Mixxx

TrackModel Class Reference

#include <trackmodel.h>

Inheritance diagram for TrackModel:

List of all members.

Public Types

enum  Capabilities {
  TRACKMODELCAPS_NONE = 0x0000, TRACKMODELCAPS_REORDER = 0x0001, TRACKMODELCAPS_RECEIVEDROPS = 0x0002, TRACKMODELCAPS_ADDTOPLAYLIST = 0x0004,
  TRACKMODELCAPS_ADDTOCRATE = 0x0008, TRACKMODELCAPS_ADDTOAUTODJ = 0x0010, TRACKMODELCAPS_LOCKED = 0x0020, TRACKMODELCAPS_RELOADMETADATA = 0x0040,
  TRACKMODELCAPS_LOADTODECK = 0x0080, TRACKMODELCAPS_LOADTOSAMPLER = 0x0100, TRACKMODELCAPS_REMOVE = 0x0200, TRACKMODELCAPS_RELOCATE = 0x0400
}
typedef int CapabilitiesFlags

Public Member Functions

 TrackModel (QSqlDatabase db, QString settingsNamespace)
virtual ~TrackModel ()
virtual TrackPointer getTrack (const QModelIndex &index) const =0
virtual QString getTrackLocation (const QModelIndex &index) const =0
virtual int getTrackId (const QModelIndex &index) const =0
virtual const QLinkedList< int > getTrackRows (int trackId) const =0
bool isTrackModel ()
virtual void search (const QString &searchText)=0
virtual const QString currentSearch () const =0
virtual bool isColumnInternal (int column)=0
virtual bool isColumnHiddenByDefault (int column)=0
virtual const QList< int > & showableColumns () const
virtual const QList< int > & searchColumns () const
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 QItemDelegate * delegateForColumn (const int i)
virtual
TrackModel::CapabilitiesFlags 
getCapabilities () const
virtual QString getModelSetting (QString name)
virtual bool setModelSetting (QString name, QVariant value)
virtual int defaultSortColumn () const
virtual Qt::SortOrder defaultSortOrder () const
virtual void setDefaultSort (int sortColumn, Qt::SortOrder sortOrder)

Detailed Description

Pure virtual (abstract) class that provides an interface for data models which display track lists.

Definition at line 14 of file trackmodel.h.


Member Typedef Documentation

Definition at line 40 of file trackmodel.h.


Member Enumeration Documentation

Enumerator:
TRACKMODELCAPS_NONE 
TRACKMODELCAPS_REORDER 
TRACKMODELCAPS_RECEIVEDROPS 
TRACKMODELCAPS_ADDTOPLAYLIST 
TRACKMODELCAPS_ADDTOCRATE 
TRACKMODELCAPS_ADDTOAUTODJ 
TRACKMODELCAPS_LOCKED 
TRACKMODELCAPS_RELOADMETADATA 
TRACKMODELCAPS_LOADTODECK 
TRACKMODELCAPS_LOADTOSAMPLER 
TRACKMODELCAPS_REMOVE 
TRACKMODELCAPS_RELOCATE 

Definition at line 25 of file trackmodel.h.


Constructor & Destructor Documentation

TrackModel::TrackModel ( QSqlDatabase  db,
QString  settingsNamespace 
) [inline]

Definition at line 16 of file trackmodel.h.

virtual TrackModel::~TrackModel ( ) [inline, virtual]

Definition at line 23 of file trackmodel.h.


Member Function Documentation

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

Reimplemented in BrowseTableModel, CrateTableModel, LibraryTableModel, MissingTableModel, PlaylistTableModel, and ProxyTrackModel.

Definition at line 71 of file trackmodel.h.

Here is the caller graph for this function:

virtual const QString TrackModel::currentSearch ( ) const [pure virtual]

Implemented in BaseSqlTableModel, BrowseTableModel, and ProxyTrackModel.

Here is the caller graph for this function:

