OpenWalnut  1.5.0dev
Public Member Functions | Protected Member Functions | Protected Attributes | Private Slots | Private Attributes | List of all members
WQtControlPanel Class Reference

container widget for a tree widget with context menu and some control widgets More...

#include <WQtControlPanel.h>

+ Inheritance diagram for WQtControlPanel:
+ Collaboration diagram for WQtControlPanel:

Public Member Functions

 WQtControlPanel (WMainWindow *parent=0)
 Constructor. More...
 
virtual ~WQtControlPanel ()
 Default Destructor. More...
 
void completeGuiSetup ()
 Complete own GUI setup. More...
 
int addTabWidgetContent (QWidget *content, WQtPropertyGroupWidget *propContents)
 Adds a page to the context widget. More...
 
WQtSubjectTreeItemaddSubject (std::string name)
 Adds a subject entry to the tree widget. More...
 
WQtDatasetTreeItemaddDataset (std::shared_ptr< WModule > module, int subjectId=0)
 Adds a dataset entry to any given subject in the tree widget. More...
 
WQtModuleTreeItemaddModule (std::shared_ptr< WModule > module)
 Adds a module to the control panel. More...
 
void addRoi (osg::ref_ptr< WROI > roi)
 Adds a ROI entry to the control panel. More...
 
void removeRoi (osg::ref_ptr< WROI > roi)
 Removes a ROI entry from the control panel. More...
 
void connectSlots ()
 helper funtion to connect all qt widgets with their functions More...
 
std::shared_ptr< WModulegetSelectedModule ()
 Returns the module currently selected in control panel. More...
 
osg::ref_ptr< WROIgetSelectedRoi ()
 Returns the currently selected ROI. More...
 
osg::ref_ptr< WROIgetFirstRoiInSelectedBranch ()
 Returns the first ROI in the currently selected branch. More...
 
QActiontoggleViewAction () const
 Returns a checkable action that can be used to show or close this dock widget. More...
 
void selectUpperMostEntry ()
 Selects the uppermost entry in the module tree. More...
 
WQtDockWidgetgetRoiDock () const
 Gets the ROI dock widget. More...
 
QActiongetRoiDeleteAction () const
 Return the action to delete a selected roi. More...
 
WQtDockWidgetgetModuleDock () const
 Gets the module dock widget. More...
 
WQtDockWidgetgetColormapperDock () const
 Gets the colormapper dock. More...
 
WQtModuleConfiggetModuleConfig () const
 Returns the module config dialog. More...
 
QActiongetMissingModuleAction () const
 Returns an action which can be triggered by the user if some module are missing. More...
 
void setActiveModule (WModule::SPtr module, bool forceUpdate=false)
 Sets the module which is now active. More...
 
void deactivateModuleSelection (bool selectTopmost=true)
 Used to clean the GUI from any module specify widgets. More...
 
- Public Member Functions inherited from WQtDockWidget
 WQtDockWidget (const QString &title, QWidget *parent=0, Qt::WindowFlags flags=Qt::WindowFlags())
 Construct dock widget with title. More...
 
 WQtDockWidget (QWidget *parent=0, Qt::WindowFlags flags=Qt::WindowFlags())
 Construct dock widget. More...
 
virtual ~WQtDockWidget ()
 Destructor. More...
 
virtual void addTitleProperty (WPropTrigger prop, WGEImage::SPtr icon=WGEImage::SPtr())
 Add a property to the title of this dock. More...
 
virtual void addTitleProperty (WPropBool prop, WGEImage::SPtr icon=WGEImage::SPtr())
 Add a property to the title of this dock. More...
 
virtual void addTitleProperty (WPropGroup prop, WGEImage::SPtr icon=WGEImage::SPtr())
 Add a property to the title of this dock. More...
 
virtual void addTitleAction (QAction *action, bool instantPopup=false)
 Add the given action to the titlebar. More...
 
virtual void addTitleButton (QToolButton *button)
 Add the given tool button to the titlebar. More...
 
virtual void removeTitleAction (QAction *action)
 Remove the given action from the list. More...
 
virtual void addTitleSeperator ()
 Add a separator. More...
 
