LeechCraft 0.6.70-17609-g3dde4097dd
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
LC::Util::ItemsModel< T, Extensions > Class Template Reference

#include "itemsmodel.h"

Inheritance diagram for LC::Util::ItemsModel< T, Extensions >:
Collaboration diagram for LC::Util::ItemsModel< T, Extensions >:

Public Member Functions

template<auto... Getter>
 ItemsModel (const Field< Getter > &... fields)
template<auto... Member, typename... ExtParams>
 ItemsModel (const std::tuple< ExtParams... > &extParams, const Field< Member > &... fields)
Qt::ItemFlags flags (const QModelIndex &index) const override
bool setData (const QModelIndex &index, const QVariant &value, int role) override
Public Member Functions inherited from LC::Util::FlatItemsModelTypedBase< T >
void SetItems (QList< T > items)
template<typename U>
requires std::is_constructible_v<T, U&&>
void SetItems (QList< U > items)
const QList< T > & GetItems () const
void AddItem (const T &item)
void AddItems (const QList< T > &items)
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 column, int role) const override
Protected Member Functions inherited from LC::Util::FlatItemsModelTypedBase< T >
int GetItemsCount () const override

Static Protected Member Functions

static QVariant GetDataForRole (auto &&...)

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 >
QList< T > Items_

Detailed Description

template<typename T, typename... Extensions>
class LC::Util::ItemsModel< T, Extensions >

Definition at line 205 of file itemsmodel.h.

Constructor & Destructor Documentation

◆ ItemsModel() [1/2]

template<typename T, typename... Extensions>
template<auto... Getter>
LC::Util::ItemsModel< T, Extensions >::ItemsModel ( const Field< Getter > &... fields)
inlineexplicit

Definition at line 215 of file itemsmodel.h.

References ItemsModel().

Referenced by ItemsModel().

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

◆ ItemsModel() [2/2]

template<typename T, typename... Extensions>
template<auto... Member, typename... ExtParams>
LC::Util::ItemsModel< T, Extensions >::ItemsModel ( const std::tuple< ExtParams... > & extParams,
const Field< Member > &... fields )
inlineexplicit

Definition at line 221 of file itemsmodel.h.

Member Function Documentation

◆ flags()

template<typename T, typename... Extensions>
Qt::ItemFlags LC::Util::ItemsModel< T, Extensions >::flags ( const QModelIndex & index) const
inlineoverride

Definition at line 229 of file itemsmodel.h.

References flags(), and LC::Util::FlatItemsModelBase::index().

Referenced by flags().

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

◆ GetData()

template<typename T, typename... Extensions>
QVariant LC::Util::ItemsModel< T, Extensions >::GetData ( int row,
int column,
int role ) const
inlineoverrideprotectedvirtual

Implements LC::Util::FlatItemsModelBase.

Definition at line 253 of file itemsmodel.h.

References GetDataForRole(), and LC::Util::FlatItemsModelTypedBase< T >::Items_.

Here is the call graph for this function:

◆ GetDataForRole()

template<typename T, typename... Extensions>
QVariant LC::Util::ItemsModel< T, Extensions >::GetDataForRole ( auto && ...)
inlinestaticprotected

Definition at line 275 of file itemsmodel.h.

Referenced by GetData().

Here is the caller graph for this function:

◆ setData()

template<typename T, typename... Extensions>
bool LC::Util::ItemsModel< T, Extensions >::setData ( const QModelIndex & index,
const QVariant & value,
int role )
inlineoverride

Definition at line 236 of file itemsmodel.h.

References LC::Util::FlatItemsModelBase::index(), and LC::Util::FlatItemsModelTypedBase< T >::Items_.

Here is the call graph for this function:

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