Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Properties | List of all members
pqInteractivePropertyWidgetAbstract Class Referenceabstract

pqInteractivePropertyWidgetAbstract is an abstract pqPropertyWidget subclass designed to serve as the superclass for all pqPropertyWidget types that have interactive widget, either in a chart or in a 3D view. More...

#include <pqInteractivePropertyWidgetAbstract.h>

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

Public Slots

virtual void setWidgetVisible (bool val)
 Toggle the interactive widget's visibility. More...
 
void setDataSource (vtkSMProxy *dataSource)
 DataSource is used by interactive widgets to determine now to place the widget in the view e.g. More...
 
- Public Slots inherited from pqPropertyWidget

Signals

void widgetVisibilityToggled (bool)
 Fired whenever setWidgetVisible() changes the widget's visibility. More...
 
void widgetVisibilityUpdated (bool)
 Fired whenever the widgets visibility is updated for whatever reason, be it because the panel was selected/deselected or the view changed, etc. More...
 
void startInteraction ()
 Fired by the underlying interactive widget representation proxy, for each respective events. More...
 
void interaction ()
 Fired by the underlying interactive widget representation proxy, for each respective events. More...
 
void endInteraction ()
 Fired by the underlying interactive widget representation proxy, for each respective events. More...
 
- 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

 pqInteractivePropertyWidgetAbstract (const char *widget_smgroup, const char *widget_smname, vtkSMProxy *proxy, vtkSMPropertyGroup *smgroup, QWidget *parent=nullptr)
 
 ~pqInteractivePropertyWidgetAbstract () override
 
void reset () override
 Overridden to call this->render() to ensure that the widget is redrawn. More...
 
void setView (pqView *view) override
 Overridden to show the widget proxy in the new view. More...
 
bool isWidgetVisible () const
 Returns the interactive widget's visibility. More...
 
vtkSMProxydataSource () const
 Returns the data source. More...
 
vtkBoundingBox dataBounds (bool visibleOnly=false) const
 Returns bounds from the dataSource, if possible. More...
 
vtkSMPropertyGrouppropertyGroup () const
 Returns the vtkSMPropertyGroup pass to the constructor. More...
 
void hideEvent (QHideEvent *) override
 Overriden in order to hide the VTK widget. More...
 
void showEvent (QShowEvent *) override
 Overriden in order to show the VTK widget. More...
 
void select () override
 In these methods, we show/hide the widget since the interactive widget is not supposed to be visible except when the panel is "active" or "selected". More...
 
void deselect () override
 In these methods, we show/hide the widget since the interactive widget is not supposed to be visible except when the panel is "active" or "selected". More...
 
void selectPort (int portIndex) final
 In these methods, we show/hide the widget since the interactive widget is not supposed to be visible except when the panel is "active" or "selected". More...
 
- Public Member Functions inherited from pqPropertyWidget
 pqPropertyWidget (vtkSMProxy *proxy, QWidget *parent=nullptr)
 
 ~pqPropertyWidget () override
 
virtual void apply ()
 
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)
 
bool isSelected () const
 These methods are called by pqPropertiesPanel when the panel for proxy becomes active/deactive. More...
 

Protected Slots

virtual void placeWidget ()=0
 Places the interactive widget using current data source information. More...
 
void render ()
 Safe call render on the view. More...
 
virtual void updateWidgetVisibility ()
 This method is called to update the state of Visibility and Enabled properties on the widget based on the state of isWidgetVisible(), isSelected() and the active view. More...
 

Protected Member Functions

virtual vtkSMNewWidgetRepresentationProxyAbstractinternalWidgetProxy ()=0
 Get the internal instance of the widget proxy. More...
 
void setupConnections (vtkSMNewWidgetRepresentationProxyAbstract *widget, vtkSMPropertyGroup *smgroup, vtkSMProxy *smproxy)
 Setup all the links and events for the given widget and SM property group. More...
 
void setupUserObserver (vtkSMProxy *smproxy)
 
- 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...
 

Protected Attributes

bool VisibleState = true
 