virtual int TrackModel::defaultSortColumn ( ) const [inline, virtual]

Definition at line 100 of file trackmodel.h.

Here is the caller graph for this function:

virtual Qt::SortOrder TrackModel::defaultSortOrder ( ) const [inline, virtual]

Definition at line 104 of file trackmodel.h.

Here is the caller graph for this function:

virtual QItemDelegate* TrackModel::delegateForColumn ( const int  i) [inline, virtual]

Reimplemented in BrowseTableModel, CrateTableModel, LibraryTableModel, MissingTableModel, PlaylistTableModel, and ProxyTrackModel.

Definition at line 81 of file trackmodel.h.

Here is the caller graph for this function:

virtual TrackModel::CapabilitiesFlags TrackModel::getCapabilities ( ) const [inline, virtual]
virtual QString TrackModel::getModelSetting ( QString  name) [inline, virtual]

Reimplemented in ProxyTrackModel.

Definition at line 88 of file trackmodel.h.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual TrackPointer TrackModel::getTrack ( const QModelIndex &  index) const [pure virtual]
virtual int TrackModel::getTrackId ( const QModelIndex &  index) const [pure virtual]

Implemented in BaseSqlTableModel, BrowseTableModel, and ProxyTrackModel.

Here is the caller graph for this function:

virtual QString TrackModel::getTrackLocation ( const QModelIndex &  index) const [pure virtual]

Implemented in BaseSqlTableModel, BrowseTableModel, and ProxyTrackModel.

Here is the caller graph for this function:

virtual const QLinkedList<int> TrackModel::getTrackRows ( int  trackId) const [pure virtual]

Implemented in BaseSqlTableModel, BrowseTableModel, and ProxyTrackModel.

Here is the caller graph for this function:

virtual bool TrackModel::isColumnHiddenByDefault ( int  column) [pure virtual]
virtual bool TrackModel::isColumnInternal ( int  column) [pure virtual]
bool TrackModel::isTrackModel ( ) [inline]

Definition at line 56 of file trackmodel.h.

virtual void TrackModel::moveTrack ( const QModelIndex &  sourceIndex,
const QModelIndex &  destIndex 
) [inline, virtual]

Reimplemented in BrowseTableModel, CrateTableModel, LibraryTableModel, MissingTableModel, PlaylistTableModel, and ProxyTrackModel.

Definition at line 76 of file trackmodel.h.

Here is the caller graph for this function:

virtual void TrackModel::removeTrack ( const QModelIndex &  index) [inline, virtual]

Reimplemented in BrowseTableModel, CrateTableModel, LibraryTableModel, MissingTableModel, PlaylistTableModel, and ProxyTrackModel.

Definition at line 65 of file trackmodel.h.

Here is the caller graph for this function:

virtual void TrackModel::removeTracks ( const QModelIndexList &  indices) [inline, virtual]

Reimplemented in BrowseTableModel, CrateTableModel, LibraryTableModel, MissingTableModel, PlaylistTableModel, and ProxyTrackModel.

Definition at line 68 of file trackmodel.h.

Here is the caller graph for this function:

virtual void TrackModel::search ( const QString &  searchText) [pure virtual]
virtual const QList<int>& TrackModel::searchColumns ( ) const [inline, virtual]

Reimplemented in BrowseTableModel.

Definition at line 64 of file trackmodel.h.

Here is the caller graph for this function:

virtual void TrackModel::setDefaultSort ( int  sortColumn,
Qt::SortOrder  sortOrder 
) [inline, virtual]

Definition at line 108 of file trackmodel.h.

Here is the caller graph for this function:

virtual bool TrackModel::setModelSetting ( QString  name,
QVariant  value 
) [inline, virtual]

Reimplemented in ProxyTrackModel.

Definition at line 94 of file trackmodel.h.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual const QList<int>& TrackModel::showableColumns ( ) const [inline, virtual]

Definition at line 63 of file trackmodel.h.


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