iVS3D v2.0.0
Loading...
Searching...
No Matches
applicationsettings.h
1#ifndef APPLICATIONSETTINGS_H
2#define APPLICATIONSETTINGS_H
3
4#include "stringcontainer.h"
5#include "cvmat_qmetadata.h"
6#include <QObject>
7#include <QMap>
8#include <QVariant>
9#include <QSettings>
10#include <QDebug>
11#include <QLocale>
12
13#include "opencv2/core.hpp"
14#ifdef WITH_CUDA
15#include "opencv2/core/cuda.hpp"
16#endif
17
32{
33public:
46 void addReconstructPath(QString name, QString path);
52 bool removeReconstructPath(QString name);
58 void setStandardInputPath(const QString &standardInput);
64 void setDisableChecks(bool disableChecks);
70 void setColorTheme(ColorTheme theme);
75 void setUseCuda(bool useCuda);
80 void setCreateLogs(bool createLogs);
85 void setInterpolateMetaData(bool interpolateMetaData);
86
92 QMap<QString, QString> getReconstructPath();
98 QString getStandardInputPath();
104 bool getDisableChecks();
110 ColorTheme getColorTheme();
115 bool getUseCuda();
116
127
133 bool getCudaAvailable(CUDA_ERR_CODE *err_code = nullptr) const;
138 bool getCreateLogs();
148 const QList<QLocale> getAvailableLocales();
153 QLocale getLocale();
163 bool setLocale(QLocale locale);
164
165
166
167private:
169 QMap<QString, QString> m_reconstructPath;
170 QString m_standardInputPath;
171 bool m_disableChecks;
172 ColorTheme m_colorTheme;
173 bool m_useCuda;
174 bool m_createLogs;
175 bool m_interpolateMetaData;
176 void loadSettings();
177 void saveSettings();
178 QLocale m_locale;
179};
180
181
182
183#endif // APPLICATIONSETTINGS_H
The ApplicationSettings class is a singleton which saves all settings for iVS3D. These are: Paths to ...
Definition applicationsettings.h:32
bool getCreateLogs()
Returns if create Logs is enabled.
Definition applicationsettings.cpp:226
void setInterpolateMetaData(bool interpolateMetaData)
setInterpolateMetaData Sets interpolateMetaData
Definition applicationsettings.cpp:45
static ApplicationSettings & instance()
Returns the singleton instance of this class.
Definition applicationsettings.cpp:92
bool removeReconstructPath(QString name)
Removes the given reconstruction software.
Definition applicationsettings.cpp:104
CUDA_ERR_CODE
The CUDA_ERR_CODE enum has an error code if CUDA is not available.
Definition applicationsettings.h:120
@ NO_GPU_FOUND
indicates that cuda is available
Definition applicationsettings.h:122
@ UNKNOWN_ERR
iVS3D was compiled without CUDA
Definition applicationsettings.h:125
@ BUILT_WITHOUT_CUDA
Compute Capability of the GPU is not supported by the build.
Definition applicationsettings.h:124
@ CC_MISSMATCH
no GPU was detected
Definition applicationsettings.h:123
void addReconstructPath(QString name, QString path)
Saves an reconstruction software.
Definition applicationsettings.cpp:98
bool getCudaAvailable(CUDA_ERR_CODE *err_code=nullptr) const
Returns if the opencv backend supports CUDA.
Definition applicationsettings.cpp:165
void setUseCuda(bool useCuda)
setUseCuda Sets use cuda boolean
Definition applicationsettings.cpp:130
QString getStandardInputPath()
Returns the standard input path.
Definition applicationsettings.cpp:146
QMap< QString, QString > getReconstructPath()
Returns all saved reconstruction softwares.
Definition applicationsettings.cpp:142
QLocale getLocale()
Returns the currently selected locale.
Definition applicationsettings.cpp:30
const QList< QLocale > getAvailableLocales()
Returns a list of available locales for translating the application.
Definition applicationsettings.cpp:23
void setColorTheme(ColorTheme theme)
Sets the darkstyle.
Definition applicationsettings.cpp:123
bool getDisableChecks()
Returns wether sanity checks in ots product configuration are disabled.
Definition applicationsettings.cpp:150
ColorTheme getColorTheme()
Returns which darkstyle is saved in the settings file.
Definition applicationsettings.cpp:155
void setCreateLogs(bool createLogs)
setCreateLogs Sets createLogs
Definition applicationsettings.cpp:136
bool getUseCuda()
Returns if use CUDA is enabled.
Definition applicationsettings.cpp:160
bool setLocale(QLocale locale)
setLocale selects a locale for translation. The local has to be supported by the application....
Definition applicationsettings.cpp:35
void setStandardInputPath(const QString &standardInput)
Saves the standard input path.
Definition applicationsettings.cpp:111
bool getInterpolateMetaData()
Returns if interpolate meta data is enabled.
Definition applicationsettings.cpp:18
void setDisableChecks(bool disableChecks)
Disable sanity checks for ots product configuration.
Definition applicationsettings.cpp:117