bool WidgetVisibility = false
 
int LinkedPortIndex = -1
 

Properties

pqSMProxy dataSource
 

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

Detailed Description

pqInteractivePropertyWidgetAbstract is an abstract pqPropertyWidget subclass designed to serve as the superclass for all pqPropertyWidget types that have interactive widget, either in a chart or in a 3D view.

pqInteractivePropertyWidgetAbstract is intended to provide a Qt widget (along with an interactive widget in the active view) for controlling properties on the proxy identified by a vtkSMPropertyGroup passed to the constructor. Subclasses are free to determine which interactive widget to create and how to setup the UI for it.

Definition at line 30 of file pqInteractivePropertyWidgetAbstract.h.

Constructor & Destructor Documentation

◆ pqInteractivePropertyWidgetAbstract()

pqInteractivePropertyWidgetAbstract::pqInteractivePropertyWidgetAbstract ( const char *  widget_smgroup,
const char *  widget_smname,
vtkSMProxy proxy,
vtkSMPropertyGroup smgroup,
QWidget *  parent = nullptr 
)

◆ ~pqInteractivePropertyWidgetAbstract()

pqInteractivePropertyWidgetAbstract::~pqInteractivePropertyWidgetAbstract ( )
override

Member Function Documentation

◆ reset()

void pqInteractivePropertyWidgetAbstract::reset ( )
overridevirtual

Overridden to call this->render() to ensure that the widget is redrawn.

Reimplemented from pqPropertyWidget.

◆ setView()

void pqInteractivePropertyWidgetAbstract::setView ( pqView view)
overridevirtual

Overridden to show the widget proxy in the new view.

Reimplemented from pqPropertyWidget.

◆ isWidgetVisible()

bool pqInteractivePropertyWidgetAbstract::isWidgetVisible ( ) const

Returns the interactive widget's visibility.

Note that the widget may still not be visible in the view if the pqPropertyWidget is not selected. An interactive widget may be visible in the view when this->isWidgetVisible() and this->isSelected() both return true and the view is of the right type.

◆ dataSource()

vtkSMProxy* pqInteractivePropertyWidgetAbstract::dataSource ( ) const

Returns the data source.

◆ select()

void pqInteractivePropertyWidgetAbstract::select ( )
overridevirtual

In these methods, we show/hide the widget since the interactive widget is not supposed to be visible except when the panel is "active" or "selected".

selectPort(int) allows to make the selection only if the given port index is linked with the vtkSMPropertyGroup this interactive widget represents.

Reimplemented from pqPropertyWidget.

◆ deselect()

void pqInteractivePropertyWidgetAbstract::deselect ( )
overridevirtual

In these methods, we show/hide the widget since the interactive widget is not supposed to be visible except when the panel is "active" or "selected".

selectPort(int) allows to make the selection only if the given port index is linked with the vtkSMPropertyGroup this interactive widget represents.

Reimplemented from pqPropertyWidget.

◆ selectPort()

void pqInteractivePropertyWidgetAbstract::selectPort ( int  portIndex)
finalvirtual

In these methods, we show/hide the widget since the interactive widget is not supposed to be visible except when the panel is "active" or "selected".

selectPort(int) allows to make the selection only if the given port index is linked with the vtkSMPropertyGroup this interactive widget represents.

Reimplemented from pqPropertyWidget.

◆ dataBounds()

vtkBoundingBox pqInteractivePropertyWidgetAbstract::dataBounds ( bool  visibleOnly = false) const

Returns bounds from the dataSource, if possible.

May return invalid bounds when no dataSource exists of hasn't been updated to produce valid data. If the input source is a vtkMultiBlockDataSet and "visibleOnly" is set to "true", this function returns the bounds of the visible blocks only.

◆ propertyGroup()

vtkSMPropertyGroup* pqInteractivePropertyWidgetAbstract::propertyGroup ( ) const

Returns the vtkSMPropertyGroup pass to the constructor.

◆ hideEvent()

void pqInteractivePropertyWidgetAbstract::hideEvent ( QHideEvent *  )
override

