Public Slots | Signals | Public Member Functions | List of all members
pqProxiesWidget Class Reference

pqProxiesWidget similar to pqProxyWidget with the difference being that unlike pqProxyWidget, pqProxiesWidget supports showing of multiple proxies in the same widget. More...

#include <pqProxiesWidget.h>

Inherits QWidget.

Public Slots

void clear ()
 Remove all proxy widgets added to the panel. More...
 
void addProxy (vtkSMProxy *, const QString &componentName=QString(), const QStringList &properties=QStringList(), bool applyChangesImmediately=false, bool showHeadersFooters=true)
 Add the widgets for a proxy. More...
 
void updateLayout ()
 Call this method once after all proxies have been added (or after clear) to update the layout for the panel. More...
 
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 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...
 

Signals

void changeAvailable (vtkSMProxy *proxy)
 This signal is fired as soon as the user starts editing in the widget. More...
 
void changeFinished (vtkSMProxy *proxy)
 This signal is fired as soon as the user is done with making an atomic change. More...
 
void restartRequired (vtkSMProxy *proxy)
 Indicates that a restart of the program is required for the setting to take effect. More...
 

Public Member Functions

 pqProxiesWidget (QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags{})
 
 ~pqProxiesWidget () override
 
QMap< QString, bool > expanderState () const
 Returns a map indicating which expand buttons are expanded and which ones aren't. More...
 
void setExpanderState (const QMap< QString, bool > &state)
 Set the expander state. More...
 

Detailed Description

pqProxiesWidget similar to pqProxyWidget with the difference being that unlike pqProxyWidget, pqProxiesWidget supports showing of multiple proxies in the same widget.

Internally, it indeed creates a pqProxyWidget for each of the added proxies.

To use this class, add all proxies to show in this panel using addProxy() and then call updateLayout() to update the layout.

pqProxiesWidget supports grouping of proxies in components (separated by using a pqExpanderButton). To use pqExpanderButton simply use a non-empty componentName when calling addProxy().

pqProxiesWidget provides API such as filterWidgets(), apply(), etc. the calls to which are simply forwarded to the internal pqProxyWidget instances. Similarly, pqProxiesWidget also forwards signals fired by pqProxyWidget such as changeFinished(), changeAvailable(), and restartRequired().

Definition at line 61 of file pqProxiesWidget.h.

Constructor & Destructor Documentation

◆ pqProxiesWidget()

pqProxiesWidget::pqProxiesWidget ( QWidget *  parent = nullptr,
Qt::WindowFlags  flags = Qt::WindowFlags{} 
)

◆ ~pqProxiesWidget()

pqProxiesWidget::~pqProxiesWidget ( )
override

Member Function Documentation

◆ expanderState()

QMap<QString, bool> pqProxiesWidget::expanderState ( ) const

Returns a map indicating which expand buttons are expanded and which ones aren't.

Useful to save and then restore the state when resetting the panel. The key is the text used for componentName argument to addProxy call. The value is true for expanded, false otherwise.

◆ setExpanderState()

void pqProxiesWidget::setExpanderState ( const QMap< QString, bool > &  state)

Set the expander state.

If any key is unrecognized, it will be silently ignored. State for expanders not referred to in the state is left unchanged.

◆ clear

void pqProxiesWidget::clear ( )
slot

Remove all proxy widgets added to the panel.

◆ addProxy

void pqProxiesWidget::addProxy ( vtkSMProxy ,
const QString &  componentName = QString(),
const QStringList &  properties = QStringList(),
bool  applyChangesImmediately = false,
bool  showHeadersFooters = true 
)
slot

Add the widgets for a proxy.

◆ updateLayout

void pqProxiesWidget::updateLayout ( )
slot

Call this method once after all proxies have been added (or after clear) to update the layout for the panel.

◆ filterWidgets

bool pqProxiesWidget::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.

◆ apply

void pqProxiesWidget::apply ( ) const
slot

Accepts the property widget changes changes.

◆ reset

void pqProxiesWidget::reset ( ) const
slot

Cleans the property widget changes and resets the widgets.

◆ setView

void pqProxiesWidget::setView ( pqView )
slot

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

◆ updatePanel

void pqProxiesWidget::updatePanel ( )
slot

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

◆ changeAvailable

void pqProxiesWidget::changeAvailable ( vtkSMProxy proxy)
signal

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

The editing may not be complete.

◆ changeFinished

void pqProxiesWidget::changeFinished ( vtkSMProxy proxy)
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 pqProxiesWidget::restartRequired ( vtkSMProxy proxy)
signal

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


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