Logo Search packages:      
Sourcecode: bangarang version File versions  Download package

MediaItemModel Class Reference

#include <mediaitemmodel.h>

List of all members.


Detailed Description

MediaItemModel contains information for a list of MediaItems repesented in the form of a model. It provides facilities for loading a list of MediaItems from a variety of sources as well as adding, updating or removing information associated with any MediaItem it contains. A subclass of QStandardItemModel, MediaItemModel may be used with a view to visually respresent the information it contains.

Definition at line 198 of file mediaitemmodel.h.


Public Slots

void actionActivated (QModelIndex index)
void addResults (QString requestSignature, QList< MediaItem > mediaList, MediaListProperties mediaListProperties, bool done, QString subRequestSignature)
void categoryActivated (QModelIndex index)
void reload ()
void removeMediaItem (QString url)
void updateMediaItem (MediaItem mediaItem)
void updateMediaItems (QList< MediaItem > mediaList)

Signals

void loading ()
void mediaListChanged ()
void propertiesChanged ()
void sourceInfoRemovalProgress (int percent)
void sourceInfoRemoved (QString url)
void sourceInfoUpdated (MediaItem mediaItem)
void sourceInfoUpdateProgress (int percent)
void sourceInfoUpdateRemovalComplete ()
void sourceInfoUpdateRemovalStarted ()

Public Member Functions

int cacheThreshold ()
void clearMediaListData (bool emitMediaListChanged=false)
QString dataEngine ()
bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
QString filter ()
Qt::ItemFlags flags (const QModelIndex &index) const
void load ()
void loadMediaItem (const MediaItem &mediaItem, bool emitMediaListChanged=false)
void loadMediaList (const QList< MediaItem > &mediaList, bool emitMediaListChanged=false, bool updateExisting=false)
void loadSources (const QList< MediaItem > &mediaList)
bool lriIsLoadable ()
MediaItem mediaItemAt (int row)
 MediaItemModel (QObject *parent)
QList< MediaItemmediaList ()
MediaListCachemediaListCache ()
MediaListProperties mediaListProperties ()
QMimeData * mimeData (const QModelIndexList &indexes) const
QStringList mimeTypes () const
void removeMediaItemAt (int row, bool emitMediaListChanged=false)
void removeSourceInfo (const QList< MediaItem > &mediaList)
void replaceMediaItemAt (int row, const MediaItem &mediaItem, bool emitMediaListChanged=false)
int rowOfUrl (const QString &url)
void setCacheThreshold (int msec)
void setListEngineFactory (ListEngineFactory *listEngineFactory)
void setMediaListCache (MediaListCache *mediaListCache)
void setMediaListProperties (const MediaListProperties &mediaListProperties)
Qt::DropActions supportedDropActions () const
void updateSourceInfo (const QList< MediaItem > &mediaList)
 ~MediaItemModel ()

Private Slots

void showLoadingMessage ()
void synchRemoveRows (const QModelIndex &index, int start, int end)

Private Member Functions

void hideLoadingMessage ()
QList< QStandardItem * > rowDataFromMediaItem (MediaItem mediaItem)
void setLoadingState (bool state)
void showNoResultsMessage ()

Private Attributes

int m_cacheThreshold
QString m_dataEngine
bool m_emitChangedAfterDrop
QString m_filter
bool m_forceRefreshFromSource
ListEngineFactorym_listEngineFactory
int m_loadingProgress
bool m_loadingState
bool m_loadSources
bool m_lriIsLoadable
QList< QString > m_lrisLoading
QHash< QString, QTime > m_lriStartTimes
QList< MediaItemm_mediaList
MediaListCachem_mediaListCache
QList< MediaItemm_mediaListForLoadSources
MediaListProperties m_mediaListProperties
QObject * m_parent
bool m_reload
QString m_requestSignature
QList< QList< MediaItem > > m_subRequestMediaLists
int m_subRequestsDone
QStringList m_subRequestSignatures
QStringList m_urlList

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

Generated by  Doxygen 1.6.0   Back to index