forked from QNnovation/ZBC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wgtfindreplacetext.h
67 lines (54 loc) · 1.49 KB
/
wgtfindreplacetext.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
#ifndef FINDREPLACETEXT_H
#define FINDREPLACETEXT_H
#include <QDialog>
#include <QTextDocument>
class QDialogButtonBox ;
class QLineEdit;
class QLabel;
class QPushButton;
class QCheckBox;
class QRadioButton;
class FindReplaceText : public QDialog
{
Q_OBJECT
public:
explicit FindReplaceText(QWidget *parent = 0);
void isReplace(bool);
~FindReplaceText();
public slots:
void findSlot();
void replaceSlot();
void replaceAllSlot();
void isEmptyText(const QString &);
signals:
void findSignal(const QString &, QTextDocument::FindFlags);
void replaceSignal(const QString &, QTextDocument::FindFlags, const QString &);
void replaceAllSignal(const QString &, QTextDocument::FindFlags, const QString &);
private:
//return flag;
QTextDocument::FindFlags options() const;
//line edit group
QLineEdit *m_textFindEdit;
QLineEdit *m_textReplaceEdit;
QLabel *m_textFindLbl;
QLabel *m_textReplaceLbl;
//buttons
QPushButton *m_findBtn;
QPushButton *m_closeBtn;
QPushButton *m_replaceBtn;
QPushButton *m_replaceAllBtn;
//radiobutton group
QLabel *m_directionLbl;
QRadioButton *m_downBtn;
QRadioButton *m_upBtn;
//checkbox group
QLabel *m_optionsLbl;
QCheckBox *m_caseSensitiveBox;
QCheckBox *m_wholeWordsBox;
//label status
QLabel *m_statusLbl;
//data
QString m_newWord;
QTextDocument::FindFlags flags;
};
#endif // FINDREPLACETEXT_H