summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/dub/dub/dubplaylist.h
blob: 49c8f2f0599e208edc138c950287692f8aface1f (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//
// C++ Interface dubplaylist.h
//
// Description:
//
//
// Author: Eray Ozkural (exa), (C) 2001
//
// Copyright: See COPYING file that comes with this distribution
//
//

#ifndef DUBPLAYLIST_H
#define DUBPLAYLIST_H

class Dub;
class DubConfigModule;

#include <tdefileitem.h>
#include <noatun/playlist.h>
#include <noatun/plugin.h>

#include "dubplaylistitem.h"

/**Playlist class. Implements the noatun playlist interface
  *@author Eray Ozkural (exa)
  */

class DubPlaylist : public Playlist, public Plugin  {
public:

  DubPlaylist();
  ~DubPlaylist();

  virtual void reset();

  virtual void clear();
  virtual void addFile(const KURL&, bool play=false);
  /**
  * Cycle everthing through forward
  **/
  virtual PlaylistItem next();
  /**
  * return the one that might/should be playing now
  **/
  virtual PlaylistItem current();
  /**
  * Cycle through backwards
  **/
  virtual PlaylistItem previous();
  virtual PlaylistItem getFirst() const;
  virtual PlaylistItem getAfter(const PlaylistItem &item) const;

  virtual bool listVisible() const;
  virtual void init();
  virtual Playlist* playlist();

  virtual void setCurrent(const PlaylistItem &play);

public slots:
  virtual void showList();
  virtual void hideList();
  virtual void setCurrent(const KFileItem* file, bool play = false);
  void updateCurrent();
//  virtual void remove(const PlaylistItem&);
//  virtual void sort();

  DubConfigModule *dubconfig;

private:
  Dub *dub;
  PlaylistItem currentItem;
  bool visible;
};

#endif