iVS3D v2.0.9
Loading...
Searching...
No Matches
controller.h
1#ifndef CONTROLLER_H
2#define CONTROLLER_H
3
11#include "DataManager.h"
12#include "openexecutor.h"
13#include "applicationsettings.h"
14#include "stackcontroller.h"
15
16#include "view/mainwindow.h"
17#include "view/progressdialog.h"
18#include "view/reconstructiontoolsdialog.h"
19
20#include "controller/exportcontroller.h"
21#include "controller/videoplayercontroller.h"
22
23#include "colmapwrapper.h"
24
25#include "pluginmanager.h"
26#include "plugincontroller.h"
27#include "pluginthread.h"
28
29#include <QObject>
30#include <QWidget>
31#include <QFileDialog>
32#include <QDialog>
33#include <QMessageBox>
34#include <QElapsedTimer>
35
36
53class Controller: public QObject
54{
55 Q_OBJECT
56public:
60 Controller(QString inputPath, QString settingsPath, QString outputPath, QString logPath);
62public slots:
77 void slot_openDragAndDrop(QString filePath);
82 void slot_openProject();
87 void slot_saveProjectAs();
93 void slot_saveProject();
111 void slot_changeColorTheme(ColorTheme theme);
116 void slot_changeUseCuda(bool useCuda);
121 void slot_changeCreateLogFile(bool createLog);
126 void slot_changeInterpolateMetaData(bool interpolate);
130 void slot_openMetaData();
131
132signals:
138 void sig_hasStatusMessage(QString message);
139
144 void sig_colorThemeChanged(ColorTheme theme);
145
146private slots:
147 void slot_openFinished(int result);
148 void slot_exportStarted();
149 void slot_exportFinished();
150 void slot_undo();
151 void slot_redo();
152 void slot_historyChanged();
153 void slot_selectLanguage(QLocale language);
154 void slot_restart();
155 void slot_workingResolutionChanged(QString resolution);
156 void slot_editCrop();
157 void slot_useCropChanged(int checkstate);
158 void slot_altitudeChanged(double altitude);
159 void slot_restorePluginSettings(int recordId);
160
161private:
162 VideoPlayerController *m_videoPlayerController;
163 PluginController* m_pluginController;
164 ExportController *m_exportController;
165 StackController *m_stackController;
166 MainWindow* m_mainWindow;
167 DataManager* m_dataManager;
168 OpenExecutor *m_openExec;
169 ProgressDialog *m_inputProgressDialog = nullptr;
170 lib3d::ots::ColmapWrapper *m_colmapWrapper;
171 QAction *m_colmapWrapperSettingsAction;
172 QPushButton *m_newProductPushButton;
173 bool m_exporting = false;
174 //Prevents multiple drag and drops at the same time
175 bool m_isImporting = false;
176
177
178 void createOpenMessage(int numPics);
179 QString getNameFromPath(QString path, QString dataFormat);
184 void onSuccessfulOpen();
185 void setInputWidgetInfo();
186 void onFailedOpen();
187 uint loadMetaDataFromPath(QString path);
188 bool loadInputDataFromPath(QString path);
189 void setAltitude();
190 void loadPluginSettingsWidgets();
191 // plugin runtime
192 QElapsedTimer m_timer;
193
194 std::shared_ptr<MaskStack> m_stack;
195 std::shared_ptr<PluginThread> m_pluginThread;
196
197};
198
199#endif // CONTROLLER_H
The Controller class is the main controller and the starting point of iVS3D. Its responsible for init...
Definition controller.h:54
void slot_changeDefaultInputPath()
slot_changeDefaultInputPath Slot is called when 'Set input Path' is clicked. It will show a file dial...
Definition controller.cpp:281
void onSuccessfulOpen()
onSuccessfulOpen is called if a new import was successfully opend
Definition controller.cpp:720
void slot_saveProjectAs()
slot_saveProjectAs Slot is called when a project should be saved to a new location It will show a fil...
Definition controller.cpp:247
void slot_openInputVideo()
slot_openInputVideo Slot is called when a video should be loaded. It will show a file dialog and use ...
Definition controller.cpp:176
void slot_saveProject()
slot_saveProject Slot is called when a project should be saved If the project is saved for the firs t...
Definition controller.cpp:264
void slot_changeColorTheme(ColorTheme theme)
slot_changeColorTheme Slot is called when a specific color theme is selected.
Definition controller.cpp:310
void slot_toggleColorTheme()
slot_toggleColorTheme Slot is called when color theme is changed by the user. Toggles between differe...
Definition controller.cpp:293
void sig_colorThemeChanged(ColorTheme theme)
[signal] sig_colorThemeChanged() is emitted when the color theme is changed.
void slot_openDragAndDrop(QString filePath)
slot_openVideoDragAndDrop Slot is called when a file is drop on the VideoPlayer. It will try to impor...
Definition controller.cpp:194
void slot_addReconstructPath()
slot_addReconstructPath Slot is called when 'Manage reconstrution tools' is clicked....
Definition controller.cpp:274
void slot_openMetaData()
slot_openMetaData Slot is called when Meta Data should be loaded
Definition controller.cpp:339
void slot_openProject()
slot_openProject Slot is called when a project should be loaded It will show a file dialog and use th...
Definition controller.cpp:229
void slot_changeUseCuda(bool useCuda)
slot_changeUseCuda Slot is called when 'CUDA' is clicked.
Definition controller.cpp:316
void slot_openInputFolder()
slot_openInputFolder Slot is called when a folder should be loaded. It will show a file dialog and us...
Definition controller.cpp:158
void sig_hasStatusMessage(QString message)
[signal] sig_hasStatusMessage() is emitted when the status message is updated.
void slot_changeCreateLogFile(bool createLog)
slot_changeUseCuda Slot is called when 'create log file' is clicked.
Definition controller.cpp:323
void slot_changeInterpolateMetaData(bool interpolate)
slot_changeInterpolateMetaData Slot is called when 'Interpolate missing meta data' is clicked.
Definition controller.cpp:331
The DataManager class is a Facade for the data holding classes in the model. It delegates most of it'...
Definition DataManager.h:29
The ExportController class is managing signals and slots for the start of an export and opening recon...
Definition exportcontroller.h:50
The MainWindow class holds all major GUI-components (widgets), has status bar on the bottom left and ...
Definition mainwindow.h:61
The OpenExecutor class tries to import files from given path. It does this in a concurrent thread and...
Definition openexecutor.h:22
Definition plugincontroller.h:15
The ProgressDialog class is the ui dialog holding the progress bar and abort/cancel button.
Definition progressdialog.h:22
Definition stackcontroller.h:13
The VideoPlayerController class manages visualization of image data and manual changes to keyframes.
Definition videoplayercontroller.h:48
Wrapperclass for integration of COLMAP.
Definition colmapwrapper.h:53