Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
|
Abstract model for displaying collections. More...
#include <apimodel.h>
Public Member Functions | |
ApiModel (QObject *parent=nullptr) | |
Creates a new basemodel. | |
int | rowCount (const QModelIndex &index) const override |
QSharedPointer< T > | at (int index) const |
int | size () const |
void | insert (int index, QSharedPointer< T > object) |
void | append (QSharedPointer< T > object) |
void | append (QList< QSharedPointer< T > > &objects) |
QList< T * > | mid (int pos, int length=-1) |
void | removeAt (int index) |
void | removeUntilEnd (int from) |
void | removeOne (QSharedPointer< T > object) |
void | clear () override |
const QList< QSharedPointer< T > > & | toList () |
virtual bool | canFetchMore (const QModelIndex &parent) const override |
virtual void | fetchMore (const QModelIndex &parent) override |
BaseModelLoader * | loader () const override |
void | setLoader (BaseModelLoader *newLoader) |
void | reload () override |
Public Member Functions inherited from Jellyfin::BaseApiModel | |
BaseApiModel (QObject *parent=nullptr) | |
void | disconnectOldLoader (BaseModelLoader *oldLoader) |
Protected Member Functions | |
void | loadingFinished () override |
Protected Attributes | |
QList< QSharedPointer< T > > | m_array |
ModelLoader< T > * | m_loader = nullptr |
Additional Inherited Members | |
Public Slots inherited from Jellyfin::BaseApiModel | |
Signals inherited from Jellyfin::BaseApiModel | |
void | loaderChanged () |
Protected Slots inherited from Jellyfin::BaseApiModel | |
Properties inherited from Jellyfin::BaseApiModel | |
BaseModelLoader * | loader |
Abstract model for displaying collections.
T | The class of the result. |
R | The class returned by the loader. |
P | The class with the request parameters for the loader. |
|
inlineexplicit |
Creates a new basemodel.
path | The path (relative to the baseUrl of JellyfinApiClient) to make the call to. |
subfield | Leave empty if the root of the result is the array with results. Otherwise, set to the key name in the root object which contains the data. |
parent | Parent (Standard QObject stuff) |
If the response looks something like this:
or
responseHasRecords should be false
If the response looks something like this:
responseHasRecords should be true
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Implements Jellyfin::BaseApiModel.
|
inlineoverridevirtual |
|
inline |
|
inlineoverridevirtual |
Implements Jellyfin::BaseApiModel.
|
inlineoverrideprotectedvirtual |
Implements Jellyfin::BaseApiModel.
|
inline |
|
inlineoverridevirtual |
Implements Jellyfin::BaseApiModel.
|
inline |
|
inline |
|
inline |
|
inlineoverride |
|
inlinevirtual |
Reimplemented from Jellyfin::BaseApiModel.
|
inline |
|
inline |
|
protected |
|
protected |