iVS3D v2.0.0
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:
87 QWidget *parent = nullptr,
88 ColorTheme theme = ColorTheme::LIGHT,
89 int cuda = -1, bool createLog = false,
90 bool interpolateMetaData = true,
91 QList<QLocale> locales = {QLocale(QLocale::English), QLocale(QLocale::German)},
92 QLocale selectedLocale = QLocale::system(),
93 QStringList algorithmList = QStringList(tr("no algorithm")),
94 QStringList transformList = QStringList(""),
95 QWidget *otsWidget = nullptr);
96
100 ~MainWindow();
106 void showProjectTitle(const QString &title = tr("not saved"));
148 void enableSaveProject(bool status);
154 void enableOpenMetaData(bool status);
160 void enableUndo(bool status);
166 void enableRedo(bool status);
172 void enableTools(bool status);
173
174 void addOtsWindow(QWidget *otsWidget);
175
176 void addSettingsAction(QAction *action);
177
178 void enableInputButtons(bool status);
179
180 void enableExportPath(bool status);
181
182 bool getInputEnabled();
183
184 void setColorTheme(ColorTheme theme);
185
192
193
194
195signals:
233 void sig_openVideoDragAndDrop(QString filePath);
239 void sig_changeLayoutStyle(bool horizontal);
248 void sig_changeUseCuda(bool useCuda);
253 void sig_changeCreateLogFile(bool createLog);
254
259 void sig_changeInterpolateMetaData(bool interpolate);
260
261 void sig_undo();
262
263 void sig_redo();
264
265 void sig_resetBoundaries();
266
267 void sig_deleteAllKeyframes();
268
269 void sig_deleteKeyframesBoundaries();
270
271 void sig_toggleKeyframe();
272
273 void sig_quit();
274
275 void sig_selectLanguage(QLocale locale);
276
277 void sig_restart();
278
279
280public slots:
285 void slot_displayStatusMessage(QString message);
286
287
288private slots:
289 void on_actionOpen_Project_triggered();
290 void on_actionSave_Project_triggered();
291 void on_actionSave_Project_As_triggered();
292 void on_actionOpen_Input_triggered();
293 void on_actionSet_Reconstructiontool_Path_triggered();
294 void on_actionSet_Input_Path_triggered();
295 void on_actionInfo_triggered();
296 void on_actionOpen_Input_Video_triggered();
297 void on_actionHelp_triggered();
298 void on_actionToggleTheme_triggered();
299 void on_actionUse_CUDA_triggered();
300 void on_actionLicence_triggered();
301 void on_actionCreate_log_file_triggered();
302 void on_actionOpen_Meta_Data_triggered();
303 void on_actionInterpolate_missing_meta_data_triggered();
304
305 void on_actionUndo_triggered();
306
307 void on_actionRedo_triggered();
308
309 void on_actionReset_Boundaries_triggered();
310
311 void on_actionDelete_All_Keyframes_triggered();
312
313 void on_actionDelete_Keyframes_triggered();
314 void on_changeLanguage();
315
316private:
317 QFrame *addFrame(QWidget *w);
318
319 Ui::MainWindow *ui;
320 //delete this: QWidget *layout_widget;
321 VideoPlayer *m_videoplayer;
322 InfoWidget *m_inputWidget;
323 SamplingWidget *m_samplingWidget;
324 OutputWidget *m_outputWidget;
325 Timeline *m_timeline;
326 AutomaticWidget *m_autoWidget;
327 const QString m_appName = "intelligent Video Sampler 3D";
328 std::vector<uint> generateKeyframes(uint totalFrames, uint keyframeCount);
329 void dropEvent(QDropEvent *event) override;
330 void dragEnterEvent(QDragEnterEvent *event) override;
331 void readSettings();
332 void closeEvent(QCloseEvent *event) override;
333 QDockWidget *m_outputDock;
334 QDockWidget *m_reconstructDock;
335};
336#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:37
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:49