Signals | Public Member Functions | Friends | List of all members
pqArraySelectionWidget Class Reference

pqArraySelectionWidget is a widget used to allow user to select arrays. More...

#include <pqArraySelectionWidget.h>

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

Signals

void widgetModified ()
 fired whenever the check state has been modified. More...
 

Public Member Functions

 pqArraySelectionWidget (QWidget *parent=nullptr)
 
 ~pqArraySelectionWidget () override
 
bool event (QEvent *e) override
 overridden to handle QDynamicPropertyChangeEvent events. More...
 
void setHeaderLabel (const QString &label)
 Specify a label to use for the horizontal header for the view. More...
 
QString headerLabel () const
 Specify a label to use for the horizontal header for the view. More...
 
void setIconType (const QString &pname, const QString &icon_type)
 Specify an icon type to use for a property with the given name. More...
 
const QString & iconType (const QString &pname) const
 Specify an icon type to use for a property with the given name. More...
 
- Public Member Functions inherited from pqTreeView
 pqTreeView (QWidget *parent=nullptr, bool use_pqHeaderView=false)
 
 ~pqTreeView () override
 
bool eventFilter (QObject *object, QEvent *e) override
 
void wheelEvent (QWheelEvent *event) override
 Overridden to eat wheel events unless this->hasFocus(). More...
 
void setModel (QAbstractItemModel *model) override
 
void setRootIndex (const QModelIndex &index) override
 
QSize sizeHint () const override
 
QSize minimumSizeHint () const override
 
void setMaximumRowCountBeforeScrolling (int val)
 
int maximumRowCountBeforeScrolling () const
 
void setupCustomHeader (bool use_pqHeaderView=false)
 Helper method to change the header type after construction. More...
 

Friends

class Model
 

Additional Inherited Members

- Protected Member Functions inherited from pqTreeView
QItemSelectionModel::SelectionFlags selectionCommand (const QModelIndex &index, const QEvent *event=nullptr) const override
 We need to change two things about how Qt manages toggling check state of a selected item (see paraview/paraview#18150). More...
 
bool edit (const QModelIndex &index, EditTrigger trigger, QEvent *event) override
 We need to change two things about how Qt manages toggling check state of a selected item (see paraview/paraview#18150). More...
 
- Properties inherited from pqTreeView
int maximumRowCountBeforeScrolling
 Set the maximum number of rows beyond which this view should show a vertical scroll bar. More...
 

Detailed Description

pqArraySelectionWidget is a widget used to allow user to select arrays.

pqArraySelectionWidget shows a list of items to select (or check) using check boxes next to each of the items.

Implementation Details

pqArraySelectionWidget uses pqTreeView as the view and internally build a QAbstractItemModel subclass to track the state.

For several readers, e.g. ExodusIIReader, there could be multiple properties that control array status. We want a single widget to show and control the selection states for all those properties. To support that, we use dynamic properties. Simply hook up the same pqArraySelectionWidget with multiple properties via pqPropertyLinks, using any name of the Qt property name when setting up the connection.

Legacy Information

pqArraySelectionWidget is based on a class known as pqExodusIIVariableSelectionWidget. pqExodusIIVariableSelectionWidget, however was a pqTreeWidget subclass. This, however, uses pqTreeView which is the recommended approach since it provides a better user experience when dealing with large lists.

Improving user experience

To help the user with checking multiple items, filtering, and sorting, you may want to connect pqArraySelectionWidget with a pqTreeViewSelectionHelper.

Definition at line 69 of file pqArraySelectionWidget.h.

Constructor & Destructor Documentation

◆ pqArraySelectionWidget()

pqArraySelectionWidget::pqArraySelectionWidget ( QWidget *  parent = nullptr)

◆ ~pqArraySelectionWidget()

pqArraySelectionWidget::~pqArraySelectionWidget ( )
override

Member Function Documentation

◆ event()

bool pqArraySelectionWidget::event ( QEvent *  e)
override

overridden to handle QDynamicPropertyChangeEvent events.

◆ setHeaderLabel()

void pqArraySelectionWidget::setHeaderLabel ( const QString &  label)

Specify a label to use for the horizontal header for the view.

◆ headerLabel()

QString pqArraySelectionWidget::headerLabel ( ) const

Specify a label to use for the horizontal header for the view.

◆ setIconType()

void pqArraySelectionWidget::setIconType ( const QString &  pname,
const QString &  icon_type 
)

Specify an icon type to use for a property with the given name.

Supported icon types are point, cell, field, vertex, edge, row, face, side-set, node-set, face-set, edge-set, cell-set, node-map, edge-map, face-map.

◆ iconType()

const QString& pqArraySelectionWidget::iconType ( const QString &  pname) const

Specify an icon type to use for a property with the given name.

Supported icon types are point, cell, field, vertex, edge, row, face, side-set, node-set, face-set, edge-set, cell-set, node-map, edge-map, face-map.

◆ widgetModified

void pqArraySelectionWidget::widgetModified ( )
signal

fired whenever the check state has been modified.

Friends And Related Function Documentation

◆ Model

friend class Model
friend

Definition at line 119 of file pqArraySelectionWidget.h.


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