-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmainwindow.h
66 lines (58 loc) · 1.48 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMessageBox>
#include <QMainWindow>
#include <dialogopen.h>
#include <d_replace.h>
#include <d_new.h>
#include <d_save.h>
#include <d_find.h>
#include <datastruct.h>
#include <QMouseEvent>
#include <QTimer>
#include <QTime>
#include <QLabel>
#include <QScrollArea>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_actionOpen_triggered();
void receivefilename(QString filename);
void receiveNewfilename(QString filename);
void receiveSavefilename(QString filename);
void on_actionreplace_triggered();
void f_replace(QString s1,QString s2);
void f_find(QString s);
void graphic_datastruct();
// void wheelEvent(QWheelEvent *event);
void on_actionexit_triggered();
void on_actionNew_triggered();
void on_actionSave_triggered();
//
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
void on_actioninstruction_triggered();
void highlightChunk(Cursor cursor1,Cursor crusor2);
void on_actionfind_triggered();
private:
Ui::MainWindow *ui;
Text* t;//主数据结构的指针
QLabel **label;
QScrollArea * scrollArea;
QWidget * screen;
QLabel * cursor;
int labelnum;
int state;
bool pressflag;
QLabel * cursor_2;
protected:
// void mouseMoveEvent(QMouseEvent *event);
};
#endif // MAINWINDOW_H