virtual void addTitleWidget (QWidget *widget)
 Add an arbitrary widget. More...
 
virtual void removeTitleWidget (QWidget *widget)
 Remove the specified widget from the title bar. More...
 
virtual void setHelpContext (const QString &id)
 Set a string which identifies help material for this dock. More...
 
virtual const QString & getHelpContext ()
 Return the help context id. More...
 
virtual void saveSettings ()
 Save settings. More...
 
virtual void restoreSettings ()
 Restore settings. More...
 
void disableCloseButton (bool disable=true)
 Disable close button? Might come in handy when embedding these widgets into others. More...
 

Protected Member Functions

virtual bool event (QEvent *event)
 Custom event dispatcher. More...
 
int getFirstSubject ()
 Helper function to return the first subject id in the tree widget. More...
 
void createCompatibleButtons (std::shared_ptr< WModule > module)
 fills the modul toolbar with buttons for modules that are compatible with the currently selected dataset More...
 
std::list< WQtTreeItem * > findItemsByModule (std::shared_ptr< WModule > module, QTreeWidgetItem *where)
 Searches the specified tree for all tree items matching the specified module. More...
 
std::list< WQtTreeItem * > findItemsByModule (std::shared_ptr< WModule > module)
 Searches the tree for all tree items matching the specified module. More...
 
void clearAndDeleteTabs ()
 As QTabWidget::clear() does not delete tabs, we have to manage that ourselves. More...
 
- Protected Member Functions inherited from WQtDockWidget
virtual void closeEvent (QCloseEvent *event)
 Called whenever a close event is received. More...
 

Protected Attributes

WMainWindowm_mainWindow
 Reference to the main window of the application. More...
 

Private Slots

void selectTreeItem ()
 function that gets called when a tree item is selected, on a new select that tab widget is rebuilt with the controls provided by the tree item More...
 
void reselectTreeItem ()
 This de-selects and re-selects the current item. More...
 
void selectRoiTreeItem (QTreeWidgetItem *item)
 function that gets called when a tree item is selected, on a new select that tab widget is rebuilt with the controls provided by the tree item More...
 
void selectDataModule (osg::ref_ptr< WGETexture3D > texture)
 Will be called to select the data module for the given texture. More...
 
QTreeWidgetItemfindModuleItem (WModule::SPtr module) const
 Search the tree item representing this module. More...
 
void buildPropTab (std::shared_ptr< WProperties > props, std::shared_ptr< WProperties > infoProps, const std::string &name, QWidget *inject=NULL)
 function that builds the property tab More...
 
void changeTreeItem (QTreeWidgetItem *item, int column)
 Function gets change when a change to a tree item occurs. More...
 
void deleteROITreeItem ()
 delete a ROI tree item More...
 
void deleteModule ()
 delete a module More...
 
void handleRoiDragDrop (QDropEvent *event)
 function to notify the ROI manager of any drag&drop action in the ROI tree More...
 

Private Attributes

WQtTreeWidgetm_moduleTreeWidget
 pointer to the tree widget More...
 
WQtTreeWidgetm_roiTreeWidget
 pointer to the tree widget More...
 
WQtColormapperm_colormapper
 the colormapper control widget More...
 
QTabWidget * m_tabWidget
 pointer to the tab widget More...
 
WQtModuleHeaderTreeItemm_tiModules
 header for modules More...
 
WQtRoiHeaderTreeItemm_tiRois
 header for ROIs More...
 
WQtDockWidgetm_roiDock
 the dock widget with the ROI tree More...
 
WQtDockWidgetm_moduleDock
 the dock widget with the module tree More...
 
QActionm_deleteModuleAction
 The action to remove a module from the tree. More...
 
QActionm_deleteRoiAction
 The action to remove a ROI from the tree. More...
 
QActionm_connectWithModuleAction
 Action which uses a compatibles list (submenu) to connect a selected item with other existing modules. More...
 
QActionm_connectWithPrototypeAction
 Action which uses a compatibles list (submenu) to connect a selected item with other prototypes. More...
 
QActionm_addModuleAction
 Action which uses a list of all modules allowing them to be added without any connections. More...
 
