Mixxx

PlaylistTableModel Class Reference

#include <playlisttablemodel.h>

Inheritance diagram for PlaylistTableModel:
Collaboration diagram for PlaylistTableModel:

List of all members.

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 &currentIndex)
QItemDelegate * delegateForColumn (const int i)
TrackModel::CapabilitiesFlags getCapabilities () const

Detailed Description

Definition at line 15 of file playlisttablemodel.h.


Constructor & Destructor Documentation

PlaylistTableModel::PlaylistTableModel ( QObject *  parent,
TrackCollection pTrackCollection,
QString  settingsNamespace 
)

Definition at line 11 of file playlisttablemodel.cpp.

Here is the call graph for this function:

PlaylistTableModel::~PlaylistTableModel ( ) [virtual]

Definition at line 25 of file playlisttablemodel.cpp.


Member Function Documentation

bool PlaylistTableModel::addTrack ( const QModelIndex &  index,
QString  location 
) [virtual]

Reimplemented from TrackModel.

Definition at line 69 of file playlisttablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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]

Here is the caller graph for this function:

TrackModel::CapabilitiesFlags PlaylistTableModel::getCapabilities ( ) const [virtual]

Reimplemented from TrackModel.

Definition at line 312 of file playlisttablemodel.cpp.

Here is the call graph for this function:

int PlaylistTableModel::getPlaylist ( ) const [inline]

Definition at line 22 of file playlisttablemodel.h.

Here is the caller graph for this function:

TrackPointer PlaylistTableModel::getTrack ( const QModelIndex &  index) const [virtual]

Enables us to do ORing

Implements TrackModel.

Definition at line 97 of file playlisttablemodel.cpp.

Here is the call graph for this function:

bool PlaylistTableModel::isColumnHiddenByDefault ( int  column) [virtual]

Implements TrackModel.

Definition at line 301 of file playlisttablemodel.cpp.

Here is the call graph for this function:

bool PlaylistTableModel::isColumnInternal ( int  column) [virtual]

Implements TrackModel.

Definition at line 292 of file playlisttablemodel.cpp.

Here is the call graph for this function:

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.

Here is the call graph for this function:

void PlaylistTableModel::removeTrack ( const QModelIndex &  index) [virtual]

Reimplemented from TrackModel.

Definition at line 106 of file playlisttablemodel.cpp.

Here is the call graph for this function:

void PlaylistTableModel::removeTracks ( const QModelIndexList &  indices) [virtual]

Reimplemented from TrackModel.

Definition at line 117 of file playlisttablemodel.cpp.

Here is the call graph for this function:

void PlaylistTableModel::search ( const QString &  searchText) [virtual]

Implements TrackModel.

Definition at line 281 of file playlisttablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void PlaylistTableModel::setPlaylist ( int  playlistId)

Definition at line 28 of file playlisttablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void PlaylistTableModel::shuffleTracks ( const QModelIndex &  currentIndex) [virtual]

Definition at line 251 of file playlisttablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines