Mixxx

BaseSqlTableModel Class Reference

#include <basesqltablemodel.h>

Inheritance diagram for BaseSqlTableModel:
Collaboration diagram for BaseSqlTableModel:

List of all members.

Classes

struct  RowInfo

Public Member Functions

 BaseSqlTableModel (QObject *pParent, TrackCollection *pTrackCollection, QSqlDatabase db, QString settingsNamespace)
virtual ~BaseSqlTableModel ()
virtual void sort (int column, Qt::SortOrder order)
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
virtual bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
virtual bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
virtual QMimeData * mimeData (const QModelIndexList &indexes) const
virtual void search (const QString &searchText, const QString extraFilter=QString())
virtual void setSearch (const QString &searchText, const QString extraFilter=QString())
virtual const QString currentSearch () const
virtual void setSort (int column, Qt::SortOrder order)
virtual int fieldIndex (const QString &fieldName) const
virtual void select ()
virtual int getTrackId (const QModelIndex &index) const
virtual QString getTrackLocation (const QModelIndex &index) const

Protected Member Functions

virtual const QLinkedList< int > getTrackRows (int trackId) const
virtual void setTable (const QString &tableName, const QString &trackIdColumn, const QStringList &tableColumns, QSharedPointer< BaseTrackCache > trackSource)
QSqlDatabase database () const
virtual Qt::ItemFlags readOnlyFlags (const QModelIndex &index) const
virtual Qt::ItemFlags readWriteFlags (const QModelIndex &index) const
virtual Qt::ItemFlags flags (const QModelIndex &index) const
virtual QString orderByClause () const
virtual void initHeaderData ()

Detailed Description

Definition at line 20 of file basesqltablemodel.h.


Constructor & Destructor Documentation

BaseSqlTableModel::BaseSqlTableModel ( QObject *  pParent,
TrackCollection pTrackCollection,
QSqlDatabase  db,
QString  settingsNamespace 
)

Definition at line 15 of file basesqltablemodel.cpp.

BaseSqlTableModel::~BaseSqlTableModel ( ) [virtual]

Definition at line 30 of file basesqltablemodel.cpp.


Member Function Documentation

int BaseSqlTableModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const [virtual]

Definition at line 382 of file basesqltablemodel.cpp.

Here is the caller graph for this function:

const QString BaseSqlTableModel::currentSearch ( ) const [virtual]

Implements TrackModel.

Definition at line 316 of file basesqltablemodel.cpp.

Here is the caller graph for this function:

QVariant BaseSqlTableModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const [virtual]

Definition at line 403 of file basesqltablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QSqlDatabase BaseSqlTableModel::database ( ) const [protected]

Definition at line 72 of file basesqltablemodel.cpp.

int BaseSqlTableModel::fieldIndex ( const QString &  fieldName) const [virtual]

Definition at line 393 of file basesqltablemodel.cpp.

Here is the caller graph for this function:

Qt::ItemFlags BaseSqlTableModel::flags ( const QModelIndex &  index) const [protected, virtual]

calls readWriteFlags() by default

Reimplemented in ITunesPlaylistModel, ITunesTrackModel, MissingTableModel, RhythmboxPlaylistModel, RhythmboxTrackModel, TraktorPlaylistModel, and TraktorTableModel.

Definition at line 516 of file basesqltablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int BaseSqlTableModel::getTrackId ( const QModelIndex &  index) const [virtual]

Implements TrackModel.

Definition at line 566 of file basesqltablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements TrackModel.

Definition at line 573 of file basesqltablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const QLinkedList< int > BaseSqlTableModel::getTrackRows ( int  trackId) const [protected, virtual]

Implements TrackModel.

Definition at line 559 of file basesqltablemodel.cpp.

QVariant BaseSqlTableModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const [virtual]

Definition at line 97 of file basesqltablemodel.cpp.

void BaseSqlTableModel::initHeaderData ( ) [protected, virtual]

Definition at line 33 of file basesqltablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QMimeData * BaseSqlTableModel::mimeData ( const QModelIndexList &  indexes) const [virtual]

Definition at line 690 of file basesqltablemodel.cpp.

Here is the call graph for this function:

QString BaseSqlTableModel::orderByClause ( ) const [protected, virtual]

Definition at line 116 of file basesqltablemodel.cpp.

Here is the caller graph for this function:

Qt::ItemFlags BaseSqlTableModel::readOnlyFlags ( const QModelIndex &  index) const [protected, virtual]

Use this if you want a model that is read-only.

Definition at line 547 of file basesqltablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Qt::ItemFlags BaseSqlTableModel::readWriteFlags ( const QModelIndex &  index) const [protected, virtual]

Use this if you want a model that can be changed

Definition at line 520 of file basesqltablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int BaseSqlTableModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const [virtual]

Definition at line 376 of file basesqltablemodel.cpp.

Here is the caller graph for this function:

void BaseSqlTableModel::search ( const QString &  searchText,
const QString  extraFilter = QString() 
) [virtual]

Definition at line 339 of file basesqltablemodel.cpp.

Here is the call graph for this function:

void BaseSqlTableModel::select ( ) [virtual]

Definition at line 138 of file basesqltablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool BaseSqlTableModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
) [virtual]

Definition at line 467 of file basesqltablemodel.cpp.

Here is the call graph for this function:

bool BaseSqlTableModel::setHeaderData ( int  section,
Qt::Orientation  orientation,
const QVariant &  value,
int  role = Qt::EditRole 
) [virtual]

Definition at line 76 of file basesqltablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BaseSqlTableModel::setSearch ( const QString &  searchText,
const QString  extraFilter = QString() 
) [virtual]

Definition at line 320 of file basesqltablemodel.cpp.

Here is the caller graph for this function:

void BaseSqlTableModel::setSort ( int  column,
Qt::SortOrder  order 
) [virtual]

Definition at line 347 of file basesqltablemodel.cpp.

Here is the caller graph for this function:

void BaseSqlTableModel::setTable ( const QString &  tableName,
const QString &  trackIdColumn,
const QStringList &  tableColumns,
QSharedPointer< BaseTrackCache trackSource 
) [protected, virtual]

Definition at line 285 of file basesqltablemodel.cpp.

Here is the caller graph for this function:

void BaseSqlTableModel::sort ( int  column,
Qt::SortOrder  order 
) [virtual]

Definition at line 368 of file basesqltablemodel.cpp.

Here is the call 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