blob: 269b7b906bf95d9a8bf6450a9497433c8be7461d (
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
|
#ifndef TAGSGET_H
#define TAGSGET_H
#include <qobject.h>
#include <cmodule.h>
#include <qvaluelist.h>
#include <qptrlist.h>
#include "tags.h"
class TagsGetter : public QObject, public PlaylistNotifier
{
Q_OBJECT
public:
TagsGetter();
void associate(Tags *t);
// if returns true, I'm deleted
bool unassociate(Tags *t);
int interval() const;
bool loadAuto() const;
public: //playlistnotifier
virtual void added(PlaylistItem &);
virtual void removed(PlaylistItem &);
protected:
void timerEvent(QTimerEvent *);
private slots:
// select the songs that need updating
void getSongs();
void newSong();
public slots:
void setInterval(int ms);
void setLoadAuto(bool);
private:
void sortPriority();
private:
QPtrList<Tags> tags;
QValueList<PlaylistItem> items;
};
class Control : public CModule
{
Q_OBJECT
public:
Control(TagsGetter* parent);
};
#endif
|