iVS3D v2.0.9
Loading...
Searching...
No Matches
mainwindow.h
1#ifndef MAINWINDOW_H
2#define MAINWINDOW_H
3
11#include <QMainWindow>
12#include <QSplitter>
13#include <QTimer>
14#include <QDesktopWidget>
15#include <QLayout>
16#include <QApplication>
17#include <QSplitter>
18#include <QMimeData>
19#include <QDockWidget>
20#include <QFrame>
21#include <QMessageBox>
22
23#include "view/videoplayer.h"
24#include "view/timeline.h"
25#include "view/infowidget.h"
26#include "view/samplingwidget.h"
27#include "view/automaticwidget.h"
28#include "view/outputwidget.h"
29#include "view/helpdialog.h"
30#include "view/about.h"
31#include "view/darkstyle/DarkStyle.h"
32
33#include "operationstack.h"
34#include "stringcontainer.h"
35
36#define UI_LAYOUT_VERSION "1.1.0"
37
38//for debug
39#include <opencv2/core.hpp>
40#include <QDebug>
41
42QT_BEGIN_NAMESPACE
43namespace Ui { class MainWindow; }
44QT_END_NAMESPACE
45
60class MainWindow : public QMainWindow
61{
62 Q_OBJECT
63
64public:
85 QWidget *parent = nullptr,
86 ColorTheme theme = ColorTheme::LIGHT,
87 int cuda = -1, bool createLog = false,
88 bool interpolateMetaData = true,
89 QList<QLocale> locales = {QLocale(QLocale::English), QLocale(QLocale::German)},
90 QLocale selectedLocale = QLocale::system(),
91 QWidget *otsWidget = nullptr);
92
102 void showProjectTitle(const QString &title = tr("not saved"));
144 void enableSaveProject(bool status);
150 void enableOpenMetaData(bool status);
156 void enableUndo(bool status);
162 void enableRedo(bool status);
168 void enableTools(bool status);
169
170 void addOtsWindow(QWidget *otsWidget);
171
172 void addSettingsAction(QAction *action);
173
174 void enableInputButtons(bool status);
175
176 void enableExportPath(bool status);
177
178 bool getInputEnabled();
179
180 void setColorTheme(ColorTheme theme);
181
188
189
190
191signals:
229 void sig_openVideoDragAndDrop(QString filePath);
235 void sig_changeLayoutStyle(bool horizontal);
244 void sig_changeUseCuda(bool useCuda);
249 void sig_changeCreateLogFile(bool createLog);
250
255 void sig_changeInterpolateMetaData(bool interpolate);
256
257 void sig_undo();
258
259 void sig_redo();
260
261 void sig_resetBoundaries();
262
263 void sig_deleteAllKeyframes();
264
265 void sig_deleteKeyframesBoundaries();
266
267 void sig_toggleKeyframe();
268
269 void sig_quit();
270
271 void sig_selectLanguage(QLocale locale);
272
273 void sig_restart();
274
275
276public slots:
281 void slot_displayStatusMessage(QString message);
282
283
284private slots:
285 void on_actionOpen_Project_triggered();
286 void on_actionSave_Project_triggered();
287 void on_actionSave_Project_As_triggered();
288 void on_actionOpen_Input_triggered();
289 void on_actionSet_Reconstructiontool_Path_triggered();
290 void on_actionSet_Input_Path_triggered();
291 void on_actionInfo_triggered();
292 void on_actionOpen_Input_Video_triggered();
293 void on_actionHelp_triggered();
294 void on_actionToggleTheme_triggered();
295 void on_actionUse_CUDA_triggered();
296 void on_actionLicence_triggered();
297 void on_actionCreate_log_file_triggered();
298 void on_actionOpen_Meta_Data_triggered();
299 void on_actionInterpolate_missing_meta_data_triggered();
300
301 void on_actionUndo_triggered();
302
303 void on_actionRedo_triggered();
304
305 void on_actionReset_Boundaries_triggered();
306
307 void on_actionDelete_All_Keyframes_triggered();
308
309 void on_actionDelete_Keyframes_triggered();
310 void on_changeLanguage();
311
312private:
313 QFrame *addFrame(QWidget *w);
314
315 Ui::MainWindow *ui;
316 //delete this: QWidget *layout_widget;
317 VideoPlayer *m_videoplayer;
318 InfoWidget *m_inputWidget;
319 SamplingWidget *m_samplingWidget;
320 OutputWidget *m_outputWidget;
321 Timeline *m_timeline;
322 AutomaticWidget *m_autoWidget;
323 const QString m_appName = "intelligent Video Sampler 3D";
324 std::vector<uint> generateKeyframes(uint totalFrames, uint keyframeCount);
325 void dropEvent(QDropEvent *event) override;
326 void dragEnterEvent(QDragEnterEvent *event) override;
327 void readSettings();
328 void closeEvent(QCloseEvent *event) override;
329 QDockWidget *m_outputDock;
330 QDockWidget *m_reconstructDock;
331};
332#endif // MAINWINDOW_H
The AutomaticWidget class is used to show the current settings of the automatic execution....
Definition automaticwidget.h:29
The InfoWidget class displays given information to the user. The information is given as key value pa...
Definition infowidget.h:33
The MainWindow class holds all major GUI-components (widgets), has status bar on the bottom left and ...
Definition mainwindow.h:61
void slot_displayStatusMessage(QString message)
slot_displayStatusMessage displays given Text in the status bar on the bottom left
Definition mainwindow.cpp:249
void sig_changeReconstructPath()
sig_changeReconstructPath "Add Reconstruct Path" in menu-bar
Timeline * getTimeline()
getOutputWidget getter for the element which is used to move through a video/image-list
Definition mainwindow.cpp:261
void sig_openProject()
sig_openProject "Open Project" in menu-bar
void enableOpenMetaData(bool status)
enableOpenMetaData enables "Open Meta Data" button in the menu-bar
Definition mainwindow.cpp:295
void enableRedo(bool status)
enableRedo enables "redo" button in the menu-bar
Definition mainwindow.cpp:306
void enableSaveProject(bool status)
enableSaveProject enables "Save project" button in the menu-bar
Definition mainwindow.cpp:289
SamplingWidget * getSamplingWidget()
getSamplingWidget getter for the element which is the ui for every algorithm
Definition mainwindow.cpp:283
void sig_changeCreateLogFile(bool createLog)
sig_changeCreateLogFile is emitted if the createLogFile option is toggled
void sig_changeInterpolateMetaData(bool interpolate)
sig_changeInterpolateMetaData is emitted if the interpolate meta data option is toggled
OperationStack * getOpStack()
getOpStack returns the OperationStack displayed on the InfoWidget
Definition mainwindow.cpp:385
void sig_saveProject()
sig_saveProject "Save Project" in menu-bar
void sig_openVideoDragAndDrop(QString filePath)
sig_openVideoDragAndDrop emitted by drag&drop event When a drag&drop event occurs this signal is used...
void sig_openInputVideo()
sig_openInputVideo "Open Input Video" in menu-bar
void sig_changeLayoutStyle(bool horizontal)
sig_changeLayoutStyle "Change layout style" in menu-bar
AutomaticWidget * getAutoWidget()
getAutoWidget getter for the element which displays the automatic sampling
Definition mainwindow.cpp:271
OutputWidget * getOutputWidget()
getOutputWidget getter for the element which displays export and output data
Definition mainwindow.cpp:266
VideoPlayer * getVideoPlayer()
getVideoPlayer getter for the element which lets the user interact with the displayed video/images
Definition mainwindow.cpp:255
void sig_openMetaData()
sig_openMetaData "Open Meta Data" in menu-bar
InfoWidget * getInputWidget()
getInputWidget getter for the widget which displays all input data
Definition mainwindow.cpp:277
void sig_openInputFolder()
sig_openInputFolder "Open Input Folder" in menu-bar
void sig_changeDefaultInputPath()
sig_changeDefaultInputPath "Change default input path" in menu-bar
void sig_changeUseCuda(bool useCuda)
sig_changeUseCuda is emitted if the useCuda option is toggled
void enableUndo(bool status)
enableUndo enables "undo" button in the menu-bar
Definition mainwindow.cpp:301
void showProjectTitle(const QString &title=tr("not saved"))
showProjectTitle used to show loaded project in the titlebar of the main-window
Definition mainwindow.cpp:244
void sig_toggleTheme()
sig_toggleTheme "Toggle theme" in menu-bar
void enableTools(bool status)
enableTools enables tool buttons in the menu-bar
Definition mainwindow.cpp:311
~MainWindow()
delete members and disconnect connections
Definition mainwindow.cpp:206
void sig_saveProjectAs()
sig_saveProjectAs "Save Project As" in menu-bar
Definition operationstack.h:13
The OutputWidget class is responsible for controlling the Widget on the bottom right holding export d...
Definition outputwidget.h:26
The SamplingWidget class is a graphical user interface to select and edit sampling algorithms and tra...
Definition samplingwidget.h:40
The Timeline class is the class wich coordinates and manages all timeline events and elements.
Definition timeline.h:30
The VideoPlayer class provides a view to display images and holds buttons to interact with image sequ...
Definition videoplayer.h:50