OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
| 1 | #ifndef TILE_H |
| 2 | #define TILE_H |
| 3 | |
| 4 | #include <QMainWindow> |
| 5 | #include <QDebug> |
| 6 | #include <QPushButton> |
| 7 | #include <QTime> |
| 8 | #include <QMessageBox> |
| 9 | #include <QKeyEvent> |
| 10 | |
| 11 | extern bool isRunning; |
| 12 | extern int Moves; |
| 13 | |
| 14 | namespace Ui { |
| 15 | class Tile; |
| 16 | } |
| 17 | |
| 18 | class Tile : public QMainWindow { |
| 19 | Q_OBJECT |
| 20 | public: |
| 21 | Tile(QWidget *parent = 0); |
| 22 | ~Tile(); |
| 23 | |
| 24 | public slots: |
| 25 | void checkNeighbours(); |
| 26 | QPushButton* idtoButton(int id); |
| 27 | void swapButtons(QPushButton *button, QPushButton *button_neighbour); |
| 28 | void Reset(); |
| 29 | void Quit(); |
| 30 | void Shuffle(); |
| 31 | int randInt(int low, int high); |
| 32 | bool isSolvable(); |
| 33 | void Help(); |
| 34 | void keyPressEvent(QKeyEvent *event); |
| 35 | bool eventFilter(QObject *obj, QEvent *event); |
| 36 | void keyUp(QPushButton *button); |
| 37 | void keyDown(QPushButton *button); |
| 38 | bool isSolved(); |
| 39 | void updateMoves(); |
| 40 | |
| 41 | protected: |
| 42 | void changeEvent(QEvent *e); |
| 43 | |
| 44 | private: |
| 45 | Ui::Tile *ui; |
| 46 | }; |
| 47 | |
| 48 | #endif // TILE_H |
| 49 |
