00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef _QSEARCH_REPLACE_PANEL_H_
00017 #define _QSEARCH_REPLACE_PANEL_H_
00018
00019 #include "qpanel.h"
00020
00028 #include "ui_searchreplace.h"
00029
00030 class QDocumentLine;
00031 class QDocumentSearch;
00032
00033 class QCE_EXPORT QSearchReplacePanel : public QPanel, private Ui::SearchReplace
00034 {
00035 Q_OBJECT
00036
00037 public:
00038 Q_PANEL(QSearchReplacePanel, "Search Replace Panel")
00039
00040 QSearchReplacePanel(QWidget *p = 0);
00041 virtual ~QSearchReplacePanel();
00042
00043 virtual QString type() const;
00044
00045 public slots:
00046 void display(int mode, bool replace);
00047
00048 void find(int backward = -1);
00049
00050 protected:
00051 virtual void editorChange(QEditor *e);
00052
00053 virtual bool eventFilter(QObject *o, QEvent *e);
00054
00055 virtual void hideEvent(QHideEvent *e);
00056 virtual void paintEvent(QPaintEvent *e);
00057
00058 private slots:
00059 void on_leFind_textEdited(const QString& text);
00060 void on_leReplace_textEdited(const QString& text);
00061
00062 void on_cbReplace_toggled(bool on);
00063
00064 void on_cbCase_toggled(bool on);
00065 void on_cbWords_toggled(bool on);
00066 void on_cbRegExp_toggled(bool on);
00067 void on_cbCursor_toggled(bool on);
00068 void on_cbHighlight_toggled(bool on);
00069 void on_cbSelection_toggled(bool on);
00070 void on_cbPrompt_toggled(bool on);
00071 void on_cbEscapeSeq_toggled(bool on);
00072
00073 void on_bRefresh_clicked();
00074
00075 void on_bNext_clicked();
00076 void on_bPrevious_clicked();
00077
00078 void cursorPositionChanged();
00079
00080 private:
00081 void init();
00082 void on_leFind_returnPressed(bool backward);
00083
00084 int lastDirection;
00085 QDocumentSearch *m_search;
00086 };
00087
00088 #endif // _QSEARCH_REPLACE_PANEL_H_