Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
pqProxyWidget Class Reference

pqProxyWidget represents a panel for a vtkSMProxy. More...

#include <pqProxyWidget.h>

Inherits QWidget.

Public Types

enum  DocumentationType { NONE, USE_DESCRIPTION, USE_SHORT_HELP, USE_LONG_HELP }
 

Public Slots

bool filterWidgets (bool show_advanced=false, const QString &filterText=QString())
 Updates the property widgets shown based on the filterText or show_advanced flag. More...
 
void showLinkedInteractiveWidget (int portIndex, bool show, bool changeFocus)
 Show any interactive widget linked to a specific output port this proxyWdiget has. More...
 
void apply () const
 Accepts the property widget changes changes. More...
 
void reset () const
 Cleans the property widget changes and resets the widgets. More...
 
void setView (pqView *)
 Set the current view to use to show 3D widgets, if any for the panel. More...
 
void updatePanel ()
 Same as calling filterWidgets() with the arguments specified to the most recent call to filterWidgets(). More...
 
virtual bool restoreDefaults ()
 Restores application default proxy settings. More...
 
void saveAsDefaults ()
 Saves settings as defaults for proxy. More...
 
static pqPropertyWidgetcreateWidgetForProperty (vtkSMProperty *property, vtkSMProxy *proxy, QWidget *parentObj)
 create a widget for a property. More...
 

Signals

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

 pqProxyWidget (vtkSMProxy *proxy, const QStringList &properties, std::initializer_list< QString > defaultLabels, std::initializer_list< QString > advancedLabels, bool showHeadersFooters=true, QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags{})
 
 pqProxyWidget (vtkSMProxy *proxy, std::initializer_list< QString > defaultLabels, std::initializer_list< QString > advancedLabels, QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags{})
 
 pqProxyWidget (vtkSMProxy *proxy, const QStringList &properties, bool showHeadersFooters=true, QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags{})
 
 pqProxyWidget (vtkSMProxy *proxy, QWidget *parent, Qt::WindowFlags flags=Qt::WindowFlags{})
 
 pqProxyWidget (vtkSMProxy *proxy)
 
 ~pqProxyWidget () override
 
vtkSMProxyproxy () const
 Returns the proxy this panel shows. More...
 
void setApplyChangesImmediately (bool value)
 When set to true, whenever the widget changes, the values are immediately pushed to the ServerManager property without having to wait for apply(). More...
 
bool applyChangesImmediately () const
 
bool useDocumentationForLabels () const
 When this is true, the panel uses a descriptive layout where the documentation for properties is used instead of their labels. More...
 
void showContextMenu (const QPoint &pt, pqPropertyWidget *propWidget)
 
const QSet< QString > & defaultVisibilityLabels () const
 pqProxyWidget shows widgets for properties in two configurations: basic and advanced. More...
 
const QSet< QString > & advancedVisibilityLabels () const
 pqProxyWidget shows widgets for properties in two configurations: basic and advanced. More...
 

Static Public Member Functions

static QWidget * newGroupLabelWidget (const QString &label, QWidget *parentWidget, const QList< QWidget *> &buttons=QList< QWidget *>())
 Returns a new widget that has the label and a h-line separator. More...
 
static bool useDocumentationForLabels (vtkSMProxy *proxy)
 Returns true of the proxy provided has XML hints indicating that labels should use documentation instead of the XML label for the widgets in the UI. More...
 
static QString documentationText (vtkSMProperty *property, DocumentationType type=USE_DESCRIPTION)
 Returns formatted (HTML or plainText) documentation for the property. More...
 
static QString documentationText (vtkSMProxy *property, DocumentationType type=USE_DESCRIPTION)
 Returns formatted (HTML or plainText) documentation for the proxy. More...
 
static DocumentationType showProxyDocumentationInPanel (vtkSMProxy *proxy)
 Returns true if the proxy has XML hints indicating that the panel should show a header label for the documentation. More...
 

Protected Member Functions

void showEvent (QShowEvent *event) override
 
void hideEvent (QHideEvent *event) override
 

Detailed Description

pqProxyWidget represents a panel for a vtkSMProxy.