QActionm_disconnectAction
 Action which disconnects a connector from the module. More...
 
WQtCombinerActionList m_addModuleActionList
 List all actions created for applying a prototype. More...
 
WQtCombinerActionList m_connectWithPrototypeActionList
 List all actions created for applying a prototype. More...
 
WQtCombinerActionList m_connectWithModuleActionList
 List all actions created for applying a prototype. More...
 
WQtCombinerActionList m_disconnectActionList
 List all actions created for applying a prototype. More...
 
bool m_ignoreSelectionChange
 If true, a selection change does not cause the property tab to rebuild. More...
 
WQtModuleConfigm_moduleFilterConfig
 The WQtCombinerActionList needs some predicate which decides whether to exclude a certain module from the list or not. More...
 
QActionm_configModuleFilterAction
 Action giving the user fast access to the module config dialog. More...
 
WModule::SPtr m_activeModule
 The module currently active. More...
 
QString m_previousTab
 The title of the last selected tab in the control panel. More...
 

Additional Inherited Members

- Public Slots inherited from WQtDockWidget
void showHelp ()
 Show help. More...
 

Detailed Description

container widget for a tree widget with context menu and some control widgets

Definition at line 58 of file WQtControlPanel.h.

Constructor & Destructor Documentation

◆ WQtControlPanel()

WQtControlPanel::WQtControlPanel ( WMainWindow parent = 0)
explicit

◆ ~WQtControlPanel()

WQtControlPanel::~WQtControlPanel ( )
virtual

Default Destructor.

Definition at line 233 of file WQtControlPanel.cpp.

Member Function Documentation

◆ addDataset()

WQtDatasetTreeItem * WQtControlPanel::addDataset ( std::shared_ptr< WModule module,
int  subjectId = 0 
)

Adds a dataset entry to any given subject in the tree widget.

Parameters
moduleshared pointer to the module associated with this tree widget entry
subjectIdsubject id this dataset belongs to
Returns
A pointer to the tree widget item

Definition at line 597 of file WQtControlPanel.cpp.

References WQtSubjectTreeItem::addDatasetItem(), getFirstSubject(), and m_moduleTreeWidget.

Referenced by event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addModule()

WQtModuleTreeItem * WQtControlPanel::addModule ( std::shared_ptr< WModule module)

Adds a module to the control panel.

Parameters
modulethe module to add.
Returns
the representation in control panel.

Definition at line 609 of file WQtControlPanel.cpp.

References WQtModuleHeaderTreeItem::addModuleItem(), m_moduleTreeWidget, and m_tiModules.

Referenced by event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addRoi()

void WQtControlPanel::addRoi ( osg::ref_ptr< WROI roi)

Adds a ROI entry to the control panel.

Parameters
roipointer to the ROI representation object

Definition at line 643 of file WQtControlPanel.cpp.

References WQtRoiHeaderTreeItem::addBranch(), WQtBranchTreeItem::addRoiItem(), WQtRoiTreeItem::createWidget(), WQtBranchTreeItem::getBranch(), WKernel::getRoiManager(), WKernel::getRunningKernel(), getSelectedRoi(), WQtBranchTreeItem::getWidget(), m_roiTreeWidget, m_tiRois, and selectRoiTreeItem().

Referenced by event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSubject()

WQtSubjectTreeItem * WQtControlPanel::addSubject ( std::string  name)

Adds a subject entry to the tree widget.

Parameters
nameThe entry name of the subjectin the tree widget
Returns
A pointer to the tree widget item

Definition at line 261 of file WQtControlPanel.cpp.

References m_moduleTreeWidget.

Referenced by WMainWindow::setupGUI().

+ Here is the caller graph for this function:

◆ addTabWidgetContent()

int WQtControlPanel::addTabWidgetContent ( QWidget *  content,
WQtPropertyGroupWidget propContents 
)

Adds a page to the context widget.

Parameters
contentA widget with controls
propContentsThe prop group widget.
Returns
the index of the new tab

Definition at line 1154 of file WQtControlPanel.cpp.

References WQtPropertyGroupWidget::getName(), WQtPropertyGroupWidget::isEmpty(), and m_tabWidget.

