Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
itemmodel.h File Reference
#include <QAbstractListModel>
#include <QObject>
#include <QScopedPointer>
#include <QVariantList>
#include "../dto/baseitemdto.h"
#include "../dto/baseitemdtoqueryresult.h"
#include "../loader/requesttypes.h"
#include "../model/item.h"
#include "../viewmodel/item.h"
#include "../apimodel.h"
#include "modelstatus.h"
#include "propertyhelper.h"

Go to the source code of this file.

Classes

class  Jellyfin::ViewModel::AbstractUserParameterLoader< T, D, R, P >
 Class intended for models which have a mandatory userId property, which can be extracted from the ApiClient. More...
 
class  Jellyfin::ViewModel::UserViewsLoader
 
class  Jellyfin::ViewModel::LatestMediaLoader
 
class  Jellyfin::ViewModel::UserItemsLoader
 
class  Jellyfin::ViewModel::ResumeItemsLoader
 
class  Jellyfin::ViewModel::ShowSeasonsLoader
 
class  Jellyfin::ViewModel::ShowEpisodesLoader
 
class  Jellyfin::ViewModel::NextUpLoader
 
class  Jellyfin::ViewModel::AlbumArtistLoader
 
class  Jellyfin::ViewModel::LiveTvChannelsLoader
 
class  Jellyfin::ViewModel::ItemModel
 Base class for each model that works with items. More...
 

Namespaces

namespace  Jellyfin
 
namespace  Jellyfin::ViewModel
 Contains all types exposed to QML.
 

Macros

#define FWDPROP(type, propName, propSetName)
 
#define FWDLISTPROP(type, propName, propSetName)
 
#define JFRN(name)   {RoleNames::name, #name}
 

Typedefs

using Jellyfin::ViewModel::UserViewsLoaderBase = AbstractUserParameterLoader<Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetUserViewsParams>
 
using Jellyfin::ViewModel::LatestMediaBase = AbstractUserParameterLoader<Model::Item, DTO::BaseItemDto, QList<DTO::BaseItemDto>, Jellyfin::Loader::GetLatestMediaParams>
 
using Jellyfin::ViewModel::UserItemsLoaderBase = AbstractUserParameterLoader<Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetItemsByUserIdParams>
 
using Jellyfin::ViewModel::ResumeItemsLoaderBase = AbstractUserParameterLoader<Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetResumeItemsParams>
 
using Jellyfin::ViewModel::ShowSeasonsLoaderBase = AbstractUserParameterLoader<Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetSeasonsParams>
 
using Jellyfin::ViewModel::ShowEpisodesLoaderBase = AbstractUserParameterLoader<Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetEpisodesParams>
 
using Jellyfin::ViewModel::NextUpLoaderBase = AbstractUserParameterLoader<Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetNextUpParams>
 
using Jellyfin::ViewModel::AlbumArtistLoaderBase = AbstractUserParameterLoader<Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetAlbumArtistsParams>
 
using Jellyfin::ViewModel::LiveTvChannelsLoaderBase = AbstractUserParameterLoader<Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetLiveTvChannelsParams>
 

Macro Definition Documentation

◆ FWDLISTPROP

#define FWDLISTPROP ( type,
propName,
propSetName )
Value:
public: \
Q_PROPERTY(QVariantList propName READ propName WRITE set##propSetName NOTIFY propName##Changed) \
QVariantList propName() const { \
QVariantList result; \
QList<type> list; \
result.reserve(list.size()); \
for (auto it = list.cbegin(); it != list.cend(); it++) { \
result.append(QVariant::fromValue<type>(*it)); \
} \
return result; \
} \
void set##propSetName(const QVariantList &newValue) { \
QList<type> list;\
list.reserve(newValue.size()); \
for(auto it = newValue.cbegin(); it != newValue.cend(); it++) { \
list.append(it->value<type>()); \
} \
this->m_parameters.set##propSetName(list); \
emit propName##Changed(); \
autoReloadIfNeeded(); \
} \
Q_SIGNALS: \
void propName##Changed();
Definition mediaplayer2.h:20

◆ FWDPROP

#define FWDPROP ( type,
propName,
propSetName )
Value:
public: \
Q_PROPERTY(type propName READ propName WRITE set##propSetName NOTIFY propName##Changed) \
type propName() const { return this->m_parameters.propName(); } \
void set##propSetName(type newValue) { \
this->m_parameters.set##propSetName( newValue ); \
emit propName##Changed(); \
autoReloadIfNeeded(); \
} \
Q_SIGNALS: \
void propName##Changed();

◆ JFRN

#define JFRN ( name)    {RoleNames::name, #name}