| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
асть SASM. |
| 23 |
|
| 24 |
ерераспространять ее и/или |
| 25 |
ественной лицензии GNU в том виде, |
| 26 |
бодного программного обеспечения; |
| 27 |
у выбору) любой более поздней |
| 28 |
ии. |
| 29 |
|
| 30 |
что она будет полезной, |
| 31 |
явной гарантии ТОВАРНОГО ВИДА |
| 32 |
ЕЙ. Подробнее см. в Стандартной |
| 33 |
ицензии GNU. |
| 34 |
|
| 35 |
ртной общественной лицензии GNU |
| 36 |
Если это не так, см. |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
#ifndef FINDDIALOG_H |
| 42 |
#define FINDDIALOG_H |
| 43 |
|
| 44 |
#include <QWidget> |
| 45 |
#include <QCheckBox> |
| 46 |
#include <QLabel> |
| 47 |
#include <QLineEdit> |
| 48 |
#include <QPushButton> |
| 49 |
#include <QHBoxLayout> |
| 50 |
#include <QVBoxLayout> |
| 51 |
#include <QCloseEvent> |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
class FindDialog : public QWidget |
| 71 |
{ |
| 72 |
Q_OBJECT |
| 73 |
|
| 74 |
public: |
| 75 |
FindDialog(QWidget *parent = 0); |
| 76 |
~FindDialog(); |
| 77 |
|
| 78 |
void keyPressEvent(QKeyEvent *e); |
| 79 |
void showEvent(QShowEvent *e); |
| 80 |
void closeEvent(QCloseEvent *e); |
| 81 |
|
| 82 |
signals: |
| 83 |
void findNext(const QString &str, Qt::CaseSensitivity cs, bool all, bool replace, |
| 84 |
const QString &replaceText = 0); |
| 85 |
|
| 86 |
public slots: |
| 87 |
bool close(); |
| 88 |
void setSearchText(const QString &text); |
| 89 |
|
| 90 |
private slots: |
| 91 |
void findClicked(); |
| 92 |
void findAllClicked(); |
| 93 |
void replaceClicked(); |
| 94 |
void replaceAllClicked(); |
| 95 |
void enableFindButton(const QString &text); |
| 96 |
|
| 97 |
private: |
| 98 |
QLabel *searchLabel; |
| 99 |
QLabel *replaceLabel; |
| 100 |
QLineEdit *searchEdit; |
| 101 |
QLineEdit *replaceEdit; |
| 102 |
QCheckBox *caseCheckBox; |
| 103 |
QPushButton *findButton; |
| 104 |
QPushButton *findAllButton; |
| 105 |
QPushButton *replaceButton; |
| 106 |
QPushButton *replaceAllButton; |
| 107 |
QPushButton *closeButton; |
| 108 |
|
| 109 |
QHBoxLayout *replaceLayout; |
| 110 |
QHBoxLayout *searchLayout; |
| 111 |
QHBoxLayout *replaceButtonLayout; |
| 112 |
QVBoxLayout *leftLayout; |
| 113 |
QVBoxLayout *rightLayout; |
| 114 |
QHBoxLayout *mainLayout; |
| 115 |
QSpacerItem *searchSpacer; |
| 116 |
}; |
| 117 |
|
| 118 |
#endif |