25 #ifndef WQTCONTROLPANEL_H
26 #define WQTCONTROLPANEL_H
33 #include <QDockWidget>
34 #include <QListWidget>
37 #include <QVBoxLayout>
40 #include "../WQtCombinerToolbar.h"
41 #include "../WQtModuleConfig.h"
42 #include "../guiElements/WQtDockWidget.h"
43 #include "WQtModuleHeaderTreeItem.h"
44 #include "WQtModuleTreeItem.h"
45 #include "WQtPropertyGroupWidget.h"
46 #include "WQtRoiHeaderTreeItem.h"
47 #include "WQtSubjectTreeItem.h"
48 #include "WQtTreeWidget.h"
49 #include "core/dataHandler/WDataSet.h"
50 #include "core/graphicsEngine/WROI.h"
122 void addRoi( osg::ref_ptr< WROI > roi );
129 void removeRoi( osg::ref_ptr< WROI > roi );
277 std::list< WQtTreeItem* >
findItemsByModule( std::shared_ptr< WModule > module );
433 void buildPropTab( std::shared_ptr< WProperties > props, std::shared_ptr< WProperties > infoProps,
434 const std::string& name, QWidget* inject = NULL );
This class contains the main window and the layout of the widgets within the window.
std::shared_ptr< WModule > SPtr
Shared pointer to a WModule.
This widget controls the colormapper of openwalnut.
This class represents a list of actions to apply a bunch of modules to others.
container widget for a tree widget with context menu and some control widgets
QAction * m_disconnectAction
Action which disconnects a connector from the module.
void deactivateModuleSelection(bool selectTopmost=true)
Used to clean the GUI from any module specify widgets.
QAction * m_connectWithModuleAction
Action which uses a compatibles list (submenu) to connect a selected item with other existing modules...
void connectSlots()
helper funtion to connect all qt widgets with their functions
WQtDockWidget * getModuleDock() const
Gets the module dock widget.
QAction * m_addModuleAction
Action which uses a list of all modules allowing them to be added without any connections.
void removeRoi(osg::ref_ptr< WROI > roi)
Removes a ROI entry from the control panel.
bool m_ignoreSelectionChange
If true, a selection change does not cause the property tab to rebuild.
std::list< WQtTreeItem * > findItemsByModule(std::shared_ptr< WModule > module, QTreeWidgetItem *where)
Searches the specified tree for all tree items matching the specified module.
WQtDockWidget * m_roiDock
the dock widget with the ROI tree
WQtDatasetTreeItem * addDataset(std::shared_ptr< WModule > module, int subjectId=0)
Adds a dataset entry to any given subject in the tree widget.
WQtModuleConfig & getModuleConfig() const
Returns the module config dialog.
WQtSubjectTreeItem * addSubject(std::string name)
Adds a subject entry to the tree widget.
osg::ref_ptr< WROI > getSelectedRoi()
Returns the currently selected ROI.
virtual bool event(QEvent *event)
Custom event dispatcher.
QAction * m_deleteModuleAction
The action to remove a module from the tree.
void deleteModule()
delete a module
void selectUpperMostEntry()
Selects the uppermost entry in the module tree.
WQtModuleConfig * m_moduleFilterConfig
The WQtCombinerActionList needs some predicate which decides whether to exclude a certain module from...
WQtModuleTreeItem * addModule(std::shared_ptr< WModule > module)
Adds a module to the control panel.
QTabWidget * m_tabWidget
pointer to the tab widget
virtual ~WQtControlPanel()
Default Destructor.
WQtCombinerActionList m_connectWithPrototypeActionList
List all actions created for applying a prototype.
int getFirstSubject()
Helper function to return the first subject id in the tree widget.
void clearAndDeleteTabs()
As QTabWidget::clear() does not delete tabs, we have to manage that ourselves.
WQtDockWidget * m_moduleDock
the dock widget with the module tree
WQtCombinerActionList m_addModuleActionList
List all actions created for applying a prototype.
QAction * getRoiDeleteAction() const
Return the action to delete a selected roi.
WQtModuleHeaderTreeItem * m_tiModules
header for modules
void completeGuiSetup()
Complete own GUI setup.
void handleRoiDragDrop(QDropEvent *event)
function to notify the ROI manager of any drag&drop action in the ROI tree
void reselectTreeItem()
This de-selects and re-selects the current item.
WQtTreeWidget * m_moduleTreeWidget
pointer to the tree widget
WQtTreeWidget * m_roiTreeWidget
pointer to the tree widget
WQtDockWidget * getColormapperDock() const
Gets the colormapper dock.
WMainWindow * m_mainWindow
Reference to the main window of the application.
QAction * toggleViewAction() const
Returns a checkable action that can be used to show or close this dock widget.
void selectDataModule(osg::ref_ptr< WGETexture3D > texture)
Will be called to select the data module for the given texture.
QAction * getMissingModuleAction() const
Returns an action which can be triggered by the user if some module are missing.
QAction * m_deleteRoiAction
The action to remove a ROI from the tree.
void selectTreeItem()
function that gets called when a tree item is selected, on a new select that tab widget is rebuilt wi...
void setActiveModule(WModule::SPtr module, bool forceUpdate=false)
Sets the module which is now active.
WQtDockWidget * getRoiDock() const
Gets the ROI dock widget.
WQtCombinerActionList m_disconnectActionList
List all actions created for applying a prototype.
void changeTreeItem(QTreeWidgetItem *item, int column)
Function gets change when a change to a tree item occurs.
QAction * m_connectWithPrototypeAction
Action which uses a compatibles list (submenu) to connect a selected item with other prototypes.
void createCompatibleButtons(std::shared_ptr< WModule > module)
fills the modul toolbar with buttons for modules that are compatible with the currently selected data...
osg::ref_ptr< WROI > getFirstRoiInSelectedBranch()
Returns the first ROI in the currently selected branch.
void addRoi(osg::ref_ptr< WROI > roi)
Adds a ROI entry to the control panel.
WQtControlPanel(WMainWindow *parent=0)
Constructor.
void deleteROITreeItem()
delete a ROI tree item
WQtRoiHeaderTreeItem * m_tiRois
header for ROIs
int addTabWidgetContent(QWidget *content, WQtPropertyGroupWidget *propContents)
Adds a page to the context widget.
WQtColormapper * m_colormapper
the colormapper control widget
WQtCombinerActionList m_connectWithModuleActionList
List all actions created for applying a prototype.
std::shared_ptr< WModule > getSelectedModule()
Returns the module currently selected in control panel.
QString m_previousTab
The title of the last selected tab in the control panel.
QAction * m_configModuleFilterAction
Action giving the user fast access to the module config dialog.
QTreeWidgetItem * findModuleItem(WModule::SPtr module) const
Search the tree item representing this module.
void selectRoiTreeItem(QTreeWidgetItem *item)
function that gets called when a tree item is selected, on a new select that tab widget is rebuilt wi...
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
WModule::SPtr m_activeModule
The module currently active.
Tree widget item to represent a dataset in the control panel tree widget.
A class which acts as a binary predicate to check exclusion of modules by name using a whitelist and ...
Tree widget item to represent a module in the control panel tree widget.
tree widget item to represent a subject in the dataset brwoser tree widget