Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/library/rhythmbox/rhythmboxplaylistmodel.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                            rhythmboxplaylistmodel.h
00003                               -------------------
00004      begin                : 01/09/2011
00005      copyright            : (C) 2011 Tobias Rafreider
00006 
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 RHYTHMBOXPLAYLISTMODEL_H
00019 #define RHYTHMBOXPLAYLISTMODEL_H
00020 
00021 #include <QtSql>
00022 #include <QItemDelegate>
00023 #include <QtCore>
00024 
00025 #include "library/trackmodel.h"
00026 #include "library/basesqltablemodel.h"
00027 #include "library/librarytablemodel.h"
00028 #include "library/dao/playlistdao.h"
00029 #include "library/dao/trackdao.h"
00030 
00031 class TrackCollection;
00032 
00033 class RhythmboxPlaylistModel : public BaseSqlTableModel {
00034     Q_OBJECT
00035   public:
00036     RhythmboxPlaylistModel(QObject* parent, TrackCollection* pTrackCollection);
00037     virtual ~RhythmboxPlaylistModel();
00038 
00039     virtual TrackPointer getTrack(const QModelIndex& index) const;
00040     virtual void search(const QString& searchText);
00041     virtual bool isColumnInternal(int column);
00042     virtual bool isColumnHiddenByDefault(int column);
00043     virtual Qt::ItemFlags flags(const QModelIndex &index) const;
00044     void setPlaylist(QString path_name);
00045     TrackModel::CapabilitiesFlags getCapabilities() 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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines