diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-08-14 09:59:14 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-08-14 09:59:14 +0000 |
| commit | 2e689e667c8f4a53b9147ee3f54189a955acbc29 (patch) | |
| tree | 3bd98ca7307d62050409d61e376010ea146cdfeb /src/qmmpui/playlistcontainer_p.h | |
| parent | 3860a6037874458f9c3baf4f53ba32b1fcb462ab (diff) | |
| download | qmmp-2e689e667c8f4a53b9147ee3f54189a955acbc29.tar.gz qmmp-2e689e667c8f4a53b9147ee3f54189a955acbc29.tar.bz2 qmmp-2e689e667c8f4a53b9147ee3f54189a955acbc29.zip | |
added normal (w/o groups) playlist container
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3597 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/playlistcontainer_p.h')
| -rw-r--r-- | src/qmmpui/playlistcontainer_p.h | 58 |
1 files changed, 23 insertions, 35 deletions
diff --git a/src/qmmpui/playlistcontainer_p.h b/src/qmmpui/playlistcontainer_p.h index bd9841a2e..b4ea6a765 100644 --- a/src/qmmpui/playlistcontainer_p.h +++ b/src/qmmpui/playlistcontainer_p.h @@ -26,44 +26,32 @@ #include "playlisttrack.h" #include "playlistgroup.h" - class PlayListContainer { public: - PlayListContainer(); - - void addGroup(PlayListGroup *group); - void addTrack(PlayListTrack *item); - - QList<PlayListGroup *> groups(); - QList<PlayListItem *> items() const; - int count() const; - int trackCount() const; - QList<PlayListItem *> mid(int pos, int count) const; - bool isEmpty() const; - - bool isSelected(int index) const; - void setSelected(int index, bool selected); - void clearSelection(); - int indexOf(PlayListItem *item) const; - PlayListItem *item(int index) const; - PlayListTrack *track(int index) const; - bool contains(PlayListItem *item) const; - int numberOfTrack(int index) const; - - void removeTrack(int index); - void removeTrack(PlayListTrack *track); - void removeTracks(QList<PlayListTrack *> tracks); - - bool move(QList<int> indexes, int from, int to); - - void clear(); - -private: - void updateIndex(); - QList<PlayListGroup *> m_groups; - QList<PlayListItem *> m_items; - + PlayListContainer(){} + virtual ~PlayListContainer(){} + + virtual void addTrack(PlayListTrack *item) = 0; + virtual QList<PlayListGroup *> groups() = 0; + virtual QList<PlayListItem *> items() const = 0; + virtual int count() const = 0; + virtual int trackCount() const = 0; + virtual QList<PlayListItem *> mid(int pos, int count) const = 0; + virtual bool isEmpty() const = 0; + virtual bool isSelected(int index) const = 0; + virtual void setSelected(int index, bool selected) = 0; + virtual void clearSelection() = 0; + virtual int indexOf(PlayListItem *item) const = 0; + virtual PlayListItem *item(int index) const = 0; + virtual PlayListTrack *track(int index) const = 0; + virtual bool contains(PlayListItem *item) const = 0; + virtual int numberOfTrack(int index) const = 0; + virtual void removeTrack(int index) = 0; + virtual void removeTrack(PlayListTrack *track) = 0; + virtual void removeTracks(QList<PlayListTrack *> tracks) = 0; + virtual bool move(QList<int> indexes, int from, int to) = 0; + virtual void clear() = 0; }; #endif // PLAYLISTCONTAINER_P_H |