pqProxyWidget creates widgets for each of the properties (or proxy groups) of the proxy respecting any registered pqPropertyWidgetInterface instances to create custom widgets. pqProxyWidget is used by pqPropertiesPanel to create panels for the source/filter and the display/representation sections of the panel.

pqProxyWidget doesn't show any widgets in the panel by default (after constructor). Use filterWidgets() or updatePanel() to show widgets matching criteria.

Note: This class replaces pqProxyPanel (and subclasses). pqProxyPanel is still available (and supported) for backwards compatibility.

Definition at line 59 of file pqProxyWidget.h.

Member Enumeration Documentation

◆ DocumentationType

Enumerator
NONE 
USE_DESCRIPTION 
USE_SHORT_HELP 
USE_LONG_HELP 

Definition at line 119 of file pqProxyWidget.h.

Constructor & Destructor Documentation

◆ pqProxyWidget() [1/5]

pqProxyWidget::pqProxyWidget ( vtkSMProxy proxy,
const QStringList &  properties,
std::initializer_list< QString >  defaultLabels,
std::initializer_list< QString >  advancedLabels,
bool  showHeadersFooters = true,
QWidget *  parent = nullptr,
Qt::WindowFlags  flags = Qt::WindowFlags{} 
)

◆ pqProxyWidget() [2/5]

pqProxyWidget::pqProxyWidget ( vtkSMProxy proxy,
std::initializer_list< QString >  defaultLabels,
std::initializer_list< QString >  advancedLabels,
QWidget *  parent = nullptr,
Qt::WindowFlags  flags = Qt::WindowFlags{} 
)

◆ pqProxyWidget() [3/5]

pqProxyWidget::pqProxyWidget ( vtkSMProxy proxy,
const QStringList &  properties,
bool  showHeadersFooters = true,
QWidget *  parent = nullptr,
Qt::WindowFlags  flags = Qt::WindowFlags{} 
)

◆ pqProxyWidget() [4/5]

pqProxyWidget::pqProxyWidget ( vtkSMProxy proxy,
QWidget *  parent,
Qt::WindowFlags  flags = Qt::WindowFlags{} 
)

◆ pqProxyWidget() [5/5]

pqProxyWidget::pqProxyWidget ( vtkSMProxy proxy)

◆ ~pqProxyWidget()

pqProxyWidget::~pqProxyWidget ( )
override

Member Function Documentation

◆ proxy()

vtkSMProxy* pqProxyWidget::proxy ( ) const

Returns the proxy this panel shows.

◆ setApplyChangesImmediately()

void pqProxyWidget::setApplyChangesImmediately ( bool  value)

When set to true, whenever the widget changes, the values are immediately pushed to the ServerManager property without having to wait for apply().

This is used for panels such as the display panel. Default is false.

◆ applyChangesImmediately()

bool pqProxyWidget::applyChangesImmediately ( ) const
inline

Definition at line 94 of file pqProxyWidget.h.

◆ useDocumentationForLabels() [1/2]

bool pqProxyWidget::useDocumentationForLabels ( ) const
inline

When this is true, the panel uses a descriptive layout where the documentation for properties is used instead of their labels.

pqProxyWidget automatically adopts this style of layout if <UseDocumentationForLabels /> hint is present in the proxy.

Definition at line 102 of file pqProxyWidget.h.

◆ newGroupLabelWidget()

static QWidget* pqProxyWidget::newGroupLabelWidget ( const QString &  label,
QWidget *  parentWidget,
const QList< QWidget *> &  buttons = QList< QWidget *>() 
)
static

Returns a new widget that has the label and a h-line separator.

This is used on the pqProxyWidget to separate groups. Other widgets can use it for the same purpose, as needed.

◆ useDocumentationForLabels() [2/2]

static bool pqProxyWidget::useDocumentationForLabels ( vtkSMProxy proxy)
static

Returns true of the proxy provided has XML hints indicating that labels should use documentation instead of the XML label for the widgets in the UI.

◆ documentationText() [1/2]

static QString pqProxyWidget::documentationText ( vtkSMProperty property,
DocumentationType  type = USE_DESCRIPTION 
)
static

Returns formatted (HTML or plainText) documentation for the property.

