GNU Octave 7.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
qt-application.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2012-2022 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_qt_application_h)
27#define octave_qt_application_h 1
28
29#include "octave.h"
30
31namespace octave
32{
33 // Programming Note: This file must not include any Qt headers. Any
34 // Qt header files required by the qt_application::execute function
35 // must be included only in the corresponding .cc file.
36
37 //! This class inherits from the pure-virtual base class
38 //! application and provides an implementation of the
39 //! application::execute method that starts an interface to Octave
40 //! that is based on Qt. It may start a command-line interface that
41 //! allows Qt graphics to be used or it may start an interface that
42 //! provides the full GUI experience.
43
44 class OCTGUI_API qt_application : public application
45 {
46 public:
47
48 qt_application (int argc, char **argv);
49
50 // No copying, at least not yet.
51
52 qt_application (const qt_application&) = delete;
53
54 qt_application& operator = (const qt_application&) = delete;
55
56 ~qt_application (void) = default;
57
58 // Should we start the GUI or fall back to the CLI?
59 bool start_gui_p (void) const;
60
61 int execute (void);
62
63 bool gui_running (void) const { return m_gui_running; }
64 void gui_running (bool arg) { m_gui_running = arg; }
65
66 private:
67
68 // If TRUE, the GUI should be started.
69 bool m_gui_running = false;
70 };
71}
72
73#endif
This class inherits from the pure-virtual base class application and provides an implementation of th...
bool gui_running(void) const
qt_application(const qt_application &)=delete
void gui_running(bool arg)
~qt_application(void)=default