Protected Member Functions | Protected Attributes | List of all members
pqAbstractItemSelectionModel Class Referenceabstract

Abstract class implementing a tree model with checkable items. More...

#include <pqAbstractItemSelectionModel.h>

Inherits QAbstractItemModel.

Protected Member Functions

 pqAbstractItemSelectionModel (QObject *parent_=nullptr)
 
 ~pqAbstractItemSelectionModel () override
 
virtual void populateModel (void *dataObject)=0
 Concrete classes should implement how the model is to be populated. More...
 
virtual void initializeRootItem ()=0
 Initialize the root item which holds the header tags. More...
 
bool isIndexValid (const QModelIndex &index_) const
 Helper for a more comprehensive validation of indices. More...
 
int rowCount (const QModelIndex &parent_=QModelIndex()) const override
 QAbstractItemModel implementation. More...
 
int columnCount (const QModelIndex &parent_=QModelIndex()) const override
 QAbstractItemModel implementation. More...
 
QModelIndex index (int row, int column, const QModelIndex &parent_=QModelIndex()) const override
 QAbstractItemModel implementation. More...
 
QModelIndex parent (const QModelIndex &index_) const override
 QAbstractItemModel implementation. More...
 
QVariant data (const QModelIndex &index_, int role=Qt::DisplayRole) const override
 QAbstractItemModel implementation. More...
 
bool setData (const QModelIndex &index_, const QVariant &value, int role) override
 QAbstractItemModel implementation. More...
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 QAbstractItemModel implementation. More...
 
Qt::ItemFlags flags (const QModelIndex &index_) const override
 QAbstractItemModel implementation. More...
 

Protected Attributes

QTreeWidgetItem * RootItem
 

Detailed Description

Abstract class implementing a tree model with checkable items.

It uses QTreeWidgetItem as its item class. Reimplement the virtual methods to fill it with data.

Definition at line 17 of file pqAbstractItemSelectionModel.h.

Constructor & Destructor Documentation

◆ pqAbstractItemSelectionModel()

pqAbstractItemSelectionModel::pqAbstractItemSelectionModel ( QObject *  parent_ = nullptr)
protected

◆ ~pqAbstractItemSelectionModel()

pqAbstractItemSelectionModel::~pqAbstractItemSelectionModel ( )
overrideprotected

Member Function Documentation

◆ rowCount()

int pqAbstractItemSelectionModel::rowCount ( const QModelIndex &  parent_ = QModelIndex()) const
overrideprotected

QAbstractItemModel implementation.

◆ columnCount()

int pqAbstractItemSelectionModel::columnCount ( const QModelIndex &  parent_ = QModelIndex()) const
overrideprotected

QAbstractItemModel implementation.

◆ index()

QModelIndex pqAbstractItemSelectionModel::index ( int  row,
int  column,
const QModelIndex &  parent_ = QModelIndex() 
) const
overrideprotected

QAbstractItemModel implementation.

◆ parent()

QModelIndex pqAbstractItemSelectionModel::parent ( const QModelIndex &  index_) const
overrideprotected

QAbstractItemModel implementation.

◆ data()

QVariant pqAbstractItemSelectionModel::data ( const QModelIndex &  index_,
int  role = Qt::DisplayRole 
) const
overrideprotected

QAbstractItemModel implementation.

◆ setData()

bool pqAbstractItemSelectionModel::setData ( const QModelIndex &  index_,
const QVariant &  value,
int  role 
)
overrideprotected

QAbstractItemModel implementation.

◆ headerData()

QVariant pqAbstractItemSelectionModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
overrideprotected

QAbstractItemModel implementation.

◆ flags()

Qt::ItemFlags pqAbstractItemSelectionModel::flags ( const QModelIndex &  index_) const
overrideprotected

QAbstractItemModel implementation.

◆ populateModel()

virtual void pqAbstractItemSelectionModel::populateModel ( void *  dataObject)
protectedpure virtual

Concrete classes should implement how the model is to be populated.

◆ initializeRootItem()

virtual void pqAbstractItemSelectionModel::initializeRootItem ( )
protectedpure virtual

Initialize the root item which holds the header tags.

◆ isIndexValid()

bool pqAbstractItemSelectionModel::isIndexValid ( const QModelIndex &  index_) const
protected

Helper for a more comprehensive validation of indices.

Member Data Documentation

◆ RootItem

QTreeWidgetItem* pqAbstractItemSelectionModel::RootItem
protected

Definition at line 58 of file pqAbstractItemSelectionModel.h.


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