implement HasSongs interface
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
#include "ncmpcpp.h"
|
||||
#include "screen.h"
|
||||
|
||||
class MediaLibrary : public Screen<Window>, public Filterable, public Searchable
|
||||
class MediaLibrary : public Screen<Window>, public Filterable, public HasSongs, public Searchable
|
||||
{
|
||||
public:
|
||||
virtual void SwitchTo();
|
||||
@@ -41,13 +41,6 @@ class MediaLibrary : public Screen<Window>, public Filterable, public Searchable
|
||||
virtual void MouseButtonPressed(MEVENT);
|
||||
virtual bool isTabbable() { return true; }
|
||||
|
||||
virtual MPD::Song *CurrentSong();
|
||||
virtual MPD::Song *GetSong(size_t pos) { return w == Songs ? &Songs->at(pos).value() : 0; }
|
||||
|
||||
virtual bool allowsSelection() { return true; }
|
||||
virtual void ReverseSelection();
|
||||
virtual void GetSelectedSongs(MPD::SongList &);
|
||||
|
||||
/// Filterable implementation
|
||||
virtual std::string currentFilter();
|
||||
virtual void applyFilter(const std::string &filter);
|
||||
@@ -57,6 +50,15 @@ class MediaLibrary : public Screen<Window>, public Filterable, public Searchable
|
||||
virtual void nextFound(bool wrap);
|
||||
virtual void prevFound(bool wrap);
|
||||
|
||||
/// HasSongs implementation
|
||||
virtual MPD::Song *getSong(size_t pos);
|
||||
virtual MPD::Song *currentSong();
|
||||
|
||||
virtual bool allowsSelection();
|
||||
virtual void reverseSelection();
|
||||
virtual void removeSelection();
|
||||
virtual MPD::SongList getSelectedSongs();
|
||||
|
||||
virtual List *GetList();
|
||||
|
||||
virtual bool isMergable() { return true; }
|
||||
|
||||
Reference in New Issue
Block a user