Signals | Public Member Functions | List of all members
pqPropertyCollectionWidget Class Reference

property widget for properties representing collection of parameters. More...

#include <pqPropertyCollectionWidget.h>

Inheritance diagram for pqPropertyCollectionWidget:
Inheritance graph
Collaboration diagram for pqPropertyCollectionWidget:
Collaboration graph


void widgetModified ()
- 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...

Public Member Functions

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

Additional Inherited Members

- Public Slots inherited from pqPropertyWidget
virtual void setView (pqView *)
 called to set the active view. 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...
- 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 collection of parameters.

pqPropertyCollectionWidget is designed for a specific use-case: a group of properties on a proxy all of which are repeatable vector properties (i.e. vtkSMVectorProperty subclasses) where each repeatable item in the collection is to be edited together. Another way of describing the same is that each vector property in the group defines a column in a table with user having the ability to add and remove rows to this table. However, instead of showing a literal tabular widget to edit values in each row, a prototype proxy definition is provided using hints.

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

<SourceProxy class="vtkSteeringDataGenerator" name="Oscillators">
<DoubleVectorProperty name="Center"
<IntVectorProperty name="Type"
<PropertyGroup label="Oscillators" panel_widget="PropertyCollection">
<Property name="Center" function="PrototypeCenter" />
<Property name="Type" function="PrototypeType" />
<!-- here, "name" identifies the property on this proxy, while
"function" identifies the property on the prototype proxy. If
"function" is not specified, same value as "name" is assumed. -->
<PropertyCollectionWidgetPrototype group="misc" name="OscillatorPrototype" />

The prototype proxy to use to build the UI for each row in this table that has two columns for "Center" and "Type" is identified using the PropertyCollectionWidgetPrototype hint added to the PropertyGroup element. Following is an example definition:

<ProxyGroup name="misc">
<Proxy name="OscillatorPrototype" label="Oscillator" >
<DoubleVectorProperty name="PrototypeCenter"
default_values="0 0 0">
<DoubleRangeDomain name="range" />
Specify center for the oscillator.
<IntVectorProperty name="PrototypeType"
<EnumerationDomain name="enum">
<Entry text="damped" value="0" />
<Entry text="decaying" value="1" />
<Entry text="periodic" value="2" />

A few things to note:

Definition at line 128 of file pqPropertyCollectionWidget.h.

Constructor & Destructor Documentation

◆ pqPropertyCollectionWidget()

pqPropertyCollectionWidget::pqPropertyCollectionWidget ( vtkSMProxy proxy,
vtkSMPropertyGroup smgroup,
QWidget *  parent = 0 

◆ ~pqPropertyCollectionWidget()

pqPropertyCollectionWidget::~pqPropertyCollectionWidget ( )

Member Function Documentation

◆ event()

bool pqPropertyCollectionWidget::event ( QEvent *  e)

Overridden to handle QDynamicPropertyChangeEvent events.

◆ widgetModified

void pqPropertyCollectionWidget::widgetModified ( )

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