Repository navigation
Expand file tree
/
Copy pathmainwindow.h
More file actions
73 lines (62 loc) · 1.49 KB
/
Copy pathmainwindow.h
File metadata and controls
73 lines (62 loc) · 1.49 KB
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QDebug>
#include <QPainter>
#include <QPixmap>
#include <QMouseEvent>
#include "block.h"
#include <QTimer>
#include <QMessageBox>
#include <qmessagebox.h>
#include <QMenuBar>
#include <QMenu>
#include <QAction>
#include <QApplication>
#include <QPushButton>
#include <QDesktopServices>
#include "inputdialog.h"
#define BLOCK_LENGTH 21
#define BLOCK_HEIGH 21
#define ELENUM_LENGHT 20
#define EXPRESSION_LENGHT 24
#define EXPRESSION_HEIGH 24
#define TTILE_BEGIN 23
#define TITILE_HEIGH (TTILE_BEGIN+40)
#define PRIMARY_LENGTH 189
#define MIDDLE_LENGTH 336
#define TOP_LENGTH 630
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private:
QTimer * runtime;
// Dialog * useDefineWindows;
protected:
virtual void paintEvent(QPaintEvent *event);
virtual void mousePressEvent(QMouseEvent *event);
private slots:
void on_secondadd();
void Easy_triggered();
void Middle_triggered();
void Hard_triggered();
void Exit_triggered();
void Customize_triggered();
void AboutQT_triggered();
void About_triggered();
private:
Ui::MainWindow *ui;
};
void showblock(int x,int y);
int iswin();
void restart(int row,int col,int boolnum);
void painttitle(QPainter * painter);
void paintboom(QPainter * painter);
void createinterface();
#endif // MAINWINDOW_H