-
Notifications
You must be signed in to change notification settings - Fork 3
/
mainwindow.h
83 lines (72 loc) · 1.65 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
80
81
82
83
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include<QHBoxLayout>
#include<QRadioButton>
#include <QPushButton>
#include <QtWidgets>
#include <QtGui>
#include<map>
#include<vector>
#include<set>
#include<QLabel>
#include "label.h"
using namespace std;
struct Node
{
Label* lb;
int times;
};
class QTextEdit;
class QLineEdit;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void openFile();
void saveFile();
void choose();
void refresh();
private:
QAction *openAction;
QAction *saveAction;
QAction *chooseAction;
QAction *refreshAction;
QTextEdit *textEdit;
QLineEdit *lineEdit;
QLineEdit *lineEdit2;
QButtonGroup *groupBox;
QRadioButton *rb1;
QRadioButton *rb2;
QRadioButton *rb3;
QString s;
QWidget *centralW,*rightW;
QHBoxLayout *layout;
map<QString,int> mp;
vector<Node> v;
//vector<QLabel *> vl;
set<QString> st;
const static int R=100,C=100;//GridLayout的规模
bool fill[R][C];//保存每一块是否被占用
bool ok(int r,int c,int h,int l);//判断左上角放在gird(r,c)且规模为h*l的单词能否放下
void set(int r,int c,int h,int l);//修改fill
int id;
int tmpp;
QString str;
QDialog *dlg;
QTimer *timer;
int controll_speed = 5000;
int controll_colorscheme = 1;
int controll_fren=1;
void reflash();
private slots:
//void selectWord();
void changeColor();
//QGridLayout *g;
void change();
//void changecolorscheme();
};
#endif // MAINWINDOW_H