|
ParaView
|
pqProxySILModel is a proxy model for pqSILModel. More...
#include <pqProxySILModel.h>
Public Slots | |
| void | setValues (const QList< QVariant > &) |
| Set the status values for the hierarchy. | |
| void | toggleRootCheckState () |
| Convenience slot to toggle the check state of the entire subtree shown by this model. | |
Signals | |
| void | valuesChanged () |
Public Member Functions | |
| pqProxySILModel (const QString &hierarchyName, QObject *parent=0) | |
| ~pqProxySILModel () | |
| virtual QModelIndex | mapFromSource (const QModelIndex &sourceIndex) const |
| Methods from QAbstractProxyModel. | |
| virtual QModelIndex | mapToSource (const QModelIndex &proxyIndex) const |
| virtual void | setSourceModel (QAbstractItemModel *sourceModel) |
| virtual QVariant | headerData (int, Qt::Orientation, int role=Qt::DisplayRole) const |
| Overridden to return the same name as the hierarchy. | |
| virtual QVariant | data (const QModelIndex &proxyIndex, int role=Qt::DisplayRole) const |
| Overridden to provide a means of turning off checkboxes. | |
| virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
| overridden to allow us to turn off checkboxes in the flags returned from the model | |
| QList< QVariant > | values () const |
| Get the status values for the hierarchy. | |
| void | setNoCheckBoxes (bool val) |
| Checkboxes for each item can be disabled by setting this flag. | |
| void | setHeaderTitle (QString &title) |
| Override the display of the title in the header with this string. | |
QAbstractItemModel Methods | |
| virtual int | rowCount (const QModelIndex &theParent=QModelIndex()) const |
| Gets the number of rows for a given index. | |
| virtual int | columnCount (const QModelIndex &theParent=QModelIndex()) const |
| Gets the number of columns for a given index. | |
| virtual bool | hasChildren (const QModelIndex &theParent=QModelIndex()) const |
| Gets whether or not the given index has child items. | |
| virtual QModelIndex | index (int row, int column, const QModelIndex &theParent=QModelIndex()) const |
| Gets a model index for a given location. | |
| virtual QModelIndex | parent (const QModelIndex &theIndex) const |
| Gets the parent for a given index. | |
| bool | setData (const QModelIndex &theIndex, const QVariant &value, int role=Qt::EditRole) |
| Sets the role data for the item at index to value. | |
Protected Slots | |
| void | sourceDataChanged (const QModelIndex &idx1, const QModelIndex &idx2) |
| void | onCheckStatusChanged () |
Properties | |
| QList< QVariant > | values |
pqProxySILModel is a proxy model for pqSILModel.
This makes it possible for tree views to show only a sub-tree in the SIL. This also provides API to get/set status values which is useful for property linking using pqPropertyManager or pqPropertyLinks.
Definition at line 45 of file pqProxySILModel.h.
| pqProxySILModel::pqProxySILModel | ( | const QString & | hierarchyName, |
| QObject * | parent = 0 |
||
| ) |
| pqProxySILModel::~pqProxySILModel | ( | ) |
| virtual int pqProxySILModel::rowCount | ( | const QModelIndex & | theParent = QModelIndex() | ) | const [inline, virtual] |
Gets the number of rows for a given index.
| parent | The parent index. |
Definition at line 62 of file pqProxySILModel.h.
| virtual int pqProxySILModel::columnCount | ( | const QModelIndex & | theParent = QModelIndex() | ) | const [inline, virtual] |
Gets the number of columns for a given index.
| parent | The parent index. |
Definition at line 72 of file pqProxySILModel.h.
| virtual bool pqProxySILModel::hasChildren | ( | const QModelIndex & | theParent = QModelIndex() | ) | const [inline, virtual] |
Gets whether or not the given index has child items.
| parent | The parent index. |
Definition at line 82 of file pqProxySILModel.h.
| virtual QModelIndex pqProxySILModel::index | ( | int | row, |
| int | column, | ||
| const QModelIndex & | theParent = QModelIndex() |
||
| ) | const [inline, virtual] |
Gets a model index for a given location.
| row | The row number. |
| column | The column number. |
| parent | The parent index. |
Definition at line 94 of file pqProxySILModel.h.
| virtual QModelIndex pqProxySILModel::parent | ( | const QModelIndex & | theIndex | ) | const [inline, virtual] |
Gets the parent for a given index.
| index | The model index. |
Definition at line 107 of file pqProxySILModel.h.
| bool pqProxySILModel::setData | ( | const QModelIndex & | theIndex, |
| const QVariant & | value, | ||
| int | role = Qt::EditRole |
||
| ) | [inline] |
Sets the role data for the item at index to value.
Returns true if successful; otherwise returns false.
Definition at line 116 of file pqProxySILModel.h.
| virtual QModelIndex pqProxySILModel::mapFromSource | ( | const QModelIndex & | sourceIndex | ) | const [virtual] |
Methods from QAbstractProxyModel.
| virtual QModelIndex pqProxySILModel::mapToSource | ( | const QModelIndex & | proxyIndex | ) | const [virtual] |
| virtual void pqProxySILModel::setSourceModel | ( | QAbstractItemModel * | sourceModel | ) | [virtual] |
| virtual QVariant pqProxySILModel::headerData | ( | int | , |
| Qt::Orientation | , | ||
| int | role = Qt::DisplayRole |
||
| ) | const [virtual] |
Overridden to return the same name as the hierarchy.
Also returns a DecorationRole icon which can show the check state of the root node. Connect the header's sectionClicked() signal to toggleRootCheckState() to support affecting the check state using the header.
| virtual QVariant pqProxySILModel::data | ( | const QModelIndex & | proxyIndex, |
| int | role = Qt::DisplayRole |
||
| ) | const [virtual] |
Overridden to provide a means of turning off checkboxes.
| virtual Qt::ItemFlags pqProxySILModel::flags | ( | const QModelIndex & | index | ) | const [virtual] |
overridden to allow us to turn off checkboxes in the flags returned from the model
| QList<QVariant> pqProxySILModel::values | ( | ) | const |
Get the status values for the hierarchy.
| void pqProxySILModel::setNoCheckBoxes | ( | bool | val | ) |
Checkboxes for each item can be disabled by setting this flag.
| void pqProxySILModel::setHeaderTitle | ( | QString & | title | ) |
Override the display of the title in the header with this string.
| void pqProxySILModel::setValues | ( | const QList< QVariant > & | ) | [slot] |
Set the status values for the hierarchy.
| void pqProxySILModel::toggleRootCheckState | ( | ) | [slot] |
Convenience slot to toggle the check state of the entire subtree shown by this model.
| void pqProxySILModel::valuesChanged | ( | ) | [signal] |
| void pqProxySILModel::sourceDataChanged | ( | const QModelIndex & | idx1, |
| const QModelIndex & | idx2 | ||
| ) | [inline, protected, slot] |
Definition at line 163 of file pqProxySILModel.h.
| void pqProxySILModel::onCheckStatusChanged | ( | ) | [protected, slot] |
QList<QVariant> pqProxySILModel::values [read, write] |
Definition at line 49 of file pqProxySILModel.h.
1.7.5.1