![]() |
OpenWalnut
1.5.0dev
|
Container widget to contain a number of properties for the module context in the control panel. More...
#include <WQtPropertyGroupWidget.h>
Inheritance diagram for WQtPropertyGroupWidget:
Collaboration diagram for WQtPropertyGroupWidget:Signals | |
| void | hideSignal (bool hide) |
| A Signal which gets emitted whenever the widget should be hidden. More... | |
Public Member Functions | |
| WQtPropertyGroupWidget (WPropertyGroupBase::SPtr group, size_t depth=0, QWidget *parent=0) | |
| Creates new widget for a property group. More... | |
| virtual | ~WQtPropertyGroupWidget () |
| destructor More... | |
| bool | isEmpty () const |
| True if there are no widgets inside. More... | |
| QPushButton * | addPushButton (QString label) |
| helper function to add a generic button More... | |
| void | addProp (WPropertyBase::SPtr property) |
| Adds a new property widget to the PropertyGroup. More... | |
| void | addGroup (WQtPropertyGroupWidget *widget, bool asScrollArea=false) |
| Adds an widget containing another property group to this widget. More... | |
| void | addGroup (WPropertyGroupBase::SPtr prop) |
| Add the given prop group to this widget. More... | |
| void | addSpacer () |
| helper function to add a spacer at the end More... | |
| QString | getName () |
| The property group name. More... | |
| void | setName (QString name) |
| Sets the name of this widget. More... | |
| WPropertyGroupBase::SPtr | getPropertyGroup () |
| Get the managed group of this widget. More... | |
Static Public Member Functions | |
| static QWidget * | createPropertyGroupBox (QWidget *widget, bool asScrollArea=false, QWidget *parent=NULL, const QString &title="", int nestingLevel=0) |
| This function creates the fancy box around your specified group widget. More... | |
| static QWidget * | createPropertyGroupBox (WPropertyGroupBase::SPtr group, const QString &title="", size_t depth=0, QWidget *parent=0) |
| Create a property widget using the given group. More... | |
| static QWidget * | createPropertyGroupBox (WPropertyGroupBase::SPtr group, bool asScrollArea, const QString &title="", size_t depth=0, QWidget *parent=0) |
| Create a property widget using the given group. More... | |
| static WQtPropertyGroupWidget * | createPropertyGroupWidget (WPropertyGroupBase::SPtr group, const QString &title="", size_t depth=0, QWidget *parent=0) |
| Create a property widget using the given group. More... | |
Protected Member Functions | |
| virtual void | propertyChangeNotifier () |
| Callback for WPropertyBase::getChangeCondition. More... | |
| virtual bool | event (QEvent *event) |
| Custom event dispatcher. More... | |
Private Types | |
| typedef std::map< WPropertyBase::SPtr, QWidget * > | PropertyWidgets |
| The map between a prop and the widget handling it. More... | |
Private Attributes | |
| QString | m_name |
| The name used for this widget. More... | |
| QGridLayout * | m_controlLayout |
| Layout used for each "widget combination". More... | |
| QVBoxLayout * | m_pageLayout |
| Layout used for the whole widget. More... | |
| unsigned int | m_numberOfWidgets |
| The number of widgets inside this one. More... | |
| WPropertyGroupBase::SPtr | m_group |
| The property group handled here. More... | |
| PropertyWidgets | m_propWidgets |
| The map if property pointer to actual property widget. More... | |
| boost::signals2::connection | m_connection |
| The connection for propertyChangeNotifier(). More... | |
| size_t | m_nestingDepth |
| The depth of this group. More... | |
Container widget to contain a number of properties for the module context in the control panel.
Definition at line 61 of file WQtPropertyGroupWidget.h.
|
private |
The map between a prop and the widget handling it.
Definition at line 252 of file WQtPropertyGroupWidget.h.
| WQtPropertyGroupWidget::WQtPropertyGroupWidget | ( | WPropertyGroupBase::SPtr | group, |
| size_t | depth = 0, |
||
| QWidget * | parent = 0 |
||
| ) |
Creates new widget for a property group.
Use this constructor to provide automatic hidden-flag management.
| group | The group |
| depth | the nesting depth of this group, it usually is parents depth + 1. |
| parent | The widget managing this widget |
Definition at line 49 of file WQtPropertyGroupWidget.cpp.
References addProp(), addSpacer(), m_connection, m_controlLayout, m_group, m_pageLayout, propertyChangeNotifier(), and setName().
Referenced by addGroup(), and createPropertyGroupWidget().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
| void WQtPropertyGroupWidget::addGroup | ( | WPropertyGroupBase::SPtr | prop | ) |
Add the given prop group to this widget.
| prop | the property group |
Definition at line 172 of file WQtPropertyGroupWidget.cpp.
References addGroup(), m_nestingDepth, and WQtPropertyGroupWidget().
Here is the call graph for this function:| void WQtPropertyGroupWidget::addGroup | ( | WQtPropertyGroupWidget * | widget, |
| bool | asScrollArea = false |
||
| ) |
Adds an widget containing another property group to this widget.
It encloses it with a GroupBox.
| widget | the widget |
| asScrollArea | true if the group should be embedded into a scroll area |
Definition at line 378 of file WQtPropertyGroupWidget.cpp.
References createPropertyGroupBox(), getPropertyGroup(), m_controlLayout, and m_propWidgets.
Referenced by addGroup(), and addProp().
Here is the call graph for this function:
Here is the caller graph for this function:| void WQtPropertyGroupWidget::addProp | ( | WPropertyBase::SPtr | property | ) |
Adds a new property widget to the PropertyGroup.
Returns NULL if property not supported. This also supports groups.
| property | the property to add. |
Definition at line 156 of file WQtPropertyGroupWidget.cpp.
References addGroup(), WPropertyWidget::construct(), m_controlLayout, and m_propWidgets.
Referenced by event(), and WQtPropertyGroupWidget().
Here is the call graph for this function:
Here is the caller graph for this function:| QPushButton* WQtPropertyGroupWidget::addPushButton | ( | QString | label | ) |
helper function to add a generic button
| label | Text on the push button |
| void WQtPropertyGroupWidget::addSpacer | ( | ) |
helper function to add a spacer at the end
Definition at line 390 of file WQtPropertyGroupWidget.cpp.
References m_pageLayout.
Referenced by WQtPropertyGroupWidget().
Here is the caller graph for this function:
|
static |
This function creates the fancy box around your specified group widget.
| widget | the widget to put into the box |
| asScrollArea | if true, the widget is embedded into a scroll area |
| parent | the parent widget |
| title | the title to use for the box. If empty, the property group name is used. |
| nestingLevel | the nesting level (defines color) |
Definition at line 177 of file WQtPropertyGroupWidget.cpp.
References WQtGui::getMainWindow(), getName(), hideSignal(), m_nestingDepth, and WScaleToolButton::setText().
Referenced by addGroup(), WQtDockWidget::addTitleProperty(), WQtControlPanel::buildPropTab(), createPropertyGroupBox(), WQtNetworkItem::mouseDoubleClickEvent(), WUIQtPropertyGroupWidget::realizeImpl(), WQtDataModuleInput::WQtDataModuleInput(), and WQtColormapper::WQtTextureListItem::WQtTextureListItem().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Create a property widget using the given group.
| group | the property group to represent |
| title | the title of the widget |
| depth | the nesting depth |
| parent | the parent widget |
| asScrollArea | if true, add a scroll area around the group |
Definition at line 342 of file WQtPropertyGroupWidget.cpp.
References createPropertyGroupBox(), createPropertyGroupWidget(), and getName().
Here is the call graph for this function:
|
static |
Create a property widget using the given group.
| group | the property group to represent |
| title | the title of the widget |
| depth | the nesting depth |
| parent | the parent widget |
Definition at line 358 of file WQtPropertyGroupWidget.cpp.
References createPropertyGroupBox().
Here is the call graph for this function:
|
static |
Create a property widget using the given group.
The difference to createPropertyGroupBox is that this call only creates the plain WQtPropertyGroupWidget which can be embedded somewhere else.
| group | the property group to represent |
| title | the title of the widget |
| depth | the nesting depth |
| parent | the parent widget |
Definition at line 363 of file WQtPropertyGroupWidget.cpp.
References setName(), and WQtPropertyGroupWidget().
Referenced by WQtDockWidget::addTitleProperty(), and createPropertyGroupBox().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Custom event dispatcher.
Gets called by QT's Event system every time an event got sent to this widget. This event handler processes property change events.
| event | the event that got transmitted. |
Definition at line 115 of file WQtPropertyGroupWidget.cpp.
References addProp(), hideSignal(), m_group, and m_propWidgets.
Here is the call graph for this function:| QString WQtPropertyGroupWidget::getName | ( | ) |
The property group name.
Definition at line 396 of file WQtPropertyGroupWidget.cpp.
References m_name.
Referenced by WQtControlPanel::addTabWidgetContent(), and createPropertyGroupBox().
Here is the caller graph for this function:| WPropertyGroupBase::SPtr WQtPropertyGroupWidget::getPropertyGroup | ( | ) |
Get the managed group of this widget.
Definition at line 411 of file WQtPropertyGroupWidget.cpp.
References m_group.
Referenced by addGroup().
Here is the caller graph for this function:
|
signal |
A Signal which gets emitted whenever the widget should be hidden.
This is a useful signal for containers which embed this group.
| hide | if true, the widget should be hidden. |
Referenced by createPropertyGroupBox(), and event().
Here is the caller graph for this function:| bool WQtPropertyGroupWidget::isEmpty | ( | ) | const |
True if there are no widgets inside.
Definition at line 406 of file WQtPropertyGroupWidget.cpp.
References m_propWidgets.
Referenced by WQtControlPanel::addTabWidgetContent().
Here is the caller graph for this function:
|
protectedvirtual |
Callback for WPropertyBase::getChangeCondition.
It emits an event to ensure all updates are done in gui thread.
Definition at line 110 of file WQtPropertyGroupWidget.cpp.
Referenced by WQtPropertyGroupWidget().
Here is the caller graph for this function:| void WQtPropertyGroupWidget::setName | ( | QString | name | ) |
Sets the name of this widget.
| name | the name. |
Definition at line 401 of file WQtPropertyGroupWidget.cpp.
References m_name.
Referenced by WQtControlPanel::buildPropTab(), createPropertyGroupWidget(), and WQtPropertyGroupWidget().
Here is the caller graph for this function:
|
private |
The connection for propertyChangeNotifier().
Definition at line 262 of file WQtPropertyGroupWidget.h.
Referenced by WQtPropertyGroupWidget(), and ~WQtPropertyGroupWidget().
|
private |
Layout used for each "widget combination".
Definition at line 232 of file WQtPropertyGroupWidget.h.
Referenced by addGroup(), addProp(), and WQtPropertyGroupWidget().
|
private |
The property group handled here.
Definition at line 247 of file WQtPropertyGroupWidget.h.
Referenced by event(), getPropertyGroup(), and WQtPropertyGroupWidget().
|
private |
The name used for this widget.
Definition at line 227 of file WQtPropertyGroupWidget.h.
|
private |
The depth of this group.
Definition at line 267 of file WQtPropertyGroupWidget.h.
Referenced by addGroup(), and createPropertyGroupBox().
|
private |
The number of widgets inside this one.
Definition at line 242 of file WQtPropertyGroupWidget.h.
|
private |
Layout used for the whole widget.
Definition at line 237 of file WQtPropertyGroupWidget.h.
Referenced by addSpacer(), and WQtPropertyGroupWidget().
|
private |
The map if property pointer to actual property widget.
Definition at line 257 of file WQtPropertyGroupWidget.h.
Referenced by addGroup(), addProp(), event(), and isEmpty().