1 | /**************************************************************************** |
2 | ** |
3 | ** Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> |
4 | ** Copyright (C) 2016 Samuel Gaist <samuel.gaist@edeltech.ch> |
5 | ** Copyright (C) 2016 The Qt Company Ltd. |
6 | ** Contact: https://www.qt.io/licensing/ |
7 | ** |
8 | ** This file is part of the examples of the Qt Toolkit. |
9 | ** |
10 | ** $QT_BEGIN_LICENSE:BSD$ |
11 | ** Commercial License Usage |
12 | ** Licensees holding valid commercial Qt licenses may use this file in |
13 | ** accordance with the commercial license agreement provided with the |
14 | ** Software or, alternatively, in accordance with the terms contained in |
15 | ** a written agreement between you and The Qt Company. For licensing terms |
16 | ** and conditions see https://www.qt.io/terms-conditions. For further |
17 | ** information use the contact form at https://www.qt.io/contact-us. |
18 | ** |
19 | ** BSD License Usage |
20 | ** Alternatively, you may use this file under the terms of the BSD license |
21 | ** as follows: |
22 | ** |
23 | ** "Redistribution and use in source and binary forms, with or without |
24 | ** modification, are permitted provided that the following conditions are |
25 | ** met: |
26 | ** * Redistributions of source code must retain the above copyright |
27 | ** notice, this list of conditions and the following disclaimer. |
28 | ** * Redistributions in binary form must reproduce the above copyright |
29 | ** notice, this list of conditions and the following disclaimer in |
30 | ** the documentation and/or other materials provided with the |
31 | ** distribution. |
32 | ** * Neither the name of The Qt Company Ltd nor the names of its |
33 | ** contributors may be used to endorse or promote products derived |
34 | ** from this software without specific prior written permission. |
35 | ** |
36 | ** |
37 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
38 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
39 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
40 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
41 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
42 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
43 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
44 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
45 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
46 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
47 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." |
48 | ** |
49 | ** $QT_END_LICENSE$ |
50 | ** |
51 | ****************************************************************************/ |
52 | |
53 | #ifndef REGULAREXPRESSIONDIALOG_H |
54 | #define REGULAREXPRESSIONDIALOG_H |
55 | |
56 | #include <QDialog> |
57 | |
58 | QT_BEGIN_NAMESPACE |
59 | class QCheckBox; |
60 | class QComboBox; |
61 | class QLabel; |
62 | class QLineEdit; |
63 | class QSpinBox; |
64 | class QPlainTextEdit; |
65 | class QTreeWidget; |
66 | QT_END_NAMESPACE |
67 | |
68 | class RegularExpressionDialog : public QDialog |
69 | { |
70 | Q_OBJECT |
71 | |
72 | public: |
73 | RegularExpressionDialog(QWidget *parent = nullptr); |
74 | |
75 | private: |
76 | void refresh(); |
77 | void setupUi(); |
78 | QWidget *setupLeftUi(); |
79 | QWidget *setupRightUi(); |
80 | void setResultUiEnabled(bool enabled); |
81 | |
82 | QLineEdit *patternLineEdit; |
83 | QLineEdit *rawStringLiteralLineEdit; |
84 | QLineEdit *escapedPatternLineEdit; |
85 | |
86 | QPlainTextEdit *subjectTextEdit; |
87 | |
88 | QCheckBox *caseInsensitiveOptionCheckBox; |
89 | QCheckBox *dotMatchesEverythingOptionCheckBox; |
90 | QCheckBox *multilineOptionCheckBox; |
91 | QCheckBox *extendedPatternSyntaxOptionCheckBox; |
92 | QCheckBox *invertedGreedinessOptionCheckBox; |
93 | QCheckBox *dontCaptureOptionCheckBox; |
94 | QCheckBox *useUnicodePropertiesOptionCheckBox; |
95 | |
96 | QSpinBox *offsetSpinBox; |
97 | |
98 | QComboBox *matchTypeComboBox; |
99 | |
100 | QCheckBox *anchoredMatchOptionCheckBox; |
101 | QCheckBox *dontCheckSubjectStringMatchOptionCheckBox; |
102 | |
103 | QTreeWidget *matchDetailsTreeWidget; |
104 | |
105 | QLabel *regexpStatusLabel; |
106 | QTreeWidget *namedGroupsTreeWidget; |
107 | }; |
108 | |
109 | #endif |
110 | |