OpenWalnut
1.5.0dev
|
This class contains the main window and the layout of the widgets within the window. More...
#include <WMainWindow.h>
Public Slots | |
void | newProject () |
Slot handling the pressed new project button. More... | |
void | openLoadDialog () |
gets called when menu option or toolbar button load is activated More... | |
void | openAboutDialog () |
gets called when menu entry "About OpenWalnut" is activated More... | |
void | openAboutQtDialog () |
Gets called when menu entry "About Qt" is activated. More... | |
void | openOpenWalnutHelpDialog () |
Gets called when menu entry "OpenWalnut Help" is activated. More... | |
void | openNotImplementedDialog () |
Gets called when a menu entry that has no functionality yet is activated. More... | |
void | newRoi () |
gets called when the button new ROI is pressed More... | |
bool | projectSaveAll () |
Gets called whenever the user presses the project save button. More... | |
bool | projectSaveCameraOnly () |
Gets called by the save menu to only save the camera settings. More... | |
bool | projectSaveROIOnly () |
Gets called by the save menu to only save the ROI settings. More... | |
bool | projectSaveModuleOnly () |
Gets called by the save menu to only save the Module settings. More... | |
void | handleLogLevelUpdate (unsigned int logLevel) |
Is able to handle updates in the log-level setting. More... | |
void | handleDrop (QDropEvent *event) |
Handles the given drop. More... | |
void | switchVisibility (QWidget *who) |
Change visibility of the given widget. More... | |
Public Member Functions | |
WMainWindow (QSplashScreen *splash) | |
Constructor of the main window. More... | |
virtual | ~WMainWindow () |
Destructor. More... | |
void | setupGUI () |
Set up all widgets menus an buttons in the main window. More... | |
WQtNetworkEditor * | getNetworkEditor () |
Returns a pointer to the network editor object. More... | |
WQtControlPanel * | getControlPanel () |
Returns a pointer to the control panel object. More... | |
WIconManager * | getIconManager () |
Return icon manager. More... | |
boost::signals2::signal< void(std::vector< std::string >) > * | getLoaderSignal () |
Returns a pointer to a signal object which signals a list of filenames to load. More... | |
std::shared_ptr< WQtCustomDockWidget > | getCustomDockWidget (std::string name) |
Searches for a custom dock widget with a given name and returns it, if found. More... | |
void | closeCustomDockWidget (std::string title) |
Close one of the custom dock widget saved in the map of customDockWidgets. More... | |
void | setCompatiblesToolbar (WQtCombinerToolbar *toolbar=NULL) |
This method removes the old compatibles toolbar and sets the specified one. More... | |
WQtCombinerToolbar * | getCompatiblesToolbar () |
This method returns the a pointer to the current compatibles toolbar. More... | |
QSplashScreen * | getSplash () const |
Get the current splash screen. More... | |
void | asyncProjectLoad (std::string filename) |
Loads a given project asynchronously. More... | |
void | addGlobalMenu (QWidget *widget) |
Add the default OW menu to the given widget using addAction. More... | |
void | reportError (QWidget *parent, QString title, QString message) |
Allows comfortable error reporting using popups. More... | |
void | reportWarning (QWidget *parent, QString title, QString message) |
Allows comfortable warning reporting using popups. More... | |
void | reportInfo (QWidget *parent, QString title, QString message) |
Allows comfortable info reporting using popups. More... | |
const WQtMessageDock * | getMessageDock () const |
Return the message dock widget. More... | |
WQtMessageDock * | getMessageDock () |
Return the message dock widget. More... | |
void | registerCustomWidget (WUIQtWidgetBase *widget) |
Register a custom widget. More... | |
void | deregisterCustomWidget (WUIQtWidgetBase *widget) |
De-register a custom widget. More... | |
Qt::DockWidgetArea | getDefaultCustomDockArea () const |
The default dock area to use for adding custom docks. More... | |
QMainWindow * | getDefaultCustomDockAreaWidget () const |
The Widget to add custom docks. More... | |
Static Public Member Functions | |
static QSettings & | getSettings () |
Returns the settings object. More... | |
static void | setSetting (std::string key, std::string value) |
Set a setting specified by a key to a given value. More... | |
static bool | isDropAcceptable (const QMimeData *mimeData) |
This method checks whether a given drop event is acceptable. More... | |
Protected Member Functions | |
void | moduleSpecificSetup (std::shared_ptr< WModule > module) |
Setup the GUI by handling special modules. More... | |
void | moduleSpecificCleanup (std::shared_ptr< WModule > module) |
Cleanup the GUI by handling special modules. More... | |
virtual void | closeEvent (QCloseEvent *e) |
We want to react on close events. More... | |
virtual void | customEvent (QEvent *event) |
Handle custom events. More... | |
virtual bool | event (QEvent *event) |
Custom event dispatcher. More... | |
virtual bool | projectSave (const std::vector< std::shared_ptr< WProjectFileIO > > &writer) |
Called for each project save request. More... | |
void | dropEvent (QDropEvent *event) |
drag and drop implementation for loading files More... | |
void | dragMoveEvent (QDragMoveEvent *event) |
drag and drop implementation for loading files More... | |
void | dragEnterEvent (QDragEnterEvent *event) |
drag and drop implementation for loading files More... | |
Private Types | |
typedef std::vector< WUIQtWidgetBase * > | CustomWidgets |
Container for core/UI widgetd. More... | |
Private Slots | |
void | handleGLVendor () |
Handles some special GL vendors and shows the user a dialog. More... | |
void | handleStartMessages () |
Shows startup info messages. More... | |
void | showWelcomeDialog (bool force=true) |
Shows the welcome message. More... | |
void | closeSplash () |
Finally closes the splash screen. More... | |
Private Member Functions | |
void | closeStage1Thread () |
The actual thread function for m_closeStage1Thread. More... | |
void | closeStage2 () |
The second stage function. More... | |
void | autoAdd (std::shared_ptr< WModule > module, std::string proto, bool onlyOnce=false) |
Combine a module with a prototype only if the module is available. More... | |
void | restoreSavedState () |
Loads the window states and geometries from a file. More... | |
void | saveWindowState () |
Saves the current window states and geometries to a file. More... | |
void | slotLoadFinished (boost::filesystem::path file, std::vector< std::string > errors, std::vector< std::string > warnings) |
Called whenever a async load has finished. More... | |
Private Attributes | |
QSplashScreen * | m_splash |
The splash screen object opened on startup. More... | |
WQtCombinerToolbar * | m_currentCompatiblesToolbar |
The currently set compatibles toolbar. More... | |
WIconManager | m_iconManager |
manager to provide icons in the gui thread More... | |
QMenuBar * | m_menuBar |
The main menu bar of the GUI. More... | |
WQtToolBar * | m_permanentToolBar |
The permanent toolbar of the main window. More... | |
WQtMessageDock * | m_messageDock |
Message and log window. More... | |
QAction * | m_newAction |
the new project button More... | |
QAction * | m_loadButton |
the load button More... | |
QAction * | m_quitAction |
quit OpenWalnut More... | |
QAction * | m_saveAction |
the save menu More... | |
QMenu * | m_saveMenu |
the menu using m_saveAction More... | |
QMenu * | m_viewMenu |
view and camera control menu More... | |
QAction * | m_settingsAction |
the settings More... | |
QMenu * | m_settingsMenu |
the settings More... | |
QAction * | m_helpAction |
the help menu More... | |
QMenu * | m_helpMenu |
the help menu More... | |
WQtControlPanel * | m_controlPanel |
control panel More... | |
WQtNetworkEditor * | m_networkEditor |
network editor More... | |
WQtGLWidget * | m_mainGLWidget |
the main GL widget of the GUI More... | |
std::shared_ptr< WQtNavGLWidget > | m_navAxial |
the axial view widget GL widget of the GUI More... | |
std::shared_ptr< WQtNavGLWidget > | m_navCoronal |
the coronal view widget GL widget of the GUI More... | |
std::shared_ptr< WQtNavGLWidget > | m_navSagittal |
the sgittal view widget GL widget of the GUI More... | |
QMainWindow * | m_glDock |
the dock that is used for gl widgets More... | |
QDockWidget * | m_dummyWidget |
The dummywidget serves as spacer in the dockwidget area;. More... | |
WQtGLDockWidget * | m_mainGLDock |
the dock containing the main gl widget More... | |
bool | m_closeFirstStage |
Used to handle the two-stage close process. More... | |
bool | m_closeInProgress |
Flag whether the system is shutting down now. More... | |
WThreadedRunner::SPtr | m_closeStage1Thread |
The thread responsible for doing stage 1 stuff. More... | |
WSharedSequenceContainer< CustomWidgets > | m_customWidgets |
All registered widgets created by the core/UI api. More... | |
boost::signals2::signal< void(std::vector< std::string >) > | m_loaderSignal |
boost signal for open file dialog More... | |
WSettingAction * | m_sliderMinMaxEditSetting |
The action for allowing editing min and max of sliders. More... | |
This class contains the main window and the layout of the widgets within the window.
Definition at line 65 of file WMainWindow.h.
|
private |
Container for core/UI widgetd.
Definition at line 487 of file WMainWindow.h.
|
explicit |
Constructor of the main window.
splash | the splash screen currently show. This windows later handles its close stuff. |
Definition at line 102 of file WMainWindow.cpp.
|
virtual |
void WMainWindow::addGlobalMenu | ( | QWidget * | widget | ) |
Add the default OW menu to the given widget using addAction.
widget | the widget to add the menu to |
Definition at line 1333 of file WMainWindow.cpp.
References m_helpAction, m_loadButton, m_newAction, m_quitAction, m_saveAction, and m_settingsAction.
Referenced by WQtControlPanel::completeGuiSetup().
void WMainWindow::asyncProjectLoad | ( | std::string | filename | ) |
Loads a given project asynchronously.
filename | the file to load. |
Definition at line 773 of file WMainWindow.cpp.
References slotLoadFinished().
Referenced by WQtGui::deferredLoad(), handleDrop(), and openLoadDialog().
|
private |
Combine a module with a prototype only if the module is available.
Else, nothing happens.
module | the module to be combined. |
proto | the prototype to combine with the module. |
onlyOnce | if true, it is ensured that only one module is in the container. |
Definition at line 472 of file WMainWindow.cpp.
References WLogger::addLogMessage(), WLogger::getLogger(), and WKernel::getRunningKernel().
void WMainWindow::closeCustomDockWidget | ( | std::string | title | ) |
Close one of the custom dock widget saved in the map of customDockWidgets.
This method is thread-safe and ensures that the widget is closed in the GUI thread. NEVER call this in the GUI thread. It will block the GUI.
title | the title of the widget to close |
|
protectedvirtual |
We want to react on close events.
e | the close event. |
Definition at line 884 of file WMainWindow.cpp.
References closeStage1Thread(), m_closeFirstStage, m_closeInProgress, m_closeStage1Thread, m_mainGLDock, m_navAxial, m_navCoronal, m_navSagittal, m_splash, and saveWindowState().
|
privateslot |
Finally closes the splash screen.
Definition at line 1323 of file WMainWindow.cpp.
References m_splash.
Referenced by setupGUI().
|
private |
The actual thread function for m_closeStage1Thread.
Definition at line 851 of file WMainWindow.cpp.
References closeStage2(), WQtGui::execInGUIThreadAsync(), WKernel::finalize(), WSharedObject< T >::getReadTicket(), WKernel::getRunningKernel(), m_customWidgets, and wlog::warn().
Referenced by closeEvent().
|
private |
The second stage function.
Called by the finished closeStage1Thread function. Runs in GUI thread.
Definition at line 877 of file WMainWindow.cpp.
References m_closeFirstStage.
Referenced by closeStage1Thread().
|
protectedvirtual |
Handle custom events.
Currently only WOpenCustomDockWidgetEvent.
event | the custom event |
Definition at line 946 of file WMainWindow.cpp.
References WDeferredCallEventBase::CUSTOM_TYPE, and event().
void WMainWindow::deregisterCustomWidget | ( | WUIQtWidgetBase * | widget | ) |
De-register a custom widget.
widget | the widget. |
Definition at line 1362 of file WMainWindow.cpp.
References m_customWidgets, and WSharedSequenceContainer< S >::remove().
Referenced by WUIQtWidgetBase::closeGT().
|
protected |
drag and drop implementation for loading files
event | the event to handle |
Definition at line 1314 of file WMainWindow.cpp.
References event(), and isDropAcceptable().
|
protected |
drag and drop implementation for loading files
event | the event to handle |
Definition at line 1305 of file WMainWindow.cpp.
References event(), and isDropAcceptable().
|
protected |
drag and drop implementation for loading files
event | the event to handle |
Definition at line 1294 of file WMainWindow.cpp.
References event(), and handleDrop().
|
protectedvirtual |
Custom event dispatcher.
Gets called by QT's Event system every time an event got sent to this widget. This event handler processes several custom events, like WModuleAssocEvent.
event | the event that got transmitted. |
Definition at line 980 of file WMainWindow.cpp.
References WQtMessageDock::addLogMessage(), WLogEvent::getEntry(), WLoadFinishedEvent::getErrors(), WLoadFinishedEvent::getFilename(), WLogEntry::getLogLevel(), WModuleCrashEvent::getMessage(), WLogEntry::getMessage(), getMessageDock(), WModuleCrashEvent::getModule(), WModuleReadyEvent::getModule(), WModuleRemovedEvent::getModule(), WLogEntry::getSource(), WLoadFinishedEvent::getWarnings(), moduleSpecificCleanup(), moduleSpecificSetup(), reportError(), reportWarning(), and string_utils::toString().
Referenced by customEvent(), dragEnterEvent(), dragMoveEvent(), dropEvent(), and handleDrop().
WQtCombinerToolbar * WMainWindow::getCompatiblesToolbar | ( | ) |
This method returns the a pointer to the current compatibles toolbar.
Definition at line 572 of file WMainWindow.cpp.
References m_currentCompatiblesToolbar.
Referenced by WQtControlPanel::createCompatibleButtons(), and WQtControlPanel::selectRoiTreeItem().
WQtControlPanel * WMainWindow::getControlPanel | ( | ) |
Returns a pointer to the control panel object.
Definition at line 577 of file WMainWindow.cpp.
References m_controlPanel.
Referenced by WQtGui::getSelectedModule(), WQtNetworkEditor::selectItem(), WQtGui::slotActivateDatasetOrModuleInTree(), WQtGui::slotAddDatasetOrModuleToTree(), WQtGui::slotAddRoiToTree(), WQtGui::slotConnectionClosed(), WQtGui::slotConnectionEstablished(), WQtGui::slotRemoveDatasetOrModuleInTree(), WQtGui::slotRemoveRoiFromTree(), WQtGui::slotUpdateTextureSorter(), WQtCombinerToolbar::updateButtons(), and WQtCombinerToolbar::WQtCombinerToolbar().
std::shared_ptr< WQtCustomDockWidget > WMainWindow::getCustomDockWidget | ( | std::string | name | ) |
Searches for a custom dock widget with a given name and returns it, if found.
name | the name of the widget |
Qt::DockWidgetArea WMainWindow::getDefaultCustomDockArea | ( | ) | const |
The default dock area to use for adding custom docks.
Definition at line 1368 of file WMainWindow.cpp.
Referenced by WUIQtWidgetBase::embedContent().
QMainWindow * WMainWindow::getDefaultCustomDockAreaWidget | ( | ) | const |
The Widget to add custom docks.
Definition at line 1373 of file WMainWindow.cpp.
References m_glDock.
Referenced by WUIQtWidgetBase::embedContent().
WIconManager * WMainWindow::getIconManager | ( | ) |
Return icon manager.
Definition at line 846 of file WMainWindow.cpp.
References m_iconManager.
Referenced by WQtControlPanel::createCompatibleButtons(), WQtGui::getIconManager(), and WQtModuleConfig::WQtModuleConfig().
boost::signals2::signal< void(std::vector< std::string >) > * WMainWindow::getLoaderSignal | ( | ) |
Returns a pointer to a signal object which signals a list of filenames to load.
Definition at line 841 of file WMainWindow.cpp.
References m_loaderSignal.
Referenced by WQtGui::getLoadButtonSignal().
WQtMessageDock * WMainWindow::getMessageDock | ( | ) |
Return the message dock widget.
Definition at line 1352 of file WMainWindow.cpp.
References m_messageDock.
const WQtMessageDock * WMainWindow::getMessageDock | ( | ) | const |
Return the message dock widget.
Definition at line 1347 of file WMainWindow.cpp.
References m_messageDock.
Referenced by event().
WQtNetworkEditor * WMainWindow::getNetworkEditor | ( | ) |
Returns a pointer to the network editor object.
Definition at line 582 of file WMainWindow.cpp.
References m_networkEditor.
Referenced by WQtControlPanel::completeGuiSetup(), WQtControlPanel::createCompatibleButtons(), WQtControlPanel::deactivateModuleSelection(), WQtControlPanel::deleteModule(), WQtNetworkArrow::findNearestCompatibleInput(), WQtGui::moduleError(), WQtControlPanel::setActiveModule(), WQtGui::slotActivateDatasetOrModuleInTree(), WQtGui::slotAddDatasetOrModuleToTree(), WQtGui::slotConnectionClosed(), WQtGui::slotConnectionEstablished(), WQtGui::slotRemoveDatasetOrModuleInTree(), and WQtControlPanel::WQtControlPanel().
|
static |
Returns the settings object.
Definition at line 1170 of file WMainWindow.cpp.
References WQtGui::getSettings().
Referenced by handleGLVendor(), WQtGLDockWidget::restoreSettings(), WQtMessageDock::saveSettings(), setSetting(), showWelcomeDialog(), and WQtMessageDock::WQtMessageDock().
QSplashScreen * WMainWindow::getSplash | ( | ) | const |
Get the current splash screen.
Definition at line 1328 of file WMainWindow.cpp.
References m_splash.
|
slot |
Handles the given drop.
Use this in conjunction with isDropAcceptable.
event | the event to handle |
Definition at line 1257 of file WMainWindow.cpp.
References asyncProjectLoad(), event(), and m_loaderSignal.
Referenced by dropEvent(), and setupGUI().
|
privateslot |
Handles some special GL vendors and shows the user a dialog.
Definition at line 1185 of file WMainWindow.cpp.
References getSettings(), WQtGLWidget::getViewer(), m_mainGLWidget, WQtMessageDialog::show(), and string_utils::toLower().
Referenced by setupGUI().
|
slot |
Is able to handle updates in the log-level setting.
logLevel | the new loglevel to set |
Definition at line 1180 of file WMainWindow.cpp.
References WLogger::getLogger(), and WLogger::setDefaultLogLevel().
Referenced by setupGUI().
|
privateslot |
Shows startup info messages.
Definition at line 1251 of file WMainWindow.cpp.
References showWelcomeDialog().
Referenced by setupGUI().
|
static |
This method checks whether a given drop event is acceptable.
Several widgets in the GUI should support drag and drop. Unfortunately, not all widgets automatically push these events to the MainWindow. This is especially the case for QGraphics* based classes.
mimeData | the mime info of the dragged thing |
Definition at line 1300 of file WMainWindow.cpp.
Referenced by dragEnterEvent(), WQtNetworkScene::dragEnterEvent(), dragMoveEvent(), and WQtNetworkScene::dragMoveEvent().
|
protected |
Cleanup the GUI by handling special modules.
NavSlices for example remove several toolbar buttons.
module | the module to setup the GUI for. |
Definition at line 488 of file WMainWindow.cpp.
Referenced by event().
|
protected |
Setup the GUI by handling special modules.
NavSlices for example setup several toolbar buttons.
module | the module to setup the GUI for. |
Definition at line 493 of file WMainWindow.cpp.
Referenced by event().
|
slot |
Slot handling the pressed new project button.
Definition at line 666 of file WMainWindow.cpp.
References WDataHandler::getDataHandler(), WKernel::getRootContainer(), and WKernel::getRunningKernel().
Referenced by setupGUI().
|
slot |
gets called when the button new ROI is pressed
Definition at line 1112 of file WMainWindow.cpp.
References WQtControlPanel::getFirstRoiInSelectedBranch(), WKernel::getRoiManager(), WKernel::getRunningKernel(), WKernel::getSelectionManager(), and m_controlPanel.
Referenced by setupGUI().
|
slot |
gets called when menu entry "About OpenWalnut" is activated
Definition at line 799 of file WMainWindow.cpp.
References WPathHelper::getDocPath().
Referenced by setupGUI().
|
slot |
Gets called when menu entry "About Qt" is activated.
Definition at line 794 of file WMainWindow.cpp.
Referenced by setupGUI().
|
slot |
gets called when menu option or toolbar button load is activated
Definition at line 721 of file WMainWindow.cpp.
References asyncProjectLoad(), WKernel::getRunningKernel(), WKernel::getScriptEngine(), WQtGui::getSettings(), and m_loaderSignal.
Referenced by setupGUI().
|
slot |
Gets called when a menu entry that has no functionality yet is activated.
Definition at line 834 of file WMainWindow.cpp.
|
slot |
Gets called when menu entry "OpenWalnut Help" is activated.
Definition at line 807 of file WMainWindow.cpp.
References WPathHelper::getDocPath().
Referenced by setupGUI().
|
protectedvirtual |
Called for each project save request.
writer | the list of writers to use. |
Definition at line 587 of file WMainWindow.cpp.
References WQtGui::getSettings().
Referenced by projectSaveAll(), projectSaveCameraOnly(), projectSaveModuleOnly(), and projectSaveROIOnly().
|
slot |
Gets called whenever the user presses the project save button.
Definition at line 638 of file WMainWindow.cpp.
References projectSave().
Referenced by setupGUI().
|
slot |
Gets called by the save menu to only save the camera settings.
Definition at line 645 of file WMainWindow.cpp.
References WProjectFile::getCameraWriter(), and projectSave().
Referenced by setupGUI().
|
slot |
Gets called by the save menu to only save the Module settings.
Definition at line 659 of file WMainWindow.cpp.
References WProjectFile::getModuleWriter(), and projectSave().
Referenced by setupGUI().
|
slot |
Gets called by the save menu to only save the ROI settings.
Definition at line 652 of file WMainWindow.cpp.
References WProjectFile::getROIWriter(), and projectSave().
void WMainWindow::registerCustomWidget | ( | WUIQtWidgetBase * | widget | ) |
Register a custom widget.
This is important as the main window needs to manage the close/delete of these widgets. Only call from withing the GUI thread.
widget | the widget. |
Definition at line 1357 of file WMainWindow.cpp.
References m_customWidgets, and WSharedSequenceContainer< S >::unique_push_back().
Referenced by WUIQtWidgetBase::realizeGT().
void WMainWindow::reportError | ( | QWidget * | parent, |
QString | title, | ||
QString | message | ||
) |
Allows comfortable error reporting using popups.
parent | the parent widget for this popup |
title | the title |
message | the message |
Definition at line 959 of file WMainWindow.cpp.
References WQtMessageDock::addMessage(), m_messageDock, and WQtMessagePopup::show().
Referenced by event().
void WMainWindow::reportInfo | ( | QWidget * | parent, |
QString | title, | ||
QString | message | ||
) |
Allows comfortable info reporting using popups.
parent | the parent widget for this popup |
title | the title |
message | the message |
Definition at line 973 of file WMainWindow.cpp.
References WQtMessageDock::addMessage(), m_messageDock, and WQtMessagePopup::show().
void WMainWindow::reportWarning | ( | QWidget * | parent, |
QString | title, | ||
QString | message | ||
) |
Allows comfortable warning reporting using popups.
parent | the parent widget for this popup |
title | the title |
message | the message |
Definition at line 966 of file WMainWindow.cpp.
References WQtMessageDock::addMessage(), m_messageDock, and WQtMessagePopup::show().
Referenced by event().
|
private |
Loads the window states and geometries from a file.
Definition at line 1131 of file WMainWindow.cpp.
References WQtGui::getSettings(), wlog::info(), m_glDock, m_navAxial, m_navCoronal, and m_navSagittal.
Referenced by setupGUI().
|
private |
Saves the current window states and geometries to a file.
Definition at line 1155 of file WMainWindow.cpp.
References WQtGui::getSettings(), wlog::info(), m_glDock, m_messageDock, and WQtMessageDock::saveSettings().
Referenced by closeEvent().
void WMainWindow::setCompatiblesToolbar | ( | WQtCombinerToolbar * | toolbar = NULL | ) |
This method removes the old compatibles toolbar and sets the specified one.
toolbar | the toolbar to set. If NULL, the toolbar gets reset. |
Definition at line 535 of file WMainWindow.cpp.
References m_currentCompatiblesToolbar, and m_permanentToolBar.
Referenced by WQtControlPanel::createCompatibleButtons(), and WQtControlPanel::selectRoiTreeItem().
|
static |
Set a setting specified by a key to a given value.
Abbreviation for the lazy programmer as it ensures proper typecast of std::string to the QSettings types (QString and QVariant).
key | the key |
value | the value |
Definition at line 1175 of file WMainWindow.cpp.
References getSettings().
Referenced by WQtGLDockWidget::saveSettings().
void WMainWindow::setupGUI | ( | ) |
Set up all widgets menus an buttons in the main window.
Definition at line 132 of file WMainWindow.cpp.
References WQtToolBar::addAction(), WIconManager::addMapping(), WQtControlPanel::addSubject(), WQtDockWidget::addTitleAction(), WQtDockWidget::addTitleSeperator(), closeSplash(), WQtControlPanel::completeGuiSetup(), WSettingAction::get(), WQtControlPanel::getColormapperDock(), WQtModuleConfig::getConfigureAction(), WQtGLDockWidget::getGLWidget(), WGraphicsEngine::getGraphicsEngine(), WIconManager::getIcon(), WQtControlPanel::getModuleConfig(), WQtControlPanel::getModuleDock(), WQtControlPanel::getRoiDeleteAction(), WQtControlPanel::getRoiDock(), WKernel::getRunningKernel(), WQtToolBarBase::getStyleMenu(), WQtNetworkEditor::getView(), WQtGLWidget::getViewer(), handleDrop(), handleGLVendor(), handleLogLevelUpdate(), handleStartMessages(), wlog::info(), m_controlPanel, m_glDock, m_helpAction, m_helpMenu, m_iconManager, m_loadButton, m_mainGLDock, m_mainGLWidget, m_menuBar, m_messageDock, m_navAxial, m_navCoronal, m_navSagittal, m_networkEditor, m_newAction, m_permanentToolBar, m_quitAction, m_saveAction, m_saveMenu, m_settingsAction, m_settingsMenu, m_sliderMinMaxEditSetting, m_viewMenu, newProject(), newRoi(), openAboutDialog(), openAboutQtDialog(), openLoadDialog(), openOpenWalnutHelpDialog(), projectSaveAll(), projectSaveCameraOnly(), projectSaveModuleOnly(), restoreSavedState(), WQtGLDockWidget::restoreSettings(), WQtControlPanel::selectUpperMostEntry(), showWelcomeDialog(), and WQtControlPanel::toggleViewAction().
Referenced by WQtGui::run().
|
privateslot |
Shows the welcome message.
force | if true, the dialog is shown even if the user said "do not show again". |
Definition at line 1219 of file WMainWindow.cpp.
References WPathHelper::getDocPath(), getSettings(), and WQtMessageDialog::show().
Referenced by handleStartMessages(), and setupGUI().
|
private |
Called whenever a async load has finished.
Used by asyncProjectLoad. It might be called from outside the GUI thread.
file | the filename |
errors | the list of errors |
warnings | the list of warnings |
Definition at line 783 of file WMainWindow.cpp.
References wlog::warn().
Referenced by asyncProjectLoad().
|
slot |
Change visibility of the given widget.
Useful as there is no toggleVisibility slot in Qt.
who | the widget to switch |
Definition at line 1378 of file WMainWindow.cpp.
|
private |
Used to handle the two-stage close process.
Definition at line 462 of file WMainWindow.h.
Referenced by closeEvent(), and closeStage2().
|
private |
Flag whether the system is shutting down now.
Definition at line 467 of file WMainWindow.h.
Referenced by closeEvent().
|
private |
The thread responsible for doing stage 1 stuff.
Definition at line 472 of file WMainWindow.h.
Referenced by closeEvent().
|
private |
control panel
Definition at line 446 of file WMainWindow.h.
Referenced by getControlPanel(), newRoi(), and setupGUI().
|
private |
The currently set compatibles toolbar.
Definition at line 418 of file WMainWindow.h.
Referenced by getCompatiblesToolbar(), and setCompatiblesToolbar().
|
private |
All registered widgets created by the core/UI api.
Definition at line 492 of file WMainWindow.h.
Referenced by closeStage1Thread(), deregisterCustomWidget(), and registerCustomWidget().
|
private |
The dummywidget serves as spacer in the dockwidget area;.
Definition at line 456 of file WMainWindow.h.
|
private |
the dock that is used for gl widgets
Definition at line 455 of file WMainWindow.h.
Referenced by getDefaultCustomDockAreaWidget(), restoreSavedState(), saveWindowState(), and setupGUI().
|
private |
the help menu
Definition at line 443 of file WMainWindow.h.
Referenced by addGlobalMenu(), and setupGUI().
|
private |
|
private |
manager to provide icons in the gui thread
Definition at line 420 of file WMainWindow.h.
Referenced by getIconManager(), and setupGUI().
|
private |
the load button
Definition at line 433 of file WMainWindow.h.
Referenced by addGlobalMenu(), and setupGUI().
|
private |
boost signal for open file dialog
Definition at line 494 of file WMainWindow.h.
Referenced by getLoaderSignal(), handleDrop(), and openLoadDialog().
|
private |
the dock containing the main gl widget
Definition at line 457 of file WMainWindow.h.
Referenced by closeEvent(), and setupGUI().
|
private |
the main GL widget of the GUI
Definition at line 450 of file WMainWindow.h.
Referenced by handleGLVendor(), and setupGUI().
|
private |
The main menu bar of the GUI.
Definition at line 422 of file WMainWindow.h.
Referenced by setupGUI().
|
private |
Message and log window.
Definition at line 429 of file WMainWindow.h.
Referenced by getMessageDock(), reportError(), reportInfo(), reportWarning(), saveWindowState(), and setupGUI().
|
private |
the axial view widget GL widget of the GUI
Definition at line 452 of file WMainWindow.h.
Referenced by closeEvent(), restoreSavedState(), and setupGUI().
|
private |
the coronal view widget GL widget of the GUI
Definition at line 453 of file WMainWindow.h.
Referenced by closeEvent(), restoreSavedState(), and setupGUI().
|
private |
the sgittal view widget GL widget of the GUI
Definition at line 454 of file WMainWindow.h.
Referenced by closeEvent(), restoreSavedState(), and setupGUI().
|
private |
network editor
Definition at line 448 of file WMainWindow.h.
Referenced by getNetworkEditor(), and setupGUI().
|
private |
the new project button
Definition at line 432 of file WMainWindow.h.
Referenced by addGlobalMenu(), and setupGUI().
|
private |
The permanent toolbar of the main window.
Definition at line 424 of file WMainWindow.h.
Referenced by setCompatiblesToolbar(), and setupGUI().
|
private |
quit OpenWalnut
Definition at line 434 of file WMainWindow.h.
Referenced by addGlobalMenu(), and setupGUI().
|
private |
the save menu
Definition at line 435 of file WMainWindow.h.
Referenced by addGlobalMenu(), and setupGUI().
|
private |
|
private |
the settings
Definition at line 440 of file WMainWindow.h.
Referenced by addGlobalMenu(), and setupGUI().
|
private |
|
private |
The action for allowing editing min and max of sliders.
Definition at line 518 of file WMainWindow.h.
Referenced by setupGUI().
|
private |
The splash screen object opened on startup.
Definition at line 413 of file WMainWindow.h.
Referenced by closeEvent(), closeSplash(), and getSplash().
|
private |
view and camera control menu
Definition at line 438 of file WMainWindow.h.
Referenced by setupGUI().