itom  3.0.0
dialogReplace.h
1 /* ********************************************************************
2  itom software
3  URL: http://www.uni-stuttgart.de/ito
4  Copyright (C) 2016, Institut fuer Technische Optik (ITO),
5  Universitaet Stuttgart, Germany
6 
7  This file is part of itom.
8 
9  itom is free software; you can redistribute it and/or modify it
10  under the terms of the GNU Library General Public Licence as published by
11  the Free Software Foundation; either version 2 of the Licence, or (at
12  your option) any later version.
13 
14  itom is distributed in the hope that it will be useful, but
15  WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17  General Public Licence for more details.
18 
19  You should have received a copy of the GNU Library General Public License
20  along with itom. If not, see <http://www.gnu.org/licenses/>.
21 *********************************************************************** */
22 
23 #ifndef DIALOGREPLACE_H
24 #define DIALOGREPLACE_H
25 
26 #include <QtGui>
27 #include <qdialog.h>
28 
29 #include "ui_dialogReplace.h"
30 #include "itomSpinBox.h"
31 
32 namespace ito
33 {
34 
35 class DialogReplace : public QDialog
36 {
37  Q_OBJECT
38 
39 public:
40  DialogReplace(QWidget *parent = 0);
41  ~DialogReplace() {}
42 
43 // void setData(const QString &defaultText, const int &lineFrom, const int &indexFrom, const int &lineTo, const int &indexTo);
44  void setData(const QString &defaultText, const bool &rowSelected);
45 
46 protected:
47  virtual void closeEvent(QCloseEvent *event);
48 
49 private:
50  Ui::DialogReplace ui;
51 
52  void comboBoxAddItem(const QString text, QComboBox *comboBox);
53  int comboBoxGetIndex(const QString text, QComboBox *comboBox);
54  void setRegularMode(const bool isRegularMode);
55 
56 /* int m_lineFrom;
57  int m_indexFrom;
58  int m_lineTo;
59  int m_indexTo;*/
60 
61 private slots:
62  void on_pushButtonFindNext_clicked();
63  void on_pushButtonReplace_clicked();
64  void on_pushButtonReplaceAll_clicked();
65  void on_pushButtonExpand_clicked();
66  void on_checkBoxReplaceWith_clicked();
67 
68 public slots:
69  void userCursorPositionChanged() {};
70 
71 signals:
72  void findNext(QString expr, bool regExpr, bool caseSensitive, bool wholeWord, bool wrap, bool forward = true, bool isQuickSeach = false);
73  void replaceSelection(QString expr, QString replace);
74  void replaceAll(QString expr, QString replace, bool regExpr, bool caseSensitive, bool wholeWord, int findIn);
75 };
76 
77 } //end namespace ito
78 
79 #endif
Definition: dialogReplace.h:35
Definition: apiFunctionsGraph.cpp:39