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.

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. private slots:
  22. void onSetupFinished();
  23. void onSetupError(QNetworkReply::NetworkError);
  24. void onGetAllCurFinished();
  25. void onGetAllCurError(QNetworkReply::NetworkError);
  26. private:
  27. QNetworkAccessManager* mgr;
  28. QList<Radio*> radios;
  29. QUrl apiBase;
  30. QUrl coverBase;
  31. int tries;
  32. };
  33. #endif // NRJ_H