Overriden in order to hide the VTK widget.

◆ showEvent()

void pqInteractivePropertyWidgetAbstract::showEvent ( QShowEvent *  )
override

Overriden in order to show the VTK widget.

◆ setWidgetVisible

virtual void pqInteractivePropertyWidgetAbstract::setWidgetVisible ( bool  val)
virtualslot

Toggle the interactive widget's visibility.

This, along with pqPropertyWidget's selected state controls whether the widget proxy is visible in a view.

◆ setDataSource

void pqInteractivePropertyWidgetAbstract::setDataSource ( vtkSMProxy dataSource)
slot

DataSource is used by interactive widgets to determine now to place the widget in the view e.g.

the bounds to use for placing the widget or when re-centering the interactive widget.

◆ placeWidget

virtual void pqInteractivePropertyWidgetAbstract::placeWidget ( )
protectedpure virtualslot

Places the interactive widget using current data source information.

◆ render

void pqInteractivePropertyWidgetAbstract::render ( )
protectedslot

Safe call render on the view.

◆ updateWidgetVisibility

virtual void pqInteractivePropertyWidgetAbstract::updateWidgetVisibility ( )
protectedvirtualslot

This method is called to update the state of Visibility and Enabled properties on the widget based on the state of isWidgetVisible(), isSelected() and the active view.

◆ widgetVisibilityToggled

void pqInteractivePropertyWidgetAbstract::widgetVisibilityToggled ( bool  )
signal

Fired whenever setWidgetVisible() changes the widget's visibility.

◆ widgetVisibilityUpdated

void pqInteractivePropertyWidgetAbstract::widgetVisibilityUpdated ( bool  )
signal

Fired whenever the widgets visibility is updated for whatever reason, be it because the panel was selected/deselected or the view changed, etc.

◆ startInteraction

void pqInteractivePropertyWidgetAbstract::startInteraction ( )
signal

Fired by the underlying interactive widget representation proxy, for each respective events.

◆ interaction

void pqInteractivePropertyWidgetAbstract::interaction ( )
signal

Fired by the underlying interactive widget representation proxy, for each respective events.

◆ endInteraction

void pqInteractivePropertyWidgetAbstract::endInteraction ( )
signal

Fired by the underlying interactive widget representation proxy, for each respective events.

◆ internalWidgetProxy()

virtual vtkSMNewWidgetRepresentationProxyAbstract* pqInteractivePropertyWidgetAbstract::internalWidgetProxy ( )
protectedpure virtual

Get the internal instance of the widget proxy.

Subclasses should implement this function and handle the instance of their own widget, wich will be exposed internally via this function.

Implemented in pqInteractiveProperty2DWidget, and pqInteractivePropertyWidget.

◆ setupConnections()

void pqInteractivePropertyWidgetAbstract::setupConnections ( vtkSMNewWidgetRepresentationProxyAbstract widget,
vtkSMPropertyGroup smgroup,
vtkSMProxy smproxy 
)
protected

Setup all the links and events for the given widget and SM property group.

This should be call by subclasses in their constructor once their widget is initialized.

◆ setupUserObserver()

void pqInteractivePropertyWidgetAbstract::setupUserObserver ( vtkSMProxy smproxy)
protected

Member Data Documentation

◆ VisibleState

bool pqInteractivePropertyWidgetAbstract::VisibleState = true
protected

Definition at line 172 of file pqInteractivePropertyWidgetAbstract.h.

◆ WidgetVisibility

bool pqInteractivePropertyWidgetAbstract::WidgetVisibility = false
protected

Definition at line 173 of file pqInteractivePropertyWidgetAbstract.h.

◆ LinkedPortIndex

int pqInteractivePropertyWidgetAbstract::LinkedPortIndex = -1
protected

Definition at line 174 of file pqInteractivePropertyWidgetAbstract.h.

Property Documentation

◆ dataSource

pqSMProxy pqInteractivePropertyWidgetAbstract::dataSource
readwrite

Definition at line 34 of file pqInteractivePropertyWidgetAbstract.h.


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