pqArraySelectionWidget is a widget used to allow user to select arrays. More...
#include <pqArraySelectionWidget.h>
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... | |
![]() | |
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 | |
![]() | |
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... | |
![]() | |
int | maximumRowCountBeforeScrolling |
Set the maximum number of rows beyond which this view should show a vertical scroll bar. More... | |
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.
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.
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.
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.
pqArraySelectionWidget::pqArraySelectionWidget | ( | QWidget * | parent = nullptr | ) |
|
override |
|
override |
overridden to handle QDynamicPropertyChangeEvent events.
void pqArraySelectionWidget::setHeaderLabel | ( | const QString & | label | ) |
Specify a label to use for the horizontal header for the view.
QString pqArraySelectionWidget::headerLabel | ( | ) | const |
Specify a label to use for the horizontal header for the view.
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.
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.
|
signal |
fired whenever the check state has been modified.
|
friend |
Definition at line 119 of file pqArraySelectionWidget.h.