type cannot be NONE.

◆ documentationText() [2/2]

static QString pqProxyWidget::documentationText ( vtkSMProxy property,
DocumentationType  type = USE_DESCRIPTION 
)
static

Returns formatted (HTML or plainText) documentation for the proxy.

type cannot be NONE.

◆ showProxyDocumentationInPanel()

static DocumentationType pqProxyWidget::showProxyDocumentationInPanel ( vtkSMProxy proxy)
static

Returns true if the proxy has XML hints indicating that the panel should show a header label for the documentation.

pqProxyWidget uses the <ShowProxyDocumentationInPanel /> hint for this purpose.

◆ defaultVisibilityLabels()

const QSet<QString>& pqProxyWidget::defaultVisibilityLabels ( ) const
inline

pqProxyWidget shows widgets for properties in two configurations: basic and advanced.

Properties on Proxies can have PanelVisibility set to an arbitrary string. This API allows the application to classify the panel-visibility strings into the two configuration categories.

By default, defaultVisibilityLabels is set to { "default" } and advancedVisibilityLabels is set to { "advanced" }.

Note that "never" is reserved and always interpreted and never show the property (unless explicitly requested in constructor arguments).

Definition at line 160 of file pqProxyWidget.h.

◆ advancedVisibilityLabels()

const QSet<QString>& pqProxyWidget::advancedVisibilityLabels ( ) const
inline

pqProxyWidget shows widgets for properties in two configurations: basic and advanced.

Properties on Proxies can have PanelVisibility set to an arbitrary string. This API allows the application to classify the panel-visibility strings into the two configuration categories.

By default, defaultVisibilityLabels is set to { "default" } and advancedVisibilityLabels is set to { "advanced" }.

Note that "never" is reserved and always interpreted and never show the property (unless explicitly requested in constructor arguments).

Definition at line 161 of file pqProxyWidget.h.

◆ showContextMenu()

void pqProxyWidget::showContextMenu ( const QPoint &  pt,
pqPropertyWidget propWidget 
)

◆ changeAvailable

void pqProxyWidget::changeAvailable ( )
signal

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

The editing may not be complete.

◆ changeFinished

void pqProxyWidget::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 pqProxyWidget::restartRequired ( )
signal

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

◆ filterWidgets

bool pqProxyWidget::filterWidgets ( bool  show_advanced = false,
const QString &  filterText = QString() 
)
slot

Updates the property widgets shown based on the filterText or show_advanced flag.

Calling filterWidgets() without any arguments will result in the panel showing all the non-advanced properties. Returns true, if any widgets were shown.

◆ showLinkedInteractiveWidget

void pqProxyWidget::showLinkedInteractiveWidget ( int  portIndex,
bool  show,
bool  changeFocus 
)
slot

Show any interactive widget linked to a specific output port this proxyWdiget has.

See XML hint

<WidgetVisibilityLink port="X" />

.

◆ apply

void pqProxyWidget::apply ( ) const
slot

Accepts the property widget changes changes.

◆ reset

void pqProxyWidget::reset ( ) const
slot

Cleans the property widget changes and resets the widgets.

◆ setView

void pqProxyWidget::setView ( pqView )
slot

Set the current view to use to show 3D widgets, if any for the panel.

◆ updatePanel

void pqProxyWidget::updatePanel ( )
slot

Same as calling filterWidgets() with the arguments specified to the most recent call to filterWidgets().

◆ restoreDefaults

virtual bool pqProxyWidget::restoreDefaults ( )
virtualslot

Restores application default proxy settings.

Returns true if any properties were modified.

◆ saveAsDefaults

void pqProxyWidget::saveAsDefaults ( )
slot

Saves settings as defaults for proxy.

◆ createWidgetForProperty

static pqPropertyWidget* pqProxyWidget::createWidgetForProperty ( vtkSMProperty property,
vtkSMProxy proxy,
QWidget *  parentObj 
)
staticslot

create a widget for a property.

◆ showEvent()

void pqProxyWidget::showEvent ( QShowEvent *  event)
overrideprotected

◆ hideEvent()

void pqProxyWidget::hideEvent ( QHideEvent *  event)
overrideprotected

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