WSF
wizard::AbstractModel Class Reference

Implements a model of a tree where each item in the tree is derived from AbstractModelItem. More...

#include <AbstractModel.hpp>

Inherits QAbstractItemModel.

Collaboration diagram for wizard::AbstractModel:

Public Member Functions

 AbstractModel ()
void SetRoot (AbstractModelItem *aItemPtr)
AbstractModelItemFindItem (const QModelIndex &idx) const
int rowCount (const QModelIndex &parent) const override
int columnCount (const QModelIndex &parent) const override
QModelIndex index (int row, int column, const QModelIndex &parent) const override
QModelIndex parent (const QModelIndex &child) const override
QModelIndex GetRowIndex (AbstractModelItem &aRow) const
void FakeInsert (AbstractModelItem &aParent)

Protected Member Functions

void BeginInsert (AbstractModelItem &aParent, int aIndex)
void EndInsert ()
void BeginRemove (AbstractModelItem &aParent, int aIndex, int aCount=1)
void EndRemove ()
void BeginMove (AbstractModelItem &aSource, int aSourceIndex, int aCount, AbstractModelItem &aDestination, int aDestinationIndex)
void EndMove ()

Protected Attributes

AbstractModelItemmRootPtr
int mChangeMode

Friends

class AbstractModelItem

Detailed Description

Implements a model of a tree where each item in the tree is derived from AbstractModelItem.

Constructor & Destructor Documentation

◆ AbstractModel()

wizard::AbstractModel::AbstractModel ( )
inline

References mChangeMode, and mRootPtr.

Member Function Documentation

◆ BeginInsert()

void wizard::AbstractModel::BeginInsert ( AbstractModelItem & aParent,
int aIndex )
protected

References AbstractModelItem, GetRowIndex(), and mChangeMode.

Referenced by FakeInsert().

◆ BeginMove()

void wizard::AbstractModel::BeginMove ( AbstractModelItem & aSource,
int aSourceIndex,
int aCount,
AbstractModelItem & aDestination,
int aDestinationIndex )
protected

◆ BeginRemove()

void wizard::AbstractModel::BeginRemove ( AbstractModelItem & aParent,
int aIndex,
int aCount = 1 )
protected

◆ columnCount()

int wizard::AbstractModel::columnCount ( const QModelIndex & parent) const
override

◆ EndInsert()

void wizard::AbstractModel::EndInsert ( )
protected

References mChangeMode.

Referenced by FakeInsert().

◆ EndMove()

void wizard::AbstractModel::EndMove ( )
protected

References mChangeMode.

◆ EndRemove()

void wizard::AbstractModel::EndRemove ( )
protected

References mChangeMode.

◆ FakeInsert()

void wizard::AbstractModel::FakeInsert ( AbstractModelItem & aParent)

◆ FindItem()

wizard::AbstractModelItem * wizard::AbstractModel::FindItem ( const QModelIndex & idx) const

◆ GetRowIndex()

QModelIndex wizard::AbstractModel::GetRowIndex ( AbstractModelItem & aRow) const

◆ index()

QModelIndex wizard::AbstractModel::index ( int row,
int column,
const QModelIndex & parent ) const
override

◆ parent()

QModelIndex wizard::AbstractModel::parent ( const QModelIndex & child) const
override

◆ rowCount()

int wizard::AbstractModel::rowCount ( const QModelIndex & parent) const
override

◆ SetRoot()

void wizard::AbstractModel::SetRoot ( AbstractModelItem * aItemPtr)

References AbstractModelItem, and mRootPtr.

◆ AbstractModelItem

Member Data Documentation

◆ mChangeMode

int wizard::AbstractModel::mChangeMode
protected

◆ mRootPtr

AbstractModelItem* wizard::AbstractModel::mRootPtr
protected

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved