Scoreboard.h 641 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include <QObject>
  2. #include <QtNetwork/QNetworkReply>
  3. #ifndef SCOREBOARD_H
  4. #define SCOREBOARD_H
  5. class Scoreboard : public QObject {
  6. Q_OBJECT
  7. public:
  8. Scoreboard();
  9. void getList();
  10. void submitScore(QString, int);
  11. public slots:
  12. void fileIsReady(QNetworkReply *);
  13. void postIsReady(QNetworkReply *);
  14. void authenticate(QNetworkReply*, QAuthenticator*);
  15. signals:
  16. void boardChanged(QList< QHash<QString,QString> >);
  17. void boardError();
  18. void boardSubmitSuccess(int);
  19. void boardSubmitError();
  20. private:
  21. QUrl _script;
  22. QNetworkAccessManager* _manager;
  23. int _score;
  24. };
  25. #endif // SCOREBOARD_H