1 /*************************************************************************** 2 * Copyright (C) 2008 by Alexey Balakin * 3 * mathgl.abalakin@gmail.com * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 2 of the License, or * 8 * (at your option) any later version. * 9 * * 10 * This program is distributed in the hope that it will be useful, * 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 * GNU General Public License for more details. * 14 * * 15 * You should have received a copy of the GNU General Public License * 16 * along with this program; if not, write to the * 17 * Free Software Foundation, Inc., * 18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 ***************************************************************************/ 20 #ifndef FIND_DLG_H 21 #define FIND_DLG_H 22 //----------------------------------------------------------------------------- 23 #include <QDialog> 24 class QCheckBox; 25 class QLineEdit; 26 class QPushButton; 27 #if defined(_MSC_VER) 28 #include <mgl2/define.h> 29 #endif 30 //----------------------------------------------------------------------------- 31 /// Dialog for finding something in text 32 class FindDialog : public QDialog 33 { 34 Q_OBJECT 35 public: 36 FindDialog(QWidget *parent = 0); 37 ~FindDialog(); 38 signals: 39 void findText(const QString &str, bool cs, bool fw); 40 void replText(const QString &str, const QString &txt, bool cs, bool fw); 41 protected: 42 void closeEvent(QCloseEvent *event); 43 private slots: 44 void findClicked(); 45 void replClicked(); 46 void enableFind(const QString &text); 47 private: 48 QLineEdit *line; 49 QLineEdit *text; 50 QCheckBox *caseUse; 51 QCheckBox *backward; 52 QPushButton *find; 53 QPushButton *repl; 54 QPushButton *cancel; 55 }; 56 //----------------------------------------------------------------------------- 57 #endif 58 //----------------------------------------------------------------------------- 59