GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
find-dialog.h
Go to the documentation of this file.
1 /****************************************************************************
2 
3 Find dialog derived from an example from Qt Toolkit (license below (**))
4 
5 Copyright (C) 2012-2013 Torsten <[email protected]>
6 Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
7  All rights reserved.
8  Contact: Nokia Corporation ([email protected])
9 
10 This file is part of Octave.
11 
12 Octave is free software; you can redistribute it and/or modify it
13 under the terms of the GNU General Public License as published by the
14 Free Software Foundation; either version 3 of the License, or (at your
15 option) any later version.
16 
17 Octave is distributed in the hope that it will be useful, but WITHOUT
18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 for more details.
21 
22 You should have received a copy of the GNU General Public License
23 along with Octave; see the file COPYING. If not, see
24 <http://www.gnu.org/licenses/>.
25 
26 ** This file is part of the examples of the Qt Toolkit.
27 **
28 ** $QT_BEGIN_LICENSE:LGPL$
29 ** Commercial Usage
30 ** Licensees holding valid Qt Commercial licenses may use this file in
31 ** accordance with the Qt Commercial License Agreement provided with the
32 ** Software or, alternatively, in accordance with the terms contained in
33 ** a written agreement between you and Nokia.
34 **
35 ** GNU Lesser General Public License Usage
36 ** Alternatively, this file may be used under the terms of the GNU Lesser
37 ** General Public License version 2.1 as published by the Free Software
38 ** Foundation and appearing in the file LICENSE.LGPL included in the
39 ** packaging of this file. Please review the following information to
40 ** ensure the GNU Lesser General Public License version 2.1 requirements
41 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
42 **
43 ** In addition, as a special exception, Nokia gives you certain additional
44 ** rights. These rights are described in the Nokia Qt LGPL Exception
45 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
46 **
47 ** GNU General Public License Usage
48 ** Alternatively, this file may be used under the terms of the GNU
49 ** General Public License version 3.0 as published by the Free Software
50 ** Foundation and appearing in the file LICENSE.GPL included in the
51 ** packaging of this file. Please review the following information to
52 ** ensure the GNU General Public License version 3.0 requirements will be
53 ** met: http://www.gnu.org/copyleft/gpl.html.
54 **
55 ** If you have questions regarding the use of this file, please contact
56 ** Nokia at [email protected].
57 ** $QT_END_LICENSE$
58 **
59 ****************************************************************************/
60 
61 #ifndef FIND_DIALOG_H
62 #define FIND_DIALOG_H
63 
64 #include <QDialog>
65 #include <Qsci/qsciscintilla.h>
66 
67 class QCheckBox;
68 class QDialogButtonBox;
69 class QGroupBox;
70 class QLabel;
71 class QLineEdit;
72 class QPushButton;
73 
74 class find_dialog : public QDialog
75 {
76  Q_OBJECT
77 public:
78  find_dialog (QsciScintilla* edit_area, QWidget *parent = 0);
79  void init_search_text ();
80 
81 private slots:
83  void find (bool forward = true);
84  void find_next ();
85  void find_prev ();
86  void replace ();
87  void replace_all ();
88 
89 private:
90  void no_matches_message ();
91  QLabel *_search_label;
92  QLineEdit *_search_line_edit;
93  QLabel *_replace_label;
94  QLineEdit *_replace_line_edit;
95  QCheckBox *_case_check_box;
97  QCheckBox *_wrap_check_box;
99  QCheckBox *_regex_check_box;
102  QDialogButtonBox *_button_box;
111 };
112 
113 #endif // FIND_DIALOG_H
114