Public Slots | Public Member Functions | Properties | List of all members
pqCheckableProperty Class Reference

property widget for properties representing a checkable property. More...

#include <pqCheckableProperty.h>

Inheritance diagram for pqCheckableProperty:
Inheritance graph
[legend]
Collaboration diagram for pqCheckableProperty:
Collaboration graph
[legend]

Public Slots

void setEnableCheckbox (bool enableCheckbox)
 
- Public Slots inherited from pqPropertyWidget

Public Member Functions

 pqCheckableProperty (vtkSMProxy *proxy, vtkSMPropertyGroup *smgroup, QWidget *parent=nullptr)
 
 ~pqCheckableProperty () override
 
void apply () override
 
void reset () override
 
void select () override
 These methods are called by pqPropertiesPanel when the panel for proxy becomes active/deactive. More...
 
void deselect () override
 These methods are called by pqPropertiesPanel when the panel for proxy becomes active/deactive. More...
 
void updateWidget (bool showing_advanced_properties) override
 
void setPanelVisibility (const char *vis) override
 
void setView (pqView *) override
 called to set the active view. More...
 
bool isSingleRowItem () const override
 Determines if the PropertyWidget must be constructed using a single row. More...
 
bool enableCheckbox () const
 
- Public Member Functions inherited from pqPropertyWidget
 pqPropertyWidget (vtkSMProxy *proxy, QWidget *parent=nullptr)
 
 ~pqPropertyWidget () override
 
pqViewview () const
 
vtkSMProxyproxy () const
 
vtkSMPropertyproperty () const
 
virtual char * panelVisibility () const
 Forward calls to vtkSMProperty. More...
 
bool showLabel () const
 
const QList< QPointer< pqPropertyWidgetDecorator > > & decorators () const
 Provides access to the decorators for this widget. More...
 
void setProperty (vtkSMProperty *property)
 
virtual void selectPort (int portIndex)
 These methods are called by pqPropertiesPanel when the panel for proxy becomes active/deactive. More...
 
bool isSelected () const
 These methods are called by pqPropertiesPanel when the panel for proxy becomes active/deactive. More...
 

Properties

bool enableCheckbox
 

Additional Inherited Members

- Signals inherited from pqPropertyWidget
void viewChanged (pqView *view)
 This signal is emitted when the current view changes. More...
 
void changeAvailable ()
 This signal is fired as soon as the user starts editing in the widget. More...
 
void changeFinished ()
 This signal is fired as soon as the user is done with making an atomic change. More...
 
void restartRequired ()
 Indicates that a restart of the program is required for the setting to take effect. More...
 
- Static Public Member Functions inherited from pqPropertyWidget
template<class T >
static QString getXMLName (T *object)
 Description: This static utility method returns the XML name for an object as a QString. More...
 
static QString getTooltip (vtkSMProperty *property)
 Returns the tooltip to use for the property. More...
 
static int hintsWidgetHeightNumberOfRows (vtkPVXMLElement *hints, int defaultValue=10)
 Helper method to return value from WidgetHeight XML hint, if any. More...
 
static std::vector< std::stringparseComponentLabels (vtkPVXMLElement *hints, unsigned int elemCount=0)
 Parse a XML element as a list of label to use for this widget. More...
 
- Protected Member Functions inherited from pqPropertyWidget
void addPropertyLink (QObject *qobject, const char *qproperty, const char *qsignal, vtkSMProperty *smproperty, int smindex=-1)
 
void addPropertyLink (QObject *qobject, const char *qproperty, const char *qsignal, vtkSMProxy *smproxy, vtkSMProperty *smproperty, int smindex=-1)
 
void removePropertyLink (QObject *qobject, const char *qproperty, const char *qsignal, vtkSMProperty *smproperty, int smindex=-1)
 
void removePropertyLink (QObject *qobject, const char *qproperty, const char *qsignal, vtkSMProxy *smproxy, vtkSMProperty *smproperty, int smindex=-1)
 
void setShowLabel (bool show)
 
void setChangeAvailableAsChangeFinished (bool status)
 For most pqPropertyWidget subclasses a changeAvailable() signal, corresponds to a changeFinished() signal. More...
 
void addDecorator (pqPropertyWidgetDecorator *)
 Register a decorator. More...
 
