Mercurial > octave
annotate libgui/src/terminal-dock-widget.cc @ 29550:8dd0fca2a3d9
where possible, use default destructors in GUI classes
In most cases, don't explicitly delete objects that have parents in
the QObject class hierarchy as they will be deleted automatically when
the parent object is deleted. Explicitly declare more destructors as
"default".
Files affected: dialog.cc, dialog.h, documentation-bookmarks.cc,
documentation-bookmarks.h, documentation-dock-widget.cc,
documentation-dock-widget.h, documentation.cc, documentation.h,
m-editor/file-editor.cc, m-editor/file-editor.h, main-window.cc,
main-window.h, set-path-dialog.cc, set-path-dialog.h, tab-bar.cc,
tab-bar.h, terminal-dock-widget.cc, and terminal-dock-widget.h.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 22 Apr 2021 12:52:14 -0400 |
parents | abac1d557184 |
children | d64ad3b93372 |
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 // |
29358
0a5b15007766
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
3 // Copyright (C) 2011-2021 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 //////////////////////////////////////////////////////////////////////// |
14692
d6d250812c01
Made the terminal window dockable, too. Now the whole interface is fully dockable.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
25 |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21301
diff
changeset
|
26 #if defined (HAVE_CONFIG_H) |
21301
40de9f8f23a6
Use '#include "config.h"' rather than <config.h>.
Rik <rik@octave.org>
parents:
21203
diff
changeset
|
27 # include "config.h" |
15286
ae9079bbc627
Add '#include <config.h>' to C++ files in libgui/src
Rik <rik@octave.org>
parents:
15204
diff
changeset
|
28 #endif |
ae9079bbc627
Add '#include <config.h>' to C++ files in libgui/src
Rik <rik@octave.org>
parents:
15204
diff
changeset
|
29 |
24791
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
30 #include <QDesktopWidget> |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
31 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
32 // This header is only needed for the new terminal widget. |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
33 #include "command-widget.h" |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
34 |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
35 // This header is only needed for the old terminal widget. |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
36 #include "QTerminal.h" |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
37 |
27560
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
38 #include "gui-preferences-cs.h" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
39 #include "gui-preferences-global.h" |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
40 |
27629
8b6e928e0705
in GUI objects, store reference to base_qobject instead of resource_manager
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
41 #include "octave-qobject.h" |
27412
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27281
diff
changeset
|
42 #include "terminal-dock-widget.h" |
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27281
diff
changeset
|
43 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
44 namespace octave |
14692
d6d250812c01
Made the terminal window dockable, too. Now the whole interface is fully dockable.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
45 { |
27620
45bb5bbaf291
don't use singleton pattern for resource manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27611
diff
changeset
|
46 terminal_dock_widget::terminal_dock_widget (QWidget *p, |
27629
8b6e928e0705
in GUI objects, store reference to base_qobject instead of resource_manager
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
47 base_qobject& oct_qobj) |
8b6e928e0705
in GUI objects, store reference to base_qobject instead of resource_manager
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
48 : octave_dock_widget ("TerminalDockWidget", p, oct_qobj), |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
49 m_experimental_terminal_widget (oct_qobj.experimental_terminal_widget ()) |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
50 { |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
51 // FIXME: we could do this in a better way, but improving it doesn't |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
52 // matter much if we will eventually be removing the old terminal. |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
53 if (m_experimental_terminal_widget) |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
54 m_terminal = new command_widget (oct_qobj, this); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
55 else |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
56 m_terminal = QTerminal::create (oct_qobj, this, p); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
57 |
24768
11cc3973381b
use "m_" prefix for member variable in terminal dock widget class
John W. Eaton <jwe@octave.org>
parents:
24733
diff
changeset
|
58 m_terminal->setObjectName ("OctaveTerminal"); |
11cc3973381b
use "m_" prefix for member variable in terminal dock widget class
John W. Eaton <jwe@octave.org>
parents:
24733
diff
changeset
|
59 m_terminal->setFocusPolicy (Qt::StrongFocus); |
17920
5c3f22dd0bbb
raise SIGINT in octave_interpreter instead of in QTerminal
John W. Eaton <jwe@octave.org>
parents:
17790
diff
changeset
|
60 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
61 setWindowIcon (QIcon (":/actions/icons/logo.png")); |
25508
3edae6ba1fcd
use a custom title bar widget for the main dock widgets
Torsten <mttl@mailbox.org>
parents:
25355
diff
changeset
|
62 set_title (tr ("Command Window")); |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
63 |
24768
11cc3973381b
use "m_" prefix for member variable in terminal dock widget class
John W. Eaton <jwe@octave.org>
parents:
24733
diff
changeset
|
64 setWidget (m_terminal); |
11cc3973381b
use "m_" prefix for member variable in terminal dock widget class
John W. Eaton <jwe@octave.org>
parents:
24733
diff
changeset
|
65 setFocusProxy (m_terminal); |
23808
2b1b2a795ba6
update clickable urls in terminal also when visible terminal has no focus
Torsten <mttl@mailbox.org>
parents:
23220
diff
changeset
|
66 |
29525
d6b2d9f9e1e0
use terminal settings for the experimental command widget
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29503
diff
changeset
|
67 connect (p, SIGNAL (settings_changed (const gui_settings *)), |
d6b2d9f9e1e0
use terminal settings for the experimental command widget
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29503
diff
changeset
|
68 m_terminal, SLOT (notice_settings (const gui_settings *))); |
d6b2d9f9e1e0
use terminal settings for the experimental command widget
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29503
diff
changeset
|
69 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
70 if (m_experimental_terminal_widget) |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
71 { |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
72 // Any interpreter_event signal from the terminal widget is |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
73 // handled the same as for the parent terminal dock widget. |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
74 |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
75 connect (m_terminal, SIGNAL (interpreter_event (const fcn_callback&)), |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
76 this, SIGNAL (interpreter_event (const fcn_callback&))); |
16446
4b3a4bf8569b
improve encapsulation of command window object
John W. Eaton <jwe@octave.org>
parents:
16057
diff
changeset
|
77 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
78 connect (m_terminal, SIGNAL (interpreter_event (const meth_callback&)), |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
79 this, SIGNAL (interpreter_event (const meth_callback&))); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
80 } |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
81 else |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
82 { |
29532
abac1d557184
fix missing connection of interrupt signal (bug #60392)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29525
diff
changeset
|
83 // Connect the interrupt signal (emitted by Ctrl-C) |
abac1d557184
fix missing connection of interrupt signal (bug #60392)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29525
diff
changeset
|
84 connect (m_terminal, SIGNAL (interrupt_signal (void)), |
abac1d557184
fix missing connection of interrupt signal (bug #60392)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29525
diff
changeset
|
85 &oct_qobj, SLOT (interpreter_interrupt (void))); |
abac1d557184
fix missing connection of interrupt signal (bug #60392)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29525
diff
changeset
|
86 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
87 // Connect the visibility signal to the terminal for |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
88 // dis-/enabling timers. |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
89 connect (this, SIGNAL (visibilityChanged (bool)), |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
90 m_terminal, SLOT (handle_visibility_changed (bool))); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
91 } |
24791
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
92 |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
93 // Chose a reasonable size at startup in order to avoid truncated |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
94 // startup messages |
27629
8b6e928e0705
in GUI objects, store reference to base_qobject instead of resource_manager
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
95 resource_manager& rmgr = m_octave_qobj.get_resource_manager (); |
8b6e928e0705
in GUI objects, store reference to base_qobject instead of resource_manager
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
96 gui_settings *settings = rmgr.get_settings (); |
24791
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
97 |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
98 QFont font = QFont (); |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
99 font.setStyleHint (QFont::TypeWriter); |
27672
a36443e94f8a
simplify gui_settings->value (PREF.key, PREF.def) calls
John W. Eaton <jwe@octave.org>
parents:
27648
diff
changeset
|
100 QString default_font = settings->value (global_mono_font).toString (); |
24791
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
101 font.setFamily |
26008
38a881b8fbec
do not use courier new as default font (bug #54086)
Torsten <mttl@mailbox.org>
parents:
25508
diff
changeset
|
102 (settings->value (cs_font.key, default_font).toString ()); |
27583
315c35e6037c
use symbolic constants for command widget preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27560
diff
changeset
|
103 font.setPointSize |
27672
a36443e94f8a
simplify gui_settings->value (PREF.key, PREF.def) calls
John W. Eaton <jwe@octave.org>
parents:
27648
diff
changeset
|
104 (settings->value (cs_font_size).toInt ()); |
24791
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
105 |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
106 QFontMetrics metrics(font); |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
107 |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
108 int win_x = metrics.maxWidth()*80; |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
109 int win_y = metrics.height()*25; |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
110 |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
111 int max_x = QApplication::desktop ()->screenGeometry (this).width (); |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
112 int max_y = QApplication::desktop ()->screenGeometry (this).height (); |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
113 |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
114 if (win_x > max_x) |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
115 win_x = max_x; |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
116 if (win_y > max_y) |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
117 win_y = max_y; |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
118 |
9421e891294e
fix truncated startup message in terminal widget on windows (bug #53189)
Torsten <mttl@mailbox.org>
parents:
24768
diff
changeset
|
119 setGeometry (0, 0, win_x, win_y); |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
120 } |
24011
9107bae20480
style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents:
23808
diff
changeset
|
121 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
122 bool terminal_dock_widget::has_focus (void) const |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
123 { |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
124 QWidget *w = widget (); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
125 return w->hasFocus (); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
126 } |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
127 |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
128 void terminal_dock_widget::interpreter_output (const QString& msg) |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
129 { |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
130 if (m_experimental_terminal_widget) |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
131 emit interpreter_output_signal (msg); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
132 } |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
133 |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
134 void terminal_dock_widget::update_prompt (const QString& prompt) |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
135 { |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
136 if (m_experimental_terminal_widget) |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
137 emit update_prompt_signal (prompt); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
138 } |
29525
d6b2d9f9e1e0
use terminal settings for the experimental command widget
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29503
diff
changeset
|
139 |
16461
094bd3627ead
move common functionality to octave_dock_widget base class
John W. Eaton <jwe@octave.org>
parents:
16460
diff
changeset
|
140 } |