QtRestClient
3.0.0
A library for generic JSON-based REST-APIs, with a mechanism to map JSON to Qt objects
|
A Qt item model that fills itself from a Paging object obtained via the network. More...
#include <pagingmodel.h>
Signals | |
void | fetchError (QPrivateSignal) |
Gets emitted if the model fails to obtain data via the network. | |
void | typeIdChanged (int typeId, QPrivateSignal) |
NOTIFY accessor for PagingModel::typeId. | |
Public Member Functions | |
PagingModel (QObject *parent=nullptr) | |
Default constructor. | |
Q_INVOKABLE void | initialize (const QUrl &initialUrl, QtRestClient::IPagingModelFetcher *fetcher, int typeId=QMetaType::UnknownType) |
Initialize the model using a type, a initial URL and a fetcher to use to send requests. More... | |
Q_INVOKABLE void | initialize (const QUrl &initialUrl, QtRestClient::RestClass *restClass, int typeId=QMetaType::UnknownType) |
Initialize the model using a type, a initial URL and a fetcher to use to send requests. More... | |
Q_INVOKABLE void | initialize (QtRestClient::RestReply *reply, QtRestClient::IPagingModelFetcher *fetcher, int typeId=QMetaType::UnknownType) |
Initialize the model from a paging object and a fetcher to use to send requests. More... | |
Q_INVOKABLE void | initialize (QtRestClient::RestReply *reply, QtRestClient::RestClass *restClass, int typeId=QMetaType::UnknownType) |
Initialize the model from a paging object and a fetcher to use to send requests. More... | |
Q_INVOKABLE void | initialize (QtRestClient::IPaging *paging, QtRestClient::IPagingModelFetcher *fetcher, int typeId=QMetaType::UnknownType) |
Initialize the model from a rest reply and a fetcher to use to send requests. More... | |
Q_INVOKABLE void | initialize (QtRestClient::IPaging *paging, QtRestClient::RestClass *restClass, int typeId=QMetaType::UnknownType) |
Initialize the model from a rest reply and a fetcher to use to send requests. More... | |
template<typename T > | |
void | initialize (const QUrl &initialUrl, IPagingModelFetcher *fetcher) |
Initialize the model using a type, a initial URL and a fetcher to use to send requests. More... | |
template<typename T > | |
void | initialize (const QUrl &initialUrl, RestClass *restClass) |
Initialize the model using a type, a initial URL and a fetcher to use to send requests. More... | |
template<typename T > | |
void | initialize (const Paging< T > &paging, IPagingModelFetcher *fetcher) |
Initialize the model from a paging object and a fetcher to use to send requests. More... | |
template<typename T > | |
void | initialize (const Paging< T > &paging, RestClass *restClass) |
Initialize the model from a paging object and a fetcher to use to send requests. More... | |
template<typename DataClassType , typename ErrorClassType = QObject*> | |
void | initialize (GenericRestReply< Paging< DataClassType >, ErrorClassType > *reply, IPagingModelFetcher *fetcher) |
Initialize the model from a rest reply and a fetcher to use to send requests. More... | |
template<typename DataClassType , typename ErrorClassType = QObject*> | |
void | initialize (GenericRestReply< Paging< DataClassType >, ErrorClassType > *reply, RestClass *restClass) |
Initialize the model from a rest reply and a fetcher to use to send requests. More... | |
int | typeId () const |
READ accessor for PagingModel::typeId. | |
QVariant | headerData (int section, Qt::Orientation orientation=Qt::Horizontal, int role=Qt::DisplayRole) const override |
Inherits QAbstractTableModel::headerData. | |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
Inherits QAbstractTableModel::rowCount. | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
Inherits QAbstractTableModel::columnCount. | |
bool | canFetchMore (const QModelIndex &parent) const override |
Inherits QAbstractTableModel::canFetchMore. | |
void | fetchMore (const QModelIndex &parent) override |
Inherits QAbstractTableModel::fetchMore. | |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
Inherits QAbstractTableModel::data. | |
Q_INVOKABLE QVariant | object (const QModelIndex &index) const |
Returns the object at the given index. | |
template<typename T > | |
T | object (const QModelIndex &index) const |
Returns the object at the given index. More... | |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
Inherits QAbstractTableModel::flags. | |
QHash< int, QByteArray > | roleNames () const override |
Inherits QAbstractTableModel::roleNames. | |
int | addColumn (const QString &text) |
Add a new column with the given title. More... | |
int | addColumn (const QString &text, const char *propertyName) |
Add a new column and set the given property as its Qt::DisplayRole. More... | |
void | addRole (int column, int role, const char *propertyName) |
Adds the given property as a new role to the given column. More... | |
void | clearColumns () |
Removes all customly added columns and roles. | |
Public Member Functions inherited from QAbstractTableModel | |
QAbstractTableModel (QObject *parent) | |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent) const const override |
virtual QModelIndex | sibling (int row, int column, const QModelIndex &idx) const const override |
virtual bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override |
Public Member Functions inherited from QAbstractItemModel | |
QAbstractItemModel (QObject *parent) | |
bool | hasIndex (int row, int column, const QModelIndex &parent) const const |
virtual QModelIndex | parent (const QModelIndex &index) const const=0 |
virtual bool | hasChildren (const QModelIndex &parent) const const |
virtual bool | setData (const QModelIndex &index, const QVariant &value, int role) |
virtual bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role) |
virtual QMap< int, QVariant > | itemData (const QModelIndex &index) const const |
virtual bool | setItemData (const QModelIndex &index, const QMap< int, QVariant > &roles) |
virtual QStringList | mimeTypes () const const |
virtual QMimeData * | mimeData (const QModelIndexList &indexes) const const |
virtual bool | canDropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const const |
virtual Qt::DropActions | supportedDropActions () const const |
virtual Qt::DropActions | supportedDragActions () const const |
void | setSupportedDragActions (Qt::DropActions actions) |
virtual bool | insertRows (int row, int count, const QModelIndex &parent) |
virtual bool | insertColumns (int column, int count, const QModelIndex &parent) |
virtual bool | removeRows (int row, int count, const QModelIndex &parent) |
virtual bool | removeColumns (int column, int count, const QModelIndex &parent) |
virtual bool | moveRows (const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) |
virtual bool | moveColumns (const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild) |
bool | insertRow (int row, const QModelIndex &parent) |
bool | insertColumn (int column, const QModelIndex &parent) |
bool | removeRow (int row, const QModelIndex &parent) |
bool | removeColumn (int column, const QModelIndex &parent) |
bool | moveRow (const QModelIndex &sourceParent, int sourceRow, const QModelIndex &destinationParent, int destinationChild) |
bool | moveColumn (const QModelIndex &sourceParent, int sourceColumn, const QModelIndex &destinationParent, int destinationChild) |
virtual void | sort (int column, Qt::SortOrder order) |
virtual QModelIndex | buddy (const QModelIndex &index) const const |
virtual QModelIndexList | match (const QModelIndex &start, int role, const QVariant &value, int hits, Qt::MatchFlags flags) const const |
virtual QSize | span (const QModelIndex &index) const const |
bool | checkIndex (const QModelIndex &index, QAbstractItemModel::CheckIndexOptions options) const const |
void | dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector< int > &roles) |
void | headerDataChanged (Qt::Orientation orientation, int first, int last) |
void | layoutChanged (const QList< QPersistentModelIndex > &parents, QAbstractItemModel::LayoutChangeHint hint) |
void | layoutAboutToBeChanged (const QList< QPersistentModelIndex > &parents, QAbstractItemModel::LayoutChangeHint hint) |
void | rowsAboutToBeInserted (const QModelIndex &parent, int start, int end) |
void | rowsInserted (const QModelIndex &parent, int first, int last) |
void | rowsAboutToBeRemoved (const QModelIndex &parent, int first, int last) |
void | rowsRemoved (const QModelIndex &parent, int first, int last) |
void | columnsAboutToBeInserted (const QModelIndex &parent, int first, int last) |
void | columnsInserted (const QModelIndex &parent, int first, int last) |
void | columnsAboutToBeRemoved (const QModelIndex &parent, int first, int last) |
void | columnsRemoved (const QModelIndex &parent, int first, int last) |
void | modelAboutToBeReset () |
void | modelReset () |
void | rowsAboutToBeMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow) |
void | rowsMoved (const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row) |
void | columnsAboutToBeMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn) |
void | columnsMoved (const QModelIndex &parent, int start, int end, const QModelIndex &destination, int column) |
virtual bool | submit () |
virtual void | revert () |
Public Member Functions inherited from QObject | |
virtual const QMetaObject * | metaObject () const const |
QObject (QObject *parent) | |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
QString | objectName () const const |
void | setObjectName (const QString &name) |
bool | isWidgetType () const const |
bool | isWindowType () const const |
bool | signalsBlocked () const const |
bool | blockSignals (bool block) |
QThread * | thread () const const |
void | moveToThread (QThread *targetThread) |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType) |
void | killTimer (int id) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
const QObjectList & | children () const const |
void | setParent (QObject *parent) |
void | installEventFilter (QObject *filterObj) |
void | removeEventFilter (QObject *obj) |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
bool | disconnect (const QObject *receiver, const char *method) const const |
void | dumpObjectTree () |
void | dumpObjectInfo () |
void | dumpObjectTree () const const |
void | dumpObjectInfo () const const |
bool | setProperty (const char *name, const QVariant &value) |
QVariant | property (const char *name) const const |
QList< QByteArray > | dynamicPropertyNames () const const |
void | destroyed (QObject *obj) |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
bool | inherits (const char *className) const const |
void | deleteLater () |
Q_DISABLE_COPY (Class) | |
Q_DISABLE_MOVE (Class) | |
Q_DISABLE_COPY_MOVE (Class) | |
T | qobject_cast (QObject *object) |
T | qobject_cast (const QObject *object) |
T | qFindChild (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QRegExp ®Exp) |
Q_CLASSINFO (Name, Value) | |
Q_INTERFACES (...) | |
Q_PROPERTY (...) | |
Q_ENUMS (...) | |
Q_FLAGS (...) | |
Q_ENUM (...) | |
Q_FLAG (...) | |
Q_ENUM_NS (...) | |
Q_FLAG_NS (...) | |
Q_OBJECT Q_OBJECT | |
Q_GADGET Q_GADGET | |
Q_NAMESPACE Q_NAMESPACE | |
Q_SIGNALS Q_SIGNALS | |
Q_SIGNAL Q_SIGNAL | |
Q_SLOTS Q_SLOTS | |
Q_SLOT Q_SLOT | |
Q_EMIT Q_EMIT | |
Q_INVOKABLE Q_INVOKABLE | |
Q_REVISION Q_REVISION | |
Q_SET_OBJECT_NAME (Object) | |
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
Static Public Attributes | |
static constexpr int | ModelDataRole = Qt::UserRole |
The Qt item role of the full REST-Object as was used to populate the model. | |
Properties | |
int | typeId |
Holds the type the model fetches data for. More... | |
Properties inherited from QObject | |
objectName | |
Additional Inherited Members | |
Static Public Member Functions inherited from QObject | |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
Public Attributes inherited from QAbstractItemModel | |
typedef | CheckIndexOptions |
Public Attributes inherited from QObject | |
typedef | QObjectList |
Protected Member Functions inherited from QAbstractItemModel | |
void | resetInternalData () |
QModelIndex | createIndex (int row, int column, void *ptr) const const |
QModelIndex | createIndex (int row, int column, quintptr id) const const |
void | beginInsertRows (const QModelIndex &parent, int first, int last) |
void | endInsertRows () |
void | beginRemoveRows (const QModelIndex &parent, int first, int last) |
void | endRemoveRows () |
bool | beginMoveRows (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild) |
void | endMoveRows () |
void | beginInsertColumns (const QModelIndex &parent, int first, int last) |
void | endInsertColumns () |
void | beginRemoveColumns (const QModelIndex &parent, int first, int last) |
void | endRemoveColumns () |
bool | beginMoveColumns (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild) |
void | endMoveColumns () |
void | reset () |
void | beginResetModel () |
void | endResetModel () |
void | changePersistentIndex (const QModelIndex &from, const QModelIndex &to) |
void | changePersistentIndexList (const QModelIndexList &from, const QModelIndexList &to) |
QModelIndexList | persistentIndexList () const const |
void | setRoleNames (const QHash< int, QByteArray > &roleNames) |
Protected Member Functions inherited from QObject | |
QObject * | sender () const const |
int | senderSignalIndex () const const |
int | receivers (const char *signal) const const |
bool | isSignalConnected (const QMetaMethod &signal) const const |
virtual void | timerEvent (QTimerEvent *event) |
virtual void | childEvent (QChildEvent *event) |
virtual void | customEvent (QEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
A Qt item model that fills itself from a Paging object obtained via the network.
This class can be used to provide a generic item model that uses a paging REST-API to fetch the data to be displayed to the user.
To use the model, you have to initialize() it once with a URL, a Paging object or a rest reply that returns a paging object. This works for both, the generic and non generic (CBOR/JSON) replies. The model uses the prpperties of the object that is managed by the paging object to generate roles that can be used in the UI.
The be able to acually fetch the data from a remote HTTP-server, the model needs a so called "fetcher", i.e. an instance of a QtRestClient::IPagingModelFetcher. Internally, this interface is used to create HTTP-requests and fetch more data for the model.
A default implementation for such a fetcher is available as the QtRestClient::RestClassFetcher. It uses a QtRestClient::RestClass to send GET-requests.
Assuming your data class looks like this:
You can instanciate a model for this data as follows:
Alternatively, you can pass a Paging<Person>
or a GenericRestReply<Paging<Person>>
as first parameter and initialize the model from that data. In this example, the standard RestClassFetcher was used, which can be created automatically by passing the RestClass directly as second parameter.
One additional feature of the model is, that it can also serve as model for table/tree views by delegating properties to multiple columns. This way you can use the model from QML by using the property names, and from widgets by delegating the properties to extra columns. For the above sample, the following code will result in a model with 2 columns, presenting the name and age properties as the Qt::DisplayRole of each column:
Definition at line 35 of file pagingmodel.h.
Add a new column with the given title.
text | The display name of the column header |
The method add a column to the model that can be used to present propeties from the underlying data as specific roles.
Add a new column and set the given property as its Qt::DisplayRole.
text | The display name of the column header |
propertyName | The name of the property to presented as the display role of that column |
This method is basically a shortcut for:
QVariant QtRestClient::PagingModel::addRole | ( | int | column, |
int | role, | ||
const char * | propertyName | ||
) |
Adds the given property as a new role to the given column.
column | The existing column to add the role to |
role | The role that should be added to the column |
propertyName | The name of the property to presented as the give role of that column |
This method adds a new role to an existing column. The new role will simply the the value of the given property of the object in each row. It's basically a delegate to the properties role.
|
inline |
Initialize the model from a paging object and a fetcher to use to send requests.
T | The type of data to be presented by the model |
paging | The paging object to initialize the model from |
fetcher | The IPagingModelFetcher to use to fetch the paging data from the remote server |
The model will first clear itself and then fill itself from the data that the paging provides. After that, the information returned by the paging of the reply is used to continue to fill the model.
Definition at line 166 of file pagingmodel.h.
|
inline |
Initialize the model from a paging object and a fetcher to use to send requests.
T | The type of data to be presented by the model |
paging | The paging object to initialize the model from |
restClass | The RestClass to use to fetch the paging data from the remote server |
The model will first clear itself and then fill itself from the data that the paging provides. After that, the information returned by the paging of the reply is used to continue to fill the model.
Definition at line 172 of file pagingmodel.h.
|
inline |
Initialize the model using a type, a initial URL and a fetcher to use to send requests.
T | The type of data to be presented by the model |
initialUrl | The URL to use to fetch the first paging object of the model |
fetcher | The IPagingModelFetcher to use to fetch the paging data from the remote server |
The model will first clear itself and then send the initialUrl as request using the fetcher to populate the model. After that, the information returned by the paging of the reply is used to continue to fill the model.
Definition at line 154 of file pagingmodel.h.
QtRestClient::PagingModel::initialize | ( | const QUrl & | initialUrl, |
QtRestClient::IPagingModelFetcher * | fetcher, | ||
int | typeId = QMetaType::UnknownType |
||
) |
Initialize the model using a type, a initial URL and a fetcher to use to send requests.
initialUrl | The URL to use to fetch the first paging object of the model |
fetcher | The IPagingModelFetcher to use to fetch the paging data from the remote server |
typeId | The type of data to be presented by the model |
The model will first clear itself and then send the initialUrl as request using the fetcher to populate the model. After that, the information returned by the paging of the reply is used to continue to fill the model.
QtRestClient::PagingModel::initialize | ( | const QUrl & | initialUrl, |
QtRestClient::RestClass * | restClass, | ||
int | typeId = QMetaType::UnknownType |
||
) |
Initialize the model using a type, a initial URL and a fetcher to use to send requests.
initialUrl | The URL to use to fetch the first paging object of the model |
restClass | The RestClass to use to fetch the paging data from the remote server |
typeId | The type of data to be presented by the model |
The model will first clear itself and then send the initialUrl as request using the fetcher to populate the model. After that, the information returned by the paging of the reply is used to continue to fill the model.
|
inline |
Initialize the model using a type, a initial URL and a fetcher to use to send requests.
T | The type of data to be presented by the model |
initialUrl | The URL to use to fetch the first paging object of the model |
restClass | The RestClass to use to fetch the paging data from the remote server |
The model will first clear itself and then send the initialUrl as request using the fetcher to populate the model. After that, the information returned by the paging of the reply is used to continue to fill the model.
Definition at line 160 of file pagingmodel.h.
|
inline |
Initialize the model from a rest reply and a fetcher to use to send requests.
DataClassType | The type of data to be presented by the model |
ErrorClassType | The ErrorClassType as needed by the GenericRestReply |
reply | A rest reply returning a paging object to intialize the model from |
fetcher | The IPagingModelFetcher to use to fetch the paging data from the remote server |
The model will first clear itself and then wait (asynchronously) for the reply to finish. Once that happend, it will fill itself with the data from that reply. After that, the information returned by the paging of the reply is used to continue to fill the model.
Definition at line 178 of file pagingmodel.h.
|
inline |
Initialize the model from a rest reply and a fetcher to use to send requests.
DataClassType | The type of data to be presented by the model |
ErrorClassType | The ErrorClassType as needed by the GenericRestReply |
reply | A rest reply returning a paging object to intialize the model from |
restClass | The RestClass to use to fetch the paging data from the remote server |
The model will first clear itself and then wait (asynchronously) for the reply to finish. Once that happend, it will fill itself with the data from that reply. After that, the information returned by the paging of the reply is used to continue to fill the model.
Definition at line 184 of file pagingmodel.h.
QtRestClient::PagingModel::initialize | ( | QtRestClient::IPaging * | paging, |
QtRestClient::IPagingModelFetcher * | fetcher, | ||
int | typeId = QMetaType::UnknownType |
||
) |
Initialize the model from a rest reply and a fetcher to use to send requests.
paging | The paging object to initialize the model from |
fetcher | The IPagingModelFetcher to use to fetch the paging data from the remote server |
typeId | The type of data to be presented by the model |
The model will first clear itself and then fill itself from the data that the paging provides. After that, the information returned by the paging of the reply is used to continue to fill the model.
QtRestClient::PagingModel::initialize | ( | QtRestClient::IPaging * | paging, |
QtRestClient::RestClass * | restClass, | ||
int | typeId = QMetaType::UnknownType |
||
) |
Initialize the model from a rest reply and a fetcher to use to send requests.
paging | The paging object to initialize the model from |
restClass | The RestClass to use to fetch the paging data from the remote server |
typeId | The type of data to be presented by the model |
The model will first clear itself and then fill itself from the data that the paging provides. After that, the information returned by the paging of the reply is used to continue to fill the model.
QtRestClient::PagingModel::initialize | ( | QtRestClient::RestReply * | reply, |
QtRestClient::IPagingModelFetcher * | fetcher, | ||
int | typeId = QMetaType::UnknownType |
||
) |
Initialize the model from a paging object and a fetcher to use to send requests.
reply | A rest reply returning a paging object to intialize the model from |
fetcher | The IPagingModelFetcher to use to fetch the paging data from the remote server |
typeId | The type of data to be presented by the model |
The model will first clear itself and then wait (asynchronously) for the reply to finish. Once that happend, it will fill itself with the data from that reply. After that, the information returned by the paging of the reply is used to continue to fill the model.
QtRestClient::PagingModel::initialize | ( | QtRestClient::RestReply * | reply, |
QtRestClient::RestClass * | restClass, | ||
int | typeId = QMetaType::UnknownType |
||
) |
Initialize the model from a paging object and a fetcher to use to send requests.
reply | A rest reply returning a paging object to intialize the model from |
restClass | The RestClass to use to fetch the paging data from the remote server |
typeId | The type of data to be presented by the model |
The model will first clear itself and then wait (asynchronously) for the reply to finish. Once that happend, it will fill itself with the data from that reply. After that, the information returned by the paging of the reply is used to continue to fill the model.
|
inline |
Returns the object at the given index.
T | The type of object to return. Must match PagingModel::typeId |
Definition at line 191 of file pagingmodel.h.
|
read |
Holds the type the model fetches data for.
Default: QMetaType::UnknownType
This type can only be changed be (re)initializing the model using one of the initialize() methods. After that was done, it can be used to retrieve the type id of the data that is beeing presented by the model.
Accessors | |
---|---|
READ | typeId() |
NOTIFY | typeIdChanged() |
Definition at line 40 of file pagingmodel.h.