![]() |
Mixxx
|
00001 /*************************************************************************** 00002 rhythmboxtracksource.h 00003 ------------------- 00004 begin : 8/15/2009 00005 copyright : (C) 2011 Tobias Rafreider 00006 email : alberts@mixxx.org 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef RHYTHMBOXTRACKMODEL_H 00019 #define RHYTHMBOXTRACKMODEL_H 00020 00021 00022 #include <QtSql> 00023 #include <QItemDelegate> 00024 #include <QtCore> 00025 00026 #include "library/trackmodel.h" 00027 #include "library/basesqltablemodel.h" 00028 #include "library/librarytablemodel.h" 00029 #include "library/dao/playlistdao.h" 00030 #include "library/dao/trackdao.h" 00031 00032 class TrackCollection; 00033 00034 class RhythmboxTrackModel : public BaseSqlTableModel { 00035 Q_OBJECT 00036 public: 00037 RhythmboxTrackModel(QObject* parent, TrackCollection* pTrackCollection); 00038 TrackModel::CapabilitiesFlags getCapabilities() const; 00039 virtual ~RhythmboxTrackModel(); 00040 00041 virtual TrackPointer getTrack(const QModelIndex& index) const; 00042 virtual void search(const QString& searchText); 00043 virtual bool isColumnInternal(int column); 00044 virtual bool isColumnHiddenByDefault(int column); 00045 virtual Qt::ItemFlags flags(const QModelIndex &index) const; 00046 00047 private slots: 00048 void slotSearch(const QString& searchText); 00049 00050 signals: 00051 void doSearch(const QString& searchText); 00052 00053 private: 00054 TrackCollection* m_pTrackCollection; 00055 QSqlDatabase &m_database; 00056 }; 00057 00058 #endif