Miam-Player  0.8.0
A nice music player
PlaylistModel Class Reference

The PlaylistModel class is the underlying class for Playlist class. More...

#include <playlistmodel.h>

Inheritance diagram for PlaylistModel:

Public Types

enum  Origin { RemoteMedia = Qt::UserRole + 1 }
 

Public Member Functions

 PlaylistModel (QObject *parent)
 
void clear ()
 
bool insertMedias (int rowIndex, const QList< QMediaContent > &tracks)
 
bool insertMedias (int rowIndex, const QStringList &tracks)
 
bool insertMedias (int rowIndex, const QList< TrackDAO > &tracks)
 
QList< QStandardItem * > internalMove (QModelIndex dest, QModelIndexList selectedIndexes)
 
void insertRow (int row, const QList< QStandardItem * > &items)
 
MediaPlaylistmediaPlaylist () const
 
void removeTrack (int row)
 

Detailed Description

The PlaylistModel class is the underlying class for Playlist class.

This class add tracks in a table

Author
Matthieu Bachelier

Member Enumeration Documentation

Enumerator
RemoteMedia 

Constructor & Destructor Documentation

PlaylistModel::PlaylistModel ( QObject *  parent)
explicit

Member Function Documentation

void PlaylistModel::clear ( )

Redefined to add lazy-loading. Clear the content of playlist.

Clear the content of playlist.

bool PlaylistModel::insertMedias ( int  rowIndex,
const QList< QMediaContent > &  tracks 
)

Redefined to add lazy-loading.

Redefined to add lazy-loading. Redefined to add lazy-loading.

bool PlaylistModel::insertMedias ( int  rowIndex,
const QStringList &  tracks 
)

XXX A new class like TrackLoader should be created. It could be a unique place to dispatch URIs to relevant plugins which can load remote tracks TrackDAO track = TrackLoader::instance()->loadFromUri(uri) However, to avoid too much requests to remove server, it might be useful to update the line only before playback started

bool PlaylistModel::insertMedias ( int  rowIndex,
const QList< TrackDAO > &  tracks 
)
void PlaylistModel::insertRow ( int  row,
const QList< QStandardItem * > &  items 
)

Redefined. XXX: warning this method is not marked as Virtual in QStandardItemModel.

QList< QStandardItem * > PlaylistModel::internalMove ( QModelIndex  dest,
QModelIndexList  selectedIndexes 
)

Moves rows from various positions to a new one (discontiguous rows are grouped).

MediaPlaylist* PlaylistModel::mediaPlaylist ( ) const
inline
void PlaylistModel::removeTrack ( int  row)

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