iVS3D v2.0.0
Loading...
Searching...
No Matches
MainWindow Class Reference

The MainWindow class holds all major GUI-components (widgets), has status bar on the bottom left and menu bar on the top left. GUI-components: VideoPlayer, Timeline, Input(-Widget), Sampling(-Widget) and Output(-Widget). the status bar is used by nearly all classes to easily display status or other vital information to the user. the menu bar holds many buttons to open inputs, open and save projects, change various settings and display about-information. More...

#include <mainwindow.h>

Inheritance diagram for MainWindow:

Public Slots

void slot_displayStatusMessage (QString message)
 slot_displayStatusMessage displays given Text in the status bar on the bottom left
 

Signals

void sig_openProject ()
 sig_openProject "Open Project" in menu-bar
 
void sig_saveProject ()
 sig_saveProject "Save Project" in menu-bar
 
void sig_saveProjectAs ()
 sig_saveProjectAs "Save Project As" in menu-bar
 
void sig_openInputFolder ()
 sig_openInputFolder "Open Input Folder" in menu-bar
 
void sig_openInputVideo ()
 sig_openInputVideo "Open Input Video" in menu-bar
 
void sig_openMetaData ()
 sig_openMetaData "Open Meta Data" in menu-bar
 
void sig_changeDefaultInputPath ()
 sig_changeDefaultInputPath "Change default input path" in menu-bar
 
void sig_changeReconstructPath ()
 sig_changeReconstructPath "Add Reconstruct Path" 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 to initiate opening the dropped filepath as input/project
 
void sig_changeLayoutStyle (bool horizontal)
 sig_changeLayoutStyle "Change layout style" in menu-bar
 
void sig_toggleTheme ()
 sig_toggleTheme "Toggle theme" in menu-bar
 
void sig_changeUseCuda (bool useCuda)
 sig_changeUseCuda is emitted if the useCuda option is toggled
 
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
 

Public Member Functions

 MainWindow (QWidget *parent=nullptr, ColorTheme theme=ColorTheme::LIGHT, int cuda=-1, bool createLog=false, bool interpolateMetaData=true, QList< QLocale > locales={QLocale(QLocale::English), QLocale(QLocale::German)}, QLocale selectedLocale=QLocale::system(), QStringList algorithmList=QStringList(tr("no algorithm")), QStringList transformList=QStringList(""), QWidget *otsWidget=nullptr)
 MainWindow sets up all UI elements on the main-window, connects signals&slots for the various widgets.
 
 ~MainWindow ()
 delete members and disconnect connections
 
void showProjectTitle (const QString &title=tr("not saved"))
 showProjectTitle used to show loaded project in the titlebar of the main-window
 
InfoWidgetgetInputWidget ()
 getInputWidget getter for the widget which displays all input data
 
VideoPlayergetVideoPlayer ()
 getVideoPlayer getter for the element which lets the user interact with the displayed video/images
 
SamplingWidgetgetSamplingWidget ()
 getSamplingWidget getter for the element which is the ui for every algorithm
 
TimelinegetTimeline ()
 getOutputWidget getter for the element which is used to move through a video/image-list
 
OutputWidgetgetOutputWidget ()
 getOutputWidget getter for the element which displays export and output data
 
AutomaticWidgetgetAutoWidget ()
 getAutoWidget getter for the element which displays the automatic sampling
 
void enableSaveProject (bool status)
 enableSaveProject enables "Save project" button in the menu-bar
 
void enableOpenMetaData (bool status)
 enableOpenMetaData enables "Open Meta Data" button in the menu-bar
 
void enableUndo (bool status)
 enableUndo enables "undo" button in the menu-bar
 
void enableRedo (bool status)
 enableRedo enables "redo" button in the menu-bar
 
void enableTools (bool status)
 enableTools enables tool buttons in the menu-bar
 
OperationStackgetOpStack ()
 getOpStack returns the OperationStack displayed on the InfoWidget
 

Detailed Description

The MainWindow class holds all major GUI-components (widgets), has status bar on the bottom left and menu bar on the top left. GUI-components: VideoPlayer, Timeline, Input(-Widget), Sampling(-Widget) and Output(-Widget). the status bar is used by nearly all classes to easily display status or other vital information to the user. the menu bar holds many buttons to open inputs, open and save projects, change various settings and display about-information.

Author
Lennart Ruck
Date
2021/02/08

Constructor & Destructor Documentation

◆ MainWindow()

MainWindow::MainWindow ( QWidget *  parent = nullptr,
ColorTheme  theme = ColorTheme::LIGHT,
int  cuda = -1,
bool  createLog = false,
bool  interpolateMetaData = true,
QList< QLocale >  locales = {QLocale(QLocale::English), QLocale(QLocale::German)},
QLocale  selectedLocale = QLocale::system(),
QStringList  algorithmList = QStringList(tr("no algorithm")),
QStringList  transformList = QStringList(""),
QWidget *  otsWidget = nullptr 
)

