pqPropertyWidget for properties with vtkDataAssembly More...
#include <pqDataAssemblyPropertyWidget.h>
Signals | |
void | selectorsChanged () |
void | colorsChanged () |
void | opacitiesChanged () |
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 | |
pqDataAssemblyPropertyWidget (vtkSMProxy *smproxy, vtkSMPropertyGroup *smgroup, QWidget *parent=nullptr) | |
pqDataAssemblyPropertyWidget (vtkSMProxy *smproxy, vtkSMProperty *smproperty, QWidget *parent=nullptr) | |
~pqDataAssemblyPropertyWidget () override | |
void | updateWidget (bool showing_advanced_properties) override |
void | setSelectors (const QStringList &paths) |
API for getting/setting selected/chosen path strings. More... | |
const QStringList & | selectors () const |
API for getting/setting selected/chosen path strings. More... | |
void | setSelectors (const QList< QVariant > &paths) |
API for getting/setting selected/chosen path strings. More... | |
QList< QVariant > | selectorsAsVariantList () const |
API for getting/setting selected/chosen path strings. More... | |
void | setCompositeIndices (const QList< QVariant > &values) |
API for getting/settings composite indices. More... | |
QList< QVariant > | compositeIndicesAsVariantList () const |
API for getting/settings composite indices. More... | |
void | setCompositeIndexColors (const QList< QVariant > &values) |
API to get/set colors. More... | |
QList< QVariant > | compositeIndexColorsAsVariantList () const |
API to get/set colors. More... | |
void | setSelectorColors (const QList< QVariant > &values) |
API to get/set colors. More... | |
QList< QVariant > | selectorColorsAsVariantList () const |
API to get/set colors. More... | |
void | setCompositeIndexOpacities (const QList< QVariant > &values) |
API to get/set opacities. More... | |
QList< QVariant > | compositeIndexOpacitiesAsVariantList () const |
API to get/set opacities. More... | |
void | setSelectorOpacities (const QList< QVariant > &values) |
API to get/set opacities. More... | |
QList< QVariant > | selectorOpacitiesAsVariantList () const |
API to get/set opacities. More... | |
Public Member Functions inherited from pqPropertyWidget | |
pqPropertyWidget (vtkSMProxy *proxy, QWidget *parent=nullptr) | |
~pqPropertyWidget () override | |
virtual void | apply () |
virtual void | reset () |
pqView * | view () const |
vtkSMProxy * | proxy () const |
vtkSMProperty * | property () 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... | |
virtual void | setReadOnly (bool readOnly) |
Set widget in read-only mode. More... | |
void | setProperty (vtkSMProperty *property) |
virtual void | select () |
These methods are called by pqPropertiesPanel when the panel for proxy becomes active/deactive. More... | |
virtual void | selectPort (int portIndex) |
These methods are called by pqPropertiesPanel when the panel for proxy becomes active/deactive. More... | |
virtual void | deselect () |
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 | |
QList< QVariant > | selectors |
Property with selectors/composite indices for checked nodes in the hierarchy. More... | |
QList< QVariant > | compositeIndices |
Property with selectors/composite indices for checked nodes in the hierarchy. More... | |
QList< QVariant > | selectorColors |
Property with selectors/composite indices and associated colors (as RGB). More... | |
QList< QVariant > | compositeIndexColors |
Property with selectors/composite indices and associated colors (as RGB). More... | |
QList< QVariant > | selectorOpacities |
Properties with selectors/composite indieces and associated opacities. More... | |
QList< QVariant > | compositeIndexOpacities |
Properties with selectors/composite indieces and associated opacities. More... | |
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... | |
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... | |
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... | |
pqPropertyLinks & | links () |
Provides access to the pqPropertyLinks instance. More... | |
pqPropertyWidget for properties with vtkDataAssembly
pqDataAssemblyPropertyWidget is intended for properties that rely on a vtkDataAssembly i.e. use a vtkSMDataAssemblyDomain. This supports getting/setting the list of selectors for checked nodes based on the chosen vtkDataAssembly. Further more, it supports show the state and resetting block properties.
pqDataAssemblyPropertyWidget can be used on a single property with a vtkSMDataAssemblyDomain or for a group of properties. For a single property, it allows for editing on selectors for checked nodes.
Here's an example proxy XML for a single property.
The widget will use the assembly provided by vtkSMDataAssemblyDomain::GetDataAssembly
to render a tree in UI.
A property-group for choosing which named-assembly to use is as follows. All properties in the group are optional and one may specify on subset that is relevant for their use-case. It is assumed, however, that all properties in the group use the same data assembly. If that's not the case, one should use separate property groups, hence separate widgets, for each.
This widget is primarily intended for vtkSMDataAssemblyDomain. However, to support legacy code that uses vtkSMCompositeTreeDomain instead, we add support for vtkSMCompositeTreeDomain as well. It is required, however, that all properties in the group to consistently use vtkSMDataAssemblyDomain or vtkSMCompositeTreeDomain and mixing is not allowed.
TODO: Remove the usage of vtkSMCompositeTreeDomain.
This widget supports hints that can be added to the group (or property). For example:
is_checkable
can be set to 0
to avoid showing checkboxes for items in the tree.
use_inputname_as_header
, when set to 1
causes the widget to use the input's registration name as the header for the tree widget rather than the XML label for the group (or property) attached to the widget.
link_active_selection
, when set to 1
causes the widget to track the active block-selection and vice-versa.
Definition at line 157 of file pqDataAssemblyPropertyWidget.h.
pqDataAssemblyPropertyWidget::pqDataAssemblyPropertyWidget | ( | vtkSMProxy * | smproxy, |
vtkSMPropertyGroup * | smgroup, | ||
QWidget * | parent = nullptr |
||
) |
pqDataAssemblyPropertyWidget::pqDataAssemblyPropertyWidget | ( | vtkSMProxy * | smproxy, |
vtkSMProperty * | smproperty, | ||
QWidget * | parent = nullptr |
||
) |
|
override |
void pqDataAssemblyPropertyWidget::setSelectors | ( | const QStringList & | paths | ) |
API for getting/setting selected/chosen path strings.
const QStringList& pqDataAssemblyPropertyWidget::selectors | ( | ) | const |
API for getting/setting selected/chosen path strings.
void pqDataAssemblyPropertyWidget::setSelectors | ( | const QList< QVariant > & | paths | ) |
API for getting/setting selected/chosen path strings.
QList<QVariant> pqDataAssemblyPropertyWidget::selectorsAsVariantList | ( | ) | const |
API for getting/setting selected/chosen path strings.
void pqDataAssemblyPropertyWidget::setCompositeIndices | ( | const QList< QVariant > & | values | ) |
API for getting/settings composite indices.
QList<QVariant> pqDataAssemblyPropertyWidget::compositeIndicesAsVariantList | ( | ) | const |
API for getting/settings composite indices.
|
inline |
API to get/set colors.
Colors are specified either as a list of selectors followed by corresponding RGB color or list of composite indices followed by the color.
Definition at line 227 of file pqDataAssemblyPropertyWidget.h.
|
inline |
API to get/set colors.
Colors are specified either as a list of selectors followed by corresponding RGB color or list of composite indices followed by the color.
Definition at line 229 of file pqDataAssemblyPropertyWidget.h.
|
inline |
API to get/set colors.
Colors are specified either as a list of selectors followed by corresponding RGB color or list of composite indices followed by the color.
Definition at line 232 of file pqDataAssemblyPropertyWidget.h.
|
inline |
API to get/set colors.
Colors are specified either as a list of selectors followed by corresponding RGB color or list of composite indices followed by the color.
Definition at line 234 of file pqDataAssemblyPropertyWidget.h.
|
inline |
API to get/set opacities.
Opacities are specified either as a list of selectors followed by corresponding opacity or list of composite indices followed by the opacity.
Definition at line 244 of file pqDataAssemblyPropertyWidget.h.
|
inline |
API to get/set opacities.
Opacities are specified either as a list of selectors followed by corresponding opacity or list of composite indices followed by the opacity.
Definition at line 246 of file pqDataAssemblyPropertyWidget.h.
|
inline |
API to get/set opacities.
Opacities are specified either as a list of selectors followed by corresponding opacity or list of composite indices followed by the opacity.
Definition at line 249 of file pqDataAssemblyPropertyWidget.h.
|
inline |
API to get/set opacities.
Opacities are specified either as a list of selectors followed by corresponding opacity or list of composite indices followed by the opacity.
Definition at line 251 of file pqDataAssemblyPropertyWidget.h.
|
overridevirtual |
Reimplemented from pqPropertyWidget.
|
signal |
|
signal |
|
signal |
|
readwrite |
Property with selectors/composite indices for checked nodes in the hierarchy.
Definition at line 167 of file pqDataAssemblyPropertyWidget.h.
|
readwrite |
Property with selectors/composite indices for checked nodes in the hierarchy.
Definition at line 167 of file pqDataAssemblyPropertyWidget.h.
|
readwrite |
Property with selectors/composite indices and associated colors (as RGB).
Definition at line 169 of file pqDataAssemblyPropertyWidget.h.
|
readwrite |
Property with selectors/composite indices and associated colors (as RGB).
Definition at line 178 of file pqDataAssemblyPropertyWidget.h.
|
readwrite |
Properties with selectors/composite indieces and associated opacities.
Definition at line 181 of file pqDataAssemblyPropertyWidget.h.
|
readwrite |
Properties with selectors/composite indieces and associated opacities.
Definition at line 190 of file pqDataAssemblyPropertyWidget.h.