![]() |
Mixxx
|
#include <playlisttablemodel.h>
Signals | |
void | doSearch (const QString &searchText) |
Public Member Functions | |
PlaylistTableModel (QObject *parent, TrackCollection *pTrackCollection, QString settingsNamespace) | |
virtual | ~PlaylistTableModel () |
void | setPlaylist (int playlistId) |
int | getPlaylist () const |
virtual TrackPointer | getTrack (const QModelIndex &index) const |
virtual void | search (const QString &searchText) |
virtual bool | isColumnInternal (int column) |
virtual bool | isColumnHiddenByDefault (int column) |
virtual void | removeTrack (const QModelIndex &index) |
virtual void | removeTracks (const QModelIndexList &indices) |
virtual bool | addTrack (const QModelIndex &index, QString location) |
virtual void | moveTrack (const QModelIndex &sourceIndex, const QModelIndex &destIndex) |
virtual void | shuffleTracks (const QModelIndex ¤tIndex) |
QItemDelegate * | delegateForColumn (const int i) |
TrackModel::CapabilitiesFlags | getCapabilities () const |
Definition at line 15 of file playlisttablemodel.h.
PlaylistTableModel::PlaylistTableModel | ( | QObject * | parent, |
TrackCollection * | pTrackCollection, | ||
QString | settingsNamespace | ||
) |
PlaylistTableModel::~PlaylistTableModel | ( | ) | [virtual] |
Definition at line 25 of file playlisttablemodel.cpp.
bool PlaylistTableModel::addTrack | ( | const QModelIndex & | index, |
QString | location | ||
) | [virtual] |
Reimplemented from TrackModel.
Definition at line 69 of file playlisttablemodel.cpp.
QItemDelegate * PlaylistTableModel::delegateForColumn | ( | const int | i | ) | [virtual] |
Reimplemented from TrackModel.
Definition at line 308 of file playlisttablemodel.cpp.
void PlaylistTableModel::doSearch | ( | const QString & | searchText | ) | [signal] |
TrackModel::CapabilitiesFlags PlaylistTableModel::getCapabilities | ( | ) | const [virtual] |
Reimplemented from TrackModel.
Definition at line 312 of file playlisttablemodel.cpp.
int PlaylistTableModel::getPlaylist | ( | ) | const [inline] |
TrackPointer PlaylistTableModel::getTrack | ( | const QModelIndex & | index | ) | const [virtual] |
Enables us to do ORing
Implements TrackModel.
Definition at line 97 of file playlisttablemodel.cpp.
bool PlaylistTableModel::isColumnHiddenByDefault | ( | int | column | ) | [virtual] |
Implements TrackModel.
Definition at line 301 of file playlisttablemodel.cpp.
bool PlaylistTableModel::isColumnInternal | ( | int | column | ) | [virtual] |
Implements TrackModel.
Definition at line 292 of file playlisttablemodel.cpp.
void PlaylistTableModel::moveTrack | ( | const QModelIndex & | sourceIndex, |
const QModelIndex & | destIndex | ||
) | [virtual] |
ALGORITHM for code below Case 1: destination < source (newPos < oldPos) 1) Set position = -1 where pos=source -- Gives that track a dummy index to keep stuff simple. 2) Decrement position where pos > source 3) increment position where pos > dest 4) Set position = dest where pos=-1 -- Move track from dummy pos to final destination.
Case 2: destination > source (newPos > oldPos) 1) Set position=-1 where pos=source -- Give track a dummy index again. 2) Decrement position where pos > source AND pos <= dest 3) Set postion=dest where pos=-1 -- Move that track from dummy pos to final destination
Reimplemented from TrackModel.
Definition at line 144 of file playlisttablemodel.cpp.
void PlaylistTableModel::removeTrack | ( | const QModelIndex & | index | ) | [virtual] |
Reimplemented from TrackModel.
Definition at line 106 of file playlisttablemodel.cpp.
void PlaylistTableModel::removeTracks | ( | const QModelIndexList & | indices | ) | [virtual] |
Reimplemented from TrackModel.
Definition at line 117 of file playlisttablemodel.cpp.
void PlaylistTableModel::search | ( | const QString & | searchText | ) | [virtual] |
Implements TrackModel.
Definition at line 281 of file playlisttablemodel.cpp.
void PlaylistTableModel::setPlaylist | ( | int | playlistId | ) |
Definition at line 28 of file playlisttablemodel.cpp.
void PlaylistTableModel::shuffleTracks | ( | const QModelIndex & | currentIndex | ) | [virtual] |
Definition at line 251 of file playlisttablemodel.cpp.