iVS3D v2.0.9
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();
143 bool getInterpolateMetaData();
148 const QList<QLocale> getAvailableLocales();
153 QLocale getLocale();
163 bool setLocale(QLocale locale);
164
165 QString getDefaultPluginName();
166 void setDefaultPluginName(const QString& pluginName);
167
168
169
170private:
172 QMap<QString, QString> m_reconstructPath;
173 QString m_standardInputPath;
174 bool m_disableChecks;
175 ColorTheme m_colorTheme;
176 bool m_useCuda;
177 bool m_createLogs;
178 bool m_interpolateMetaData;
179 void loadSettings();
180 void saveSettings();
181 QLocale m_locale;
182 QString m_defaultPluginName;
183};
184
185
186
187#endif // APPLICATIONSETTINGS_H
The ApplicationSettings class is a singleton which saves all settings for iVS3D. These are: Paths to ...
Definition applicationsettings.h:32
void setInterpolateMetaData(bool interpolateMetaData)
setInterpolateMetaData Sets interpolateMetaData
Definition applicationsettings.cpp:52
static ApplicationSettings & instance()
Returns the singleton instance of this class.
Definition applicationsettings.cpp:101
bool removeReconstructPath(QString name)
Removes the given reconstruction software.
Definition applicationsettings.cpp:113
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:107
void setUseCuda(bool useCuda)
setUseCuda Sets use cuda boolean
Definition applicationsettings.cpp:139
QString getStandardInputPath()
Returns the standard input path.
Definition applicationsettings.cpp:155
QMap< QString, QString > getReconstructPath()
Returns all saved reconstruction softwares.
Definition applicationsettings.cpp:151
void setColorTheme(ColorTheme theme)
Sets the darkstyle.
Definition applicationsettings.cpp:132
bool getDisableChecks()
Returns wether sanity checks in ots product configuration are disabled.
Definition applicationsettings.cpp:159
ColorTheme getColorTheme()
Returns which darkstyle is saved in the settings file.
Definition applicationsettings.cpp:164
void setCreateLogs(bool createLogs)
setCreateLogs Sets createLogs
Definition applicationsettings.cpp:145
bool getUseCuda()
Returns if use CUDA is enabled.
Definition applicationsettings.cpp:169
void setStandardInputPath(const QString &standardInput)
Saves the standard input path.
Definition applicationsettings.cpp:120
void setDisableChecks(bool disableChecks)
Disable sanity checks for ots product configuration.
Definition applicationsettings.cpp:126