LeechCraft 0.6.70-17335-ge406ffdcaf
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
LC::Util::RoledItemsModel< T > Class Template Reference

#include "roleditemsmodel.h"

Inheritance diagram for LC::Util::RoledItemsModel< T >:
Collaboration diagram for LC::Util::RoledItemsModel< T >:

Public Types

using FieldGetter_t = QVariant (*) (const T&)
using FieldsList_t = QVector<QPair<QByteArray, FieldGetter_t>>

Public Member Functions

template<typename... Fields>
 RoledItemsModel (QObject *parent, Fields...) noexcept
QHash< int, QByteArray > roleNames () const override
Public Member Functions inherited from LC::Util::FlatItemsModelTypedBase< T >
void SetItems (QVector< T > items)
const QVector< T > & GetItems () const
void AddItem (const T &item)
void SetItem (int idx, const T &item)
template<typename F>
void EditItem (int idx, F &&editor)
void RemoveItem (int idx)
 FlatItemsModelBase (QStringList headers, QObject *=nullptr)
Public Member Functions inherited from LC::Util::FlatItemsModelBase
 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

Protected Member Functions

QVariant GetData (int row, int, int role) const override
Protected Member Functions inherited from LC::Util::FlatItemsModelTypedBase< T >
int GetItemsCount () const override

Additional Inherited Members

Static Public Attributes inherited from LC::Util::FlatItemsModelBase
static constexpr auto DataRole = Qt::UserRole
Protected Attributes inherited from LC::Util::FlatItemsModelTypedBase< T >
QVector< T > Items_

Detailed Description

template<typename T>
class LC::Util::RoledItemsModel< T >

Definition at line 37 of file roleditemsmodel.h.

Member Typedef Documentation

◆ FieldGetter_t

template<typename T>
using LC::Util::RoledItemsModel< T >::FieldGetter_t = QVariant (*) (const T&)

Definition at line 40 of file roleditemsmodel.h.

◆ FieldsList_t

template<typename T>
using LC::Util::RoledItemsModel< T >::FieldsList_t = QVector<QPair<QByteArray, FieldGetter_t>>

Definition at line 41 of file roleditemsmodel.h.

Constructor & Destructor Documentation

◆ RoledItemsModel()

template<typename T>
template<typename... Fields>
LC::Util::RoledItemsModel< T >::RoledItemsModel ( QObject * parent,
Fields...  )
inlinenoexcept

Definition at line 47 of file roleditemsmodel.h.

References LC::Util::FlatItemsModelBase::parent().

Here is the call graph for this function:

Member Function Documentation

◆ GetData()

template<typename T>
QVariant LC::Util::RoledItemsModel< T >::GetData ( int row,
int ,
int role ) const
inlineoverrideprotectedvirtual

◆ roleNames()

template<typename T>
QHash< int, QByteArray > LC::Util::RoledItemsModel< T >::roleNames ( ) const
inlineoverride

Definition at line 54 of file roleditemsmodel.h.


The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/leechcraft-doc-0.6.70+git.17335.ge406ffdcaf-build/leechcraft-0.6.70-17335-ge406ffdcaf/src/util/models/roleditemsmodel.h