iVS3D v2.0.0
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 "automaticexecutor.h"
15#include "automaticexecsettings.h"
16#include "stackcontroller.h"
17
18#include "view/mainwindow.h"
19#include "view/progressdialog.h"
20#include "view/reconstructiontoolsdialog.h"
21
22#include "controller/exportcontroller.h"
23#include "controller/algorithmcontroller.h"
24#include "controller/videoplayercontroller.h"
25#include "controller/automaticcontroller.h"
26
27#include "colmapwrapper.h"
28
29#include "plugin/algorithmmanager.h"
30#include "plugin/transformmanager.h"
31
32#include <QObject>
33#include <QWidget>
34#include <QFileDialog>
35#include <QDialog>
36#include <QMessageBox>
37#include <QElapsedTimer>
38
39
56class Controller: public QObject
57{
58 Q_OBJECT
59public:
63 Controller(QString inputPath, QString settingsPath, QString outputPath, QString logPath);
65public slots:
80 void slot_openDragAndDrop(QString filePath);
85 void slot_openProject();
90 void slot_saveProjectAs();
96 void slot_saveProject();
114 void slot_changeColorTheme(ColorTheme theme);
119 void slot_changeUseCuda(bool useCuda);
124 void slot_changeCreateLogFile(bool createLog);
129 void slot_changeInterpolateMetaData(bool interpolate);
133 void slot_openMetaData();
134
135signals:
141 void sig_hasStatusMessage(QString message);
142
147 void sig_colorThemeChanged(ColorTheme theme);
148
149private slots:
150 void slot_openFinished(int result);
151 void slot_exportStarted();
152 void slot_exportFinished();
153 void slot_undo();
154 void slot_redo();
155 void slot_historyChanged();
156 void slot_selectLanguage(QLocale language);
157 void slot_restart();
158 void slot_workingResolutionChanged(QString resolution);
159 void slot_editCrop();
160 void slot_useCropChanged(int checkstate);
161 void slot_altitudeChanged(double altitude);
162
163private:
164 VideoPlayerController *m_videoPlayerController;
165 AlgorithmController* m_algorithmController;
166 ExportController *m_exportController;
167 AutomaticController* m_automaticController;
168 StackController *m_stackController;
169 MainWindow* m_mainWindow;
170 DataManager* m_dataManager;
171 OpenExecutor *m_openExec;
172 ProgressDialog *m_inputProgressDialog = nullptr;
173 lib3d::ots::ColmapWrapper *m_colmapWrapper;
174 QAction *m_colmapWrapperSettingsAction;
175 QPushButton *m_newProductPushButton;
176 bool m_exporting = false;
177 //Prevents multiple drag and drops at the same time
178 bool m_isImporting = false;
179
180
181 void createOpenMessage(int numPics);
182 QString getNameFromPath(QString path, QString dataFormat);
187 void onSuccessfulOpen();
188 void setInputWidgetInfo();
189 void displayPluginSettings();
190 void onFailedOpen();
191 uint loadMetaDataFromPath(QString path);
192 bool loadInputDataFromPath(QString path);
193 void setAltitude();
194 // plugin runtime
195 QElapsedTimer m_timer;
196
197
198};
199
200#endif // CONTROLLER_H
The AlgorithmController class is responsible for controlling the user input regarding algorithm selec...
Definition algorithmcontroller.h:40
The AutomaticController class is responsible for controlling the automatic execution.
Definition automaticcontroller.h:27
The Controller class is the main controller and the starting point of iVS3D. Its responsible for init...
Definition controller.h:57
void slot_changeDefaultInputPath()
slot_changeDefaultInputPath Slot is called when 'Set input Path' is clicked. It will show a file dial...
Definition controller.cpp:255
void onSuccessfulOpen()
onSuccessfulOpen is called if a new import was successfully opend
Definition controller.cpp:680
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:221
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:150
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:238
void slot_changeColorTheme(ColorTheme theme)
slot_changeColorTheme Slot is called when a specific color theme is selected.
Definition controller.cpp:284
void slot_toggleColorTheme()
slot_toggleColorTheme Slot is called when color theme is changed by the user. Toggles between differe...
Definition controller.cpp:267
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:168
void slot_addReconstructPath()
slot_addReconstructPath Slot is called when 'Manage reconstrution tools' is clicked....
Definition controller.cpp:248
void slot_openMetaData()
slot_openMetaData Slot is called when Meta Data should be loaded
Definition controller.cpp:315
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:203
void slot_changeUseCuda(bool useCuda)
slot_changeUseCuda Slot is called when 'CUDA' is clicked.
Definition controller.cpp:290
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:132
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:299
void slot_changeInterpolateMetaData(bool interpolate)
slot_changeInterpolateMetaData Slot is called when 'Interpolate missing meta data' is clicked.
Definition controller.cpp:307
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:48
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
The ProgressDialog class is the ui dialog holding the progress bar and abort/cancel button.
Definition progressdialog.h:22
Definition stackcontroller.h:12
The VideoPlayerController class manages visualization of image data and manual changes to keyframes.
Definition videoplayercontroller.h:43
Wrapperclass for integration of COLMAP.
Definition colmapwrapper.h:53