|
virtual void | setView (pqView *) |
| called to set the active view. More...
|
|
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::string > | parseComponentLabels (vtkPVXMLElement *hints, unsigned int elemCount=0) |
| Parse a XML element as a list of label to use for this widget. More...
|
|
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...
|
|
pqPropertyLinks & | links () |
| Provides access to the pqPropertyLinks instance. More...
|
|
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"
command="SetTuple3Double"
use_index="1"
clean_command="Clear"
initial_string="coords"
number_of_elements_per_command="3"
repeat_command="1">
</DoubleVectorProperty>
<IntVectorProperty name="Type"
command="SetTuple1Int"
clean_command="Clear"
use_index="1"
initial_string="type"
number_of_elements_per_command="1"
repeat_command="1">
</IntVectorProperty>
<PropertyGroup label="Oscillators" panel_widget="PropertyCollection">
<Property name="Center" function="PrototypeCenter" />
<Property name="Type" function="PrototypeType" />
<Hints>
<PropertyCollectionWidgetPrototype group="misc" name="OscillatorPrototype" />
</Hints>
</PropertyGroup>
</SourceProxy>
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"
label="Center"
number_of_elements="3"
default_values="0 0 0">
<DoubleRangeDomain name="range" />
<Documentation>
Specify center for the oscillator.
</Documentation>
</DoubleVectorProperty>
<IntVectorProperty name="PrototypeType"
label="Type"
number_of_elements="1"
default_values="0">
<EnumerationDomain name="enum">
<Entry text="damped" value="0" />
<Entry text="decaying" value="1" />
<Entry text="periodic" value="2" />
</EnumerationDomain>
</IntVectorProperty>
</Proxy>
</ProxyGroup>
A few things to note:
- Only vtkSMVectorProperty subclasses are supported and types must match between the property in the group and corresponding property on the prototype proxy.
- For each property in the group, the
number_of_elements_per_command
matches the number_of_elements
on the corresponding property on the prototype proxy.
Definition at line 100 of file pqPropertyCollectionWidget.h.