Public Member Functions | Static Public Member Functions | List of all members
pqProxyWidgetItem Class Reference

pqProxyWidgetItem represents a single widget for a property/properties. More...

#include <pqProxyWidgetItem.h>

Inherits QObject.

Public Member Functions

 ~pqProxyWidgetItem () override
 
pqPropertyWidgetpropertyWidget () const
 Return the underlying pqPropertyWidget. More...
 
void appendToDefaultVisibilityForRepresentations (const QString &repr)
 Add representation to the list of representations that forces visibility to be "default", bypassing the "Advanced" option. More...
 
bool canShowWidget (bool show_advanced, const QString &filterText, vtkSMProxy *proxy) const
 Return true if the widget should be shown in the current configuration: advanced mode, filtering text and optional decorators. More...
 
bool enableWidget () const
 Return true if the widget should be enabled. More...
 
bool isAdvanced (vtkSMProxy *proxy) const
 Return true if the property is advanced. More...
 
void show (const pqProxyWidgetItem *prevVisibleItem, bool enabled=true, bool show_advanced=false) const
 Show the underlying widgets Separators are shown only when needed (i.e. More...
 
void hide () const
 Hide the underlying widgets. More...
 
void appendToLayout (QGridLayout *glayout, bool singleColumn)
 Adds widgets to the layout. More...
 
void apply () const
 Utility methods forwarded to the Property widget. More...
 
void reset () const
 Utility methods forwarded to the Property widget. More...
 
void select () const
 Utility methods forwarded to the Property widget. More...
 
void deselect () const
 Utility methods forwarded to the Property widget. More...
 

Static Public Member Functions

static pqProxyWidgetItemnewItem (pqPropertyWidget *widget, const QString &label, bool advanced, bool informationOnly, const QStringList &searchTags, pqProxyWidget *parentObj)
 Create a simple pqProxyWidgetItem. More...
 
static pqProxyWidgetItemnewGroupItem (pqPropertyWidget *widget, const QString &label, bool showSeparators, bool advanced, const QStringList &searchTags, pqProxyWidget *parentObj)
 Creates a new item for a property group. More...
 
static pqProxyWidgetItemnewMultiItemGroupItem (const QString &group_label, pqPropertyWidget *widget, const QString &widget_label, bool showSeparators, bool advanced, bool informationOnly, const QStringList &searchTags, pqProxyWidget *parentObj)
 Creates a new item for a property group with several widgets (for individual properties in the group). More...
 
static QFrame * newHLine (QWidget *parent)
 Create a simple horizontal line. More...
 
static QWidget * newGroupSeparator (QWidget *parent)
 Create a separator for a new Group widget. More...
 

Detailed Description

pqProxyWidgetItem represents a single widget for a property/properties.

While pqProxyWidgetItem mainly handles a pqPropertyWidget with its label, it is also used for propertyGroups.

It can be added to a QGridLayout (see appendToLayout()), so underlying QWidgets are consistently added.

Definition at line 23 of file pqProxyWidgetItem.h.

Constructor & Destructor Documentation

◆ ~pqProxyWidgetItem()

pqProxyWidgetItem::~pqProxyWidgetItem ( )
override

Member Function Documentation

◆ newItem()

static pqProxyWidgetItem* pqProxyWidgetItem::newItem ( pqPropertyWidget widget,
const QString &  label,
bool  advanced,
bool  informationOnly,
const QStringList &  searchTags,
pqProxyWidget parentObj 
)
static

Create a simple pqProxyWidgetItem.

◆ newGroupItem()

static pqProxyWidgetItem* pqProxyWidgetItem::newGroupItem ( pqPropertyWidget widget,
const QString &  label,
bool  showSeparators,
bool  advanced,
const QStringList &  searchTags,
pqProxyWidget parentObj 
)
static

Creates a new item for a property group.

Use this overload when creating an item for a group where there's a single widget for all the properties in that group.

◆ newMultiItemGroupItem()

static pqProxyWidgetItem* pqProxyWidgetItem::newMultiItemGroupItem ( const QString &  group_label,
pqPropertyWidget widget,
const QString &  widget_label,
bool  showSeparators,
bool  advanced,
bool  informationOnly,
const QStringList &  searchTags,
pqProxyWidget parentObj 
)
static

Creates a new item for a property group with several widgets (for individual properties in the group).

◆ newHLine()

static QFrame* pqProxyWidgetItem::newHLine ( QWidget *  parent)
static

Create a simple horizontal line.

Useful to add a visible but light separation.

◆ newGroupSeparator()

static QWidget* pqProxyWidgetItem::newGroupSeparator ( QWidget *  parent)
static

Create a separator for a new Group widget.

This is mainly more spacing and an horizontal line.

◆ propertyWidget()

pqPropertyWidget* pqProxyWidgetItem::propertyWidget ( ) const

Return the underlying pqPropertyWidget.

◆ appendToDefaultVisibilityForRepresentations()

void pqProxyWidgetItem::appendToDefaultVisibilityForRepresentations ( const QString &  repr)

Add representation to the list of representations that forces visibility to be "default", bypassing the "Advanced" option.

◆ apply()

void pqProxyWidgetItem::apply ( ) const

Utility methods forwarded to the Property widget.

◆ reset()

void pqProxyWidgetItem::reset ( ) const

Utility methods forwarded to the Property widget.

◆ select()

void pqProxyWidgetItem::select ( ) const

Utility methods forwarded to the Property widget.

◆ deselect()

void pqProxyWidgetItem::deselect ( ) const

Utility methods forwarded to the Property widget.

◆ canShowWidget()

bool pqProxyWidgetItem::canShowWidget ( bool  show_advanced,
const QString &  filterText,
vtkSMProxy proxy 
) const

Return true if the widget should be shown in the current configuration: advanced mode, filtering text and optional decorators.

◆ enableWidget()

bool pqProxyWidgetItem::enableWidget ( ) const

Return true if the widget should be enabled.

Return false if the property is Information only or if at least one decorator say so.

◆ isAdvanced()

bool pqProxyWidgetItem::isAdvanced ( vtkSMProxy proxy) const

Return true if the property is advanced.

◆ show()

void pqProxyWidgetItem::show ( const pqProxyWidgetItem prevVisibleItem,
bool  enabled = true,
bool  show_advanced = false 
) const

Show the underlying widgets Separators are shown only when needed (i.e.

if another item is around).

◆ hide()

void pqProxyWidgetItem::hide ( ) const

Hide the underlying widgets.

◆ appendToLayout()

void pqProxyWidgetItem::appendToLayout ( QGridLayout *  glayout,
bool  singleColumn 
)

Adds widgets to the layout.

This is a little greedy. It adds everything that could be potentially shown to the layout. We control visibilities of things like headers and footers dynamically in show()/hide().


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