Public Slots | Signals | Public Member Functions | Protected Slots | Properties | List of all members
pqProxySILModel Class Reference

pqProxySILModel is a proxy model for pqSILModel. More...

#include <pqProxySILModel.h>

Inherits QAbstractProxyModel.

Public Slots

void setValues (const QList< QVariant > &)
 Set the status values for the hierarchy. More...
 

Signals

void valuesChanged ()
 

Public Member Functions

 pqProxySILModel (const QString &hierarchyName, QObject *parent=0)
 
 ~pqProxySILModel () override
 
QModelIndex mapFromSource (const QModelIndex &sourceIndex) const override
 Methods from QAbstractProxyModel. More...
 
QModelIndex mapToSource (const QModelIndex &proxyIndex) const override
 
void setSourceModel (QAbstractItemModel *sourceModel) override
 
QVariant headerData (int, Qt::Orientation, int role=Qt::DisplayRole) const override
 Overridden to return the same name as the hierarchy. More...
 
bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole) override
 overridden to handle toggling of check state. More...
 
QVariant data (const QModelIndex &proxyIndex, int role=Qt::DisplayRole) const override
 Overridden to provide a means of turning off checkboxes. More...
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 overridden to allow us to turn off checkboxes in the flags returned from the model More...
 
QList< QVariant > values () const
 Get the status values for the hierarchy. More...
 
void setNoCheckBoxes (bool val)
 Checkboxes for each item can be disabled by setting this flag. More...
 
void setHeaderTitle (QString &title)
 Override the display of the title in the header with this string. More...
 
QAbstractItemModel Methods
int rowCount (const QModelIndex &theParent=QModelIndex()) const override
 Gets the number of rows for a given index. More...
 
int columnCount (const QModelIndex &theParent=QModelIndex()) const override
 Gets the number of columns for a given index. More...
 
bool hasChildren (const QModelIndex &theParent=QModelIndex()) const override
 Gets whether or not the given index has child items. More...
 
QModelIndex index (int row, int column, const QModelIndex &theParent=QModelIndex()) const override
 Gets a model index for a given location. More...
 
QModelIndex parent (const QModelIndex &theIndex) const override
 Gets the parent for a given index. More...
 
bool setData (const QModelIndex &theIndex, const QVariant &value, int role=Qt::EditRole) override
 Sets the role data for the item at index to value. More...
 

Protected Slots

void sourceDataChanged (const QModelIndex &idx1, const QModelIndex &idx2)
 
void onCheckStatusChanged ()
 

Properties

QList< QVariant > values
 

Detailed Description

pqProxySILModel is a proxy model for pqSILModel.

This makes it possible for tree views to show only a sub-tree in the SIL. This provides API to get/set status values which is useful for property linking using pqPropertyManager or pqPropertyLinks.

Definition at line 47 of file pqProxySILModel.h.

Constructor & Destructor Documentation

◆ pqProxySILModel()

pqProxySILModel::pqProxySILModel ( const QString &  hierarchyName,
QObject *  parent = 0 
)

◆ ~pqProxySILModel()

pqProxySILModel::~pqProxySILModel ( )
override

Member Function Documentation

◆ rowCount()

int pqProxySILModel::rowCount ( const QModelIndex &  theParent = QModelIndex()) const
inlineoverride

Gets the number of rows for a given index.

Parameters
theParentThe parent index.
Returns
The number of rows for the given index.

Definition at line 68 of file pqProxySILModel.h.

◆ columnCount()

int pqProxySILModel::columnCount ( const QModelIndex &  theParent = QModelIndex()) const
inlineoverride

Gets the number of columns for a given index.

Parameters
theParentThe parent index.
Returns
The number of columns for the given index.

Definition at line 80 of file pqProxySILModel.h.

◆ hasChildren()

bool pqProxySILModel::hasChildren ( const QModelIndex &  theParent = QModelIndex()) const
inlineoverride

Gets whether or not the given index has child items.

Parameters
theParentThe parent index.
Returns
True if the given index has child items.

Definition at line 92 of file pqProxySILModel.h.

◆ index()

QModelIndex pqProxySILModel::index ( int  row,
int  column,
const QModelIndex &  theParent = QModelIndex() 
) const
inlineoverride

Gets a model index for a given location.

Parameters
rowThe row number.
columnThe column number.
theParentThe parent index.
Returns
A model index for the given location.

Definition at line 106 of file pqProxySILModel.h.

◆ parent()

QModelIndex pqProxySILModel::parent ( const QModelIndex &  theIndex) const
inlineoverride

Gets the parent for a given index.

Parameters
theIndexThe model index.
Returns
A model index for the parent of the given index.

Definition at line 120 of file pqProxySILModel.h.

◆ setData()

bool pqProxySILModel::setData ( const QModelIndex &  theIndex,
const QVariant &  value,
int  role = Qt::EditRole 
)
inlineoverride

Sets the role data for the item at index to value.

Returns true if successful; otherwise returns false.

Definition at line 131 of file pqProxySILModel.h.

◆ mapFromSource()

QModelIndex pqProxySILModel::mapFromSource ( const QModelIndex &  sourceIndex) const
override

Methods from QAbstractProxyModel.

◆ mapToSource()

QModelIndex pqProxySILModel::mapToSource ( const QModelIndex &  proxyIndex) const
override

◆ setSourceModel()

void pqProxySILModel::setSourceModel ( QAbstractItemModel *  sourceModel)
override

◆ headerData()

QVariant pqProxySILModel::headerData ( int  ,
Qt::Orientation  ,
int  role = Qt::DisplayRole 
) const
override

Overridden to return the same name as the hierarchy.

Also overridden to handle Qt::CheckStateRole for pqHeaderView to support toggling column checkstate from the header.

◆ setHeaderData()

bool pqProxySILModel::setHeaderData ( int  section,
Qt::Orientation  orientation,
const QVariant &  value,
int  role = Qt::EditRole 
)
override

overridden to handle toggling of check state.

◆ data()

QVariant pqProxySILModel::data ( const QModelIndex &  proxyIndex,
int  role = Qt::DisplayRole 
) const
override

Overridden to provide a means of turning off checkboxes.

◆ flags()

Qt::ItemFlags pqProxySILModel::flags ( const QModelIndex &  index) const
override

overridden to allow us to turn off checkboxes in the flags returned from the model

◆ values()

QList<QVariant> pqProxySILModel::values ( ) const

Get the status values for the hierarchy.

◆ setNoCheckBoxes()

void pqProxySILModel::setNoCheckBoxes ( bool  val)

Checkboxes for each item can be disabled by setting this flag.

◆ setHeaderTitle()

void pqProxySILModel::setHeaderTitle ( QString &  title)

Override the display of the title in the header with this string.

◆ setValues

void pqProxySILModel::setValues ( const QList< QVariant > &  )
slot

Set the status values for the hierarchy.

◆ valuesChanged

void pqProxySILModel::valuesChanged ( )
signal

◆ sourceDataChanged

void pqProxySILModel::sourceDataChanged ( const QModelIndex &  idx1,
const QModelIndex &  idx2 
)
inlineprotectedslot

Definition at line 194 of file pqProxySILModel.h.

◆ onCheckStatusChanged

void pqProxySILModel::onCheckStatusChanged ( )
protectedslot

Property Documentation

◆ values

QList<QVariant> pqProxySILModel::values
readwrite

Definition at line 51 of file pqProxySILModel.h.


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