Referenced by buildPropTab().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildPropTab

void WQtControlPanel::buildPropTab ( std::shared_ptr< WProperties props,
std::shared_ptr< WProperties infoProps,
const std::string &  name,
QWidget *  inject = NULL 
)
privateslot

function that builds the property tab

Parameters
propsthe properties.
infoPropsthe information properties shown on a separate tab
namethe name used as title. Can be empty but should not.
injectinject this widget to the property tab.

Definition at line 1019 of file WQtControlPanel.cpp.

References addTabWidgetContent(), WQtPropertyGroupWidget::createPropertyGroupBox(), m_previousTab, m_tabWidget, and WQtPropertyGroupWidget::setName().

Referenced by selectDataModule(), selectRoiTreeItem(), and setActiveModule().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ changeTreeItem

void WQtControlPanel::changeTreeItem ( QTreeWidgetItem item,
int  column 
)
privateslot

Function gets change when a change to a tree item occurs.

Parameters
itemthe item
columncolumn index

Definition at line 1145 of file WQtControlPanel.cpp.

References WQtTreeItem::handleCheckStateChange().

Referenced by connectSlots().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearAndDeleteTabs()

void WQtControlPanel::clearAndDeleteTabs ( )
protected

As QTabWidget::clear() does not delete tabs, we have to manage that ourselves.

So this function clears all tabs and deletes the data as well.

Definition at line 1399 of file WQtControlPanel.cpp.

References m_previousTab, and m_tabWidget.

Referenced by deactivateModuleSelection(), selectDataModule(), selectRoiTreeItem(), and setActiveModule().

+ Here is the caller graph for this function:

◆ completeGuiSetup()

void WQtControlPanel::completeGuiSetup ( )

Complete own GUI setup.

This is useful when not all the information is available during construction. Called by the WMainWindow.

Definition at line 237 of file WQtControlPanel.cpp.

References WMainWindow::addGlobalMenu(), WMainWindow::getNetworkEditor(), WQtNetworkEditor::getView(), and m_mainWindow.

Referenced by WMainWindow::setupGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ connectSlots()

void WQtControlPanel::connectSlots ( )

helper funtion to connect all qt widgets with their functions

Definition at line 247 of file WQtControlPanel.cpp.

References changeTreeItem(), handleRoiDragDrop(), m_colormapper, m_moduleFilterConfig, m_moduleTreeWidget, m_roiTreeWidget, reselectTreeItem(), selectDataModule(), selectRoiTreeItem(), and selectTreeItem().

Referenced by WQtControlPanel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createCompatibleButtons()

void WQtControlPanel::createCompatibleButtons ( std::shared_ptr< WModule module)
protected

◆ deactivateModuleSelection()

void WQtControlPanel::deactivateModuleSelection ( bool  selectTopmost = true)

Used to clean the GUI from any module specify widgets.

Parameters
selectTopmostselect top element or keep current

Definition at line 863 of file WQtControlPanel.cpp.

References clearAndDeleteTabs(), WQtNetworkEditor::clearSelection(), createCompatibleButtons(), WMainWindow::getNetworkEditor(), m_activeModule, m_deleteModuleAction, m_ignoreSelectionChange, m_mainWindow, m_moduleTreeWidget, and selectUpperMostEntry().

Referenced by WQtNetworkEditor::selectItem(), selectTreeItem(), and setActiveModule().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteModule

void WQtControlPanel::deleteModule ( )
privateslot

◆ deleteROITreeItem

void WQtControlPanel::deleteROITreeItem ( )
privateslot

delete a ROI tree item

Definition at line 1282 of file WQtControlPanel.cpp.

References getFirstRoiInSelectedBranch(), WKernel::getRoiManager(), WKernel::getRunningKernel(), and m_roiTreeWidget.

Referenced by WQtControlPanel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ event()

bool WQtControlPanel::event ( QEvent event)
protectedvirtual

◆ findItemsByModule() [1/2]

std::list< WQtTreeItem * > WQtControlPanel::findItemsByModule ( std::shared_ptr< WModule module)
protected

Searches the tree for all tree items matching the specified module.

Parameters
modulethe module uses as search criteria.
Returns
a list of all matching items.

