Progressbar fix
[groove] / splayer.h
1 #ifndef SPLAYER_H
2 #define SPLAYER_H
3 #include <QtNetwork>
4 //#include <parser.h>
5 #include <QObject>
6 #include <phonon>
7 #include "streamio.h"
8 #include <QProgressDialog>
9 #include "grooveprogressbar.h"
10
11 class sPlayer : public QObject
12 {
13     Q_OBJECT
14 public:
15     explicit sPlayer(QObject *parent = 0);
16     void play(QString StreamKey, QUrl server);
17     void stop();
18     ~sPlayer();
19
20 signals:
21     void finishedPlaying();
22     void downloadComplete();
23 public slots:
24     void start();
25     void putb(qint64,qint64);
26     void abortDownload();
27 private:
28     QNetworkAccessManager *manager;
29     Phonon::AudioOutput *audioOutput;
30     Phonon::MediaObject *media;
31     QNetworkReply *reply;
32     QBuffer *buffer;
33     Phonon::Path *path;
34     bool playing;
35     QObject *internal;
36     QTime startStreamT;
37     grooveProgressBar *pd;
38 };
39 #endif // SPLAYER_H