annotate libgui/qterminal/libqterminal/QTerminal.h @ 31619:ad014fc78bd6

use individual local gui_settings objects Previously, we created a single gui_settings object (derived from QSettings) and accessed it from the resource_manager object. That design is not necessary and is not the way QSettings was designed to be used. Instead of managing a single object, we should be using individual QSettings objects where needed. Each individual QSettings object manages thread-safe access to a single global collection of settings. The Qt docs say that operations on QSettings are not thread safe, but that means that you can't create a QSettings object in one thread and use it in another without some locking. I'm not sure whether we were doing that correctly, but with this change it no longer matters. Each QSettings object does perform locking when reading or writing the underlying global data. * resource-manager.h, resource-manager.cc (resource_manager::m_settings): Delete data member. (resource_manager::get_settings): Delete. * annotation-dialog.cc, QTerminal.cc, QTerminal.h, command-widget.cc, command-widget.h, community-news.cc, dialog.cc, 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, files-dock-widget.cc, files-dock-widget.h, find-files-dialog.cc, history-dock-widget.cc, history-dock-widget.h, file-editor-interface.h, file-editor-tab.cc, file-editor-tab.h, file-editor.cc, file-editor.h, find-dialog.cc, octave-qscintilla.cc, main-window.cc, main-window.h, news-reader.cc, octave-dock-widget.cc, octave-dock-widget.h, qt-interpreter-events.cc, qt-interpreter-events.h, release-notes.cc, resource-manager.cc, resource-manager.h, set-path-dialog.cc, settings-dialog.cc, settings-dialog.h, shortcut-manager.cc, shortcut-manager.h, terminal-dock-widget.cc, terminal-dock-widget.h, variable-editor.cc, variable-editor.h, welcome-wizard.cc, workspace-model.cc, workspace-model.h, workspace-view.cc: Use local gui_settings objects instead of accessing a pointer to a single gui_settings object owned by the resource_manager object.
author John W. Eaton <jwe@octave.org>
date Fri, 02 Dec 2022 14:23:53 -0500
parents 5154c91e0d98
children dd904ce6f53f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
1 /*
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
2
26376
00f796120a6d maint: Update copyright dates in all source files.
John W. Eaton <jwe@octave.org>
parents: 25955
diff changeset
3 Copyright (C) 2012-2019 Michael Goffioul.
00f796120a6d maint: Update copyright dates in all source files.
John W. Eaton <jwe@octave.org>
parents: 25955
diff changeset
4 Copyright (C) 2012-2019 Jacob Dawid.
15647
a044a259c423 Renamed SessionModel in TerminalModel.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15646
diff changeset
5
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
6 This file is part of QTerminal.
15631
9712f29c97de Compiles again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
7
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23808
diff changeset
8 This program is free software: you can redistribute it and/or modify
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
9 it under the terms of the GNU General Public License as published by
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
10 the Free Software Foundation, either version 3 of the License, or
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
11 (at your option) any later version.
15631
9712f29c97de Compiles again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
12
17795
0a8c35ae5ce1 maint: Fix various problems with GPL copyright statements.
Rik <rik@octave.org>
parents: 17790
diff changeset
13 This program is distributed in the hope that it will be useful,
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
16 GNU General Public License for more details.
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
17
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
18 You should have received a copy of the GNU General Public License
17795
0a8c35ae5ce1 maint: Fix various problems with GPL copyright statements.
Rik <rik@octave.org>
parents: 17790
diff changeset
19 along with this program. If not,
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23808
diff changeset
20 see <https://www.gnu.org/licenses/>.
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
21
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
22 */
15631
9712f29c97de Compiles again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
23
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
24 #ifndef QTERMINAL_H
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
25 #define QTERMINAL_H
15649
c22fa57226b2 Fixed bug with ECHOCTL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15648
diff changeset
26
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
27 #include <QColor>
16641
64f9a3e301d3 don't store default values in resource manager class
John W. Eaton <jwe@octave.org>
parents: 16639
diff changeset
28 #include <QList>
27648
2952471e29a7 eliminate global access to resource_manager in qterminal widget
John W. Eaton <jwe@octave.org>
parents: 27620
diff changeset
29 #include <QPoint>
2952471e29a7 eliminate global access to resource_manager in qterminal widget
John W. Eaton <jwe@octave.org>
parents: 27620
diff changeset
30 #include <QString>
2952471e29a7 eliminate global access to resource_manager in qterminal widget
John W. Eaton <jwe@octave.org>
parents: 27620
diff changeset
31 #include <QWidget>
15662
5758e0013246 Enable compilation on Win32-native platform.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 15658
diff changeset
32
27648
2952471e29a7 eliminate global access to resource_manager in qterminal widget
John W. Eaton <jwe@octave.org>
parents: 27620
diff changeset
33 namespace octave
2952471e29a7 eliminate global access to resource_manager in qterminal widget
John W. Eaton <jwe@octave.org>
parents: 27620
diff changeset
34 {
2952471e29a7 eliminate global access to resource_manager in qterminal widget
John W. Eaton <jwe@octave.org>
parents: 27620
diff changeset
35 class base_qobject;
2952471e29a7 eliminate global access to resource_manager in qterminal widget
John W. Eaton <jwe@octave.org>
parents: 27620
diff changeset
36 }
2952471e29a7 eliminate global access to resource_manager in qterminal widget
John W. Eaton <jwe@octave.org>
parents: 27620
diff changeset
37
2952471e29a7 eliminate global access to resource_manager in qterminal widget
John W. Eaton <jwe@octave.org>
parents: 27620
diff changeset
38 class QMenu;
2952471e29a7 eliminate global access to resource_manager in qterminal widget
John W. Eaton <jwe@octave.org>
parents: 27620
diff changeset
39 class QAction;
27611
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents: 27583
diff changeset
40
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
41 class QTerminal : public QWidget
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
42 {
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
43 Q_OBJECT
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
44
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
45 public:
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
46
27648
2952471e29a7 eliminate global access to resource_manager in qterminal widget
John W. Eaton <jwe@octave.org>
parents: 27620
diff changeset
47 static QTerminal *
29783
5154c91e0d98 eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents: 29691
diff changeset
48 create (octave::base_qobject& oct_qobj, QWidget *xparent);
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
49
22868
87e3163f6c87 use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
50 virtual ~QTerminal (void) = default;
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
51
16794
1d1f02e0f6b4 GUI: enable clipboard content detection for terminal window context menu
John Donoghue <john.donoghue@ieee.org>
parents: 16718
diff changeset
52 virtual void setTerminalFont (const QFont& font) = 0;
1d1f02e0f6b4 GUI: enable clipboard content detection for terminal window context menu
John Donoghue <john.donoghue@ieee.org>
parents: 16718
diff changeset
53
1d1f02e0f6b4 GUI: enable clipboard content detection for terminal window context menu
John Donoghue <john.donoghue@ieee.org>
parents: 16718
diff changeset
54 virtual void setSize (int h, int v) = 0;
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
55
16794
1d1f02e0f6b4 GUI: enable clipboard content detection for terminal window context menu
John Donoghue <john.donoghue@ieee.org>
parents: 16718
diff changeset
56 virtual void sendText (const QString& text) = 0;
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
57
16794
1d1f02e0f6b4 GUI: enable clipboard content detection for terminal window context menu
John Donoghue <john.donoghue@ieee.org>
parents: 16718
diff changeset
58 virtual QString selectedText () = 0;
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
59
19690
bd1369a2a651 add extra action for interrupting with Ctrl-C (bug #44204)
Torsten <ttl@justmail.de>
parents: 19303
diff changeset
60 virtual void has_extra_interrupt (bool extra) = 0;
bd1369a2a651 add extra action for interrupting with Ctrl-C (bug #44204)
Torsten <ttl@justmail.de>
parents: 19303
diff changeset
61
23403
fee531225679 make url in the console window clickable under linux (bug #41076)
Torsten <mttl@mailbox.org>
parents: 23220
diff changeset
62 virtual QList<QAction*> get_hotspot_actions (const QPoint&)
25103
078b795c5219 maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents: 25054
diff changeset
63 { return QList<QAction*> (); }
23403
fee531225679 make url in the console window clickable under linux (bug #41076)
Torsten <mttl@mailbox.org>
parents: 23220
diff changeset
64
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
65 enum CursorType
17790
86c6ae5f969e Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents: 17744
diff changeset
66 {
27583
315c35e6037c use symbolic constants for command widget preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27288
diff changeset
67 IBeamCursor,
17790
86c6ae5f969e Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents: 17744
diff changeset
68 BlockCursor,
27583
315c35e6037c use symbolic constants for command widget preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27288
diff changeset
69 UnderlineCursor
17790
86c6ae5f969e Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents: 17744
diff changeset
70 };
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
71
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
72 virtual void setCursorType (CursorType type, bool blinking)
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
73 {
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
74 // Provide empty default impl in order to avoid conflicts with the
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
75 // win impl.
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
76
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
77 Q_UNUSED (type);
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
78 Q_UNUSED (blinking);
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
79 }
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
80
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
81 virtual void setBackgroundColor (const QColor& color) = 0;
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
82
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
83 virtual void setForegroundColor (const QColor& color) = 0;
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
84
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
85 virtual void setSelectionColor (const QColor& color) = 0;
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
86
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
87 virtual void setCursorColor (bool useForegroundColor,
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
88 const QColor& color) = 0;
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
89
18610
6e81b59d657c Add preference for terminal windows buffer size (bug #41474)
Ahsan Ali Shahid <ahsan.ali.shahid@gmail.com>
parents: 18555
diff changeset
90 virtual void setScrollBufferSize(int value=1000) = 0;
6e81b59d657c Add preference for terminal windows buffer size (bug #41474)
Ahsan Ali Shahid <ahsan.ali.shahid@gmail.com>
parents: 18555
diff changeset
91
16648
b04413e5a811 improve handling of interrupts, copy and paste shortcuts
John W. Eaton <jwe@octave.org>
parents: 16641
diff changeset
92 signals:
b04413e5a811 improve handling of interrupts, copy and paste shortcuts
John W. Eaton <jwe@octave.org>
parents: 16641
diff changeset
93
b04413e5a811 improve handling of interrupts, copy and paste shortcuts
John W. Eaton <jwe@octave.org>
parents: 16641
diff changeset
94 void report_status_message (const QString&);
b04413e5a811 improve handling of interrupts, copy and paste shortcuts
John W. Eaton <jwe@octave.org>
parents: 16641
diff changeset
95
17920
5c3f22dd0bbb raise SIGINT in octave_interpreter instead of in QTerminal
John W. Eaton <jwe@octave.org>
parents: 17795
diff changeset
96 void interrupt_signal (void);
5c3f22dd0bbb raise SIGINT in octave_interpreter instead of in QTerminal
John W. Eaton <jwe@octave.org>
parents: 17795
diff changeset
97
20995
aab7a3c7168e edit a file from an error message in the terminal (bug #35619)
Torsten <ttl@justmail.de>
parents: 20994
diff changeset
98 void edit_mfile_request (const QString&, int);
aab7a3c7168e edit a file from an error message in the terminal (bug #35619)
Torsten <ttl@justmail.de>
parents: 20994
diff changeset
99
27288
0a2e5c808709 allow editing and showing help on selected text in console (bug #41276)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27276
diff changeset
100 void show_doc_signal (const QString&);
0a2e5c808709 allow editing and showing help on selected text in console (bug #41276)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27276
diff changeset
101
25813
d98d7df9fd15 updated context menus in editor and console window (bug #46884)
Torsten <mttl@mailbox.org>
parents: 25103
diff changeset
102 void execute_command_in_terminal_signal (const QString&);
d98d7df9fd15 updated context menus in editor and console window (bug #46884)
Torsten <mttl@mailbox.org>
parents: 25103
diff changeset
103
29783
5154c91e0d98 eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents: 29691
diff changeset
104 void request_edit_mfile_signal (const QString&, int);
5154c91e0d98 eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents: 29691
diff changeset
105
5154c91e0d98 eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents: 29691
diff changeset
106 void request_open_file_signal (const QString&, const QString&, int);
5154c91e0d98 eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents: 29691
diff changeset
107
5154c91e0d98 eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents: 29691
diff changeset
108 void set_screen_size_signal (int, int);
5154c91e0d98 eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents: 29691
diff changeset
109
5154c91e0d98 eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents: 29691
diff changeset
110 void clear_command_window_request (void);
5154c91e0d98 eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents: 29691
diff changeset
111
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
112 public slots:
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
113
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
114 virtual void copyClipboard (void) = 0;
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
115
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
116 virtual void pasteClipboard (void) = 0;
16413
28136851099a remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15894
diff changeset
117
18555
2d5d0d86432e gui: Add select all menu (Bug #41797)
John Donoghue <john.donoghue@ieee.org>
parents: 17920
diff changeset
118 virtual void selectAll (void) = 0;
2d5d0d86432e gui: Add select all menu (Bug #41797)
John Donoghue <john.donoghue@ieee.org>
parents: 17920
diff changeset
119
20995
aab7a3c7168e edit a file from an error message in the terminal (bug #35619)
Torsten <ttl@justmail.de>
parents: 20994
diff changeset
120 virtual void handleCustomContextMenuRequested (const QPoint& at);
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
121
31619
ad014fc78bd6 use individual local gui_settings objects
John W. Eaton <jwe@octave.org>
parents: 29783
diff changeset
122 void notice_settings (void);
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
123
19303
c6615ca0a11d horizontal scrollbar for GUI terminal on Windows systems
John W. Eaton <jwe@octave.org>
parents: 18610
diff changeset
124 virtual void init_terminal_size (void) { }
c6615ca0a11d horizontal scrollbar for GUI terminal on Windows systems
John W. Eaton <jwe@octave.org>
parents: 18610
diff changeset
125
17920
5c3f22dd0bbb raise SIGINT in octave_interpreter instead of in QTerminal
John W. Eaton <jwe@octave.org>
parents: 17795
diff changeset
126 void terminal_interrupt (void) { emit interrupt_signal (); }
5c3f22dd0bbb raise SIGINT in octave_interpreter instead of in QTerminal
John W. Eaton <jwe@octave.org>
parents: 17795
diff changeset
127
25813
d98d7df9fd15 updated context menus in editor and console window (bug #46884)
Torsten <mttl@mailbox.org>
parents: 25103
diff changeset
128 void run_selection (void);
d98d7df9fd15 updated context menus in editor and console window (bug #46884)
Torsten <mttl@mailbox.org>
parents: 25103
diff changeset
129
20995
aab7a3c7168e edit a file from an error message in the terminal (bug #35619)
Torsten <ttl@justmail.de>
parents: 20994
diff changeset
130 void edit_file (void);
aab7a3c7168e edit a file from an error message in the terminal (bug #35619)
Torsten <ttl@justmail.de>
parents: 20994
diff changeset
131
27288
0a2e5c808709 allow editing and showing help on selected text in console (bug #41276)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27276
diff changeset
132 void edit_selected (void);
0a2e5c808709 allow editing and showing help on selected text in console (bug #41276)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27276
diff changeset
133
0a2e5c808709 allow editing and showing help on selected text in console (bug #41276)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27276
diff changeset
134 void help_on_expression (void);
0a2e5c808709 allow editing and showing help on selected text in console (bug #41276)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27276
diff changeset
135
0a2e5c808709 allow editing and showing help on selected text in console (bug #41276)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27276
diff changeset
136 void doc_on_expression (void);
0a2e5c808709 allow editing and showing help on selected text in console (bug #41276)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27276
diff changeset
137
23808
2b1b2a795ba6 update clickable urls in terminal also when visible terminal has no focus
Torsten <mttl@mailbox.org>
parents: 23795
diff changeset
138 virtual void handle_visibility_changed (bool) { };
2b1b2a795ba6 update clickable urls in terminal also when visible terminal has no focus
Torsten <mttl@mailbox.org>
parents: 23795
diff changeset
139
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
140 protected:
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
141
29691
67eccd062618 fix calling documentations from terminal and editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29393
diff changeset
142 QTerminal (octave::base_qobject& oct_qobj, QWidget *xparent = nullptr)
67eccd062618 fix calling documentations from terminal and editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29393
diff changeset
143 : QWidget (xparent), m_octave_qobj (oct_qobj) { }
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
144
29783
5154c91e0d98 eliminate some connections to parent objects in octave_dock_widget classes
John W. Eaton <jwe@octave.org>
parents: 29691
diff changeset
145 void construct (octave::base_qobject& oct_qobj);
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
146
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
147 private:
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
148
29691
67eccd062618 fix calling documentations from terminal and editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29393
diff changeset
149 octave::base_qobject& m_octave_qobj;
67eccd062618 fix calling documentations from terminal and editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29393
diff changeset
150
17790
86c6ae5f969e Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents: 17744
diff changeset
151 QMenu *_contextMenu;
86c6ae5f969e Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents: 17744
diff changeset
152 QAction * _copy_action;
86c6ae5f969e Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents: 17744
diff changeset
153 QAction * _paste_action;
18555
2d5d0d86432e gui: Add select all menu (Bug #41797)
John Donoghue <john.donoghue@ieee.org>
parents: 17920
diff changeset
154 QAction * _selectall_action;
20995
aab7a3c7168e edit a file from an error message in the terminal (bug #35619)
Torsten <ttl@justmail.de>
parents: 20994
diff changeset
155 QAction * _edit_action;
25813
d98d7df9fd15 updated context menus in editor and console window (bug #46884)
Torsten <mttl@mailbox.org>
parents: 25103
diff changeset
156 QAction * _run_selection_action;
27288
0a2e5c808709 allow editing and showing help on selected text in console (bug #41276)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27276
diff changeset
157 QAction * m_edit_selected_action;
0a2e5c808709 allow editing and showing help on selected text in console (bug #41276)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27276
diff changeset
158 QAction * m_help_selected_action;
0a2e5c808709 allow editing and showing help on selected text in console (bug #41276)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27276
diff changeset
159 QAction * m_doc_selected_action;
19690
bd1369a2a651 add extra action for interrupting with Ctrl-C (bug #44204)
Torsten <ttl@justmail.de>
parents: 19303
diff changeset
160
bd1369a2a651 add extra action for interrupting with Ctrl-C (bug #44204)
Torsten <ttl@justmail.de>
parents: 19303
diff changeset
161 QAction *_interrupt_action;
20987
f99cbd86a0f9 Prevent closing GUI by Ctrl+D in terminal (bug #46661)
Torsten <ttl@justmail.de>
parents: 19943
diff changeset
162 QAction *_nop_action;
16639
ba808cd9d86c simplify QTerminal inheritance scheme
John W. Eaton <jwe@octave.org>
parents: 16570
diff changeset
163 };
15631
9712f29c97de Compiles again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
164
15651
845cebf281aa Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 15650
diff changeset
165 #endif // QTERMINAL_H