Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
Jellyfin::ViewModel::ItemLoader Class Reference

#include <item.h>

Inheritance diagram for Jellyfin::ViewModel::ItemLoader:
Jellyfin::ViewModel::Loader< ViewModel::Item, DTO::BaseItemDto, Jellyfin::Loader::GetItemParams > Jellyfin::ViewModel::LoaderBase

Signals

void itemIdChanged (const QString &newItemId) const
 
- Signals inherited from Jellyfin::ViewModel::LoaderBase
void statusChanged (Jellyfin::ViewModel::LoaderBase::Status newStatus)
 
void apiClientChanged (ApiClient *newApiClient)
 
void errorStringChanged (QString newErrorString)
 
void autoReloadChanged (bool newAutoReload)
 
void dataChanged ()
 
void ready ()
 Convenience signal for status == RemoteData.Ready.
 

Public Member Functions

 ItemLoader (QObject *parent=nullptr)
 
QString itemId () const
 
void setItemId (QString newItemId)
 
virtual bool canReload () const override
 Subclasses should implement this to determine if they can load data from the server.
 
- Public Member Functions inherited from Jellyfin::ViewModel::Loader< ViewModel::Item, DTO::BaseItemDto, Jellyfin::Loader::GetItemParams >
 Loader (Support::Loader< DTO::BaseItemDto, Jellyfin::Loader::GetItemParams > *loaderImpl, QObject *parent=nullptr)
 
 Loader (ApiClient *apiClient, Support::Loader< DTO::BaseItemDto, Jellyfin::Loader::GetItemParams > *loaderImpl, QObject *parent=nullptr)
 
ViewModel::ItemdataViewModel () const
 
QObject * data () const override
 
void reload () override
 Overload this method to reimplement the fetching mechanism to populate the RemoteData with data from the server.
 
- Public Member Functions inherited from Jellyfin::ViewModel::LoaderBase
 LoaderBase (QObject *parent=nullptr)
 
 LoaderBase (ApiClient *apiClient, QObject *parent=nullptr)
 
Status status () const
 
QString errorString () const
 
void setApiClient (ApiClient *newApiClient)
 
void setExtraFields (const QStringList &extraFields)
 

Properties

QString itemId
 
- Properties inherited from Jellyfin::ViewModel::LoaderBase
ApiClientapiClient
 
Jellyfin::ViewModel::LoaderBase::Status status
 
QString errorString
 
bool autoReload
 
QObject * data
 

Additional Inherited Members

- Public Types inherited from Jellyfin::ViewModel::LoaderBase
enum  Status { Uninitialised , Loading , Ready , Error }
 
- Public Slots inherited from Jellyfin::ViewModel::LoaderBase
- Protected Member Functions inherited from Jellyfin::ViewModel::LoaderBase
void setStatus (Status newStatus)
 
void setError (QNetworkReply::NetworkError error)
 
void setErrorString (const QString &newErrorString)
 
void reloadIfNeeded ()
 
void classBegin () override
 
void componentComplete () override
 
bool isQmlParsing () const
 
void emitDataChanged ()
 
- Protected Attributes inherited from Jellyfin::ViewModel::Loader< ViewModel::Item, DTO::BaseItemDto, Jellyfin::Loader::GetItemParams >
ViewModel::Itemm_dataViewModel
 
Jellyfin::Loader::GetItemParams m_parameters
 
QScopedPointer< Support::Loader< DTO::BaseItemDto, Jellyfin::Loader::GetItemParams > > m_loader
 Subclasses should initialize this to a loader that actually loads stuff.
 
- Protected Attributes inherited from Jellyfin::ViewModel::LoaderBase
ApiClientm_apiClient = nullptr
 

Constructor & Destructor Documentation

◆ ItemLoader()

Jellyfin::ViewModel::ItemLoader::ItemLoader ( QObject * parent = nullptr)
explicit

Member Function Documentation

◆ canReload()

bool Jellyfin::ViewModel::ItemLoader::canReload ( ) const
overridevirtual

Subclasses should implement this to determine if they can load data from the server.

Usage cases include checking if the required properties, such as the item id are set.

Reimplemented from Jellyfin::ViewModel::LoaderBase.

◆ itemId()

QString Jellyfin::ViewModel::ItemLoader::itemId ( ) const
inline

◆ itemIdChanged

void Jellyfin::ViewModel::ItemLoader::itemIdChanged ( const QString & newItemId) const
signal

◆ setItemId()

void Jellyfin::ViewModel::ItemLoader::setItemId ( QString newItemId)

Property Documentation

◆ itemId

QString Jellyfin::ViewModel::ItemLoader::itemId
readwrite

The documentation for this class was generated from the following files: