Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
pqPropertyWidgetDecorator Class Reference

pqPropertyWidgetDecorator provides a mechanism to decorate pqPropertyWidget instances to add logic to the widget to add additional control logic. More...

#include <pqPropertyWidgetDecorator.h>

Inheritance diagram for pqPropertyWidgetDecorator:
Inheritance graph
[legend]

Signals

void visibilityChanged ()
 This signal is fired whenever the decorator has determined that the panel may need a refresh since the state of the system has changed which would deem changes in the widget visibility or enable state. More...
 
void enableStateChanged ()
 

Public Member Functions

 pqPropertyWidgetDecorator (vtkPVXMLElement *xml, pqPropertyWidget *parent)
 Constructor. More...
 
 ~pqPropertyWidgetDecorator () override
 
pqPropertyWidgetparentWidget () const
 Returns the pqPropertyWidget parent. More...
 
virtual bool canShowWidget (bool show_advanced) const
 Override this method to override the visibility of the widget in the panel. More...
 
virtual bool enableWidget () const
 Override this method to override the enable state of the widget in the panel. More...
 

Static Public Member Functions

static pqPropertyWidgetDecoratorcreate (vtkPVXMLElement *xml, pqPropertyWidget *parent)
 Creates a new decorator, given the xml config and the parent pqPropertyWidget for the decorator. More...
 

Protected Member Functions

vtkPVXMLElementxml () const
 

Detailed Description

pqPropertyWidgetDecorator provides a mechanism to decorate pqPropertyWidget instances to add logic to the widget to add additional control logic.

Subclasses can be used to logic to control when the widget is enabled/disabled, hidden/visible, etc. based on values of other properties of UI elements.

Definition at line 19 of file pqPropertyWidgetDecorator.h.

Constructor & Destructor Documentation

◆ pqPropertyWidgetDecorator()

pqPropertyWidgetDecorator::pqPropertyWidgetDecorator ( vtkPVXMLElement xml,
pqPropertyWidget parent 
)

Constructor.

Parameters
xmlThe XML element from the <Hints/> section for the proxy/property that resulted in the creation of the decorator. Decorators can be provided configuration parameters from the XML.
parentParent widget

◆ ~pqPropertyWidgetDecorator()

pqPropertyWidgetDecorator::~pqPropertyWidgetDecorator ( )
override

Member Function Documentation

◆ parentWidget()

pqPropertyWidget* pqPropertyWidgetDecorator::parentWidget ( ) const

Returns the pqPropertyWidget parent.

◆ canShowWidget()

virtual bool pqPropertyWidgetDecorator::canShowWidget ( bool  show_advanced) const
inlinevirtual

Override this method to override the visibility of the widget in the panel.

This is called after the generic tests for advanced and text filtering are passed. Since there can be multiple decorators, the first decorator that returns 'false' wins. Default implementation returns true. Thus subclasses typically override this method only to force the widget invisible given the current state.

Reimplemented in pqCompositePropertyWidgetDecorator, pqSessionTypeDecorator, pqGenericPropertyWidgetDecorator, pqInputDataTypeDecorator, pqMultiComponentsDecorator, pqOSPRayHidingDecorator, pqShowWidgetDecorator, and pqOpenVRHidingDecorator.

Definition at line 49 of file pqPropertyWidgetDecorator.h.

◆ enableWidget()

virtual bool pqPropertyWidgetDecorator::enableWidget ( ) const
inlinevirtual

Override this method to override the enable state of the widget in the panel.

This is called after the generic tests for advanced and text filtering are passed. Since there can be multiple decorators, the first decorator that returns 'false' wins. Default implementation returns true. Thus subclasses typically override this method only to force the widget disabled given the current state.

Reimplemented in pqCompositePropertyWidgetDecorator, pqSessionTypeDecorator, pqGenericPropertyWidgetDecorator, pqInputDataTypeDecorator, and pqEnableWidgetDecorator.

Definition at line 63 of file pqPropertyWidgetDecorator.h.

◆ create()

static pqPropertyWidgetDecorator* pqPropertyWidgetDecorator::create ( vtkPVXMLElement xml,
pqPropertyWidget parent 
)
static

Creates a new decorator, given the xml config and the parent pqPropertyWidget for the decorator.

◆ visibilityChanged

void pqPropertyWidgetDecorator::visibilityChanged ( )
signal

This signal is fired whenever the decorator has determined that the panel may need a refresh since the state of the system has changed which would deem changes in the widget visibility or enable state.

◆ enableStateChanged

void pqPropertyWidgetDecorator::enableStateChanged ( )
signal

◆ xml()

vtkPVXMLElement* pqPropertyWidgetDecorator::xml ( ) const
protected

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