void removeDecorator (pqPropertyWidgetDecorator *)
 Unregisters a decorator. More...
 
pqPropertyLinkslinks ()
 Provides access to the pqPropertyLinks instance. More...
 

Detailed Description

property widget for properties representing a checkable property.

pqCheckableProperty is designed for a specific use-case: a property that can be enabled or disabled by a checkbox. This is useful for optional properties since it restrains the user to use the property unless it is really needed.

Example proxy definition(s) that use this widget is as follows:

<ServerManagerConfiguration>
<ProxyGroup name="sources">
<SourceProxy name="CustomSource" class="vtkSphereSource">
<DoubleVectorProperty name="PropertyA"
number_of_elements="1"
default_values="0">
<DoubleRangeDomain name="range" min="0" max="10" />
</DoubleVectorProperty>
<IntVectorProperty name="EnablePropertyA"
number_of_elements="1"
default_values="0">
<BooleanDomain name="bool" />
</IntVectorProperty>
<PropertyGroup label="Property A" panel_widget="CheckableProperty">
<Property name="PropertyA" function="Property" />
<Property name="EnablePropertyA" function="PropertyCheckBox" />
</PropertyGroup>
</SourceProxy>
</ProxyGroup>
</ServerManagerConfiguration>

Definition at line 47 of file pqCheckableProperty.h.

Constructor & Destructor Documentation

◆ pqCheckableProperty()

pqCheckableProperty::pqCheckableProperty ( vtkSMProxy proxy,
vtkSMPropertyGroup smgroup,
QWidget *  parent = nullptr 
)

◆ ~pqCheckableProperty()

pqCheckableProperty::~pqCheckableProperty ( )
override

Member Function Documentation

◆ apply()

void pqCheckableProperty::apply ( )
overridevirtual

Reimplemented from pqPropertyWidget.

◆ reset()

void pqCheckableProperty::reset ( )
overridevirtual

Reimplemented from pqPropertyWidget.

◆ select()

void pqCheckableProperty::select ( )
overridevirtual

These methods are called by pqPropertiesPanel when the panel for proxy becomes active/deactive.

Only widgets that have interactive widgets need to override these methods to select/deselect the interactive widgets. selectPort(int) allows to specify an output port index and conditionnaly select the interactive widget if the XML hint WidgetVisibilityLink has been set. Default implementation does nothing.

Reimplemented from pqPropertyWidget.

◆ deselect()

void pqCheckableProperty::deselect ( )
overridevirtual

These methods are called by pqPropertiesPanel when the panel for proxy becomes active/deactive.

Only widgets that have interactive widgets need to override these methods to select/deselect the interactive widgets. selectPort(int) allows to specify an output port index and conditionnaly select the interactive widget if the XML hint WidgetVisibilityLink has been set. Default implementation does nothing.

Reimplemented from pqPropertyWidget.

◆ updateWidget()

void pqCheckableProperty::updateWidget ( bool  showing_advanced_properties)
overridevirtual

Reimplemented from pqPropertyWidget.

◆ setPanelVisibility()

void pqCheckableProperty::setPanelVisibility ( const char *  vis)
overridevirtual

Reimplemented from pqPropertyWidget.

◆ setView()

void pqCheckableProperty::setView ( pqView )
overridevirtual

called to set the active view.

This will fire the viewChanged() signal.

Reimplemented from pqPropertyWidget.

◆ isSingleRowItem()

bool pqCheckableProperty::isSingleRowItem ( ) const
overridevirtual

Determines if the PropertyWidget must be constructed using a single row.

Originally intended for PropertyWidgets which are a group of other Propertywidgets, such as pqCheckableProperty. This mandates that when the widget is rendered, its label to be placed in the same row as the widget group.

See also
pqProxyWidgetItem::newGroupItem

Reimplemented from pqPropertyWidget.

◆ enableCheckbox()

bool pqCheckableProperty::enableCheckbox ( ) const

◆ setEnableCheckbox

void pqCheckableProperty::setEnableCheckbox ( bool  enableCheckbox)
slot

Property Documentation

◆ enableCheckbox

bool pqCheckableProperty::enableCheckbox
readwrite

Definition at line 71 of file pqCheckableProperty.h.


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