MainWindow sets up all UI elements on the main-window, connects signals&slots for the various widgets.

Parameters
parentgui-parent (here it is a nullptr)
darktrue if darkmode enabled
cuda-1..-4 if cuda is not available, 0 if disabled, 1 if enabled
horizontaltrue if horizontal layout, vertical otherwise
algorithmListholds identifier(names) of all loaded plugins(algorithms)
transformListholds identifier(names) of all loaded transform plugins

The following error codes can be supplied vie the cuda parameter: -1 No GPU found -2 Compute Capability missmatch -3 Built without cuda -4 Unknown error

In these cases, the use-cuda setting is disabled for the user. Otherwise, the user can toggle cuda off and on, the initial state is provided by the cuda parameter as well: 0 Disabled 1 enabled

Member Function Documentation

◆ enableOpenMetaData()

void MainWindow::enableOpenMetaData ( bool  status)

enableOpenMetaData enables "Open Meta Data" button in the menu-bar

Parameters
statustrue = enable

◆ enableRedo()

void MainWindow::enableRedo ( bool  status)

enableRedo enables "redo" button in the menu-bar

Parameters
statustrue = enable

◆ enableSaveProject()

void MainWindow::enableSaveProject ( bool  status)

enableSaveProject enables "Save project" button in the menu-bar

Parameters
statustrue = enable

◆ enableTools()

void MainWindow::enableTools ( bool  status)

enableTools enables tool buttons in the menu-bar

Parameters
statustrue = enable

◆ enableUndo()

void MainWindow::enableUndo ( bool  status)

enableUndo enables "undo" button in the menu-bar

Parameters
statustrue = enable

◆ getAutoWidget()

AutomaticWidget * MainWindow::getAutoWidget ( )

getAutoWidget getter for the element which displays the automatic sampling

Returns
Pointer to the AutomaticWidget

◆ getInputWidget()

InfoWidget * MainWindow::getInputWidget ( )

getInputWidget getter for the widget which displays all input data

Returns
Pointer to an Infowidget which displays all input data

◆ getOpStack()

OperationStack * MainWindow::getOpStack ( )

getOpStack returns the OperationStack displayed on the InfoWidget

Returns
Pointer to the current OperationStack

◆ getOutputWidget()

OutputWidget * MainWindow::getOutputWidget ( )

getOutputWidget getter for the element which displays export and output data

Returns
Pointer to the OutputWidget

◆ getSamplingWidget()

SamplingWidget * MainWindow::getSamplingWidget ( )

getSamplingWidget getter for the element which is the ui for every algorithm

Returns
Pointer to the SamplingWidget

◆ getTimeline()

Timeline * MainWindow::getTimeline ( )

getOutputWidget getter for the element which is used to move through a video/image-list

Returns
Pointer to the Timeline

◆ getVideoPlayer()

VideoPlayer * MainWindow::getVideoPlayer ( )

getVideoPlayer getter for the element which lets the user interact with the displayed video/images

Returns
Pointer to the Videoplayer

◆ showProjectTitle()

void MainWindow::showProjectTitle ( const QString &  title = tr("not saved"))

showProjectTitle used to show loaded project in the titlebar of the main-window

Parameters
titleproject file path or default "not saved"

◆ sig_changeCreateLogFile

void MainWindow::sig_changeCreateLogFile ( bool  createLog)
signal

sig_changeCreateLogFile is emitted if the createLogFile option is toggled

Parameters
createLogtrue if createLogFile is enabled

◆ sig_changeInterpolateMetaData

void MainWindow::sig_changeInterpolateMetaData ( bool  interpolate)
signal

sig_changeInterpolateMetaData is emitted if the interpolate meta data option is toggled

Parameters
interpolatetrue if interpolate is enabled

◆ sig_changeLayoutStyle

void MainWindow::sig_changeLayoutStyle ( bool  horizontal)
signal

sig_changeLayoutStyle "Change layout style" in menu-bar

Parameters
horizontallayout is in horizontal mode

◆ sig_changeUseCuda

void MainWindow::sig_changeUseCuda ( bool  useCuda)
signal

sig_changeUseCuda is emitted if the useCuda option is toggled

Parameters
useCudatrue if cuda is enabled

◆ sig_openVideoDragAndDrop

void MainWindow::sig_openVideoDragAndDrop ( QString  filePath)
signal

sig_openVideoDragAndDrop emitted by drag&drop event When a drag&drop event occurs this signal is used to initiate opening the dropped filepath as input/project

Parameters
filePathpath dropped by the drag&drop event

◆ slot_displayStatusMessage

void MainWindow::slot_displayStatusMessage ( QString  message)
slot

slot_displayStatusMessage displays given Text in the status bar on the bottom left

Parameters
messagetext to display

The documentation for this class was generated from the following files: