GNU Octave
6.2.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-2021 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
return
m_options
.
gui
();
55
}
56
57
int
qt_application::execute
(
void
)
58
{
59
octave_block_interrupt_signal
();
60
61
set_application_id
();
62
63
// Create and show main window.
64
65
if
(
start_gui_p
())
66
{
67
gui_qobject
gui_interface (*
this
);
68
return
gui_interface.
exec
();
69
}
70
else
71
{
72
cli_qobject
cli_interface (*
this
);
73
return
cli_interface.
exec
();
74
}
75
}
76
}
octave::application
Definition:
octave.h:235
octave::application::m_options
cmdline_options m_options
Definition:
octave.h:333
octave::base_qobject::exec
int exec(void)
Definition:
octave-qobject.cc:282
octave::cli_qobject
This object provides a command-line interface to Octave that may use Qt graphics.
Definition:
octave-qobject.h:179
octave::cmdline_options::gui
bool gui(void) const
Definition:
octave.h:60
octave::gui_qobject
This object provides a full GUI interface to Octave that is implemented Qt.
Definition:
octave-qobject.h:193
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:57
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:
aepbalance.cc:41
octave::set_application_id
void set_application_id(void)
Definition:
sysdep.cc:186
octave::sysdep_init
void sysdep_init(void)
Definition:
sysdep.cc:433
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:490
signal-wrappers.h
sysdep.h
libgui
src
qt-application.cc
Generated on Tue Apr 13 2021 15:27:44 for GNU Octave by
1.9.1