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
43
namespace
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
52
bool
qt_application::start_gui_p
(
void
)
const
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
60
int
qt_application::execute
(
void
)
61
{
62
octave_block_interrupt_signal
();
63
64
set_application_id
();
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
}
application
Definition:
octave.h:240
application::experimental_terminal_widget
bool experimental_terminal_widget(void) const
Definition:
octave.cc:332
application::m_options
cmdline_options m_options
Definition:
octave.h:342
cmdline_options::gui
bool gui(void) const
Definition:
octave.h:63
octave::base_qobject
Base class for Octave interfaces that use Qt.
Definition:
octave-qobject.h:99
octave::base_qobject::exec
int exec(void)
Definition:
octave-qobject.cc:422
octave::qt_application::qt_application
qt_application(int argc, char **argv)
Definition:
qt-application.cc:45
octave::qt_application::execute
int execute(void)
Definition:
qt-application.cc:60
octave::qt_application::start_gui_p
bool start_gui_p(void) const
Definition:
qt-application.cc:52
display.h
lo-utils.h
main-window.h
octave
Definition:
idx-vector.cc:46
oct-env.h
oct-syscalls.h
octave-qobject.h
octave.h
qt-application.h
octave_block_interrupt_signal
void octave_block_interrupt_signal(void)
Definition:
signal-wrappers.c:493
signal-wrappers.h
set_application_id
OCTAVE_NAMESPACE_BEGIN void set_application_id(void)
Definition:
sysdep.cc:183
sysdep_init
void sysdep_init(void)
Definition:
sysdep.cc:509
sysdep.h
libgui
src
qt-application.cc
Generated on Sun Jun 26 2022 01:27:28 for GNU Octave by
1.9.4