You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

nrj.h 854B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef NRJ_H
  2. #define NRJ_H
  3. #include <QObject>
  4. #include <QNetworkAccessManager>
  5. #include <QNetworkRequest>
  6. #include <QNetworkReply>
  7. #include "radio.h"
  8. class NRJ : public QObject
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit NRJ(QObject *parent = 0);
  13. QList<Radio*> getRadios();
  14. signals:
  15. void setupFinished();
  16. void setupError();
  17. void getAllCurError();
  18. public slots:
  19. void setupPlayer();
  20. void getAllCur();
  21. void setRadio(QString radio);
  22. private slots:
  23. void onSetupFinished();
  24. void onSetupError(QNetworkReply::NetworkError);
  25. void onGetAllCurFinished();
  26. void onGetAllCurError(QNetworkReply::NetworkError);
  27. private:
  28. QNetworkAccessManager* mgr;
  29. QList<Radio*> radios;
  30. QUrl apiBase;
  31. QUrl coverBase;
  32. int tries;
  33. QString radio;
  34. };
  35. #endif // NRJ_H