-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmainwindow.h
79 lines (64 loc) · 1.75 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "sudokucrack.h"
class QStackedWidget;
class QFrame;
class QPushButton;
class SudoKu;
typedef std::vector<std::vector<bool> > vvbool;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
void paintEvent(QPaintEvent * );
void resizeEvent(QResizeEvent* size);
void keyPressEvent(QKeyEvent *e);
~MainWindow();
private:
void load(int );
void save(int );
bool checkwin();
void beginGameClicked(int hard=0);
void setButtonInit();
void showwrong1(int i, int j);//same number
void notshowwrong1(int i, int j);
void showwrong2(int i, int j);//override the only number can be seen from other tab
void notshowwrong2(int i, int j);
void recoverwrong();
void showAllWrong();
QStackedWidget *m_widget;
QStackedWidget *b_w;
QPushButton ***b;
// QPushButton **others;
QPushButton **key;
QWidget* widget;
QFrame* widget2;
Ui::MainWindow *ui;
SudoKu *Game;
vvbool clickable;
vvint saved[5];
std::set<std::pair<int,int> > wrong1;
std::set<std::pair<int,int> > wrong2;
std::set<std::pair<int,int> > save_wrong1[5];
std::set<std::pair<int,int> > save_wrong2[5];
private slots:
void b_buttonClicked();
void b_SelectedHardClicked();
void tablebuttonClicked();
void keyboardclicked();
void newGameClicked();
void loadGameClicked();
void saveGameClicked();
void on_action_triggered();
void on_action_2_triggered();
void on_action_5_triggered();
void on_action_6_triggered();
void on_action_help_triggered();
void on_show_shortcuts_triggered();
};
#endif // MAINWINDOW_H