Definition at line 589 of file WQtControlPanel.cpp.

References findItemsByModule(), and m_moduleTreeWidget.

+ Here is the call graph for this function:

◆ findItemsByModule() [2/2]

std::list< WQtTreeItem * > WQtControlPanel::findItemsByModule ( std::shared_ptr< WModule module,
QTreeWidgetItem where 
)
protected

Searches the specified tree for all tree items matching the specified module.

Parameters
modulethe module uses as search criteria.
wherein which subtree to search.
Returns
a list of all matching items.

Definition at line 556 of file WQtControlPanel.cpp.

References WQtTreeItem::getModule().

Referenced by event(), findItemsByModule(), and setActiveModule().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findModuleItem

QTreeWidgetItem * WQtControlPanel::findModuleItem ( WModule::SPtr  module) const
privateslot

Search the tree item representing this module.

Parameters
modulethe module
Returns
the item or null if not found

Definition at line 825 of file WQtControlPanel.cpp.

References m_moduleTreeWidget.

◆ getColormapperDock()

WQtDockWidget * WQtControlPanel::getColormapperDock ( ) const

Gets the colormapper dock.

Returns
the dock

Definition at line 1384 of file WQtControlPanel.cpp.

References m_colormapper.

Referenced by WMainWindow::setupGUI().

+ Here is the caller graph for this function:

◆ getFirstRoiInSelectedBranch()

osg::ref_ptr< WROI > WQtControlPanel::getFirstRoiInSelectedBranch ( )

Returns the first ROI in the currently selected branch.

Returns
pointer to ROI representation

Definition at line 1201 of file WQtControlPanel.cpp.

References m_roiTreeWidget.

Referenced by deleteROITreeItem(), WMainWindow::newRoi(), and selectRoiTreeItem().

+ Here is the caller graph for this function:

◆ getFirstSubject()

int WQtControlPanel::getFirstSubject ( )
protected

Helper function to return the first subject id in the tree widget.

Returns
index of first subject in tree

Definition at line 1173 of file WQtControlPanel.cpp.

References m_moduleTreeWidget.

Referenced by addDataset().

+ Here is the caller graph for this function:

◆ getMissingModuleAction()

QAction * WQtControlPanel::getMissingModuleAction ( ) const

Returns an action which can be triggered by the user if some module are missing.

Returns
the action.

Definition at line 1394 of file WQtControlPanel.cpp.

References m_configModuleFilterAction.

Referenced by createCompatibleButtons(), WQtCombinerToolbar::updateButtons(), and WQtCombinerToolbar::WQtCombinerToolbar().

+ Here is the caller graph for this function:

◆ getModuleConfig()

WQtModuleConfig & WQtControlPanel::getModuleConfig ( ) const

Returns the module config dialog.

It then can be used for configuration.

Returns
the module config dialog.

Definition at line 1389 of file WQtControlPanel.cpp.

References m_moduleFilterConfig.

Referenced by WMainWindow::setupGUI().

+ Here is the caller graph for this function:

◆ getModuleDock()

WQtDockWidget * WQtControlPanel::getModuleDock ( ) const

Gets the module dock widget.

Returns
the module dock

Definition at line 1379 of file WQtControlPanel.cpp.

References m_moduleDock.

Referenced by WMainWindow::setupGUI().

+ Here is the caller graph for this function:

◆ getRoiDeleteAction()

QAction * WQtControlPanel::getRoiDeleteAction ( ) const

Return the action to delete a selected roi.

Returns
the action

Definition at line 242 of file WQtControlPanel.cpp.

References m_deleteRoiAction.

Referenced by WMainWindow::setupGUI().

+ Here is the caller graph for this function:

◆ getRoiDock()

WQtDockWidget * WQtControlPanel::getRoiDock ( ) const

Gets the ROI dock widget.

Returns
the ROI dock.

Definition at line 1374 of file WQtControlPanel.cpp.

References m_roiDock.

Referenced by WMainWindow::setupGUI().

+ Here is the caller graph for this function:

◆ getSelectedModule()

std::shared_ptr< WModule > WQtControlPanel::getSelectedModule ( )

