itom
Loading...
Searching...
No Matches
dialogReplace.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität 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
32class QCompleter; //forward declaration
33
34namespace ito
35{
36
37class DialogReplace : public QDialog
38{
39 Q_OBJECT
40
41public:
42 DialogReplace(QWidget *parent = 0);
44
45// void setData(const QString &defaultText, const int &lineFrom, const int &indexFrom, const int &lineTo, const int &indexTo);
46 void setData(const QString &defaultText, const bool &rowSelected);
47
48protected:
49 virtual void closeEvent(QCloseEvent *event);
50
51private:
52 Ui::DialogReplace ui;
53
54 void comboBoxAddItem(const QString &text, QComboBox *comboBox);
55 int comboBoxGetIndex(const QString &text, QComboBox *comboBox) const;
56 void setRegularMode(const bool isRegularMode);
57
58 QCompleter *m_pCompleter;
59
60private slots:
61 void on_pushButtonFindNext_clicked();
62 void on_pushButtonReplace_clicked();
63 void on_pushButtonReplaceAll_clicked();
64 void on_pushButtonExpand_clicked();
65 void on_checkBoxReplaceWith_clicked();
66
67public slots:
68 void userCursorPositionChanged() {};
69
70signals:
71 void findNext(QString expr, bool regExpr, bool caseSensitive, bool wholeWord, bool wrap, bool forward = true, bool isQuickSeach = false);
72 void replaceSelection(QString expr, QString replace);
73 void replaceAll(QString expr, QString replace, bool regExpr, bool caseSensitive, bool wholeWord, bool findInSel);
74};
75
76} //end namespace ito
77
78#endif
Definition dialogReplace.h:38
Definition apiFunctionsGraph.cpp:40