blob: 0b8cd3e7b40fd0c5a248f21f1814cfb65e5d2131 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef BASEEXTERNALPLAYLISTMODEL_H
#define BASEEXTERNALPLAYLISTMODEL_H
#include <QtSql>
#include <QItemDelegate>
#include <QString>
#include <QObject>
#include <QModelIndex>
#include "library/trackmodel.h"
#include "library/basesqltablemodel.h"
#include "library/librarytablemodel.h"
#include "library/dao/playlistdao.h"
#include "library/dao/trackdao.h"
class BaseExternalPlaylistModel : public BaseSqlTableModel {
Q_OBJECT
public:
BaseExternalPlaylistModel(QObject* pParent, TrackCollection* pTrackCollection,
const char* settingsNamespace, const QString& playlistsTable,
const QString& playlistTracksTable, QSharedPointer<BaseTrackCache> trackSource);
~BaseExternalPlaylistModel() override;
void setPlaylist(QString path_name);
TrackPointer getTrack(const QModelIndex& index) const override;
bool isColumnInternal(int column) override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
void trackLoaded(QString group, TrackPointer pTrack) override;
CapabilitiesFlags getCapabilities() const override;
private:
QString m_playlistsTable;
QString m_playlistTracksTable;
QSharedPointer<BaseTrackCache> m_trackSource;
};
#endif /* BASEEXTERNALPLAYLISTMODEL_H */
|