-
Notifications
You must be signed in to change notification settings - Fork 3
/
editwindow.h
50 lines (42 loc) · 1.19 KB
/
editwindow.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
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. See COPYING file for more details.
*
*/
#ifndef EDITWINDOW_H
#define EDITWINDOW_H
#include <QDialog>
#include <QMenuBar>
#include <QAbstractButton>
#include <QShortcut>
#include <QTextCursor>
namespace Ui {
class EditWindow;
}
class EditWindow : public QDialog
{
Q_OBJECT
public:
explicit EditWindow(QWidget *parent, const QString& fPath);
~EditWindow();
protected:
void keyPressEvent(QKeyEvent *);
private slots:
void on_buttonBox_clicked(QAbstractButton *button);
signals:
private:
Ui::EditWindow *ui;
void loadFile();
void setWindowFont();
QString gFileName;
QShortcut *keyCtrlPlus; // объект горячей клавиши Ctrl + +
QShortcut *keyCtrlMinus; // объект сочетания клавиш Ctrl + -
QTextCursor findWord();
QTextCursor curPos;
QString sWord;
void moveCursor(int, int);
void setSelection(QTextCursor &findCur);
};
#endif // EDITWINDOW_H