Returns the module currently selected in control panel.

Returns
the module.

Definition at line 704 of file WQtControlPanel.cpp.

References WQtTreeItem::getModule(), and m_moduleTreeWidget.

Referenced by event(), WQtGui::getSelectedModule(), and reselectTreeItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectedRoi()

osg::ref_ptr< WROI > WQtControlPanel::getSelectedRoi ( )

Returns the currently selected ROI.

Returns
pointer to ROI representation

Definition at line 1187 of file WQtControlPanel.cpp.

References m_roiTreeWidget.

Referenced by addRoi(), removeRoi(), and selectRoiTreeItem().

+ Here is the caller graph for this function:

◆ handleRoiDragDrop

void WQtControlPanel::handleRoiDragDrop ( QDropEvent *  event)
privateslot

function to notify the ROI manager of any drag&drop action in the ROI tree

Parameters
eventthe drop event

Definition at line 1315 of file WQtControlPanel.cpp.

References WQtRoiTreeItem::createWidget(), wlog::error(), WQtBranchTreeItem::getBranch(), WQtRoiTreeItem::getRoi(), WKernel::getRoiManager(), WKernel::getRunningKernel(), m_roiTreeWidget, and m_tiRois.

Referenced by connectSlots().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeRoi()

void WQtControlPanel::removeRoi ( osg::ref_ptr< WROI roi)

Removes a ROI entry from the control panel.

Parameters
roipointer to the ROI representation object

Definition at line 680 of file WQtControlPanel.cpp.

References WQtRoiTreeItem::getRoi(), WKernel::getRoiManager(), WKernel::getRunningKernel(), getSelectedRoi(), and m_tiRois.

Referenced by event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reselectTreeItem

void WQtControlPanel::reselectTreeItem ( )
privateslot

This de-selects and re-selects the current item.

This is useful for updating compatibles bar and similar if data changes

Definition at line 718 of file WQtControlPanel.cpp.

References getSelectedModule(), and setActiveModule().

Referenced by connectSlots().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectDataModule

void WQtControlPanel::selectDataModule ( osg::ref_ptr< WGETexture3D texture)
privateslot

Will be called to select the data module for the given texture.

Parameters
texturethe texture currently selected.

Definition at line 819 of file WQtControlPanel.cpp.

References buildPropTab(), and clearAndDeleteTabs().

Referenced by connectSlots().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectRoiTreeItem

void WQtControlPanel::selectRoiTreeItem ( QTreeWidgetItem item)
privateslot

function that gets called when a tree item is selected, on a new select that tab widget is rebuilt with the controls provided by the tree item

Parameters
itemthe item that has been clicked

Definition at line 770 of file WQtControlPanel.cpp.

References buildPropTab(), clearAndDeleteTabs(), WMainWindow::getCompatiblesToolbar(), getFirstRoiInSelectedBranch(), WKernel::getRoiManager(), WKernel::getRunningKernel(), getSelectedRoi(), m_deleteRoiAction, m_mainWindow, m_roiTreeWidget, WQtCombinerToolbar::makeEmpty(), and WMainWindow::setCompatiblesToolbar().

Referenced by addRoi(), and connectSlots().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectTreeItem

void WQtControlPanel::selectTreeItem ( )
privateslot

function that gets called when a tree item is selected, on a new select that tab widget is rebuilt with the controls provided by the tree item

Definition at line 723 of file WQtControlPanel.cpp.

References deactivateModuleSelection(), m_ignoreSelectionChange, m_moduleTreeWidget, and setActiveModule().

Referenced by connectSlots().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectUpperMostEntry()

void WQtControlPanel::selectUpperMostEntry ( )

Selects the uppermost entry in the module tree.

Definition at line 1310 of file WQtControlPanel.cpp.

References m_tiModules.

Referenced by deactivateModuleSelection(), and WMainWindow::setupGUI().

+ Here is the caller graph for this function:

◆ setActiveModule()

void WQtControlPanel::setActiveModule ( WModule::SPtr  module,
bool  forceUpdate = false 
)

Sets the module which is now active.

Updates the GUI accordingly. Can be NULL which causes the GUI to remove all module specific stuff.

