summaryrefslogtreecommitdiff
path: root/player.h
blob: 12437d479c636d73a6ea4039f724530d7214355d (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
#ifndef PLAYER_H
#define PLAYER_H

#include <QObject>
#include <phonon/mediaobject.h>
#include <phonon/audiooutput.h>

class Player : public QObject {
	Q_OBJECT
	
	private:
		Phonon::MediaObject* mo;
		Phonon::AudioOutput* ao;
	
	private slots:
		void tick(qint64 time);
		void newlength(qint64 length);
	
	public:
		Player();
	
	public slots:
		void prev();
		void pause();
		void play();
		void next();
		void seek(int pos);
	
	signals:
		void changed_track(const QUrl& track);
		void changed_state(bool playing);
		void changed_pos(int pos);
		void changed_length(int length);
};

#endif