12#ifndef ABSTRACTMODEL_HPP
13#define ABSTRACTMODEL_HPP
17#include <QAbstractItemModel>
40 int rowCount(
const QModelIndex& parent)
const override;
42 int columnCount(
const QModelIndex& parent)
const override;
43 QModelIndex index(
int row,
int column,
const QModelIndex& parent)
const override;
45 QModelIndex parent(
const QModelIndex& child)
const override;
86 void RemoveAllAbstractItems(
bool aDelete =
false);
90 void AbstractItemChanged();
92 void RemoveItemFromParent();
97 virtual void RequestItemDelete();
103 if (mItemParentPtr != aParent)
105 mItemParentPtr = aParent;
112 void FinalizeSetModel();
116 void ReIndexChildrenP(
int aFirstIndex);
121 std::vector<AbstractModelItem*> mItemChildren;
#define VI_EXPORT
Definition ViExport.hpp:38
Objects inheriting this class may be added to a AbstractModel.
Definition AbstractModel.hpp:65
AbstractModelItem()
Definition AbstractModel.cpp:158
virtual void AbstractItemParentChanged()
Definition AbstractModel.hpp:99
virtual void PreRemoveAbstractItem(int aIndex)
Definition AbstractModel.hpp:98
virtual void AddedToModel()
Definition AbstractModel.hpp:100
AbstractModel * GetModel() const
Definition AbstractModel.hpp:76
bool IsInModel() const
Definition AbstractModel.hpp:113
AbstractModelItem * GetAbstractItem(int aIdx) const
Definition AbstractModel.hpp:77
AbstractModelItem * GetAbstractItemParent() const
Definition AbstractModel.hpp:72
int GetItemIndex()
Definition AbstractModel.hpp:74
void SetAbstractItemParent(AbstractModelItem *aParent)
Definition AbstractModel.hpp:101
int GetAbstractItemCount() const
Definition AbstractModel.hpp:78
friend class AbstractModel
Definition AbstractModel.hpp:67
Implements a model of a tree where each item in the tree is derived from AbstractModelItem.
Definition AbstractModel.hpp:27
AbstractModelItem * mRootPtr
Definition AbstractModel.hpp:59
int mChangeMode
Definition AbstractModel.hpp:60
friend class AbstractModelItem
Definition AbstractModel.hpp:29
AbstractModel()
Definition AbstractModel.hpp:31