LeechCraft 0.6.70-17609-g3dde4097dd
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
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

static constexpr 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 16 of file flatitemsmodelbase.h.

Constructor & Destructor Documentation

◆ FlatItemsModelBase()

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

Definition at line 13 of file flatitemsmodelbase.cpp.

References parent().

+ 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 19 of file flatitemsmodelbase.cpp.

References index().

Referenced by LC::Util::FlatItemsModelTypedBase< T >::EditItem(), and LC::Util::FlatItemsModelTypedBase< T >::SetItem().

+ 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 24 of file flatitemsmodelbase.cpp.

References GetData(), and index().

+ Here is the call graph for this function:

◆ GetData()

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

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

Referenced by data().

+ 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 index(), and rowCount().

+ 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 32 of file flatitemsmodelbase.cpp.

◆ index()

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

◆ parent()

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

Definition at line 50 of file flatitemsmodelbase.cpp.

Referenced by FlatItemsModelBase(), LC::Util::RoledItemsModel< T >::RoledItemsModel(), index(), and rowCount().

+ Here is the caller graph for this function:

◆ rowCount()

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

Definition at line 55 of file flatitemsmodelbase.cpp.

References GetItemsCount(), and parent().

+ Here is the call graph for this function:

Member Data Documentation

◆ DataRole

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

Definition at line 20 of file flatitemsmodelbase.h.

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


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