GNU Octave 7.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
qt-application.cc
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2011-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 (HAVE_CONFIG_H)
27# include "config.h"
28#endif
29
30#include "main-window.h"
31#include "octave-qobject.h"
32#include "qt-application.h"
33
34#include "lo-utils.h"
35#include "oct-env.h"
36#include "oct-syscalls.h"
37#include "signal-wrappers.h"
38
39#include "display.h"
40#include "octave.h"
41#include "sysdep.h"
42
43namespace octave
44{
45 qt_application::qt_application (int argc, char **argv)
46 : application (argc, argv)
47 {
48 // This should probably happen early.
49 sysdep_init ();
50 }
51
53 {
54 // Note: this function is not needed if using the experimental
55 // terminal widget, so return a dummy value of false in that case.
56
57 return experimental_terminal_widget () ? false : m_options.gui ();
58 }
59
61 {
63
65
66 // Create and show main window.
67
68 // Note: the second argument is ignored if using the new terminal
69 // widget.
70
71 base_qobject qt_interface (*this, start_gui_p ());
72
73 return qt_interface.exec ();
74 }
75}
bool experimental_terminal_widget(void) const
Definition: octave.cc:332
cmdline_options m_options
Definition: octave.h:342
bool gui(void) const
Definition: octave.h:63
Base class for Octave interfaces that use Qt.
qt_application(int argc, char **argv)
bool start_gui_p(void) const
void octave_block_interrupt_signal(void)
OCTAVE_NAMESPACE_BEGIN void set_application_id(void)
Definition: sysdep.cc:183
void sysdep_init(void)
Definition: sysdep.cc:509