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

pqPropertyWidget subclass for properties with vtkSMArrayListDomain. More...

#include <pqArraySelectorPropertyWidget.h>

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

Public Slots

void setArray (int assoc, const QString &val)
 Set the chosen array name and association. More...
 
void setArray (const QList< QVariant > &val)
 A setArray overload useful to expose the setArray using Qt's property system. More...
 
void setArrayName (const QString &name)
 Set the array name without caring for the array association. More...
 
- Public Slots inherited from pqPropertyWidget
virtual void setView (pqView *)
 called to set the active view. More...
 

Signals

void arrayChanged ()
 
- 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

 pqArraySelectorPropertyWidget (vtkSMProperty *smproperty, vtkSMProxy *smproxy, QWidget *parent=nullptr)
 
 pqArraySelectorPropertyWidget (vtkSMProperty *smproperty, vtkSMProxy *smproxy, std::initializer_list< QPair< int, QString >> knownArrays, QWidget *parent=nullptr)
 
 ~pqArraySelectorPropertyWidget () override
 
QString arrayName () const
 Returns the chosen array name. More...
 
int arrayAssociation () const
 Returns the chosen array association. More...
 
QList< QVariant > array () const
 Returns the {association, name} for the chosen array. More...
 
- Public Member Functions inherited from pqPropertyWidget
 pqPropertyWidget (vtkSMProxy *proxy, QWidget *parent=nullptr)
 
 ~pqPropertyWidget () override
 
virtual void apply ()
 
virtual void reset ()
 
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)
 
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 > array
 
QString arrayName
 

Additional Inherited Members

- 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

pqPropertyWidget subclass for properties with vtkSMArrayListDomain.

pqArraySelectorPropertyWidget is intended to be used for vtkSMStringVectorProperty instances that have a vtkSMArrayListDomain domain and want to show a single combo-box to allow the user to choose the array to use.

We support non-repeatable string-vector property with a 1, 2, or 5 elements. When 1 element is present, we interpret the property value as the name of chosen array, thus the user won't be able to pick array association. While for 2 and 5 element properties the array association and name can be picked.

The list of available arrays is built using the vtkSMArrayListDomain and updated anytime the domain is updated. If the currently chosen value is no longer in the domain, we will preserve it and flag it by adding a (?) suffix to the displayed label.

pqStringVectorPropertyWidget::createWidget instantiates this for any string vector property with a vtkSMArrayListDomain that is not repeatable.

Pre-defined entries can be provided with the KnownArrays argument when constructing the widget.

Definition at line 38 of file pqArraySelectorPropertyWidget.h.

Constructor & Destructor Documentation

◆ pqArraySelectorPropertyWidget() [1/2]

pqArraySelectorPropertyWidget::pqArraySelectorPropertyWidget ( vtkSMProperty smproperty,
vtkSMProxy smproxy,
QWidget *  parent = nullptr 
)

◆ pqArraySelectorPropertyWidget() [2/2]

pqArraySelectorPropertyWidget::pqArraySelectorPropertyWidget ( vtkSMProperty smproperty,
vtkSMProxy smproxy,
std::initializer_list< QPair< int, QString >>  knownArrays,
QWidget *  parent = nullptr 
)

◆ ~pqArraySelectorPropertyWidget()

pqArraySelectorPropertyWidget::~pqArraySelectorPropertyWidget ( )
override

Member Function Documentation

◆ arrayName()

QString pqArraySelectorPropertyWidget::arrayName ( ) const

Returns the chosen array name.

◆ arrayAssociation()

int pqArraySelectorPropertyWidget::arrayAssociation ( ) const

Returns the chosen array association.

◆ array()

QList<QVariant> pqArraySelectorPropertyWidget::array ( ) const

Returns the {association, name} for the chosen array.

◆ setArray [1/2]

void pqArraySelectorPropertyWidget::setArray ( int  assoc,
const QString &  val 
)
slot

Set the chosen array name and association.

◆ setArray [2/2]

void pqArraySelectorPropertyWidget::setArray ( const QList< QVariant > &  val)
slot

A setArray overload useful to expose the setArray using Qt's property system.

val must be a two-tuple.

◆ setArrayName

void pqArraySelectorPropertyWidget::setArrayName ( const QString &  name)
slot

Set the array name without caring for the array association.

In general, this is only meant to be used for connecting to a SMProperty which only lets the user choose the array name and not the association.

◆ arrayChanged

void pqArraySelectorPropertyWidget::arrayChanged ( )
signal

Property Documentation

◆ array

QList<QVariant> pqArraySelectorPropertyWidget::array
readwrite

Definition at line 43 of file pqArraySelectorPropertyWidget.h.

◆ arrayName

QString pqArraySelectorPropertyWidget::arrayName
readwrite

Definition at line 43 of file pqArraySelectorPropertyWidget.h.


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