QCodeEdit 2.2
|
00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr> 00004 ** 00005 ** This file is part of the Edyuk project <http://edyuk.org> 00006 ** 00007 ** This file may be used under the terms of the GNU General Public License 00008 ** version 3 as published by the Free Software Foundation and appearing in the 00009 ** file GPL.txt included in the packaging of this file. 00010 ** 00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 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 bool forward(QMouseEvent *e); 00052 virtual void editorChange(QEditor *e); 00053 00054 virtual bool eventFilter(QObject *o, QEvent *e); 00055 00056 virtual void hideEvent(QHideEvent *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_