Root/Tile/src/tile.h

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
11extern bool isRunning;
12extern int Moves;
13
14namespace Ui {
15    class Tile;
16}
17
18class Tile : public QMainWindow {
19    Q_OBJECT
20public:
21    Tile(QWidget *parent = 0);
22    ~Tile();
23
24public 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
41protected:
42    void changeEvent(QEvent *e);
43
44private:
45    Ui::Tile *ui;
46};
47
48#endif // TILE_H
49

Archive Download this file



interactive