maxLibQt
GroupedItemsProxyModel::GroupedProxyItem Class Reference

#include "GroupedItemsProxyModel.h"

Public Member Functions

 GroupedProxyItem (const QModelIndex &srcIndex, const bool isSrcItem=false, GroupedProxyItem *parent=NULL)
 GroupedProxyItem. More...
 
 GroupedProxyItem (GroupedProxyItem *parent=NULL)
 
virtual ~GroupedProxyItem ()
 
GroupedProxyItemaddChild (const QModelIndex &srcIndex, const bool isSrcItem=true)
 
GroupedProxyItemchild (const int row) const
 
QVector< GroupedProxyItem * > children () const
 
int childRow (GroupedProxyItem *child) const
 
void clear ()
 
QVariant data (int role=Qt::EditRole) const
 
bool isGroupItem () const
 
bool isSourceItem () const
 
QMap< int, QVariantitemData () const
 
GroupedProxyItemparent () const
 
void removeChild (GroupedProxyItem *item)
 
void removeChild (const int row)
 
int row () const
 
int rowCount () const
 
bool setData (const QVariant &data, int role=Qt::EditRole)
 
bool setItemData (const QMap< int, QVariant > &roles)
 
QModelIndex sourceIndex () const
 

Protected Attributes

QVector< GroupedProxyItem * > m_childItems
 
bool m_isSourceItem
 
QMap< int, QVariantm_itemData
 
GroupedProxyItemm_parentItem
 
QPersistentModelIndex m_sourceIndex
 

Friends

class GroupedItemsProxyModel
 

Detailed Description

Definition at line 213 of file GroupedItemsProxyModel.h.

Constructor & Destructor Documentation

◆ GroupedProxyItem() [1/2]

GroupedItemsProxyModel::GroupedProxyItem::GroupedProxyItem ( const QModelIndex srcIndex,
const bool  isSrcItem = false,
GroupedProxyItem parent = NULL 
)
explicit

GroupedProxyItem.

Definition at line 36 of file GroupedItemsProxyModel.cpp.

◆ GroupedProxyItem() [2/2]

GroupedItemsProxyModel::GroupedProxyItem::GroupedProxyItem ( GroupedProxyItem parent = NULL)
explicit

Definition at line 43 of file GroupedItemsProxyModel.cpp.

◆ ~GroupedProxyItem()

GroupedItemsProxyModel::GroupedProxyItem::~GroupedProxyItem ( )
virtual

Definition at line 48 of file GroupedItemsProxyModel.cpp.

Member Function Documentation

◆ addChild()

GroupedItemsProxyModel::GroupedProxyItem * GroupedItemsProxyModel::GroupedProxyItem::addChild ( const QModelIndex srcIndex,
const bool  isSrcItem = true 
)

Definition at line 67 of file GroupedItemsProxyModel.cpp.

◆ child()

GroupedProxyItem* GroupedItemsProxyModel::GroupedProxyItem::child ( const int  row) const
inline

Definition at line 225 of file GroupedItemsProxyModel.h.

◆ children()

QVector<GroupedProxyItem *> GroupedItemsProxyModel::GroupedProxyItem::children ( ) const
inline

Definition at line 224 of file GroupedItemsProxyModel.h.

◆ childRow()

int GroupedItemsProxyModel::GroupedProxyItem::childRow ( GroupedProxyItem child) const
inline

Definition at line 226 of file GroupedItemsProxyModel.h.

◆ clear()

void GroupedItemsProxyModel::GroupedProxyItem::clear ( )

Definition at line 53 of file GroupedItemsProxyModel.cpp.

◆ data()

QVariant GroupedItemsProxyModel::GroupedProxyItem::data ( int  role = Qt::EditRole) const
inline

Definition at line 221 of file GroupedItemsProxyModel.h.

◆ isGroupItem()

bool GroupedItemsProxyModel::GroupedProxyItem::isGroupItem ( ) const
inline

Definition at line 231 of file GroupedItemsProxyModel.h.

◆ isSourceItem()

bool GroupedItemsProxyModel::GroupedProxyItem::isSourceItem ( ) const
inline

Definition at line 230 of file GroupedItemsProxyModel.h.

◆ itemData()

QMap<int, QVariant> GroupedItemsProxyModel::GroupedProxyItem::itemData ( ) const
inline

Definition at line 222 of file GroupedItemsProxyModel.h.

◆ parent()

GroupedProxyItem* GroupedItemsProxyModel::GroupedProxyItem::parent ( ) const
inline

Definition at line 227 of file GroupedItemsProxyModel.h.

◆ removeChild() [1/2]

void GroupedItemsProxyModel::GroupedProxyItem::removeChild ( GroupedProxyItem item)

Definition at line 74 of file GroupedItemsProxyModel.cpp.

◆ removeChild() [2/2]

void GroupedItemsProxyModel::GroupedProxyItem::removeChild ( const int  row)
inline

Definition at line 236 of file GroupedItemsProxyModel.h.

◆ row()

int GroupedItemsProxyModel::GroupedProxyItem::row ( ) const

Definition at line 59 of file GroupedItemsProxyModel.cpp.

◆ rowCount()

int GroupedItemsProxyModel::GroupedProxyItem::rowCount ( ) const
inline

Definition at line 223 of file GroupedItemsProxyModel.h.

◆ setData()

bool GroupedItemsProxyModel::GroupedProxyItem::setData ( const QVariant data,
int  role = Qt::EditRole 
)

Definition at line 82 of file GroupedItemsProxyModel.cpp.

◆ setItemData()

bool GroupedItemsProxyModel::GroupedProxyItem::setItemData ( const QMap< int, QVariant > &  roles)

Definition at line 88 of file GroupedItemsProxyModel.cpp.

◆ sourceIndex()

QModelIndex GroupedItemsProxyModel::GroupedProxyItem::sourceIndex ( ) const
inline

Definition at line 229 of file GroupedItemsProxyModel.h.

Friends And Related Function Documentation

◆ GroupedItemsProxyModel

friend class GroupedItemsProxyModel
friend

Definition at line 247 of file GroupedItemsProxyModel.h.

Member Data Documentation

◆ m_childItems

QVector<GroupedProxyItem *> GroupedItemsProxyModel::GroupedProxyItem::m_childItems
protected

Definition at line 242 of file GroupedItemsProxyModel.h.

◆ m_isSourceItem

bool GroupedItemsProxyModel::GroupedProxyItem::m_isSourceItem
protected

Definition at line 245 of file GroupedItemsProxyModel.h.

◆ m_itemData

QMap<int, QVariant> GroupedItemsProxyModel::GroupedProxyItem::m_itemData
protected

Definition at line 243 of file GroupedItemsProxyModel.h.

◆ m_parentItem

GroupedProxyItem* GroupedItemsProxyModel::GroupedProxyItem::m_parentItem
protected

Definition at line 241 of file GroupedItemsProxyModel.h.

◆ m_sourceIndex

QPersistentModelIndex GroupedItemsProxyModel::GroupedProxyItem::m_sourceIndex
protected

Definition at line 244 of file GroupedItemsProxyModel.h.