Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
pqPropertyWidget Class Reference

pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (for the proxy's properties or display properties). More...

#include <pqPropertyWidget.h>

Inheritance diagram for pqPropertyWidget:
Inheritance graph
[legend]

Public Slots

virtual void setView (pqView *)
 called to set the active view. More...
 

Signals

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

 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...
 

Static Public Member Functions

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

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...
 

Friends

class pqCompositePropertyWidgetDecorator
 
class pqPropertyWidgetDecorator
 
class pqProxyWidget
 

Detailed Description

pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (for the proxy's properties or display properties).

Definition at line 25 of file pqPropertyWidget.h.

Constructor & Destructor Documentation

◆ pqPropertyWidget()

pqPropertyWidget::pqPropertyWidget ( vtkSMProxy proxy,
QWidget *  parent = nullptr 
)

◆ ~pqPropertyWidget()

pqPropertyWidget::~pqPropertyWidget ( )
override

Member Function Documentation

◆ apply()

virtual void pqPropertyWidget::apply ( )
virtual

◆ reset()

virtual void pqPropertyWidget::reset ( )
virtual

◆ select()

virtual void pqPropertyWidget::select ( )
inlinevirtual

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 in pqInteractivePropertyWidgetAbstract, pqCheckableProperty, pqProxySelectionWidget, and pqProxyPropertyWidget.

Definition at line 48 of file pqPropertyWidget.h.

◆ selectPort()

virtual void pqPropertyWidget::selectPort ( int  portIndex)
inlinevirtual

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 in pqInteractivePropertyWidgetAbstract.

Definition at line 49 of file pqPropertyWidget.h.

◆ deselect()

virtual void pqPropertyWidget::deselect ( )
inlinevirtual

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 in pqInteractivePropertyWidgetAbstract, pqCheckableProperty, pqProxySelectionWidget, and pqProxyPropertyWidget.

Definition at line 50 of file pqPropertyWidget.h.

◆ isSelected()

bool pqPropertyWidget::isSelected ( ) const
inline

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.

Definition at line 51 of file pqPropertyWidget.h.

◆ updateWidget()

virtual void pqPropertyWidget::updateWidget ( bool  showing_advanced_properties)
inlinevirtual

◆ view()

pqView* pqPropertyWidget::view ( ) const

◆ proxy()

vtkSMProxy* pqPropertyWidget::proxy ( ) const

◆ property()

vtkSMProperty* pqPropertyWidget::property ( ) const

◆ panelVisibility()

virtual char* pqPropertyWidget::panelVisibility ( ) const
virtual

Forward calls to vtkSMProperty.

Are overwritten by pqPropertyGroupWidget to forward calls to vtkSMPropertyGroup

Reimplemented in pqPropertyGroupWidget.

◆ setPanelVisibility()

virtual void pqPropertyWidget::setPanelVisibility ( const char *  vis)
virtual

◆ isSingleRowItem()

virtual bool pqPropertyWidget::isSingleRowItem ( ) const
virtual

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 in pqCheckableProperty.

◆ showLabel()

bool pqPropertyWidget::showLabel ( ) const

◆ getXMLName()

template<class T >
static QString pqPropertyWidget::getXMLName ( T *  object)
inlinestatic

Description: This static utility method returns the XML name for an object as a QString.

This allows for code to get the XML name of an object without having to explicitly check for a possibly nullptr char* pointer.

This is templated so that it will work with a variety of objects such as vtkSMProperty's and vtkSMDomain's. It can be called with anything that has a "char* GetXMLName()" method.

For example, to get the XML name of a vtkSMIntRangeDomain: QString name = pqPropertyWidget::getXMLName(domain);

Definition at line 104 of file pqPropertyWidget.h.

◆ decorators()

const QList<QPointer<pqPropertyWidgetDecorator> >& pqPropertyWidget::decorators ( ) const
inline

Provides access to the decorators for this widget.

Definition at line 112 of file pqPropertyWidget.h.

◆ getTooltip()

static QString pqPropertyWidget::getTooltip ( vtkSMProperty property)
static

Returns the tooltip to use for the property.

May return an empty string.

◆ hintsWidgetHeightNumberOfRows()

static int pqPropertyWidget::hintsWidgetHeightNumberOfRows ( vtkPVXMLElement hints,
int  defaultValue = 10 
)
static

Helper method to return value from WidgetHeight XML hint, if any.

<WidgetHeight number_of_rows="val">,

◆ parseComponentLabels()

static std::vector<std::string> pqPropertyWidget::parseComponentLabels ( vtkPVXMLElement hints,
unsigned int  elemCount = 0 
)
static

Parse a XML element as a list of label to use for this widget.

This is usually the XML node named ShowComponentLabels in the hints of a proxy. elemCount is a hint of the number of labels to use. Set to 0 to use the number of labels existing in the XML.

◆ viewChanged

void pqPropertyWidget::viewChanged ( pqView view)
signal

This signal is emitted when the current view changes.

◆ changeAvailable

void pqPropertyWidget::changeAvailable ( )
signal

This signal is fired as soon as the user starts editing in the widget.

The editing may not be complete.

◆ changeFinished

void pqPropertyWidget::changeFinished ( )
signal

This signal is fired as soon as the user is done with making an atomic change.

changeAvailable() is always fired before changeFinished().

◆ restartRequired

void pqPropertyWidget::restartRequired ( )
signal

Indicates that a restart of the program is required for the setting to take effect.

◆ setView

virtual void pqPropertyWidget::setView ( pqView )
virtualslot

called to set the active view.

This will fire the viewChanged() signal.

Reimplemented in pqCheckableProperty, pqProxySelectionWidget, and pqInteractivePropertyWidgetAbstract.

◆ addPropertyLink() [1/2]

void pqPropertyWidget::addPropertyLink ( QObject *  qobject,
const char *  qproperty,
const char *  qsignal,
vtkSMProperty smproperty,
int  smindex = -1 
)
protected

◆ addPropertyLink() [2/2]

void pqPropertyWidget::addPropertyLink ( QObject *  qobject,
const char *  qproperty,
const char *  qsignal,
vtkSMProxy smproxy,
vtkSMProperty smproperty,
int  smindex = -1 
)
protected

◆ removePropertyLink() [1/2]

void pqPropertyWidget::removePropertyLink ( QObject *  qobject,
const char *  qproperty,
const char *  qsignal,
vtkSMProperty smproperty,
int  smindex = -1 
)
protected

◆ removePropertyLink() [2/2]

void pqPropertyWidget::removePropertyLink ( QObject *  qobject,
const char *  qproperty,
const char *  qsignal,
vtkSMProxy smproxy,
vtkSMProperty smproperty,
int  smindex = -1 
)
protected

◆ setShowLabel()

void pqPropertyWidget::setShowLabel ( bool  show)
protected

◆ setChangeAvailableAsChangeFinished()

void pqPropertyWidget::setChangeAvailableAsChangeFinished ( bool  status)
inlineprotected

For most pqPropertyWidget subclasses a changeAvailable() signal, corresponds to a changeFinished() signal.

Hence by default we connect the two together. For subclasses that don't follow this pattern should call this method with 'false' to disconnect changeAvailable() and changeFinished() signals. In that case, the subclass must explicitly fire changeFinished() signal.

Definition at line 189 of file pqPropertyWidget.h.

◆ addDecorator()

void pqPropertyWidget::addDecorator ( pqPropertyWidgetDecorator )
protected

Register a decorator.

The pqPropertyWidget takes over the ownership of the decorator. The decorator will be deleted when the pqPropertyWidget is destroyed.

◆ removeDecorator()

void pqPropertyWidget::removeDecorator ( pqPropertyWidgetDecorator )
protected

Unregisters a decorator.

◆ links()

pqPropertyLinks& pqPropertyWidget::links ( )
inlineprotected

Provides access to the pqPropertyLinks instance.

Definition at line 209 of file pqPropertyWidget.h.

◆ setProperty()

void pqPropertyWidget::setProperty ( vtkSMProperty property)

Friends And Related Function Documentation

◆ pqCompositePropertyWidgetDecorator

Definition at line 215 of file pqPropertyWidget.h.

◆ pqPropertyWidgetDecorator

friend class pqPropertyWidgetDecorator
friend

Definition at line 216 of file pqPropertyWidget.h.

◆ pqProxyWidget

friend class pqProxyWidget
friend

Definition at line 217 of file pqPropertyWidget.h.


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