Parameters
modulethe module to activate
forceUpdateforce update even if the module is the same as the current one.

Definition at line 895 of file WQtControlPanel.cpp.

References buildPropTab(), clearAndDeleteTabs(), createCompatibleButtons(), deactivateModuleSelection(), wlog::debug(), findItemsByModule(), WMainWindow::getNetworkEditor(), m_activeModule, m_deleteModuleAction, m_ignoreSelectionChange, m_mainWindow, m_moduleTreeWidget, m_previousTab, m_tabWidget, and WQtNetworkEditor::selectByModule().

Referenced by event(), reselectTreeItem(), WQtNetworkEditor::selectItem(), and selectTreeItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleViewAction()

QAction * WQtControlPanel::toggleViewAction ( ) const

Returns a checkable action that can be used to show or close this dock widget.

The action's text is set to the dock widget's window title.

This member function is overwritten to add a keyboard shortcut to this action.

Returns
Modified QAction

Definition at line 1224 of file WQtControlPanel.cpp.

Referenced by WMainWindow::setupGUI().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_activeModule

WModule::SPtr WQtControlPanel::m_activeModule
private

The module currently active.

Definition at line 383 of file WQtControlPanel.h.

Referenced by deactivateModuleSelection(), and setActiveModule().

◆ m_addModuleAction

QAction* WQtControlPanel::m_addModuleAction
private

Action which uses a list of all modules allowing them to be added without any connections.

Definition at line 324 of file WQtControlPanel.h.

Referenced by createCompatibleButtons(), and WQtControlPanel().

◆ m_addModuleActionList

WQtCombinerActionList WQtControlPanel::m_addModuleActionList
private

List all actions created for applying a prototype.

Is needed for m_addModuleAction.

Note
We need to store this action list here as Qt is not able to delete the actions if they get replaced. We need to handle this manually.

Definition at line 337 of file WQtControlPanel.h.

Referenced by createCompatibleButtons().

◆ m_colormapper

WQtColormapper* WQtControlPanel::m_colormapper
private

the colormapper control widget

Definition at line 290 of file WQtControlPanel.h.

Referenced by connectSlots(), getColormapperDock(), and WQtControlPanel().

◆ m_configModuleFilterAction

QAction* WQtControlPanel::m_configModuleFilterAction
private

Action giving the user fast access to the module config dialog.

Definition at line 378 of file WQtControlPanel.h.

Referenced by getMissingModuleAction(), and WQtControlPanel().

◆ m_connectWithModuleAction

QAction* WQtControlPanel::m_connectWithModuleAction
private

Action which uses a compatibles list (submenu) to connect a selected item with other existing modules.

Definition at line 314 of file WQtControlPanel.h.

Referenced by createCompatibleButtons(), and WQtControlPanel().

◆ m_connectWithModuleActionList

WQtCombinerActionList WQtControlPanel::m_connectWithModuleActionList
private

List all actions created for applying a prototype.

Is needed for m_connectWithModuleAction.

Note
We need to store this action list here as Qt is not able to delete the actions if they get replaced. We need to handle this manually.

Definition at line 353 of file WQtControlPanel.h.

Referenced by createCompatibleButtons().

◆ m_connectWithPrototypeAction

QAction* WQtControlPanel::m_connectWithPrototypeAction
private

Action which uses a compatibles list (submenu) to connect a selected item with other prototypes.

Definition at line 319 of file WQtControlPanel.h.

Referenced by createCompatibleButtons(), and WQtControlPanel().

◆ m_connectWithPrototypeActionList

WQtCombinerActionList WQtControlPanel::m_connectWithPrototypeActionList
private

List all actions created for applying a prototype.

Is needed for m_connectWithPrototypeAction.

Note
We need to store this action list here as Qt is not able to delete the actions if they get replaced. We need to handle this manually.

Definition at line 345 of file WQtControlPanel.h.

Referenced by createCompatibleButtons().

◆ m_deleteModuleAction

QAction* WQtControlPanel::m_deleteModuleAction
private

The action to remove a module from the tree.

Definition at line 304 of file WQtControlPanel.h.

