digiKam
Digikam::SimpleTreeModel Class Reference
+ Inheritance diagram for Digikam::SimpleTreeModel:

Classes

class  Item
 

Public Member Functions

ItemaddItem (Item *const parentItem=nullptr, const int rowNumber=-1)
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 QAbstractItemModel: More...
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
ItemindexToItem (const QModelIndex &itemIndex) const
 
QModelIndex itemToIndex (const Item *const item) const
 
QModelIndex parent (const QModelIndex &index) const override
 
ItemrootItem () const
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role) override
 
bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role) override
 
 SimpleTreeModel (const int columnCount, QObject *const parent=nullptr)
 
 ~SimpleTreeModel () override
 

Constructor & Destructor Documentation

◆ SimpleTreeModel()

Digikam::SimpleTreeModel::SimpleTreeModel ( const int  columnCount,
QObject *const  parent = nullptr 
)
explicit

References columnCount().

◆ ~SimpleTreeModel()

Digikam::SimpleTreeModel::~SimpleTreeModel ( )
override

Member Function Documentation

◆ addItem()

SimpleTreeModel::Item * Digikam::SimpleTreeModel::addItem ( SimpleTreeModel::Item *const  parentItem = nullptr,
const int  rowNumber = -1 
)

References itemToIndex().

◆ columnCount()

int Digikam::SimpleTreeModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

QAbstractItemModel:

References indexToItem(), and parent().

Referenced by SimpleTreeModel().

◆ data()

QVariant Digikam::SimpleTreeModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

References index(), and indexToItem().

◆ flags()

Qt::ItemFlags Digikam::SimpleTreeModel::flags ( const QModelIndex &  index) const
override

References index().

◆ headerData()

QVariant Digikam::SimpleTreeModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const
override

◆ index()

QModelIndex Digikam::SimpleTreeModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
override

References indexToItem(), and parent().

Referenced by data(), flags(), parent(), and setData().

◆ indexToItem()

SimpleTreeModel::Item * Digikam::SimpleTreeModel::indexToItem ( const QModelIndex &  itemIndex) const

◆ itemToIndex()

QModelIndex Digikam::SimpleTreeModel::itemToIndex ( const Item *const  item) const

Referenced by addItem(), and parent().

◆ parent()

QModelIndex Digikam::SimpleTreeModel::parent ( const QModelIndex &  index) const
override

References index(), indexToItem(), and itemToIndex().

Referenced by columnCount(), index(), and rowCount().

◆ rootItem()

SimpleTreeModel::Item * Digikam::SimpleTreeModel::rootItem ( ) const

◆ rowCount()

int Digikam::SimpleTreeModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

References indexToItem(), and parent().

◆ setData()

bool Digikam::SimpleTreeModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
)
override

References index(), indexToItem(), and value.

◆ setHeaderData()

bool Digikam::SimpleTreeModel::setHeaderData ( int  section,
Qt::Orientation  orientation,
const QVariant &  value,
int  role 
)
override

References value.


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