|
Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
|
#include <qt_list_model_adapter.hpp>
Public Types | |
| using | RoleMap = QHash<int, QByteArray> |
| using | RoleFn = std::function<QVariant(const T&, int role)> |
Public Member Functions | |
| template<class L> | |
| requires ::aria::ListSourceOf< L, T > | ObservableListModel (L &source, RoleMap roles, RoleFn role_fn, QObject *parent=nullptr) |
| Generic constructor: accepts any list source whose element type matches T. | |
| ~ObservableListModel () override | |
| int | rowCount (const QModelIndex &parent=QModelIndex{}) const override |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| QHash< int, QByteArray > | roleNames () const override |
| void | reload () |
| Re-notify Qt views using the current event-maintained snapshot. | |
| using aria::adapters::qt6::ObservableListModel< T >::RoleMap = QHash<int, QByteArray> |
| using aria::adapters::qt6::ObservableListModel< T >::RoleFn = std::function<QVariant(const T&, int role)> |
|
inline |
Generic constructor: accepts any list source whose element type matches T.
Source reads happen only during construction; subsequent Insert/Replace/Reset events own the replayed payload.
|
inlineoverride |
|
inlineoverride |
|
inlineoverride |
|
inlineoverride |
|
inline |
Re-notify Qt views using the current event-maintained snapshot.
No source lookup is needed, so queued events cannot be duplicated.