Referenced by deactivateModuleSelection(), setActiveModule(), and WQtControlPanel().

◆ m_deleteRoiAction

QAction* WQtControlPanel::m_deleteRoiAction
private

The action to remove a ROI from the tree.

Definition at line 309 of file WQtControlPanel.h.

Referenced by getRoiDeleteAction(), selectRoiTreeItem(), and WQtControlPanel().

◆ m_disconnectAction

QAction* WQtControlPanel::m_disconnectAction
private

Action which disconnects a connector from the module.

Definition at line 329 of file WQtControlPanel.h.

Referenced by createCompatibleButtons(), and WQtControlPanel().

◆ m_disconnectActionList

WQtCombinerActionList WQtControlPanel::m_disconnectActionList
private

List all actions created for applying a prototype.

Is needed for m_disconnectAction.

Note
We need to store this action list here as Qt is not able to delete the actions if they get replaced. We need to handle this manually.

Definition at line 361 of file WQtControlPanel.h.

Referenced by createCompatibleButtons().

◆ m_ignoreSelectionChange

bool WQtControlPanel::m_ignoreSelectionChange
private

If true, a selection change does not cause the property tab to rebuild.

This is useful if multiple items get selected at once programatically.

Definition at line 367 of file WQtControlPanel.h.

Referenced by deactivateModuleSelection(), selectTreeItem(), and setActiveModule().

◆ m_mainWindow

WMainWindow* WQtControlPanel::m_mainWindow
protected

Reference to the main window of the application.

Definition at line 258 of file WQtControlPanel.h.

Referenced by completeGuiSetup(), createCompatibleButtons(), deactivateModuleSelection(), deleteModule(), selectRoiTreeItem(), setActiveModule(), and WQtControlPanel().

◆ m_moduleDock

WQtDockWidget* WQtControlPanel::m_moduleDock
private

the dock widget with the module tree

Definition at line 299 of file WQtControlPanel.h.

Referenced by getModuleDock(), and WQtControlPanel().

◆ m_moduleFilterConfig

WQtModuleConfig* WQtControlPanel::m_moduleFilterConfig
private

The WQtCombinerActionList needs some predicate which decides whether to exclude a certain module from the list or not.

We use this predicate here. It is configured internally using a white and blacklist.

Definition at line 373 of file WQtControlPanel.h.

Referenced by connectSlots(), createCompatibleButtons(), getModuleConfig(), and WQtControlPanel().

◆ m_moduleTreeWidget

WQtTreeWidget* WQtControlPanel::m_moduleTreeWidget
private

◆ m_previousTab

QString WQtControlPanel::m_previousTab
private

The title of the last selected tab in the control panel.

This needs to be done using the tab name as the tab index is not consistent( depending on the number of tabs. Sometimes, some tabs are not visible).

Definition at line 389 of file WQtControlPanel.h.

Referenced by buildPropTab(), clearAndDeleteTabs(), and setActiveModule().

◆ m_roiDock

WQtDockWidget* WQtControlPanel::m_roiDock
private

the dock widget with the ROI tree

Definition at line 298 of file WQtControlPanel.h.

Referenced by getRoiDock(), and WQtControlPanel().

◆ m_roiTreeWidget

WQtTreeWidget* WQtControlPanel::m_roiTreeWidget
private

◆ m_tabWidget

QTabWidget* WQtControlPanel::m_tabWidget
private

pointer to the tab widget

Definition at line 292 of file WQtControlPanel.h.

Referenced by addTabWidgetContent(), buildPropTab(), clearAndDeleteTabs(), setActiveModule(), and WQtControlPanel().

◆ m_tiModules

WQtModuleHeaderTreeItem* WQtControlPanel::m_tiModules
private

header for modules

Definition at line 294 of file WQtControlPanel.h.

Referenced by addModule(), event(), selectUpperMostEntry(), and WQtControlPanel().

◆ m_tiRois

WQtRoiHeaderTreeItem* WQtControlPanel::m_tiRois
private

header for ROIs

Definition at line 296 of file WQtControlPanel.h.

Referenced by addRoi(), handleRoiDragDrop(), removeRoi(), and WQtControlPanel().


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