mainwindow.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include <QMainWindow>
  4. class BuyCatalog;
  5. class QPushButton;
  6. namespace Ui {
  7. class MainWindow;
  8. }
  9. class MainWindow : public QMainWindow
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit MainWindow(QWidget *parent = 0);
  14. virtual ~MainWindow();
  15. void listLevels(const QString& aString);
  16. void updateLevels();
  17. private slots:
  18. void playLevel();
  19. void catalogClosed();
  20. void mainWindowClose();
  21. void mainWindowResetPurchases();
  22. private:
  23. bool isPurchased(int drmErrCode, QString& fileName);
  24. QString getProductId(const QString& path);
  25. public:
  26. static QString getTicketDir();
  27. static QString getTicketUri(const QString& productID);
  28. static bool readTicket(const QString& productID);
  29. static void saveTicket(const QString& purchaseTicket,
  30. QString& productID);
  31. private:
  32. //data
  33. QPushButton* getButton(QString& fname);
  34. QStringList* gameLevels;
  35. BuyCatalog* catalog;
  36. private:
  37. Ui::MainWindow *ui;
  38. };
  39. #endif // MAINWINDOW_H