annotate libgui/src/dialog.h @ 31649:deb553ac2c54

maint: Merge stable to default.
author John W. Eaton <jwe@octave.org>
date Tue, 06 Dec 2022 15:45:27 -0500
parents 431f80aba37a 29d734430e5f
children 5f11de0e7440
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ////////////////////////////////////////////////////////////////////////
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 //
30564
796f54d4ddbf update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 29550
diff changeset
3 // Copyright (C) 2013-2022 The Octave Project Developers
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
4 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 // See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 // distribution or <https://octave.org/copyright/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
7 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
8 // This file is part of Octave.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
9 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
10 // Octave is free software: you can redistribute it and/or modify it
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
11 // under the terms of the GNU General Public License as published by
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
12 // the Free Software Foundation, either version 3 of the License, or
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
13 // (at your option) any later version.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
14 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
15 // Octave is distributed in the hope that it will be useful, but
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
18 // GNU General Public License for more details.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
19 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
20 // You should have received a copy of the GNU General Public License
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
21 // along with Octave; see the file COPYING. If not, see
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
22 // <https://www.gnu.org/licenses/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ////////////////////////////////////////////////////////////////////////
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
25
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 20505
diff changeset
26 #if ! defined (octave_dialog_h)
17822
ebb3ef964372 maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents: 17790
diff changeset
27 #define octave_dialog_h 1
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
28
27412
da1f59fe04b3 try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
29 #include <QAbstractButton>
da1f59fe04b3 try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
30 #include <QDialog>
da1f59fe04b3 try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
31 #include <QFileDialog>
da1f59fe04b3 try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
32 #include <QItemSelectionModel>
da1f59fe04b3 try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
33 #include <QLineEdit>
da1f59fe04b3 try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
34 #include <QList>
da1f59fe04b3 try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
35 #include <QMessageBox>
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
36 #include <QMutex>
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
37 #include <QWaitCondition>
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
38
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
39 // Defined for purposes of sending QList<int> as part of signal.
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
40 typedef QList<int> QIntList;
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
41
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
42 // Defined for purposes of sending QList<float> as part of signal.
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
43 typedef QList<float> QFloatList;
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
44
31646
c6d54dd31a7e maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
45 OCTAVE_BEGIN_NAMESPACE(octave)
c6d54dd31a7e maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
46
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
47 class QUIWidgetCreator : public QObject
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
48 {
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
49 Q_OBJECT
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
50
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
51 public:
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
52
31626
9034cf663768 eliminate unnecessary base_qobject object from GUI dialog classes
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
53 QUIWidgetCreator (void);
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
54
27549
5189bfa8ad2a eliminate unnecessary use of pointers
John W. Eaton <jwe@octave.org>
parents: 27412
diff changeset
55 ~QUIWidgetCreator (void) = default;
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
56
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
57 public:
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
58
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
59 QString rm_amp (const QString& text);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
60
27552
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
61 QString message_dialog (const QString& message, const QString& title,
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
62 const QString& icon, const QStringList& button,
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
63 const QString& defbutton, const QStringList& role);
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
64
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
65 int get_dialog_result (void) { return m_dialog_result; }
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
66
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
67 QString get_dialog_button (void) { return m_dialog_button; }
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
68
27552
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
69 QPair<QIntList, int> list_dialog (const QStringList& list,
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
70 const QString& mode,
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
71 int wd, int ht,
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
72 const QList<int>& initial,
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
73 const QString& name,
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
74 const QStringList& prompt,
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
75 const QString& ok_string,
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
76 const QString& cancel_string);
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
77
27549
5189bfa8ad2a eliminate unnecessary use of pointers
John W. Eaton <jwe@octave.org>
parents: 27412
diff changeset
78 QIntList get_list_index (void) const { return m_list_index; }
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
79
27552
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
80 QStringList input_dialog (const QStringList& prompt, const QString& title,
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
81 const QFloatList& nr, const QFloatList& nc,
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
82 const QStringList& defaults);
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
83
27549
5189bfa8ad2a eliminate unnecessary use of pointers
John W. Eaton <jwe@octave.org>
parents: 27412
diff changeset
84 QStringList get_string_list (void) const { return m_string_list; }
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
85
27552
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
86 QStringList file_dialog (const QStringList& filters, const QString& title,
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
87 const QString& filename, const QString& dirname,
de5129cb0796 refactor dialog functions
John W. Eaton <jwe@octave.org>
parents: 27551
diff changeset
88 const QString& multimode);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
89
27549
5189bfa8ad2a eliminate unnecessary use of pointers
John W. Eaton <jwe@octave.org>
parents: 27412
diff changeset
90 QString get_dialog_path (void) const { return m_path_name; }
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
91
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
92 void lock (void) { m_mutex.lock (); }
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
93 void wait (void) { m_waitcondition.wait (&m_mutex); }
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
94 void unlock (void) { m_mutex.unlock (); }
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
95 void wake_all (void) { m_waitcondition.wakeAll (); }
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
96
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
97 signals:
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
98
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
99 void create_dialog (const QString&, const QString&, const QString&,
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
100 const QStringList&, const QString&, const QStringList&);
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
101
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
102 void create_listview (const QStringList&, const QString&, int, int,
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
103 const QIntList&, const QString&, const QStringList&,
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
104 const QString&, const QString&);
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
105
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
106 void create_inputlayout (const QStringList&, const QString&,
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
107 const QFloatList&, const QFloatList&,
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
108 const QStringList&);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
109
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
110 void create_filedialog (const QStringList& filters, const QString& title,
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
111 const QString& filename, const QString& dirname,
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
112 const QString& multimode);
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
113 public slots:
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
114
27551
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
115 void handle_create_dialog (const QString& message, const QString& title,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
116 const QString& icon, const QStringList& button,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
117 const QString& defbutton,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
118 const QStringList& role);
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
119
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
120 void dialog_button_clicked (QAbstractButton *button);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
121
27551
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
122 void handle_create_listview (const QStringList& list, const QString& mode,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
123 int width, int height,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
124 const QIntList& initial,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
125 const QString& name,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
126 const QStringList& prompt,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
127 const QString& ok_string,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
128 const QString& cancel_string);
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
129
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
130 void list_select_finished (const QIntList& selected, int button_pressed);
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
131
27551
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
132 void handle_create_inputlayout (const QStringList&, const QString&,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
133 const QFloatList&, const QFloatList&,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
134 const QStringList&);
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
135
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
136 void input_finished (const QStringList& input, int button_pressed);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
137
27551
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
138 void handle_create_filedialog (const QStringList& filters,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
139 const QString& title,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
140 const QString& filename,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
141 const QString& dirname,
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
142 const QString& multimode);
564bba235594 move some dialog slot functions from octave-qobject.cc to dialog.cc
John W. Eaton <jwe@octave.org>
parents: 27549
diff changeset
143
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
144 void filedialog_finished (const QStringList& files, const QString& path,
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
145 int filterindex);
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
146
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
147 private:
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
148
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
149 int m_dialog_result;
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
150 QString m_dialog_button;
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
151
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
152 // A copy of the dialogs button texts
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
153 QStringList m_button_list;
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
154
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
155 // The list could conceivably be big. Not sure how things are
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
156 // stored internally, so keep off of the stack.
27549
5189bfa8ad2a eliminate unnecessary use of pointers
John W. Eaton <jwe@octave.org>
parents: 27412
diff changeset
157 QStringList m_string_list;
5189bfa8ad2a eliminate unnecessary use of pointers
John W. Eaton <jwe@octave.org>
parents: 27412
diff changeset
158 QIntList m_list_index;
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
159
27549
5189bfa8ad2a eliminate unnecessary use of pointers
John W. Eaton <jwe@octave.org>
parents: 27412
diff changeset
160 QString m_path_name;
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
161
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
162 // GUI objects cannot be accessed in the non-GUI thread. However,
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
163 // signals can be sent to slots across threads with proper
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
164 // synchronization. Hence, the use of QWaitCondition.
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
165 QMutex m_mutex;
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
166 QWaitCondition m_waitcondition;
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
167 };
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
168
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
169 class MessageDialog : public QMessageBox
31648
29d734430e5f maint: Re-indent code after switch to using namespace macros.
John W. Eaton <jwe@octave.org>
parents: 31646
diff changeset
170 {
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
171 Q_OBJECT
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
172
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
173 public:
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
174
31626
9034cf663768 eliminate unnecessary base_qobject object from GUI dialog classes
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
175 MessageDialog (const QString& message,
27643
337132e66ec2 eliminate need for global access to resource manager in uiwidget objects
John W. Eaton <jwe@octave.org>
parents: 27553
diff changeset
176 const QString& title, const QString& icon,
337132e66ec2 eliminate need for global access to resource manager in uiwidget objects
John W. Eaton <jwe@octave.org>
parents: 27553
diff changeset
177 const QStringList& button, const QString& defbutton,
337132e66ec2 eliminate need for global access to resource manager in uiwidget objects
John W. Eaton <jwe@octave.org>
parents: 27553
diff changeset
178 const QStringList& role);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
179
29550
8dd0fca2a3d9 where possible, use default destructors in GUI classes
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
180 ~MessageDialog (void) = default;
8dd0fca2a3d9 where possible, use default destructors in GUI classes
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
181
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
182 private:
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
183
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
184 void closeEvent (QCloseEvent *)
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
185 {
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
186 // Reroute the close tab to a button click so there is only a single
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
187 // route to waking the wait condition.
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
188 emit buttonClicked (nullptr);
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
189 }
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
190 };
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
191
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
192 class ListDialog : public QDialog
16551
6ae555fc8c43 Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 16547
diff changeset
193 {
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
194 Q_OBJECT
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
195
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
196 QItemSelectionModel *selector;
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
197
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
198 public:
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
199
31626
9034cf663768 eliminate unnecessary base_qobject object from GUI dialog classes
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
200 ListDialog (const QStringList& list,
27643
337132e66ec2 eliminate need for global access to resource manager in uiwidget objects
John W. Eaton <jwe@octave.org>
parents: 27553
diff changeset
201 const QString& mode, int width, int height,
337132e66ec2 eliminate need for global access to resource manager in uiwidget objects
John W. Eaton <jwe@octave.org>
parents: 27553
diff changeset
202 const QList<int>& initial, const QString& name,
337132e66ec2 eliminate need for global access to resource manager in uiwidget objects
John W. Eaton <jwe@octave.org>
parents: 27553
diff changeset
203 const QStringList& prompt, const QString& ok_string,
337132e66ec2 eliminate need for global access to resource manager in uiwidget objects
John W. Eaton <jwe@octave.org>
parents: 27553
diff changeset
204 const QString& cancel_string);
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
205
29550
8dd0fca2a3d9 where possible, use default destructors in GUI classes
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
206 ~ListDialog (void) = default;
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
207
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
208 signals:
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
209
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
210 void finish_selection (const QIntList&, int);
21613
e15d3387fc59 eliminate leak in ListDialog class (bug #47372)
John W. Eaton <jwe@octave.org>
parents: 20955
diff changeset
211
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
212 public slots:
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
213
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
214 void buttonOk_clicked (void);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
215
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
216 void buttonCancel_clicked (void);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
217
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
218 void reject (void);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
219
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
220 void item_double_clicked (const QModelIndex&);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
221
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
222 private:
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
223
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
224 QAbstractItemModel *m_model;
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
225 };
20505
dd327c0909b0 listdlg: Make appearance and behavior more Matlab compatible (bug #46026)
Mike Miller <mtmiller@octave.org>
parents: 20091
diff changeset
226
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
227 class InputDialog : public QDialog
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
228 {
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
229 Q_OBJECT
21613
e15d3387fc59 eliminate leak in ListDialog class (bug #47372)
John W. Eaton <jwe@octave.org>
parents: 20955
diff changeset
230
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
231 QList<QLineEdit *> input_line;
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
232
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
233 public:
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
234
31626
9034cf663768 eliminate unnecessary base_qobject object from GUI dialog classes
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
235 InputDialog (const QStringList& prompt,
27643
337132e66ec2 eliminate need for global access to resource manager in uiwidget objects
John W. Eaton <jwe@octave.org>
parents: 27553
diff changeset
236 const QString& title, const QFloatList& nr,
337132e66ec2 eliminate need for global access to resource manager in uiwidget objects
John W. Eaton <jwe@octave.org>
parents: 27553
diff changeset
237 const QFloatList& nc, const QStringList& defaults);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
238
29550
8dd0fca2a3d9 where possible, use default destructors in GUI classes
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
239 ~InputDialog (void) = default;
8dd0fca2a3d9 where possible, use default destructors in GUI classes
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
240
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
241 signals:
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
242
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
243 void finish_input (const QStringList&, int);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
244
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
245 public slots:
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
246
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
247 void buttonOk_clicked (void);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
248
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
249 void buttonCancel_clicked (void);
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
250
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
251 void reject (void);
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
252 };
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
253
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
254 class FileDialog : public QFileDialog
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
255 {
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
256 Q_OBJECT
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
257
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
258 public:
16579
7f8db1942dc0 Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents: 16565
diff changeset
259
31626
9034cf663768 eliminate unnecessary base_qobject object from GUI dialog classes
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
260 FileDialog (const QStringList& filters,
27643
337132e66ec2 eliminate need for global access to resource manager in uiwidget objects
John W. Eaton <jwe@octave.org>
parents: 27553
diff changeset
261 const QString& title, const QString& filename,
337132e66ec2 eliminate need for global access to resource manager in uiwidget objects
John W. Eaton <jwe@octave.org>
parents: 27553
diff changeset
262 const QString& dirname, const QString& multimode);
16579
7f8db1942dc0 Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents: 16565
diff changeset
263
29550
8dd0fca2a3d9 where possible, use default destructors in GUI classes
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
264 ~FileDialog (void) = default;
8dd0fca2a3d9 where possible, use default destructors in GUI classes
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
265
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
266 signals:
16579
7f8db1942dc0 Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents: 16565
diff changeset
267
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
268 void finish_input (const QStringList&, const QString&, int);
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
269
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
270 private slots:
16579
7f8db1942dc0 Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents: 16565
diff changeset
271
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
272 void acceptSelection (void);
16579
7f8db1942dc0 Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents: 16565
diff changeset
273
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
274 void rejectSelection (void);
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24586
diff changeset
275 };
31646
c6d54dd31a7e maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
276
c6d54dd31a7e maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
277 OCTAVE_END_NAMESPACE(octave)
16579
7f8db1942dc0 Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents: 16565
diff changeset
278
16512
7f2395651a1c dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
diff changeset
279 #endif