![]() |
LeechCraft 0.6.70-19214-g121e5318a7
Modular cross-platform feature rich live environment.
|
#include "itemsmodel.h"
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 > | |
| FlatItemsModelTypedBase (QStringList headers, QObject *parent=nullptr) | |
| 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 |
| QList< T > & | GetMutItems () |
| qsizetype | 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) |
| void | RemoveItem (QList< T >::const_iterator it) |
| 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 |
| void | SetGlobalData (const QVariant &data, int role) |
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 |
| auto & | ItemAt (this auto &&self, int row, const std::source_location &loc=std::source_location::current()) |
Static Protected Member Functions | |
| static QVariant | GetDataForRole (auto &&...) |
| Static Protected Member Functions inherited from LC::Util::FlatItemsModelBase | |
| static void | NotifyRowOutOfRange (const FlatItemsModelBase &model, int row, int count, const std::source_location &loc) |
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_ |
Definition at line 385 of file itemsmodel.h.
|
inlineexplicit |
Definition at line 395 of file itemsmodel.h.
References ItemsModel().
Referenced by ItemsModel().
|
inlineexplicit |
Definition at line 401 of file itemsmodel.h.
References LC::Util::FlatItemsModelTypedBase< T >::FlatItemsModelTypedBase().
|
inlineoverride |
Definition at line 409 of file itemsmodel.h.
References LC::Util::FlatItemsModelTypedBase< T >::FlatItemsModelTypedBase(), flags(), and LC::Util::FlatItemsModelBase::index().
Referenced by flags().
|
inlineoverrideprotectedvirtual |
Implements LC::Util::FlatItemsModelBase.
Definition at line 437 of file itemsmodel.h.
References GetDataForRole(), and LC::Util::FlatItemsModelTypedBase< T >::ItemAt().
|
inlinestaticprotected |
Definition at line 459 of file itemsmodel.h.
Referenced by GetData().
|
inlineoverride |
Definition at line 417 of file itemsmodel.h.
References LC::Util::FlatItemsModelBase::index(), and LC::Util::FlatItemsModelTypedBase< T >::ItemAt().