OpenWalnut
1.5.0dev
|
Implements a property widget for WPropSelection. More...
#include <WPropertySelectionWidget.h>
Public Slots | |
void | listSelectionChanged () |
Called whenever the selection in m_list has changed. More... | |
void | comboSelectionChanged (int index) |
Selection of the combobox has changed. More... | |
Public Member Functions | |
WPropertySelectionWidget (WPropSelection property, QGridLayout *propertyGrid, QWidget *parent=0) | |
Constructor. More... | |
virtual | ~WPropertySelectionWidget () |
Destructor. More... | |
Public Member Functions inherited from WPropertyWidget | |
WPropertyWidget (std::shared_ptr< WPropertyBase > property, QGridLayout *propertyGrid, QWidget *parent=0) | |
Constructor. More... | |
virtual | ~WPropertyWidget () |
Destructor. More... | |
std::shared_ptr< WPropertyBase > | getProperty () |
Returns the handled property. More... | |
virtual void | invalidate (bool invalid=true) |
This method marks this widget as invalid. More... | |
virtual std::string | getTooltip () const |
Gets the tooltip that should be used for this widget. More... | |
QWidget * | getParameterWidgets () |
Returns the parameter widget for this property. More... | |
QWidget * | getInformationWidgets () |
Returns the info widget for this property. More... | |
virtual void | requestUpdate () |
Request an update of the property widget. More... | |
void | forceInformationMode (bool force=true) |
Force the widget to use the information widgets. More... | |
Protected Member Functions | |
virtual void | update () |
Called whenever the widget should update. More... | |
Protected Member Functions inherited from WPropertyWidget | |
virtual bool | event (QEvent *event) |
Custom event dispatcher. More... | |
Protected Attributes | |
WPropSelection | m_selectionProperty |
The integer property represented by this widget. More... | |
QListWidget * | m_list |
The list holding all items. More... | |
QComboBox * | m_combo |
The combobox holding all items. More... | |
QGridLayout | m_layout |
Layout used to position the label and the checkbox. More... | |
bool | m_update |
True if a selection update is currently in progress. More... | |
Protected Attributes inherited from WPropertyWidget | |
std::shared_ptr< WPropertyBase > | m_property |
The property handled by the widget. More... | |
QGridLayout * | m_propertyGrid |
The grid used to layout label and widget. More... | |
WScaleLabel | m_label |
The label used to name the property. More... | |
QWidget | m_separator |
Separator after each property. More... | |
bool | m_useLabel |
If set to true, the widgets uses the control layout to combine the widget with a label. More... | |
QWidget | m_parameterWidgets |
The widget containing a layout and provides the edit widgets for the property. More... | |
QWidget | m_informationWidgets |
The widget containing a layout and provides the widgets for showing information properties. More... | |
bool | m_invalid |
Flag denoting whether the widget is set to an invalid value. More... | |
boost::signals2::connection | m_connection |
The connection for propertyChangeNotifier(). More... | |
QColor | m_sepCol |
The color to use for separators. More... | |
QColor | m_labelCol |
The color to use for the property labels. More... | |
QColor | m_propertyCol |
The color to use for property widgets. More... | |
QColor | m_errorCol |
Color used for indicating errors. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from WPropertyWidget | |
static WPropertyWidget * | construct (WPropertyBase::SPtr property, QGridLayout *propertyGrid=NULL, QWidget *parent=NULL) |
Constructs a proper widget for the specified property. More... | |
Implements a property widget for WPropSelection.
Definition at line 39 of file WPropertySelectionWidget.h.
WPropertySelectionWidget::WPropertySelectionWidget | ( | WPropSelection | property, |
QGridLayout * | propertyGrid, | ||
QWidget * | parent = 0 |
||
) |
Constructor.
Creates a new widget appropriate for the specified property.
property | the property to handle |
parent | the parent widget. |
propertyGrid | the grid used to layout the labels and property widgets |
Definition at line 67 of file WPropertySelectionWidget.cpp.
References comboSelectionChanged(), WQtGui::getMainWindow(), listSelectionChanged(), m_combo, WPropertyWidget::m_informationWidgets, m_layout, m_list, WPropertyWidget::m_parameterWidgets, WPropertyWidget::m_property, m_selectionProperty, and update().
|
virtual |
Destructor.
Definition at line 139 of file WPropertySelectionWidget.cpp.
|
slot |
Selection of the combobox has changed.
index | the new index |
Definition at line 263 of file WPropertySelectionWidget.cpp.
References WPropertyWidget::invalidate(), and m_selectionProperty.
Referenced by update(), and WPropertySelectionWidget().
|
slot |
Called whenever the selection in m_list has changed.
Definition at line 277 of file WPropertySelectionWidget.cpp.
References WPropertyWidget::invalidate(), m_list, m_selectionProperty, and m_update.
Referenced by update(), and WPropertySelectionWidget().
|
protectedvirtual |
Called whenever the widget should update.
Implements WPropertyWidget.
Definition at line 144 of file WPropertySelectionWidget.cpp.
References WItemSelector::atAll(), comboSelectionChanged(), WItemSelector::getItemIndexOfSelected(), listSelectionChanged(), WItemSelector::lock(), m_combo, m_list, m_selectionProperty, m_update, WItemSelector::size(), and WItemSelector::sizeAll().
Referenced by WPropertySelectionWidget().
|
protected |
The combobox holding all items.
Definition at line 76 of file WPropertySelectionWidget.h.
Referenced by update(), and WPropertySelectionWidget().
|
protected |
Layout used to position the label and the checkbox.
Definition at line 81 of file WPropertySelectionWidget.h.
Referenced by WPropertySelectionWidget().
|
protected |
The list holding all items.
Definition at line 71 of file WPropertySelectionWidget.h.
Referenced by listSelectionChanged(), update(), and WPropertySelectionWidget().
|
protected |
The integer property represented by this widget.
Definition at line 66 of file WPropertySelectionWidget.h.
Referenced by comboSelectionChanged(), listSelectionChanged(), update(), and WPropertySelectionWidget().
|
protected |
True if a selection update is currently in progress.
This is needed as QT does not provide a signal for selection changes which is NOT called when changed programmatically.
Definition at line 87 of file WPropertySelectionWidget.h.
Referenced by listSelectionChanged(), and update().