MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / readSettings

Method readSettings

ImagePlay/src/MainWindow.cpp:198–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198void MainWindow::readSettings()
199{
200 // properties
201 _settings = new QSettings("BFH", "ImagePlay");
202 _useOpenCV = _settings->value("OpenCV", true).toBool();
203 _autosaveEnabled = _settings->value("AutoSave", true).toBool();
204 _defaultImagePath = _settings->value("DefaultImagePath", "").toString();
205 _logFileEnabled = _settings->value("LogFile", false).toBool();
206
207#ifdef Q_OS_LINUX
208 _processIconPath = _settings->value("ProcessIconPath", QString(LINUX_PATH_PREFIX) + "process_icons/").toString();
209 _pluginPath = _settings->value("PluginPath", QString(LINUX_PATH_PREFIX) + "plugins/").toString();
210 _pluginDevPath = _settings->value("PluginDevPath", QString(LINUX_PATH_PREFIX) + "plugin_development/").toString();
211#else
212 _processIconPath = _settings->value("ProcessIconPath", QCoreApplication::applicationDirPath() + QString("/process_icons/")).toString();
213 _pluginPath = _settings->value("PluginPath", QCoreApplication::applicationDirPath() + QString("/plugins/")).toString();
214 _pluginDevPath = _settings->value("PluginDevPath", QCoreApplication::applicationDirPath() + QString("/plugin_development/")).toString();
215#endif
216
217 bool showLog = _settings->value("showLog", false).toBool();
218 ui->dockLog->setVisible(showLog);
219 ui->actionShowLog->setChecked(showLog);
220
221 bool alwaysOnTop = _settings->value("alwaysOnTop", true).toBool();
222 ui->actionImage_Viewer_always_on_top->setChecked(alwaysOnTop);
223 on_actionImage_Viewer_always_on_top_triggered(alwaysOnTop);
224
225 _synchronizeViews = _settings->value("synchronizeViews", true).toBool();
226 ui->actionSynchronizeViews->setChecked(_synchronizeViews);
227
228 bool showThumbnails = _settings->value("showThumbnails", false).toBool();
229 ui->actionShowThumbnails->setChecked(showThumbnails);
230 _scene->setShowThumbnails(showThumbnails);
231
232 _settings->beginGroup("MainWindow");
233 if(_settings->value("isMaximized", false).toBool())
234 {
235 showMaximized();
236 }
237 else
238 {
239 resize(_settings->value("size", QSize(1080, 700)).toSize());
240 move(_settings->value("pos", QPoint(100, 100)).toPoint());
241 }
242 _settings->endGroup();
243
244
245 _settings->beginGroup("ImageViewerWindow");
246 _imageViewer->resize(_settings->value("size", QSize(800, 600)).toSize());
247 _imageViewer->move(_settings->value("pos", QPoint(100, 100)).toPoint());
248 _imageViewer->setZoomWidgetMode(_settings->value("zoomWidgetMode", 0).toInt());
249 _settings->endGroup();
250
251 ui->actionUseOpenCV->setChecked(_useOpenCV);
252
253 // tutorial
254 if(!_settings->value("IgnoreTutorial", 0).toInt())
255 {

Callers

nothing calls this directly

Calls 10

setShowThumbnailsMethod · 0.80
toPointMethod · 0.80
setZoomWidgetModeMethod · 0.80
containsMethod · 0.80
removeMethod · 0.80
valueMethod · 0.45
toStringMethod · 0.45
resizeMethod · 0.45
moveMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected