LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
LC::Util::FlatItemsModelBase Class Referenceabstract

#include "flatitemsmodelbase.h"

+ Inheritance diagram for LC::Util::FlatItemsModelBase:
+ Collaboration diagram for LC::Util::FlatItemsModelBase:

Public Member Functions

 FlatItemsModelBase (QStringList headers, QObject *=nullptr)
 
int columnCount (const QModelIndex &index={}) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 
QModelIndex index (int row, int col, const QModelIndex &parent={}) const override
 
QModelIndex parent (const QModelIndex &) const override
 
int rowCount (const QModelIndex &parent={}) const override
 

Static Public Attributes

constexpr static auto DataRole = Qt::UserRole
 

Protected Member Functions

virtual int GetItemsCount () const =0
 
virtual QVariant GetData (int row, int col, int role) const =0
 

Detailed Description

Definition at line 22 of file flatitemsmodelbase.h.

Constructor & Destructor Documentation

◆ FlatItemsModelBase()

LC::Util::FlatItemsModelBase::FlatItemsModelBase ( QStringList  headers,
QObject *  parent = nullptr 
)
explicit

Definition at line 19 of file flatitemsmodelbase.cpp.

References index().

+ Here is the call graph for this function:

Member Function Documentation

◆ columnCount()

int LC::Util::FlatItemsModelBase::columnCount ( const QModelIndex &  index = {}) const
override

Definition at line 25 of file flatitemsmodelbase.cpp.

References GetData(), and index().

Referenced by LC::Util::FlatItemsModelTypedBase< T >::GetItems().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ data()

QVariant LC::Util::FlatItemsModelBase::data ( const QModelIndex &  index,
int  role 
) const
override

Definition at line 30 of file flatitemsmodelbase.cpp.

◆ GetData()

virtual QVariant LC::Util::FlatItemsModelBase::GetData ( int  row,
int  col,
int  role 
) const
protectedpure virtual

Implemented in LC::Util::RoledItemsModel< T >, and LC::Util::FlatItemsModel< T >.

Referenced by columnCount().

+ Here is the caller graph for this function:

◆ GetItemsCount()

virtual int LC::Util::FlatItemsModelBase::GetItemsCount ( ) const
protectedpure virtual

Implemented in LC::Util::FlatItemsModelTypedBase< T >.

Referenced by parent().

+ Here is the caller graph for this function:

◆ headerData()

QVariant LC::Util::FlatItemsModelBase::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const
override

Definition at line 38 of file flatitemsmodelbase.cpp.

◆ index()

QModelIndex LC::Util::FlatItemsModelBase::index ( int  row,
int  col,
const QModelIndex &  parent = {} 
) const
override

Definition at line 46 of file flatitemsmodelbase.cpp.

Referenced by columnCount(), FlatItemsModelBase(), and LC::Util::FlatItemsModelTypedBase< T >::GetItems().

+ Here is the caller graph for this function:

◆ parent()

QModelIndex LC::Util::FlatItemsModelBase::parent ( const QModelIndex &  ) const
override

Definition at line 56 of file flatitemsmodelbase.cpp.

References GetItemsCount().

+ Here is the call graph for this function:

◆ rowCount()

int LC::Util::FlatItemsModelBase::rowCount ( const QModelIndex &  parent = {}) const
override

Definition at line 61 of file flatitemsmodelbase.cpp.

Member Data Documentation

◆ DataRole

constexpr static auto LC::Util::FlatItemsModelBase::DataRole = Qt::UserRole
staticconstexpr

Definition at line 32 of file flatitemsmodelbase.h.

Referenced by LC::Util::RoledItemsModel< T >::GetData().


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