![]() |
Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
|
#include <apimodel.h>
Signals | |
| void | ready () |
| void | apiClientChanged (ApiClient *newApiClient) |
| void | statusChanged () |
| void | limitChanged (int newLimit) |
| void | autoReloadChanged (bool newAutoReload) |
| void | modelShouldClear () |
| Emitted when the model should clear itself. | |
| void | itemsLoaded () |
| void | reloadWanted () |
Public Member Functions | |
| BaseModelLoader (QObject *parent=nullptr) | |
| ApiClient * | apiClient () const |
| void | setApiClient (ApiClient *newApiClient) |
| int | limit () const |
| void | setLimit (int newLimit) |
| bool | autoReload () const |
| void | setAutoReload (bool newAutoReload) |
| ViewModel::ModelStatus | status () const |
| virtual Q_INVOKABLE void | reload () |
| Clears and reloads the model. | |
| virtual void | classBegin () override |
| virtual void | componentComplete () override |
| void | autoReloadIfNeeded () |
Protected Member Functions | |
| void | emitModelShouldClear () |
| void | emitItemsLoaded () |
| void | setStatus (ViewModel::ModelStatus newStatus) |
| virtual bool | canReload () const |
| Determines if this model is able to reload. | |
Protected Attributes | |
| bool | m_isBeingParsed = false |
| ApiClient * | m_apiClient = nullptr |
| bool | m_autoReload = true |
| bool | m_needsAuthentication = true |
| bool | m_manualLimitSet = false |
| int | m_limit = -1 |
| int | m_startIndex = 0 |
| int | m_totalRecordCount = 0 |
| bool | m_explicitLimitSet = false |
| const int | DEFAULT_LIMIT = 100 |
| ViewModel::ModelStatus | m_status = ViewModel::ModelStatus::Uninitialised |
Properties | |
| ApiClient * | apiClient |
| Jellyfin::ViewModel::ModelStatusClass::Value | status |
| int | limit |
| bool | autoReload |
|
explicit |
|
inline |
|
signal |
|
inline |
|
signal |
| void Jellyfin::BaseModelLoader::autoReloadIfNeeded | ( | ) |
|
protectedvirtual |
Determines if this model is able to reload.
The default implementation checks if the user is authenticated, and the model is not reloading. If overriding this method, please call this method as well in determining if the model should be reloadable.
Reimplemented in Jellyfin::ViewModel::AbstractUserParameterLoader< T, D, R, P >, Jellyfin::ViewModel::AbstractUserParameterLoader< Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetAlbumArtistsParams >, Jellyfin::ViewModel::AbstractUserParameterLoader< Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetEpisodesParams >, Jellyfin::ViewModel::AbstractUserParameterLoader< Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetItemsParams >, Jellyfin::ViewModel::AbstractUserParameterLoader< Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetLiveTvChannelsParams >, Jellyfin::ViewModel::AbstractUserParameterLoader< Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetNextUpParams >, Jellyfin::ViewModel::AbstractUserParameterLoader< Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetResumeItemsParams >, Jellyfin::ViewModel::AbstractUserParameterLoader< Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetSeasonsParams >, Jellyfin::ViewModel::AbstractUserParameterLoader< Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetUserViewsParams >, Jellyfin::ViewModel::AbstractUserParameterLoader< Model::Item, DTO::BaseItemDto, QList< DTO::BaseItemDto >, Jellyfin::Loader::GetLatestMediaParams >, and Jellyfin::ViewModel::PublicUsersLoader.
|
overridevirtual |
|
overridevirtual |
|
inlineprotected |
|
inlineprotected |
|
signal |
Emitted when new items are loaded.
|
inline |
|
signal |
|
signal |
Emitted when the model should clear itself.
|
signal |
|
inlinevirtual |
Clears and reloads the model.
Reimplemented in Jellyfin::ModelLoader< T >, Jellyfin::ModelLoader< Model::Item >, and Jellyfin::ModelLoader< Model::User >.
|
signal |
| void Jellyfin::BaseModelLoader::setApiClient | ( | ApiClient * | newApiClient | ) |
| void Jellyfin::BaseModelLoader::setAutoReload | ( | bool | newAutoReload | ) |
| void Jellyfin::BaseModelLoader::setLimit | ( | int | newLimit | ) |
|
inlineprotected |
|
inline |
|
signal |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
readwrite |
|
readwrite |
|
readwrite |
|
read |