Public Member Functions | Friends | List of all members
pqCompositePropertyWidgetDecorator Class Reference

pqPropertyWidgetDecorator subclass that can combine multiple decorators using boolean operations. More...

#include <pqCompositePropertyWidgetDecorator.h>

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

Public Member Functions

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

Friends

class pqInternals
 

Additional Inherited Members

- Signals inherited from pqPropertyWidgetDecorator
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 ()
 
- Static Public Member Functions inherited from pqPropertyWidgetDecorator
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 inherited from pqPropertyWidgetDecorator
vtkPVXMLElementxml () const
 

Detailed Description

pqPropertyWidgetDecorator subclass that can combine multiple decorators using boolean operations.

pqCompositePropertyWidgetDecorator helps combine multiple decorators using boolean operators as indicated in the example below.

<IntVectorProperty name="Expression1"
number_of_elements="1"
default_values="0">
<BooleanDomain name="bool" />
<Hints>
<!-- Expression === { A and [B or (C and D)] } or E -->
<PropertyWidgetDecorator type="CompositeDecorator">
<Expression type="or">
<Expression type="and">
<PropertyWidgetDecorator type="GenericDecorator" mode="enabled_state" property="A"
value="1" />
<Expression type="or">
<PropertyWidgetDecorator type="GenericDecorator" mode="enabled_state" property="B"
value="1" />
<Expression type="and">
<PropertyWidgetDecorator type="GenericDecorator" mode="enabled_state" property="C"
value="1" />
<PropertyWidgetDecorator type="GenericDecorator" mode="enabled_state" property="D"
value="1" />
</Expression>
</Expression>
</Expression>
<PropertyWidgetDecorator type="GenericDecorator" mode="enabled_state" property="E"
value="1" />
</Expression>
</PropertyWidgetDecorator>
</Hints>
</IntVectorProperty>

Definition at line 50 of file pqCompositePropertyWidgetDecorator.h.

Constructor & Destructor Documentation

◆ pqCompositePropertyWidgetDecorator()

pqCompositePropertyWidgetDecorator::pqCompositePropertyWidgetDecorator ( vtkPVXMLElement xml,
pqPropertyWidget parent 
)

◆ ~pqCompositePropertyWidgetDecorator()

pqCompositePropertyWidgetDecorator::~pqCompositePropertyWidgetDecorator ( )
override

Member Function Documentation

◆ canShowWidget()

bool pqCompositePropertyWidgetDecorator::canShowWidget ( bool  show_advanced) const
overridevirtual

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

◆ enableWidget()

bool pqCompositePropertyWidgetDecorator::enableWidget ( ) const
overridevirtual

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

Friends And Related Function Documentation

◆ pqInternals

friend class pqInternals
friend

Definition at line 67 of file pqCompositePropertyWidgetDecorator.h.


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