forked from spacewander/EasyTable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
finddialog.h
98 lines (86 loc) · 2.09 KB
/
finddialog.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/**
*@class FindDialog
*use this dialog for finding and replacing
*/
/**
*@file
*use this dialog for finding and replacing
*/
#ifndef FINDDIALOG_H
#define FINDDIALOG_H
#include <QDialog>
class QCheckBox;
class QRadioButton;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class FindDialog : public QDialog
{
Q_OBJECT
public:
explicit FindDialog(QWidget *parent = 0);
signals:
// find with normal string
/**
*find forward
*/
void findNext(const QString &str,Qt::CaseSensitivity cs);
/**
*find backward
*/
void findPrevious(const QString &str,Qt::CaseSensitivity cs);
/**
*find from the begin of file to the end of file
*/
void findInAll(const QString &str,Qt::CaseSensitivity cs);
/**
*find from here and search the whole file
*/
void findFromHere(const QString &str,Qt::CaseSensitivity cs);
// find with regex
/**
*find forward using regex
*/
void findNextRE(const QRegExp &re);
/**
*find backward using regex
*/
void findPreviousRE(const QRegExp &re);
/**
*find from the begin of file to the end of file using regex
*/
void findInAllRE(const QRegExp &re);
/**
*find from here and search the whole file using regex
*/
void findFromHereRE(const QRegExp &re);
/**
*replace the context of the cell found
*/
void replaceSelectedCell(const QString &str);
public slots:
void findClicked();
void replaceClicked();
void enableFindButton(const QString &text);
void enableReplaceButton(const QString &text);
void enableRegexCheckBox(bool ok);
void enableCaseCheckBox(bool ok);
void match();
private:
QLabel *label;
QLineEdit *lineEdit;
QLabel *replaceLabel;
QLineEdit *replaceLineEdit;
QCheckBox *caseCheckBox;
QCheckBox *regexCheckBox;
QRadioButton *backwardRadioButton;
QRadioButton *forwardRadioButton;
QRadioButton *findInAllRadioButton;
QRadioButton *findFromHereRadioButton;
QGroupBox *radioButtonGroupBox;
QPushButton *findButton;
QPushButton *replaceButton;
QPushButton *closeButton;
};
#endif // FINDDIALOG_H