blob: 9e93c7b452f162d6a4521f9039b8388509a9d7e8 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
// playlistfeature.h
// Created 8/17/09 by RJ Ryan (rryan@mit.edu)
#ifndef PLAYLISTFEATURE_H
#define PLAYLISTFEATURE_H
#include <QVariant>
#include <QIcon>
#include <QModelIndex>
#include <QUrl>
#include <QObject>
#include <QPoint>
#include <QPointer>
#include "library/baseplaylistfeature.h"
#include "preferences/usersettings.h"
class TrackCollection;
class TreeItem;
class WLibrarySidebar;
class PlaylistFeature : public BasePlaylistFeature {
Q_OBJECT
public:
PlaylistFeature(QObject* parent, TrackCollection* pTrackCollection,
UserSettingsPointer pConfig);
virtual ~PlaylistFeature();
QVariant title() override;
QIcon getIcon() override;
void bindSidebarWidget(WLibrarySidebar* pSidebarWidget) override;
bool dropAcceptChild(const QModelIndex& index, QList<QUrl> urls, QObject* pSource) override;
bool dragMoveAcceptChild(const QModelIndex& index, QUrl url) override;
public slots:
void onRightClick(const QPoint& globalPos) override;
void onRightClickChild(const QPoint& globalPos, QModelIndex index) override;
private slots:
void slotPlaylistTableChanged(int playlistId) override;
void slotPlaylistContentChanged(int playlistId) override;
void slotPlaylistTableRenamed(int playlistId, QString a_strName) override;
protected:
QList<BasePlaylistFeature::IdAndLabel> createPlaylistLabels() override;
QString fetchPlaylistLabel(int playlistId) override;
void decorateChild(TreeItem *pChild, int playlist_id) override;
private:
QString getRootViewHtml() const override;
QIcon m_icon;
QPointer<WLibrarySidebar> m_pSidebarWidget;
};
#endif /* PLAYLISTFEATURE_H */
|