Mercurial > octave
annotate libgui/src/octave-qobject.h @ 31646:c6d54dd31a7e stable
maint: Use macros to begin/end C++ namespaces.
* BaseControl.cc, BaseControl.h, ButtonControl.cc, ButtonControl.h,
ButtonGroup.cc, ButtonGroup.h, Canvas.cc, Canvas.h,
CheckBoxControl.cc, CheckBoxControl.h, Container.cc, Container.h,
ContextMenu.cc, ContextMenu.h, EditControl.cc, EditControl.h,
Figure.cc, Figure.h, FigureWindow.cc, FigureWindow.h, GLCanvas.cc,
GLCanvas.h, GenericEventNotify.h, KeyMap.cc, KeyMap.h,
ListBoxControl.cc, ListBoxControl.h, Logger.cc, Logger.h, Menu.cc,
Menu.h, MenuContainer.h, Object.cc, Object.h, ObjectProxy.cc,
ObjectProxy.h, Panel.cc, Panel.h, PopupMenuControl.cc,
PopupMenuControl.h, PushButtonControl.cc, PushButtonControl.h,
PushTool.cc, PushTool.h, QtHandlesUtils.cc, QtHandlesUtils.h,
RadioButtonControl.cc, RadioButtonControl.h, SliderControl.cc,
SliderControl.h, Table.cc, Table.h, TextControl.cc, TextControl.h,
TextEdit.cc, TextEdit.h, ToggleButtonControl.cc,
ToggleButtonControl.h, ToggleTool.cc, ToggleTool.h, ToolBar.cc,
ToolBar.h, ToolBarButton.cc, ToolBarButton.h, annotation-dialog.cc,
annotation-dialog.h, gl-select.cc, gl-select.h, qopengl-functions.h,
qt-graphics-toolkit.cc, qt-graphics-toolkit.h, QTerminal.h,
color-picker.cc, color-picker.h, command-widget.cc, command-widget.h,
community-news.cc, community-news.h, dialog.cc, dialog.h,
documentation-bookmarks.cc, documentation-bookmarks.h,
documentation-dock-widget.cc, documentation-dock-widget.h,
documentation.cc, documentation.h, dw-main-window.cc,
dw-main-window.h, external-editor-interface.cc,
external-editor-interface.h, files-dock-widget.cc,
files-dock-widget.h, find-files-dialog.cc, find-files-dialog.h,
find-files-model.cc, find-files-model.h, graphics-init.cc,
graphics-init.h, gui-settings.cc, gui-settings.h, gui-utils.cc,
gui-utils.h, history-dock-widget.cc, history-dock-widget.h,
interpreter-qobject.cc, interpreter-qobject.h, led-indicator.cc,
led-indicator.h, file-editor-interface.h, file-editor-tab.cc,
file-editor-tab.h, file-editor.cc, file-editor.h, find-dialog.cc,
find-dialog.h, marker.cc, marker.h, octave-qscintilla.cc,
octave-qscintilla.h, octave-txt-lexer.cc, octave-txt-lexer.h,
main-window.cc, main-window.h, news-reader.cc, news-reader.h,
octave-dock-widget.cc, octave-dock-widget.h, octave-qobject.cc,
octave-qobject.h, qt-application.cc, qt-application.h,
qt-interpreter-events.cc, qt-interpreter-events.h, qt-utils.h,
release-notes.cc, release-notes.h, resource-manager.cc,
resource-manager.h, set-path-dialog.cc, set-path-dialog.h,
set-path-model.cc, set-path-model.h, settings-dialog.cc,
settings-dialog.h, shortcut-manager.cc, shortcut-manager.h,
tab-bar.cc, tab-bar.h, terminal-dock-widget.cc,
terminal-dock-widget.h, variable-editor-model.cc,
variable-editor-model.h, variable-editor.cc, variable-editor.h,
welcome-wizard.cc, welcome-wizard.h, workspace-model.cc,
workspace-model.h, workspace-view.cc, workspace-view.h:
Use new macros to begin/end C++ namespaces.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 06 Dec 2022 14:37:51 -0500 |
parents | d6ca77706ab3 |
children | 29d734430e5f |
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:
30398
diff
changeset
|
3 // Copyright (C) 2011-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 //////////////////////////////////////////////////////////////////////// |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
26 #if ! defined (octave_octave_qobject_h) |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
27 #define octave_octave_qobject_h 1 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 |
27588
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
29 #include <memory> |
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
30 |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
31 #include <QApplication> |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
32 #include <QList> |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
33 #include <QObject> |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
34 #include <QString> |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 #include <QStringList> |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
37 #include "interpreter-qobject.h" |
27620
45bb5bbaf291
don't use singleton pattern for resource manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27619
diff
changeset
|
38 #include "resource-manager.h" |
27630
262cdd0f7619
don't use singleton pattern for shortcut manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
39 #include "shortcut-manager.h" |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
40 |
31646
c6d54dd31a7e
maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents:
30740
diff
changeset
|
41 OCTAVE_BEGIN_NAMESPACE(octave) |
c6d54dd31a7e
maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents:
30740
diff
changeset
|
42 |
29835
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29822
diff
changeset
|
43 class community_news; |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
44 class main_window; |
27217
de0762d72d52
eliminate unnecessary inclusion of qt-application.h
John W. Eaton <jwe@octave.org>
parents:
27197
diff
changeset
|
45 class qt_application; |
27588
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
46 class qt_interpreter_events; |
29836
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
47 class release_notes; |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
48 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
49 //! This class is a simple wrapper around QApplication so that we can |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
50 //! reimplement QApplication::notify. The octave_qapplication object |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
51 //! should behave identically to a QApplication object except that it |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
52 //! overrides the notify method so we can handle forward Octave |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28795
diff
changeset
|
53 //! execution_exception exceptions from the GUI thread to the |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
54 //! interpreter thread. |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
55 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
56 class octave_qapplication : public QApplication |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
57 { |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
58 Q_OBJECT |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
59 |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
60 public: |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
61 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
62 octave_qapplication (int& argc, char **argv) |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
63 : QApplication (argc, argv) |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
64 { } |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
65 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
66 virtual bool notify (QObject *receiver, QEvent *e) override; |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
67 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
68 ~octave_qapplication (void) { }; |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
69 |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
70 signals: |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
71 |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
72 void interpreter_event (const fcn_callback& fcn); |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
73 void interpreter_event (const meth_callback& meth); |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
74 }; |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
75 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
76 //! Container for windows that may be created from the command line or |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
77 //! docked with the main GUI window. Any of these windows that are |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
78 //! created in command line mode will be adopted by the main window if |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
79 //! it is opened from the command line. Any that are undocked from |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
80 //! the main window will remain open if control returns to the command |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
81 //! line. |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
82 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
83 class base_qobject; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
84 class documentation_dock_widget; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
85 class file_editor_interface; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
86 class files_dock_widget; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
87 class history_dock_widget; |
29787
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29783
diff
changeset
|
88 class terminal_dock_widget; |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
89 class variable_editor; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
90 class workspace_model; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
91 class workspace_view; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
92 |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
93 //! Base class for Octave interfaces that use Qt. There are two |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
94 //! classes derived from this one. One provides a command-line |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
95 //! interface that may use Qt graphics and another provides the |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
96 //! full GUI experience. |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
97 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
98 class base_qobject : public QObject |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
99 { |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
100 Q_OBJECT |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
101 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
102 public: |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
103 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
104 // Note: the GUI_APP argument is not needed with the new |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
105 // experimental terminal widget. |
29153
02ee34a30351
eliminate separate cli_qobject and gui_qobject classes
John W. Eaton <jwe@octave.org>
parents:
28857
diff
changeset
|
106 base_qobject (qt_application& app_context, bool gui_app = false); |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
107 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
108 ~base_qobject (void); |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
109 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
110 void config_translators (void); |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
111 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
112 void start_main_thread (void); |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
113 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
114 int exec (void); |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
115 |
27218
a044202208af
more refactoring of GUI classes that manage the interpreter
John W. Eaton <jwe@octave.org>
parents:
27217
diff
changeset
|
116 // The Octave application context. |
a044202208af
more refactoring of GUI classes that manage the interpreter
John W. Eaton <jwe@octave.org>
parents:
27217
diff
changeset
|
117 qt_application& app_context (void) { return m_app_context; } |
a044202208af
more refactoring of GUI classes that manage the interpreter
John W. Eaton <jwe@octave.org>
parents:
27217
diff
changeset
|
118 |
a044202208af
more refactoring of GUI classes that manage the interpreter
John W. Eaton <jwe@octave.org>
parents:
27217
diff
changeset
|
119 // The Qt QApplication. |
a044202208af
more refactoring of GUI classes that manage the interpreter
John W. Eaton <jwe@octave.org>
parents:
27217
diff
changeset
|
120 QApplication * qapplication (void) { return m_qapplication; }; |
a044202208af
more refactoring of GUI classes that manage the interpreter
John W. Eaton <jwe@octave.org>
parents:
27217
diff
changeset
|
121 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
122 // Provided for convenience. Will be removed once we eliminate the |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
123 // old terminal widget. |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
124 bool experimental_terminal_widget (void) const; |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
125 |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
126 // Provided for convenience. |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
127 bool gui_running (void) const; |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
128 |
29796
a0fce019cd1f
additional reorganization of signal/slot connections in main_window class
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
129 bool have_terminal_window (void) const |
a0fce019cd1f
additional reorganization of signal/slot connections in main_window class
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
130 { |
a0fce019cd1f
additional reorganization of signal/slot connections in main_window class
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
131 return ! m_terminal_widget.isNull (); |
a0fce019cd1f
additional reorganization of signal/slot connections in main_window class
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
132 } |
a0fce019cd1f
additional reorganization of signal/slot connections in main_window class
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
133 |
30398
d4d83344d653
maint: style check C++ files in src/ and libgui/ ahead of 7.1 release.
Rik <rik@octave.org>
parents:
29891
diff
changeset
|
134 main_window * get_main_window (void) |
29891
7f22f024afdf
fix broken signal/slot connections for the variable editor
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29836
diff
changeset
|
135 { |
7f22f024afdf
fix broken signal/slot connections for the variable editor
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29836
diff
changeset
|
136 return m_main_window; |
7f22f024afdf
fix broken signal/slot connections for the variable editor
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29836
diff
changeset
|
137 } |
7f22f024afdf
fix broken signal/slot connections for the variable editor
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29836
diff
changeset
|
138 |
27620
45bb5bbaf291
don't use singleton pattern for resource manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27619
diff
changeset
|
139 resource_manager& get_resource_manager (void) |
45bb5bbaf291
don't use singleton pattern for resource manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27619
diff
changeset
|
140 { |
45bb5bbaf291
don't use singleton pattern for resource manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27619
diff
changeset
|
141 return m_resource_manager; |
45bb5bbaf291
don't use singleton pattern for resource manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27619
diff
changeset
|
142 } |
45bb5bbaf291
don't use singleton pattern for resource manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27619
diff
changeset
|
143 |
27630
262cdd0f7619
don't use singleton pattern for shortcut manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
144 shortcut_manager& get_shortcut_manager (void) |
262cdd0f7619
don't use singleton pattern for shortcut manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
145 { |
262cdd0f7619
don't use singleton pattern for shortcut manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
146 return m_shortcut_manager; |
262cdd0f7619
don't use singleton pattern for shortcut manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
147 } |
262cdd0f7619
don't use singleton pattern for shortcut manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
148 |
27588
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
149 std::shared_ptr<qt_interpreter_events> get_qt_interpreter_events (void) |
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
150 { |
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
151 return m_qt_interpreter_events; |
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
152 } |
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
153 |
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
154 qt_interpreter_events * qt_link (void) |
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
155 { |
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
156 return m_qt_interpreter_events.get (); |
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
157 } |
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
158 |
27218
a044202208af
more refactoring of GUI classes that manage the interpreter
John W. Eaton <jwe@octave.org>
parents:
27217
diff
changeset
|
159 interpreter_qobject * interpreter_qobj (void) |
a044202208af
more refactoring of GUI classes that manage the interpreter
John W. Eaton <jwe@octave.org>
parents:
27217
diff
changeset
|
160 { |
a044202208af
more refactoring of GUI classes that manage the interpreter
John W. Eaton <jwe@octave.org>
parents:
27217
diff
changeset
|
161 return m_interpreter_qobj; |
a044202208af
more refactoring of GUI classes that manage the interpreter
John W. Eaton <jwe@octave.org>
parents:
27217
diff
changeset
|
162 } |
a044202208af
more refactoring of GUI classes that manage the interpreter
John W. Eaton <jwe@octave.org>
parents:
27217
diff
changeset
|
163 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
164 workspace_model * get_workspace_model (void) |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
165 { |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
166 return m_workspace_model; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
167 } |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
168 |
29787
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29783
diff
changeset
|
169 QPointer<terminal_dock_widget> |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29783
diff
changeset
|
170 terminal_widget (main_window *mw = nullptr); |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29783
diff
changeset
|
171 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
172 QPointer<documentation_dock_widget> |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
173 documentation_widget (main_window *mw = nullptr); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
174 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
175 QPointer<files_dock_widget> |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
176 file_browser_widget (main_window *mw = nullptr); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
177 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
178 QPointer<history_dock_widget> |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
179 history_widget (main_window *mw = nullptr); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
180 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
181 QPointer<workspace_view> |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
182 workspace_widget (main_window *mw = nullptr); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
183 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
184 // FIXME: The file_editor_interface needs to be a proper generic |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
185 // interface for all editors (internal and external) for this to |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
186 // work properly. |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
187 QPointer<file_editor_interface> |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
188 editor_widget (main_window *mw = nullptr); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
189 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
190 QPointer<variable_editor> |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
191 variable_editor_widget (main_window *mw = nullptr); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
192 |
29835
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29822
diff
changeset
|
193 QPointer<community_news> community_news_widget (int serial = -1); |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29822
diff
changeset
|
194 |
29836
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
195 QPointer<release_notes> release_notes_widget (void); |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
196 |
30398
d4d83344d653
maint: style check C++ files in src/ and libgui/ ahead of 7.1 release.
Rik <rik@octave.org>
parents:
29891
diff
changeset
|
197 QThread * main_thread (void) { return m_main_thread; } |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
198 |
29153
02ee34a30351
eliminate separate cli_qobject and gui_qobject classes
John W. Eaton <jwe@octave.org>
parents:
28857
diff
changeset
|
199 // Declared virtual so that a derived class may redefine this |
02ee34a30351
eliminate separate cli_qobject and gui_qobject classes
John W. Eaton <jwe@octave.org>
parents:
28857
diff
changeset
|
200 // method. |
02ee34a30351
eliminate separate cli_qobject and gui_qobject classes
John W. Eaton <jwe@octave.org>
parents:
28857
diff
changeset
|
201 |
27588
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
202 virtual bool confirm_shutdown (void); |
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
203 |
30740
d6ca77706ab3
shutdown via interpreter with experimental terminal in gui mode (bug #61994)
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
204 bool is_gui_app (void) const { return m_gui_app; } |
d6ca77706ab3
shutdown via interpreter with experimental terminal in gui mode (bug #61994)
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
205 |
29783
5154c91e0d98
eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents:
29762
diff
changeset
|
206 template <typename T> void connect_interpreter_events (T *widget) |
5154c91e0d98
eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents:
29762
diff
changeset
|
207 { |
5154c91e0d98
eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents:
29762
diff
changeset
|
208 connect (widget, QOverload<const fcn_callback&>::of (&T::interpreter_event), |
5154c91e0d98
eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents:
29762
diff
changeset
|
209 this, QOverload<const fcn_callback&>::of (&base_qobject::interpreter_event)); |
5154c91e0d98
eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents:
29762
diff
changeset
|
210 |
5154c91e0d98
eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents:
29762
diff
changeset
|
211 connect (widget, QOverload<const meth_callback&>::of (&T::interpreter_event), |
5154c91e0d98
eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents:
29762
diff
changeset
|
212 this, QOverload<const meth_callback&>::of (&base_qobject::interpreter_event)); |
5154c91e0d98
eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents:
29762
diff
changeset
|
213 } |
5154c91e0d98
eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents:
29762
diff
changeset
|
214 |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
215 public slots: |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
216 |
29762
84d7e1ace446
improve variable editor functionality when used without GUI main window
John W. Eaton <jwe@octave.org>
parents:
29754
diff
changeset
|
217 void execute_command (const QString& command); |
84d7e1ace446
improve variable editor functionality when used without GUI main window
John W. Eaton <jwe@octave.org>
parents:
29754
diff
changeset
|
218 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
219 // Note: START_GUI and CLOSE_GUI don't currently perform any work |
29548
f6ad83cbe3c4
simplify interpreter shutdown in the GUI
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
220 // with the old terminal widget. |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
221 void start_gui (bool gui_app); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
222 void close_gui (void); |
29219
c2f3a0832cf0
fix possible glitch when interpreter is ready when main window is created
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29153
diff
changeset
|
223 |
29787
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29783
diff
changeset
|
224 void show_terminal_window (void); |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29783
diff
changeset
|
225 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
226 void show_documentation_window (const QString& file); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
227 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
228 void show_file_browser_window (void); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
229 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
230 void show_command_history_window (void); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
231 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
232 void show_workspace_window (void); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
233 |
29754
4c569e386e9b
improve behavior of dockable widgets (bug #60750)
John W. Eaton <jwe@octave.org>
parents:
29613
diff
changeset
|
234 void show_variable_editor_window (const QString& name, |
4c569e386e9b
improve behavior of dockable widgets (bug #60750)
John W. Eaton <jwe@octave.org>
parents:
29613
diff
changeset
|
235 const octave_value& value); |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
236 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
237 void handle_variable_editor_update (void); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
238 |
29835
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29822
diff
changeset
|
239 void show_community_news (int serial); |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29822
diff
changeset
|
240 |
29836
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
241 void show_release_notes (void); |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
242 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
243 void interpreter_ready (void); |
28347
00a9a49c7670
improve interpreter shutdown process (bug #56952)
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
244 |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
245 void interpreter_event (const fcn_callback& fcn); |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
246 |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
247 void interpreter_event (const meth_callback& meth); |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
248 |
29292
eb1e10abe9d5
use method in interpreter class to interrupt interpreter execution in GUI
John W. Eaton <jwe@octave.org>
parents:
29219
diff
changeset
|
249 void interpreter_interrupt (void); |
eb1e10abe9d5
use method in interpreter class to interrupt interpreter execution in GUI
John W. Eaton <jwe@octave.org>
parents:
29219
diff
changeset
|
250 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
251 // Note: these currently only work with the new experimental |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
252 // terminal widget. |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
253 void interpreter_pause (void); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
254 void interpreter_stop (void); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
255 void interpreter_resume (void); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
256 |
27588
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
257 void copy_image_to_clipboard (const QString& file, bool remove_file); |
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
258 |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
259 protected: |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
260 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
261 qt_application& m_app_context; |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
262 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
263 // Use these to ensure that argc and argv exist for as long as the |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
264 // QApplication object. |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
265 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
266 int m_argc; |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
267 char **m_argv; |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
268 |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27218
diff
changeset
|
269 octave_qapplication *m_qapplication; |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
270 |
27620
45bb5bbaf291
don't use singleton pattern for resource manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27619
diff
changeset
|
271 resource_manager m_resource_manager; |
45bb5bbaf291
don't use singleton pattern for resource manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27619
diff
changeset
|
272 |
27630
262cdd0f7619
don't use singleton pattern for shortcut manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
273 shortcut_manager m_shortcut_manager; |
262cdd0f7619
don't use singleton pattern for shortcut manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
274 |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
275 QTranslator *m_qt_tr; |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
276 QTranslator *m_gui_tr; |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
277 QTranslator *m_qsci_tr; |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
278 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
279 bool m_translators_installed; |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
280 |
27588
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
281 std::shared_ptr<qt_interpreter_events> m_qt_interpreter_events; |
f0e3f3e28a8e
move qt_interpreter_events object from interpreter_qobject to octave_qobject
John W. Eaton <jwe@octave.org>
parents:
27582
diff
changeset
|
282 |
27218
a044202208af
more refactoring of GUI classes that manage the interpreter
John W. Eaton <jwe@octave.org>
parents:
27217
diff
changeset
|
283 interpreter_qobject *m_interpreter_qobj; |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
284 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
285 QThread *m_main_thread; |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
286 |
29153
02ee34a30351
eliminate separate cli_qobject and gui_qobject classes
John W. Eaton <jwe@octave.org>
parents:
28857
diff
changeset
|
287 bool m_gui_app; |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
288 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
289 bool m_interpreter_ready; |
29219
c2f3a0832cf0
fix possible glitch when interpreter is ready when main window is created
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29153
diff
changeset
|
290 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
291 workspace_model *m_workspace_model; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
292 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
293 // Dock widgets that may be used from the command line. They are |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
294 // adopted by the desktop (main window) if it is also started from |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
295 // the command line. |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
296 |
29787
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29783
diff
changeset
|
297 QPointer<terminal_dock_widget> m_terminal_widget; |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29783
diff
changeset
|
298 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
299 QPointer<documentation_dock_widget> m_documentation_widget; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
300 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
301 QPointer<files_dock_widget> m_file_browser_widget; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
302 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
303 QPointer<history_dock_widget> m_history_widget; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
304 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
305 QPointer<workspace_view> m_workspace_widget; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
306 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
307 QPointer<file_editor_interface> m_editor_widget; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
308 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
309 QPointer<variable_editor> m_variable_editor_widget; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29548
diff
changeset
|
310 |
29835
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29822
diff
changeset
|
311 QPointer<community_news> m_community_news; |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29822
diff
changeset
|
312 |
29836
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
313 QPointer<release_notes> m_release_notes; |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
314 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
315 main_window *m_main_window; |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
316 }; |
31646
c6d54dd31a7e
maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents:
30740
diff
changeset
|
317 |
c6d54dd31a7e
maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents:
30740
diff
changeset
|
318 OCTAVE_END_NAMESPACE(octave) |
27197
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
319 |
b8c0d5ad024f
refactor and rename some qt application objects
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
320 #endif |