forked from sanshao27/apktool
/
txteditor.h
61 lines (51 loc) · 1 KB
/
txteditor.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
#ifndef TXTEDITOR_H
#define TXTEDITOR_H
#include <QWidget>
#include <QPlainTextEdit>
namespace Ui {
class TxtEditor;
}
class TxtEditor : public QWidget
{
Q_OBJECT
public:
explicit TxtEditor(QWidget *parent = 0, QString file = "");
~TxtEditor();
signals:
void noreadperm();
void nowriteperm();
void closed();
public slots:
void up();
void down();
void left();
void right();
void prev();
void next();
void pageup();
void pagedown();
void setlinenum();
void gotoline();
void totalline(int lines);
void findnext();
void findprev();
void replace();
void replaceall();
void undo();
void redo();
void savefile();
void textchanged();
void copy();
void cut();
void paste();
protected:
void closeEvent(QCloseEvent *);
// bool eventFilter(QObject *, QEvent *);
private:
Ui::TxtEditor *ui;
QPlainTextEdit *editor;
QString _file;
bool _textchanged;
void savefile1();
};
#endif // TXTEDITOR_H