Mercurial > octave
annotate libgui/src/qt-application.h @ 30564:796f54d4ddbf stable
update Octave Project Developers copyright for the new year
In files that have the "Octave Project Developers" copyright notice,
update for 2021.
In all .txi and .texi files except gpl.txi and gpl.texi in the
doc/liboctave and doc/interpreter directories, change the copyright
to "Octave Project Developers", the same as used for other source
files. Update copyright notices for 2022 (not done since 2019). For
gpl.txi and gpl.texi, change the copyright notice to be "Free Software
Foundation, Inc." and leave the date at 2007 only because this file
only contains the text of the GPL, not anything created by the Octave
Project Developers.
Add Paul Thomas to contributors.in.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 28 Dec 2021 18:22:40 -0500 |
parents | 7854d5752dd2 |
children | c6683fcc5c33 c6d54dd31a7e |
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:
29359
diff
changeset
|
3 // Copyright (C) 2012-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 //////////////////////////////////////////////////////////////////////// |
15139
bfc220d1de67
include gui in default Octave binary
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 |
27413
b67e5dc2e34a
use consistent naming pattern for include file guards in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27197
diff
changeset
|
26 #if ! defined (octave_qt_application_h) |
b67e5dc2e34a
use consistent naming pattern for include file guards in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27197
diff
changeset
|
27 #define octave_qt_application_h 1 |
15139
bfc220d1de67
include gui in default Octave binary
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 |
22089
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
29 #include "octave.h" |
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
30 |
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
31 namespace octave |
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
32 { |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
33 // Programming Note: This file must not include any Qt headers. Any |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
34 // Qt header files required by the qt_application::execute function |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
35 // must be included only in the corresponding .cc file. |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
36 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
37 //! This class inherits from the pure-virtual base class |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
38 //! application and provides an implementation of the |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
39 //! application::execute method that starts an interface to Octave |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
40 //! that is based on Qt. It may start a command-line interface that |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
41 //! allows Qt graphics to be used or it may start an interface that |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
42 //! provides the full GUI experience. |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
43 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
44 class OCTGUI_API qt_application : public application |
22089
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
45 { |
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
46 public: |
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
47 |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
48 qt_application (int argc, char **argv); |
22089
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
49 |
22869
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22865
diff
changeset
|
50 // No copying, at least not yet. |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22865
diff
changeset
|
51 |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
52 qt_application (const qt_application&) = delete; |
22869
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22865
diff
changeset
|
53 |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
54 qt_application& operator = (const qt_application&) = delete; |
22869
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22865
diff
changeset
|
55 |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
27195
diff
changeset
|
56 ~qt_application (void) = default; |
25944
ceb508ea92ee
refactor GUI main_window class
John W. Eaton <jwe@octave.org>
parents:
25938
diff
changeset
|
57 |
22089
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
58 // Should we start the GUI or fall back to the CLI? |
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
59 bool start_gui_p (void) const; |
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
60 |
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
61 int execute (void); |
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
62 |
25938
6fec0e305268
Backed out changeset 2ab0a9b66388
John W. Eaton <jwe@octave.org>
parents:
25937
diff
changeset
|
63 bool gui_running (void) const { return m_gui_running; } |
6fec0e305268
Backed out changeset 2ab0a9b66388
John W. Eaton <jwe@octave.org>
parents:
25937
diff
changeset
|
64 void gui_running (bool arg) { m_gui_running = arg; } |
22089
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
65 |
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
66 private: |
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
67 |
25944
ceb508ea92ee
refactor GUI main_window class
John W. Eaton <jwe@octave.org>
parents:
25938
diff
changeset
|
68 // If TRUE, the GUI should be started. |
ceb508ea92ee
refactor GUI main_window class
John W. Eaton <jwe@octave.org>
parents:
25938
diff
changeset
|
69 bool m_gui_running = false; |
22089
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
70 }; |
c2c668b3051b
use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
71 } |
15139
bfc220d1de67
include gui in default Octave binary
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
72 |
bfc220d1de67
include gui in default Octave binary
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
73 #endif |