Mercurial > octave-nkf
annotate libgui/src/main-window.cc @ 16438:a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
* file-editor-interface.h
(file_editor_interface::handle_enter_debug_mode): Rename from
file_editor_interface::handle_entered_debug_mode. Change all uses.
(file_editor_interface::handle_exit_debug_mode): Rename from
file_editor_interface::handle_quit_debug_mode. Change all uses.
* file_editor.h, file_editor.cc
(file_editor::handle_enter_debug_mode): Rename from
file_editor::handle_entered_debug_mode. Change all uses.
(file_editor::handle_exit_debug_mode): Rename from
file_editor::handle_quit_debug_mode. Change all uses.
* main-window.h, main-window.cc (main_window::handle_enter_debugger):
Rename from main_window::handle_entered_debug_mode. Change all uses.
(main_window::handle_exit_debugger): Rename from
main_window::handle_quit_debug_mode. Change all uses.
(main_window::construct): Delete signal connection from
_octave_qt_event_listener::entered_debug_mode_signal to
main_window::handle_entered_debug_mode.
Delete signal connection from
_octave_qt_event_listener::quit_debug_mode_signal to
main_window::handle_quit_debug_mode.
Connect _octave_qt_link::enter_debugger_signal signal to
main_window::handle_enter_debugger.
Connect _octave_qt_link::exit_debugger_signal signal to
main_window::handle_exit_debugger.
* octave-qt-event-listener.h, octave-qt-event-listener.cc
(octave_qt_event_listener::entered_debug_mode,
octave_qt_event_listener::quit_debug_mode): Delete.
(octave_qt_event_listener::entered_debug_mode_signal,
octave_qt_event_listener::quit_debug_mode_signal): Delete signals.
* octave-qt-link.h, octave-qt-link.cc
(octave_qt_link::do_enter_debugger_event): Emit enter_debugger_signal.
(octave_qt_link::do_execute_in_debugger_event): New function.
(octave_qt_link::do_exit_debugger_event): Emit exit_debugger_signal.
(octave_qt_link::enter_debugger_signal,
octave_qt_link::exit_debugger_signal): New signals.
* octave-event-listener.h (octave_event_listener::entered_debug_mode,
octave_event_listener::quit_debug_mode): Delete.
* input.cc (octave_base_reader::octave_gets): Call
octave_link::exit_debugger_event if not debugging.
(execute_in_debugger_handler): Rename from exit_debugger_handler.
Change all uses.
Call octave_link::execute_in_debugger_event instead of
octave_link::exit_debugger_event.
* octave-link.h, octave-link.cc (octave_link::do_generate_events):
Don't call debugging mode functions here.
(octave_link::enter_debugger_event): Set instance->debugging to true.
(octave_link::execute_in_debugger_event): New function.
(octave_link::exit_debugger_event): Don't do anything unless
instance->debugging is true. Toggle instance->debugging.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 05 Apr 2013 03:04:56 -0400 |
parents | 919796a440c6 |
children | 7a2ee6ea7800 |
rev | line source |
---|---|
15204
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
1 /* |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
2 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
3 Copyright (C) 2011-2012 Jacob Dawid |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
4 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
5 This file is part of Octave. |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
6 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
7 Octave is free software; you can redistribute it and/or modify it |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
8 under the terms of the GNU General Public License as published by the |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
9 Free Software Foundation; either version 3 of the License, or (at your |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
10 option) any later version. |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
11 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
15 for more details. |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
16 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
17 You should have received a copy of the GNU General Public License |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
18 along with Octave; see the file COPYING. If not, see |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
19 <http://www.gnu.org/licenses/>. |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
20 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
21 */ |
13501 | 22 |
15286
ae9079bbc627
Add '#include <config.h>' to C++ files in libgui/src
Rik <rik@octave.org>
parents:
15274
diff
changeset
|
23 #ifdef HAVE_CONFIG_H |
ae9079bbc627
Add '#include <config.h>' to C++ files in libgui/src
Rik <rik@octave.org>
parents:
15274
diff
changeset
|
24 #include <config.h> |
ae9079bbc627
Add '#include <config.h>' to C++ files in libgui/src
Rik <rik@octave.org>
parents:
15274
diff
changeset
|
25 #endif |
ae9079bbc627
Add '#include <config.h>' to C++ files in libgui/src
Rik <rik@octave.org>
parents:
15274
diff
changeset
|
26 |
15257
7ee62f559a73
Fix compilation under Windows with GUI and LLVM enabled.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
15204
diff
changeset
|
27 #include <QApplication> |
7ee62f559a73
Fix compilation under Windows with GUI and LLVM enabled.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
15204
diff
changeset
|
28 #include <QLabel> |
13501 | 29 #include <QMenuBar> |
30 #include <QMenu> | |
31 #include <QAction> | |
32 #include <QSettings> | |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
33 #include <QStyle> |
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
34 #include <QToolBar> |
13501 | 35 #include <QDesktopServices> |
16391
a695ee2dc17e
* main-window.cc: Include <QDesktopWidget>
John W. Eaton <jwe@octave.org>
parents:
16386
diff
changeset
|
36 #include <QDesktopWidget> |
13501 | 37 #include <QFileDialog> |
13626
cc90c62ada21
Removed terminal, instead now using QPlainTextEdit, which looks much nicer and is not that error-prone...
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13620
diff
changeset
|
38 #include <QMessageBox> |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
39 #include <QIcon> |
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
40 |
16290
d07aeecb2d22
build: Add more #ifdefs to build GUI when Qscintilla is not present.
Rik <rik@octave.org>
parents:
16176
diff
changeset
|
41 #ifdef HAVE_QSCINTILLA |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
42 #include "file-editor.h" |
16290
d07aeecb2d22
build: Add more #ifdefs to build GUI when Qscintilla is not present.
Rik <rik@octave.org>
parents:
16176
diff
changeset
|
43 #endif |
14707
674740c44c09
Changed various files to matche file naming conventions.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14703
diff
changeset
|
44 #include "main-window.h" |
674740c44c09
Changed various files to matche file naming conventions.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14703
diff
changeset
|
45 #include "settings-dialog.h" |
13501 | 46 |
15420
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15404
diff
changeset
|
47 #include "builtins.h" |
15404
f52a62a6db3a
eliminate copy and paste copyright info in GUI about info box
John W. Eaton <jwe@octave.org>
parents:
15402
diff
changeset
|
48 #include "defaults.h" |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
49 #include "load-save.h" |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
50 #include "toplev.h" |
15404
f52a62a6db3a
eliminate copy and paste copyright info in GUI about info box
John W. Eaton <jwe@octave.org>
parents:
15402
diff
changeset
|
51 #include "version.h" |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
52 |
16382
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
53 #include "cmd-edit.h" |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
54 #include "cmd-hist.h" |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
55 #include "oct-env.h" |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
56 |
15368
36ececf69385
avoid some GCC warnings in the libgui code
John W. Eaton <jwe@octave.org>
parents:
15367
diff
changeset
|
57 main_window::main_window (QWidget *p) |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
58 : QMainWindow (p) |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
59 { |
14599
97cb9286919c
Cleaned up code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14588
diff
changeset
|
60 // We have to set up all our windows, before we finally launch octave. |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
61 construct (); |
13501 | 62 } |
63 | |
14709
f50591409306
Started to rename class names and methods from camel case to underscore-
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14707
diff
changeset
|
64 main_window::~main_window () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
65 { |
15607
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
66 // Clean up all dynamically created objects to ensure they are |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
67 // deleted before this main_window is. Otherwise, some will be |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
68 // attached to a non-existent parent. |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
69 |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
70 if (_octave_qt_event_listener) |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
71 delete _octave_qt_event_listener; |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
72 |
16421
40d1ddca4db5
improve use of octave_link
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
73 octave_link::connect_link (0); |
40d1ddca4db5
improve use of octave_link
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
74 delete _octave_qt_link; |
40d1ddca4db5
improve use of octave_link
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
75 |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
76 #ifdef HAVE_QSCINTILLA |
15607
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
77 if (_file_editor) |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
78 delete _file_editor; |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
79 #endif |
15607
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
80 |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
81 if (_terminal_dock_widget) |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
82 delete _terminal_dock_widget; |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
83 |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
84 if (_status_bar) |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
85 delete _status_bar; |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
86 |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
87 if (_documentation_dock_widget) |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
88 delete _documentation_dock_widget; |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
89 |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
90 if (_files_dock_widget) |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
91 delete _files_dock_widget; |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
92 |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
93 if (_history_dock_widget) |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
94 delete _history_dock_widget; |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
95 |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
96 if (_workspace_view) |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
97 delete _workspace_view; |
13501 | 98 } |
99 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
100 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
101 main_window::new_file () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
102 { |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
103 #ifdef HAVE_QSCINTILLA |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
104 _file_editor->request_new_file (); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
105 #endif |
13501 | 106 } |
107 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
108 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
109 main_window::open_file () |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
110 { |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
111 #ifdef HAVE_QSCINTILLA |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
112 _file_editor->request_open_file (); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
113 #endif |
14875
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
114 } |
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
115 |
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
116 void |
15300
fd27e10b9b05
pass QString by const reference instead of value
John W. Eaton <jwe@octave.org>
parents:
15286
diff
changeset
|
117 main_window::open_file (const QString& file_name) |
14875
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
118 { |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
119 #ifdef HAVE_QSCINTILLA |
14875
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
120 _file_editor->request_open_file (file_name); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
121 #endif |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
122 } |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
123 |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
124 void |
15300
fd27e10b9b05
pass QString by const reference instead of value
John W. Eaton <jwe@octave.org>
parents:
15286
diff
changeset
|
125 main_window::report_status_message (const QString& statusMessage) |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
126 { |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
127 _status_bar->showMessage (statusMessage, 1000); |
13501 | 128 } |
129 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
130 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
131 main_window::handle_save_workspace_request () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
132 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
133 QString selectedFile = |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
134 QFileDialog::getSaveFileName (this, tr ("Save Workspace As"), |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
135 resource_manager::get_home_path ()); |
14824
9c0959a1dc7b
Not attempint to save workspace when no filename provided.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14814
diff
changeset
|
136 if (!selectedFile.isEmpty ()) |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
137 octave_link::post_event (this, &main_window::save_workspace_callback, |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
138 selectedFile.toStdString ()); |
13501 | 139 } |
140 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
141 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
142 main_window::handle_load_workspace_request () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
143 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
144 QString selectedFile = |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
145 QFileDialog::getOpenFileName (this, tr ("Load Workspace"), |
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
146 resource_manager::get_home_path ()); |
14682
9ea75ea686b5
Allowing nested dock widgets and fixed small bug in loading a workspace.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14681
diff
changeset
|
147 if (!selectedFile.isEmpty ()) |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
148 octave_link::post_event (this, &main_window::load_workspace_callback, |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
149 selectedFile.toStdString ()); |
13501 | 150 } |
151 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
152 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
153 main_window::handle_clear_workspace_request () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
154 { |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
155 octave_link::post_event (this, &main_window::clear_workspace_callback); |
13501 | 156 } |
157 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
158 void |
16431
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
159 main_window::handle_clear_history_request (void) |
14814
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
160 { |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
161 octave_link::post_event (this, &main_window::clear_history_callback); |
14814
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
162 } |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
163 |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
164 void |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
165 main_window::handle_command_double_clicked (const QString&) |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
166 { |
15992
c4c46e1a086b
gui: switch to console when running an editor file or a command from history
Torsten <ttl@justmail.de>
parents:
15989
diff
changeset
|
167 focus_command_window (); |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
168 } |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
169 |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
170 void |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
171 main_window::open_online_documentation_page () |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
172 { |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
173 QDesktopServices::openUrl (QUrl ("http://gnu.org/software/octave/doc/interpreter")); |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
174 } |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
175 |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
176 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
177 main_window::open_bug_tracker_page () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
178 { |
15044
b7b1ffc88086
Update urls to Agora and bug tracker
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15041
diff
changeset
|
179 QDesktopServices::openUrl (QUrl ("http://bugs.octave.org")); |
13501 | 180 } |
181 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
182 void |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
183 main_window::open_octave_forge_page () |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
184 { |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
185 QDesktopServices::openUrl (QUrl ("http://octave.sourceforge.net/")); |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
186 } |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
187 |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
188 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
189 main_window::open_agora_page () |
13533
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
190 { |
15044
b7b1ffc88086
Update urls to Agora and bug tracker
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15041
diff
changeset
|
191 QDesktopServices::openUrl (QUrl ("http://agora.octave.org/")); |
13533
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
192 } |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
193 |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
194 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
195 main_window::process_settings_dialog_request () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
196 { |
14709
f50591409306
Started to rename class names and methods from camel case to underscore-
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14707
diff
changeset
|
197 settings_dialog *settingsDialog = new settings_dialog (this); |
15274
c5d09a57ceb2
provide buttons for the settings dialog (bug #36981)
Torsten <ttl@justmail.de>
parents:
15257
diff
changeset
|
198 int change_settings = settingsDialog->exec (); |
c5d09a57ceb2
provide buttons for the settings dialog (bug #36981)
Torsten <ttl@justmail.de>
parents:
15257
diff
changeset
|
199 if (change_settings == QDialog::Accepted) |
c5d09a57ceb2
provide buttons for the settings dialog (bug #36981)
Torsten <ttl@justmail.de>
parents:
15257
diff
changeset
|
200 { |
c5d09a57ceb2
provide buttons for the settings dialog (bug #36981)
Torsten <ttl@justmail.de>
parents:
15257
diff
changeset
|
201 settingsDialog->write_changed_settings (); |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
202 QSettings *settings = resource_manager::get_settings (); |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
203 if (settings) |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
204 emit settings_changed (settings); |
15274
c5d09a57ceb2
provide buttons for the settings dialog (bug #36981)
Torsten <ttl@justmail.de>
parents:
15257
diff
changeset
|
205 } |
14586
8e9823066dad
Fixed bug with not correctly syncing settings.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14308
diff
changeset
|
206 delete settingsDialog; |
14588
fa52c6e84ae0
Added controls and settings for changing the terminal font.
"Israel Herraiz <israel.herraiz@upm.es>"
parents:
14586
diff
changeset
|
207 } |
fa52c6e84ae0
Added controls and settings for changing the terminal font.
"Israel Herraiz <israel.herraiz@upm.es>"
parents:
14586
diff
changeset
|
208 |
15914
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
209 |
14588
fa52c6e84ae0
Added controls and settings for changing the terminal font.
"Israel Herraiz <israel.herraiz@upm.es>"
parents:
14586
diff
changeset
|
210 void |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
211 main_window::notice_settings (const QSettings *settings) |
14588
fa52c6e84ae0
Added controls and settings for changing the terminal font.
"Israel Herraiz <israel.herraiz@upm.es>"
parents:
14586
diff
changeset
|
212 { |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
213 // QSettings pointer is checked before emitting. |
14998
de3a318128f2
Added support for changing the terminal cursor and the cursor blinking.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14996
diff
changeset
|
214 |
15787
b081fbe80174
provide separate icons for gui's floating widgets
Torsten <ttl@justmail.de>
parents:
15758
diff
changeset
|
215 // the widget's icons (when floating) |
15914
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
216 QString icon_set = settings->value ("DockWidgets/widget_icon_set","NONE"). |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
217 toString (); |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
218 static struct |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
219 { |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
220 QString name; |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
221 QString path; |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
222 } |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
223 widget_icon_data[] = |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
224 { // array of possible icon sets (name, path (complete for NONE)) |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
225 // the first entry here is the default! |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
226 {"NONE", ":/actions/icons/logo.png"}, |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
227 {"GRAPHIC", ":/actions/icons/graphic_logo_"}, |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
228 {"LETTER", ":/actions/icons/letter_logo_"}, |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
229 {"", ""} // end marker has empty name |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
230 }; |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
231 int count = 0; |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
232 int icon_set_found = 0; // default |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
233 while (!widget_icon_data[count].name.isEmpty ()) |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
234 { // while not end of data |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
235 if (widget_icon_data[count].name == icon_set) |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
236 { // data of desired icon set found |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
237 icon_set_found = count; |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
238 break; |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
239 } |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
240 count++; |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
241 } |
15787
b081fbe80174
provide separate icons for gui's floating widgets
Torsten <ttl@justmail.de>
parents:
15758
diff
changeset
|
242 QString icon; |
b081fbe80174
provide separate icons for gui's floating widgets
Torsten <ttl@justmail.de>
parents:
15758
diff
changeset
|
243 foreach (QObject *obj, children ()) |
b081fbe80174
provide separate icons for gui's floating widgets
Torsten <ttl@justmail.de>
parents:
15758
diff
changeset
|
244 { |
b081fbe80174
provide separate icons for gui's floating widgets
Torsten <ttl@justmail.de>
parents:
15758
diff
changeset
|
245 QString name = obj->objectName (); |
b081fbe80174
provide separate icons for gui's floating widgets
Torsten <ttl@justmail.de>
parents:
15758
diff
changeset
|
246 if (obj->inherits("QDockWidget") && ! name.isEmpty ()) |
b081fbe80174
provide separate icons for gui's floating widgets
Torsten <ttl@justmail.de>
parents:
15758
diff
changeset
|
247 { // if children is a dockwidget with a name |
b081fbe80174
provide separate icons for gui's floating widgets
Torsten <ttl@justmail.de>
parents:
15758
diff
changeset
|
248 QDockWidget *widget = qobject_cast<QDockWidget *> (obj); |
15914
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
249 icon = widget_icon_data[icon_set_found].path; // prefix or octave-logo |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
250 if (widget_icon_data[icon_set_found].name != "NONE") |
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
251 icon = icon + name + ".png"; // add widget name and ext. |
15787
b081fbe80174
provide separate icons for gui's floating widgets
Torsten <ttl@justmail.de>
parents:
15758
diff
changeset
|
252 widget->setWindowIcon (QIcon (icon)); |
b081fbe80174
provide separate icons for gui's floating widgets
Torsten <ttl@justmail.de>
parents:
15758
diff
changeset
|
253 } |
b081fbe80174
provide separate icons for gui's floating widgets
Torsten <ttl@justmail.de>
parents:
15758
diff
changeset
|
254 } |
b081fbe80174
provide separate icons for gui's floating widgets
Torsten <ttl@justmail.de>
parents:
15758
diff
changeset
|
255 |
15164
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
256 resource_manager::update_network_settings (); |
13501 | 257 } |
258 | |
15914
85f9aca30c76
gui: reorganized handling of different icons for dock widgets
Torsten <ttl@justmail.de>
parents:
15900
diff
changeset
|
259 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
260 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
261 main_window::prepare_for_quit () |
14693
c952f1e35e50
Added patch from Marco Atzeri for QTerminal to build with cygwin. Removed some compiler warnings.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14692
diff
changeset
|
262 { |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
263 write_settings (); |
14693
c952f1e35e50
Added patch from Marco Atzeri for QTerminal to build with cygwin. Removed some compiler warnings.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14692
diff
changeset
|
264 } |
c952f1e35e50
Added patch from Marco Atzeri for QTerminal to build with cygwin. Removed some compiler warnings.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14692
diff
changeset
|
265 |
c952f1e35e50
Added patch from Marco Atzeri for QTerminal to build with cygwin. Removed some compiler warnings.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14692
diff
changeset
|
266 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
267 main_window::reset_windows () |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
268 { |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
269 // TODO: Implement. |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
270 } |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
271 |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
272 void |
16350
d4b6ad43bc87
use direct callbacks instead to handle history and workspace list updates
John W. Eaton <jwe@octave.org>
parents:
16290
diff
changeset
|
273 main_window::update_workspace (void) |
d4b6ad43bc87
use direct callbacks instead to handle history and workspace list updates
John W. Eaton <jwe@octave.org>
parents:
16290
diff
changeset
|
274 { |
d4b6ad43bc87
use direct callbacks instead to handle history and workspace list updates
John W. Eaton <jwe@octave.org>
parents:
16290
diff
changeset
|
275 _workspace_view->model_changed (); |
d4b6ad43bc87
use direct callbacks instead to handle history and workspace list updates
John W. Eaton <jwe@octave.org>
parents:
16290
diff
changeset
|
276 } |
d4b6ad43bc87
use direct callbacks instead to handle history and workspace list updates
John W. Eaton <jwe@octave.org>
parents:
16290
diff
changeset
|
277 |
d4b6ad43bc87
use direct callbacks instead to handle history and workspace list updates
John W. Eaton <jwe@octave.org>
parents:
16290
diff
changeset
|
278 void |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
279 main_window::change_directory (const QString& dir) |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
280 { |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
281 // Remove existing entry, if any, then add new directory at top and |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
282 // mark it as the current directory. Finally, update the file list |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
283 // widget. |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
284 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
285 int index = _current_directory_combo_box->findText (dir); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
286 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
287 if (index >= 0) |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
288 _current_directory_combo_box->removeItem (index); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
289 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
290 _current_directory_combo_box->insertItem (0, dir); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
291 _current_directory_combo_box->setCurrentIndex (0); |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
292 |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
293 _files_dock_widget->display_directory (dir); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
294 } |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
295 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
296 void |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
297 main_window::browse_for_directory (void) |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
298 { |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
299 QString dir = |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
300 QFileDialog::getExistingDirectory (this, tr ("Set working directory")); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
301 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
302 if (! dir.isEmpty ()) |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
303 octave_link::post_event (this, |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
304 &main_window::change_directory_callback, |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
305 dir.toStdString ()); |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
306 } |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
307 |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
308 void |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
309 main_window::set_current_working_directory (const QString& dir) |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
310 { |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
311 // Change to dir if it is an existing directory. |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
312 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
313 QString xdir = dir.isEmpty () ? "." : dir; |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
314 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
315 QFileInfo fileInfo (xdir); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
316 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
317 if (fileInfo.exists () && fileInfo.isDir ()) |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
318 octave_link::post_event (this, &main_window::change_directory_callback, |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
319 xdir.toStdString ()); |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
320 } |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
321 |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
322 void |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
323 main_window::change_directory_up (void) |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
324 { |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
325 QDir dir (".."); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
326 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
327 set_current_working_directory (dir.absolutePath ()); |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
328 } |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
329 |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
330 // Slot that is called if return is pressed in the line edit of the |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
331 // combobox to change to a new directory or a directory that is already |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
332 // in the drop down list. |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
333 |
15626
1cc10ce368ea
enable entering a new directory in the current directory combobox
Torsten <ttl@justmail.de>
parents:
15607
diff
changeset
|
334 void |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
335 main_window::accept_directory_line_edit (void) |
15626
1cc10ce368ea
enable entering a new directory in the current directory combobox
Torsten <ttl@justmail.de>
parents:
15607
diff
changeset
|
336 { |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
337 // Get new directory name, and change to it if it is new. Otherwise, |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
338 // the combo box will triggers the "activated" signal to change to the |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
339 // directory. |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
340 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
341 QString dir = _current_directory_line_edit->text (); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
342 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
343 int index = _current_directory_combo_box->findText (dir); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
344 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
345 if (index < 0) |
15626
1cc10ce368ea
enable entering a new directory in the current directory combobox
Torsten <ttl@justmail.de>
parents:
15607
diff
changeset
|
346 set_current_working_directory (dir); |
1cc10ce368ea
enable entering a new directory in the current directory combobox
Torsten <ttl@justmail.de>
parents:
15607
diff
changeset
|
347 } |
1cc10ce368ea
enable entering a new directory in the current directory combobox
Torsten <ttl@justmail.de>
parents:
15607
diff
changeset
|
348 |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
349 void |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
350 main_window::focus_command_window () |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
351 { |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
352 if (!_terminal_dock_widget->isVisible ()) |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
353 { |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
354 _terminal_dock_widget->setVisible (true); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
355 } |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
356 |
14813
2de56de8953a
* main-window: Fixed bug with command window not coming up on Ctrl+0.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14812
diff
changeset
|
357 _terminal_dock_widget->setFocus (); |
2de56de8953a
* main-window: Fixed bug with command window not coming up on Ctrl+0.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14812
diff
changeset
|
358 _terminal_dock_widget->activateWindow (); |
2de56de8953a
* main-window: Fixed bug with command window not coming up on Ctrl+0.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14812
diff
changeset
|
359 _terminal_dock_widget->raise (); |
2de56de8953a
* main-window: Fixed bug with command window not coming up on Ctrl+0.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14812
diff
changeset
|
360 |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
361 _terminal_dock_widget->widget ()->setFocus (); |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
362 _terminal_dock_widget->widget ()->activateWindow (); |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
363 _terminal_dock_widget->widget ()->raise (); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
364 } |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
365 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
366 void |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
367 main_window::focus_command_history () |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
368 { |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
369 if (!_history_dock_widget->isVisible ()) |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
370 { |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
371 _history_dock_widget->setVisible (true); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
372 } |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
373 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
374 _history_dock_widget->setFocus (); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
375 _history_dock_widget->activateWindow (); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
376 _history_dock_widget->raise (); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
377 } |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
378 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
379 void |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
380 main_window::focus_current_directory () |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
381 { |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
382 if (!_files_dock_widget->isVisible ()) |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
383 { |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
384 _files_dock_widget->setVisible (true); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
385 } |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
386 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
387 _files_dock_widget->setFocus (); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
388 _files_dock_widget->activateWindow (); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
389 _files_dock_widget->raise (); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
390 } |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
391 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
392 void |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
393 main_window::focus_workspace () |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
394 { |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
395 if (!_workspace_view->isVisible ()) |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
396 { |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
397 _workspace_view->setVisible (true); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
398 } |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
399 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
400 _workspace_view->setFocus (); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
401 _workspace_view->activateWindow (); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
402 _workspace_view->raise (); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
403 } |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
404 |
15980
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
405 |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
406 void |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
407 main_window::focus_editor () |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
408 { |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
409 #ifdef HAVE_QSCINTILLA |
15980
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
410 // call own function of editor in order to set focus to the current editor tab |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
411 _file_editor->set_focus (); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
412 #endif |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
413 } |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
414 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
415 void |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
416 main_window::focus_documentation () |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
417 { |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
418 if (!_documentation_dock_widget->isVisible ()) |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
419 { |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
420 _documentation_dock_widget->setVisible (true); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
421 } |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
422 |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
423 _documentation_dock_widget->setFocus (); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
424 _documentation_dock_widget->activateWindow (); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
425 _documentation_dock_widget->raise (); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
426 } |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
427 |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
428 void |
15980
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
429 main_window::handle_command_window_visible (bool visible) |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
430 { |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
431 // if widget is changed to visible and is not floating |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
432 if (visible && !_terminal_dock_widget->isFloating ()) |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
433 focus_command_window (); |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
434 } |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
435 |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
436 void |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
437 main_window::handle_command_history_visible (bool visible) |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
438 { |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
439 // if changed to visible and widget is not floating |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
440 if (visible && !_history_dock_widget->isFloating ()) |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
441 focus_command_history (); |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
442 } |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
443 |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
444 void |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
445 main_window::handle_current_directory_visible (bool visible) |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
446 { |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
447 // if changed to visible and widget is not floating |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
448 if (visible && !_files_dock_widget->isFloating ()) |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
449 focus_current_directory (); |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
450 } |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
451 |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
452 void |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
453 main_window::handle_workspace_visible (bool visible) |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
454 { |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
455 // if changed to visible and widget is not floating |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
456 if (visible && !_workspace_view->isFloating ()) |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
457 focus_workspace (); |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
458 } |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
459 |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
460 void |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
461 main_window::handle_editor_visible (bool visible) |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
462 { |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
463 // if changed to visible and widget is not floating |
15983
200dab2eecd4
gui: complete changeset 6c0fce0632a4 with #ifdef HAVE_QSCINTILLA for editor
Torsten <ttl@justmail.de>
parents:
15980
diff
changeset
|
464 #ifdef HAVE_QSCINTILLA |
15980
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
465 if (visible && !_file_editor->isFloating ()) |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
466 focus_editor (); |
15983
200dab2eecd4
gui: complete changeset 6c0fce0632a4 with #ifdef HAVE_QSCINTILLA for editor
Torsten <ttl@justmail.de>
parents:
15980
diff
changeset
|
467 #endif |
15980
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
468 } |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
469 |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
470 void |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
471 main_window::handle_documentation_visible (bool visible) |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
472 { |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
473 // if changed to visible and widget is not floating |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
474 if (visible && !_documentation_dock_widget->isFloating ()) |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
475 focus_documentation (); |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
476 } |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
477 |
6c0fce0632a4
gui: set keyboard focus when switching between dock widgets (bug #36957)
Torsten <ttl@justmail.de>
parents:
15914
diff
changeset
|
478 void |
16438
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
479 main_window::handle_enter_debugger (void) |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
480 { |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
481 setWindowTitle ("Octave (Debugging)"); |
16438
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
482 |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
483 _debug_continue->setEnabled (true); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
484 _debug_step_into->setEnabled (true); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
485 _debug_step_over->setEnabled (true); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
486 _debug_step_out->setEnabled (true); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
487 _debug_quit->setEnabled (true); |
16438
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
488 |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
489 #ifdef HAVE_QSCINTILLA |
16438
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
490 _file_editor->handle_enter_debug_mode (); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
491 #endif |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
492 } |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
493 |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
494 void |
16438
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
495 main_window::handle_exit_debugger (void) |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
496 { |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
497 setWindowTitle ("Octave"); |
16438
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
498 |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
499 _debug_continue->setEnabled (false); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
500 _debug_step_into->setEnabled (false); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
501 _debug_step_over->setEnabled (false); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
502 _debug_step_out->setEnabled (false); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
503 _debug_quit->setEnabled (false); |
16438
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
504 |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
505 #ifdef HAVE_QSCINTILLA |
16438
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
506 _file_editor->handle_exit_debug_mode (); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
507 #endif |
14752
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
508 } |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
509 |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
510 void |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
511 main_window::debug_continue () |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
512 { |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
513 octave_link::post_event (this, &main_window::debug_continue_callback); |
14752
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
514 } |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
515 |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
516 void |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
517 main_window::debug_step_into () |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
518 { |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
519 octave_link::post_event (this, &main_window::debug_step_into_callback); |
14752
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
520 } |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
521 |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
522 void |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
523 main_window::debug_step_over () |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
524 { |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
525 octave_link::post_event (this, &main_window::debug_step_over_callback); |
14752
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
526 } |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
527 |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
528 void |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
529 main_window::debug_step_out () |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
530 { |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
531 octave_link::post_event (this, &main_window::debug_step_out_callback); |
14752
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
532 } |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
533 |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
534 void |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
535 main_window::debug_quit () |
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
536 { |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
537 octave_link::post_event (this, &main_window::debug_quit_callback); |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
538 } |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
539 |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
540 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
541 main_window::show_about_octave () |
13548
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
542 { |
15404
f52a62a6db3a
eliminate copy and paste copyright info in GUI about info box
John W. Eaton <jwe@octave.org>
parents:
15402
diff
changeset
|
543 QString message = OCTAVE_STARTUP_MESSAGE; |
13548
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
544 |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
545 QMessageBox::about (this, tr ("About Octave"), message); |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
546 } |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
547 |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
548 void |
15368
36ececf69385
avoid some GCC warnings in the libgui code
John W. Eaton <jwe@octave.org>
parents:
15367
diff
changeset
|
549 main_window::closeEvent (QCloseEvent *e) |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
550 { |
15368
36ececf69385
avoid some GCC warnings in the libgui code
John W. Eaton <jwe@octave.org>
parents:
15367
diff
changeset
|
551 e->ignore (); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
552 octave_link::post_event (this, &main_window::exit_callback); |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
553 } |
13501 | 554 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
555 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
556 main_window::read_settings () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
557 { |
15164
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
558 QSettings *settings = resource_manager::get_settings (); |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
559 if (!settings) |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
560 { |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
561 qDebug("Error: QSettings pointer from resource manager is NULL."); |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
562 return; |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
563 } |
15164
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
564 |
15348
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
565 restoreState (settings->value ("MainWindow/windowState").toByteArray ()); |
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
566 settings->beginGroup ("DockWidgets"); |
15552
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
567 // restoring the geometry of all dock-widgets |
15348
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
568 foreach (QObject *obj, children ()) |
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
569 { |
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
570 QString name = obj->objectName (); |
15552
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
571 if (obj->inherits("QDockWidget") && ! name.isEmpty ()) |
15348
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
572 { |
15552
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
573 QDockWidget *widget = qobject_cast<QDockWidget *> (obj); |
15348
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
574 QVariant val = settings->value (name); |
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
575 widget->restoreGeometry (val.toByteArray ()); |
15552
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
576 bool floating = settings->value (name+"Floating",false).toBool (); |
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
577 bool visible = settings->value (name+"Visible",true).toBool (); |
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
578 if (floating) |
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
579 widget->setWindowFlags (Qt::Window); // if floating, make window from widget |
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
580 widget->setVisible (visible); // make widget visible if desired (setWindowFlags hides widget) |
15348
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
581 } |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
582 } |
15348
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
583 settings->endGroup(); |
13537
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
584 restoreGeometry (settings->value ("MainWindow/geometry").toByteArray ()); |
15465
ded4ce76ee7a
save and restore the list of recently visited directories
Torsten <ttl@justmail.de>
parents:
15426
diff
changeset
|
585 // restore the list of the last directories |
ded4ce76ee7a
save and restore the list of recently visited directories
Torsten <ttl@justmail.de>
parents:
15426
diff
changeset
|
586 QStringList curr_dirs = settings->value ("MainWindow/current_directory_list").toStringList (); |
ded4ce76ee7a
save and restore the list of recently visited directories
Torsten <ttl@justmail.de>
parents:
15426
diff
changeset
|
587 for (int i=0; i < curr_dirs.size (); i++) |
ded4ce76ee7a
save and restore the list of recently visited directories
Torsten <ttl@justmail.de>
parents:
15426
diff
changeset
|
588 { |
ded4ce76ee7a
save and restore the list of recently visited directories
Torsten <ttl@justmail.de>
parents:
15426
diff
changeset
|
589 _current_directory_combo_box->addItem (curr_dirs.at (i)); |
ded4ce76ee7a
save and restore the list of recently visited directories
Torsten <ttl@justmail.de>
parents:
15426
diff
changeset
|
590 } |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
591 emit settings_changed (settings); |
13501 | 592 } |
593 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
594 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
595 main_window::write_settings () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
596 { |
15164
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
597 QSettings *settings = resource_manager::get_settings (); |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
598 if (!settings) |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
599 { |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
600 qDebug("Error: QSettings pointer from resource manager is NULL."); |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
601 return; |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
602 } |
15164
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
603 |
13537
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
604 settings->setValue ("MainWindow/geometry", saveGeometry ()); |
15348
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
605 settings->beginGroup ("DockWidgets"); |
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
606 // saving the geometry of all widgets |
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
607 foreach (QObject *obj, children()) |
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
608 { |
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
609 QString name = obj->objectName (); |
15552
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
610 if (obj->inherits ("QDockWidget") && ! name.isEmpty ()) |
15348
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
611 { |
15552
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
612 QDockWidget *widget = qobject_cast<QDockWidget *> (obj); |
15348
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
613 settings->setValue (name, widget->saveGeometry ()); |
15552
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
614 bool floating = widget->isFloating (); |
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
615 bool visible = widget->isVisible (); |
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
616 settings->setValue (name+"Floating",floating); // store floating state |
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
617 settings->setValue (name+"Visible",visible); // store visibility |
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
618 if (floating) |
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
619 widget->setWindowFlags(Qt::Widget); // if floating, recover the widget state such that the widget's |
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
620 } // state is correctly saved by the saveSate () below |
15348
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
621 } |
450fedd44176
correctly restore the size of all dock-widgets when maximized
Torsten <ttl@justmail.de>
parents:
15300
diff
changeset
|
622 settings->endGroup(); |
15552
bbbb89cc338f
make a floating widget behave like a normal window (bug #37190)
Torsten <ttl@justmail.de>
parents:
15465
diff
changeset
|
623 settings->setValue ("MainWindow/windowState", saveState ()); |
15465
ded4ce76ee7a
save and restore the list of recently visited directories
Torsten <ttl@justmail.de>
parents:
15426
diff
changeset
|
624 // write the list of recent used directories |
ded4ce76ee7a
save and restore the list of recently visited directories
Torsten <ttl@justmail.de>
parents:
15426
diff
changeset
|
625 QStringList curr_dirs; |
ded4ce76ee7a
save and restore the list of recently visited directories
Torsten <ttl@justmail.de>
parents:
15426
diff
changeset
|
626 for (int i=0; i<_current_directory_combo_box->count (); i++) |
ded4ce76ee7a
save and restore the list of recently visited directories
Torsten <ttl@justmail.de>
parents:
15426
diff
changeset
|
627 { |
ded4ce76ee7a
save and restore the list of recently visited directories
Torsten <ttl@justmail.de>
parents:
15426
diff
changeset
|
628 curr_dirs.append (_current_directory_combo_box->itemText (i)); |
ded4ce76ee7a
save and restore the list of recently visited directories
Torsten <ttl@justmail.de>
parents:
15426
diff
changeset
|
629 } |
ded4ce76ee7a
save and restore the list of recently visited directories
Torsten <ttl@justmail.de>
parents:
15426
diff
changeset
|
630 settings->setValue ("MainWindow/current_directory_list",curr_dirs); |
14694
ea11c9d8aa47
Calling qApp->quit () via QMetaObject::invoke caused a segfault, now exits cleanly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14693
diff
changeset
|
631 settings->sync (); |
13501 | 632 } |
633 | |
15987
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
634 |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
635 // Connecting the signals emitted when the visibility of a widget changes. |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
636 // This has to be done after the window is shown (see octave-gui.cc) |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
637 void |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
638 main_window::connect_visibility_changed () |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
639 { |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
640 connect (_terminal_dock_widget, SIGNAL (visibilityChanged (bool)), |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
641 this, SLOT (handle_command_window_visible (bool))); |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
642 connect (_workspace_view, SIGNAL (visibilityChanged (bool)), |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
643 this, SLOT (handle_workspace_visible (bool))); |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
644 connect (_history_dock_widget, SIGNAL (visibilityChanged (bool)), |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
645 this, SLOT (handle_command_history_visible (bool))); |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
646 connect (_files_dock_widget, SIGNAL (visibilityChanged (bool)), |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
647 this, SLOT (handle_current_directory_visible (bool))); |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
648 #ifdef HAVE_QSCINTILLA |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
649 connect (_file_editor, SIGNAL (visibilityChanged (bool)), |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
650 this, SLOT (handle_editor_visible (bool))); |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
651 #endif |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
652 connect (_documentation_dock_widget, SIGNAL (visibilityChanged (bool)), |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
653 this, SLOT (handle_documentation_visible (bool))); |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
654 } |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
655 |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
656 |
47a4c92924a7
gui: prevent error messages at start-up (regression from changeset 6c0fce0632a4)
Torsten <ttl@justmail.de>
parents:
15983
diff
changeset
|
657 // Main subroutine of the constructor |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
658 void |
14709
f50591409306
Started to rename class names and methods from camel case to underscore-
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14707
diff
changeset
|
659 main_window::construct () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
660 { |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
661 _closing = false; // flag for editor files when closed |
15081
d02b229ce693
Cleaned up icon positions. Removed icon loading from resource manager.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15055
diff
changeset
|
662 setWindowIcon (QIcon(":/actions/icons/logo.png")); |
13501 | 663 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
664 // Setup dockable widgets and the status bar. |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
665 _workspace_view = new workspace_view (this); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
666 _workspace_view->setStatusTip (tr ("View the variables in the active workspace.")); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
667 _history_dock_widget = new history_dock_widget (this); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
668 _history_dock_widget->setStatusTip (tr ("Browse and search the command history.")); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
669 _files_dock_widget = new files_dock_widget (this); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
670 _files_dock_widget->setStatusTip (tr ("Browse your files.")); |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
671 _documentation_dock_widget= new documentation_dock_widget (this); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
672 _documentation_dock_widget->setStatusTip (tr ("See the documentation for help.")); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
673 _status_bar = new QStatusBar (this); |
13501 | 674 |
15626
1cc10ce368ea
enable entering a new directory in the current directory combobox
Torsten <ttl@justmail.de>
parents:
15607
diff
changeset
|
675 _current_directory_line_edit = new QLineEdit (this); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
676 _current_directory_combo_box = new QComboBox (this); |
15626
1cc10ce368ea
enable entering a new directory in the current directory combobox
Torsten <ttl@justmail.de>
parents:
15607
diff
changeset
|
677 _current_directory_combo_box->setFixedWidth (current_directory_width); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
678 _current_directory_combo_box->setEditable (true); |
15626
1cc10ce368ea
enable entering a new directory in the current directory combobox
Torsten <ttl@justmail.de>
parents:
15607
diff
changeset
|
679 // setLineEdit takes ownership -> no need to delete line_edit in ~main_window |
1cc10ce368ea
enable entering a new directory in the current directory combobox
Torsten <ttl@justmail.de>
parents:
15607
diff
changeset
|
680 _current_directory_combo_box->setLineEdit (_current_directory_line_edit); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
681 _current_directory_combo_box->setInsertPolicy (QComboBox::InsertAtTop); |
15626
1cc10ce368ea
enable entering a new directory in the current directory combobox
Torsten <ttl@justmail.de>
parents:
15607
diff
changeset
|
682 _current_directory_combo_box->setMaxVisibleItems (current_directory_max_visible); |
1cc10ce368ea
enable entering a new directory in the current directory combobox
Torsten <ttl@justmail.de>
parents:
15607
diff
changeset
|
683 _current_directory_combo_box->setMaxCount (current_directory_max_count); |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
684 |
15607
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
685 QToolButton *current_directory_tool_button = new QToolButton (this); |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
686 current_directory_tool_button->setIcon (QIcon(":/actions/icons/search.png")); |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
687 |
15607
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
688 QToolButton *current_directory_up_tool_button = new QToolButton (this); |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
689 current_directory_up_tool_button->setIcon (QIcon(":/actions/icons/up.png")); |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
690 |
13550
cd66481d55b0
Added close button to file editor, assorted subwindows after importance.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13549
diff
changeset
|
691 // Octave Terminal subwindow. |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
692 QTerminal *terminal = new QTerminal (this); |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
693 terminal->setObjectName ("OctaveTerminal"); |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
694 terminal->setFocusPolicy (Qt::StrongFocus); |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
695 _terminal_dock_widget = new terminal_dock_widget (terminal, this); |
13501 | 696 |
15607
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
697 // Create and set the central widget. QMainWindow takes ownership of |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
698 // the widget (pointer) so there is no need to delete the object upon |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
699 // destroying this main_window. |
14693
c952f1e35e50
Added patch from Marco Atzeri for QTerminal to build with cygwin. Removed some compiler warnings.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14692
diff
changeset
|
700 QWidget *dummyWidget = new QWidget (); |
14698
79c9a6d06590
Wrote SymbolInformation struct and refactored code that updates the symbol table.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14695
diff
changeset
|
701 dummyWidget->setObjectName ("CentralDummyWidget"); |
79c9a6d06590
Wrote SymbolInformation struct and refactored code that updates the symbol table.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14695
diff
changeset
|
702 dummyWidget->resize (10, 10); |
14693
c952f1e35e50
Added patch from Marco Atzeri for QTerminal to build with cygwin. Removed some compiler warnings.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14692
diff
changeset
|
703 dummyWidget->setSizePolicy (QSizePolicy::Minimum, QSizePolicy::Minimum); |
14698
79c9a6d06590
Wrote SymbolInformation struct and refactored code that updates the symbol table.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14695
diff
changeset
|
704 dummyWidget->hide (); |
79c9a6d06590
Wrote SymbolInformation struct and refactored code that updates the symbol table.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14695
diff
changeset
|
705 setCentralWidget (dummyWidget); |
14692
d6d250812c01
Made the terminal window dockable, too. Now the whole interface is fully dockable.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14690
diff
changeset
|
706 |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
707 #ifdef HAVE_QSCINTILLA |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15787
diff
changeset
|
708 _file_editor = new file_editor (this); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
709 #endif |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
710 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
711 QMenu *file_menu = menuBar ()->addMenu (tr ("&File")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
712 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
713 QMenu *new_menu = file_menu->addMenu(tr ("New")); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
714 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
715 QAction *new_script_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
716 = new_menu->addAction (QIcon(":/actions/icons/filenew.png"), tr ("Script")); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
717 new_script_action->setShortcut (QKeySequence::New); |
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
718 new_script_action->setShortcutContext (Qt::ApplicationShortcut); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
719 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
720 QAction *new_function_action = new_menu->addAction (tr ("Function")); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
721 new_function_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
722 QAction *new_class_action = new_menu->addAction (tr ("Class")); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
723 new_class_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
724 QAction *new_enumeration_action = new_menu->addAction (tr ("Enumeration")); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
725 new_enumeration_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
726 QAction *new_figure_action = new_menu->addAction (tr ("Figure")); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
727 new_figure_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
728 QAction *new_variable_action = new_menu->addAction (tr ("Variable")); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
729 new_variable_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
730 QAction *new_model_action = new_menu->addAction (tr ("Model")); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
731 new_model_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
732 QAction *new_gui_action = new_menu->addAction (tr ("GUI")); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
733 new_gui_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
734 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
735 QAction *open_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
736 = file_menu->addAction (QIcon(":/actions/icons/fileopen.png"), tr ("Open...")); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
737 open_action->setShortcut (QKeySequence::Open); |
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
738 open_action->setShortcutContext (Qt::ApplicationShortcut); |
15993
41471c02d51c
gui: show menu with recently used editor files also in file menu of main window
Torsten <ttl@justmail.de>
parents:
15992
diff
changeset
|
739 |
16290
d07aeecb2d22
build: Add more #ifdefs to build GUI when Qscintilla is not present.
Rik <rik@octave.org>
parents:
16176
diff
changeset
|
740 #ifdef HAVE_QSCINTILLA |
15993
41471c02d51c
gui: show menu with recently used editor files also in file menu of main window
Torsten <ttl@justmail.de>
parents:
15992
diff
changeset
|
741 file_menu->addMenu(_file_editor->get_mru_menu ()); |
16290
d07aeecb2d22
build: Add more #ifdefs to build GUI when Qscintilla is not present.
Rik <rik@octave.org>
parents:
16176
diff
changeset
|
742 #endif |
15993
41471c02d51c
gui: show menu with recently used editor files also in file menu of main window
Torsten <ttl@justmail.de>
parents:
15992
diff
changeset
|
743 |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
744 QAction *close_command_window_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
745 = file_menu->addAction (tr ("Close Command Window")); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
746 close_command_window_action->setShortcut (QKeySequence::Close); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
747 close_command_window_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
748 |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
749 file_menu->addSeparator (); ///// |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
750 |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
751 QAction *import_data_action |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
752 = file_menu->addAction (tr ("Import Data")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
753 import_data_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
754 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
755 QAction *save_workspace_action |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
756 = file_menu->addAction (tr ("Save Workspace As")); |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
757 |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
758 file_menu->addSeparator (); ///// |
13501 | 759 |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
760 QAction *preferences_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
761 = file_menu->addAction (QIcon(":/actions/icons/configure.png"), |
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
762 tr ("Preferences...")); |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
763 |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
764 file_menu->addSeparator (); ///// |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
765 |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
766 QAction *page_setup_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
767 = file_menu->addAction (tr ("Page Setup...")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
768 page_setup_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
769 QAction *print_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
770 = file_menu->addAction (tr ("Print")); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
771 print_action->setShortcut (QKeySequence::Print); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
772 print_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
773 QAction *print_selection_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
774 = file_menu->addAction (tr ("Print Selection...")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
775 print_selection_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
776 |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
777 file_menu->addSeparator (); ///// |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
778 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
779 QAction *exit_action = file_menu->addAction (tr ("Exit")); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
780 exit_action->setShortcut (QKeySequence::Quit); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
781 |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
782 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
783 QMenu *edit_menu = menuBar ()->addMenu (tr ("&Edit")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
784 QAction *undo_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
785 = edit_menu->addAction (QIcon(":/actions/icons/undo.png"), tr ("Undo")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
786 undo_action->setShortcut (QKeySequence::Undo); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
787 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
788 QAction *redo_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
789 = edit_menu->addAction (QIcon(":/actions/icons/redo.png"), tr ("Redo")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
790 redo_action->setShortcut (QKeySequence::Redo); |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
791 |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
792 edit_menu->addSeparator (); ///// |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
793 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
794 QAction *cut_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
795 = edit_menu->addAction (QIcon(":/actions/icons/editcut.png"), tr ("Cut")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
796 cut_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier + Qt::Key_X); |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
797 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
798 QAction *copy_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
799 = edit_menu->addAction (QIcon(":/actions/icons/editcopy.png"), tr ("Copy")); |
14757
ace446cda345
Changed copy-paste shortcuts from Ctrl-C/V to Ctrl-Shift-C/V, so that the Ctrl-C signal won't be catched by the terminal anymore.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14754
diff
changeset
|
800 copy_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier + Qt::Key_C); |
13532
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
801 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
802 QAction *paste_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
803 = edit_menu->addAction (QIcon(":/actions/icons/editpaste.png"), tr ("Paste")); |
14757
ace446cda345
Changed copy-paste shortcuts from Ctrl-C/V to Ctrl-Shift-C/V, so that the Ctrl-C signal won't be catched by the terminal anymore.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14754
diff
changeset
|
804 paste_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier + Qt::Key_V); |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
805 |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
806 QAction *paste_to_workspace_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
807 = edit_menu->addAction (tr ("Paste To Workspace...")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
808 paste_to_workspace_action->setEnabled (false); // TODO: Make this work. |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
809 |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
810 edit_menu->addSeparator (); ///// |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
811 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
812 QAction *select_all_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
813 = edit_menu->addAction (tr ("Select All")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
814 select_all_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
815 QAction *delete_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
816 = edit_menu->addAction (tr ("Delete")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
817 delete_action->setShortcut (Qt::Key_Delete); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
818 delete_action->setEnabled (false); // TODO: Make this work. |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
819 |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
820 edit_menu->addSeparator (); ///// |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
821 |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
822 QAction *find_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
823 = edit_menu->addAction (tr ("Find...")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
824 find_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
825 QAction *find_files_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
826 = edit_menu->addAction (tr ("Find Files...")); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
827 find_files_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
828 + Qt::Key_F); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
829 find_files_action->setEnabled (false); // TODO: Make this work. |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
830 |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
831 edit_menu->addSeparator (); ///// |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
832 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
833 QAction *clear_command_window_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
834 = edit_menu->addAction (tr ("Clear Command Window")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
835 clear_command_window_action->setEnabled (false); // TODO: Make this work. |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
836 QAction *clear_command_history |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
837 = edit_menu->addAction(tr ("Clear Command History")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
838 QAction * clear_workspace_action |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
839 = edit_menu->addAction (tr ("Clear Workspace")); |
13532
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
840 |
14752
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
841 _debug_menu = menuBar ()->addMenu (tr ("De&bug")); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
842 |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
843 _debug_step_over = _debug_menu->addAction (QIcon (":/actions/icons/db_step.png"), tr ("Step")); |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
844 _debug_step_over->setEnabled (false); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
845 #ifdef HAVE_QSCINTILLA |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
846 _file_editor->debug_menu ()->addAction (_debug_step_over); |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
847 _file_editor->toolbar ()->addAction (_debug_step_over); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
848 #endif |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
849 _debug_step_over->setShortcut (Qt::Key_F10); |
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
850 |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
851 _debug_step_into = _debug_menu->addAction (QIcon (":/actions/icons/db_step_in.png"), tr ("Step in")); |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
852 _debug_step_into->setEnabled (false); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
853 #ifdef HAVE_QSCINTILLA |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
854 _file_editor->debug_menu ()->addAction (_debug_step_into); |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
855 _file_editor->toolbar ()->addAction (_debug_step_into); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
856 #endif |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
857 _debug_step_into->setShortcut (Qt::Key_F11); |
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
858 |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
859 _debug_step_out = _debug_menu->addAction (QIcon (":/actions/icons/db_step_out.png"), tr ("Step out")); |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
860 _debug_step_out->setEnabled (false); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
861 #ifdef HAVE_QSCINTILLA |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
862 _file_editor->debug_menu ()->addAction (_debug_step_out); |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
863 _file_editor->toolbar ()->addAction (_debug_step_out); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
864 #endif |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
865 _debug_step_out->setShortcut (Qt::ShiftModifier + Qt::Key_F11); |
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
866 |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
867 _debug_continue = _debug_menu->addAction (QIcon (":/actions/icons/db_cont.png"), tr ("Continue")); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
868 _debug_continue->setEnabled (false); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
869 #ifdef HAVE_QSCINTILLA |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
870 _file_editor->debug_menu ()->addAction (_debug_continue); |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
871 _file_editor->toolbar ()->addAction (_debug_continue); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
872 #endif |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
873 _debug_continue->setShortcut (Qt::Key_F5); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
874 |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
875 _debug_menu->addSeparator (); ///// |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
876 #ifdef HAVE_QSCINTILLA |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
877 _file_editor->debug_menu ()->addSeparator (); ///// |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
878 #endif |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
879 |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
880 _debug_quit = _debug_menu->addAction (QIcon (":/actions/icons/db_stop.png"), tr ("Exit Debug Mode")); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
881 _debug_quit->setEnabled (false); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
882 #ifdef HAVE_QSCINTILLA |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
883 _file_editor->debug_menu ()->addAction (_debug_quit); |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
884 _file_editor->toolbar ()->addAction (_debug_quit); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
885 #endif |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
886 _debug_quit->setShortcut (Qt::ShiftModifier + Qt::Key_F5); |
14752
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
887 |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
888 //QMenu *parallelMenu = menuBar ()->addMenu (tr ("&Parallel")); |
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
889 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
890 QMenu * desktop_menu = menuBar ()->addMenu (tr ("&Desktop")); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
891 QAction * load_workspace_action = desktop_menu->addAction (tr ("Load workspace")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
892 |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
893 |
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
894 // Window menu |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
895 QMenu * window_menu = menuBar ()->addMenu (tr ("&Window")); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
896 QAction * show_command_window_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
897 = window_menu->addAction (tr ("Show Command Window")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
898 show_command_window_action->setCheckable (true); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
899 show_command_window_action->setShortcut (Qt::ControlModifier |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
900 + Qt::ShiftModifier + Qt::Key_0); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
901 show_command_window_action->setShortcutContext (Qt::ApplicationShortcut); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
902 QAction * show_history_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
903 = window_menu->addAction (tr ("Show Command History")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
904 show_history_action->setCheckable (true); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
905 show_history_action->setShortcut (Qt::ControlModifier |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
906 + Qt::ShiftModifier + Qt::Key_1); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
907 show_history_action->setShortcutContext (Qt::ApplicationShortcut); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
908 QAction * show_file_browser_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
909 = window_menu->addAction (tr ("Show Current Directory")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
910 show_file_browser_action->setCheckable (true); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
911 show_file_browser_action->setShortcut (Qt::ControlModifier |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
912 + Qt::ShiftModifier + Qt::Key_2); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
913 show_file_browser_action->setShortcutContext (Qt::ApplicationShortcut); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
914 QAction * show_workspace_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
915 = window_menu->addAction (tr ("Show Workspace")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
916 show_workspace_action->setCheckable (true); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
917 show_workspace_action->setShortcut (Qt::ControlModifier |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
918 + Qt::ShiftModifier + Qt::Key_3); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
919 show_workspace_action->setShortcutContext (Qt::ApplicationShortcut); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
920 QAction * show_editor_action = window_menu->addAction (tr ("Show Editor")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
921 show_editor_action->setCheckable (true); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
922 show_editor_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
923 + Qt::Key_4); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
924 show_editor_action->setShortcutContext (Qt::ApplicationShortcut); |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
925 QAction * show_documentation_action = window_menu->addAction (tr ("Show Documentation")); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
926 show_documentation_action->setCheckable (true); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
927 show_documentation_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
928 + Qt::Key_5); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
929 show_documentation_action->setShortcutContext (Qt::ApplicationShortcut); |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
930 window_menu->addSeparator (); ///// |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
931 |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
932 QAction * command_window_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
933 = window_menu->addAction (tr ("Command Window")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
934 command_window_action->setShortcut (Qt::ControlModifier + Qt::Key_0); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
935 command_window_action->setShortcutContext (Qt::ApplicationShortcut); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
936 QAction * history_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
937 = window_menu->addAction (tr ("Command History")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
938 history_action->setShortcut (Qt::ControlModifier + Qt::Key_1); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
939 history_action->setShortcutContext (Qt::ApplicationShortcut); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
940 QAction * file_browser_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
941 = window_menu->addAction (tr ("Current Directory")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
942 file_browser_action->setShortcut (Qt::ControlModifier + Qt::Key_2); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
943 file_browser_action->setShortcutContext (Qt::ApplicationShortcut); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
944 QAction * workspace_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
945 = window_menu->addAction (tr ("Workspace")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
946 workspace_action->setShortcut (Qt::ControlModifier + Qt::Key_3); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
947 workspace_action->setShortcutContext (Qt::ApplicationShortcut); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
948 QAction * editor_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
949 = window_menu->addAction (tr ("Editor")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
950 editor_action->setShortcut (Qt::ControlModifier + Qt::Key_4); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
951 editor_action->setShortcutContext (Qt::ApplicationShortcut); |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
952 QAction * documentation_action |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
953 = window_menu->addAction (tr ("Documentation")); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
954 documentation_action->setShortcut (Qt::ControlModifier + Qt::Key_5); |
16176
74ba79f79fcc
gui: improve shortcuts for the editor (bug #38383) and for widget navigation
Torsten <ttl@justmail.de>
parents:
15993
diff
changeset
|
955 documentation_action->setShortcutContext (Qt::ApplicationShortcut); |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
956 |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
957 window_menu->addSeparator (); ///// |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
958 |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
959 QAction * reset_windows_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
960 = window_menu->addAction (tr ("Reset Windows")); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
961 reset_windows_action->setEnabled (false); // TODO: Make this work. |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
962 |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
963 // Help menu |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
964 QMenu * help_menu = menuBar ()->addMenu (tr ("&Help")); |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
965 QMenu * documentation_menu |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
966 = help_menu->addMenu (tr ("Documentation")); |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
967 QAction * ondisk_documentation_action |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
968 = documentation_menu->addAction (tr ("On Disk")); |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
969 QAction * online_documentation_action |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
970 = documentation_menu->addAction (tr ("Online")); |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
971 |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
972 help_menu->addSeparator (); ///// |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
973 |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
974 QAction * report_bug_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
975 = help_menu->addAction (tr ("Report Bug")); |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
976 QAction * octave_forge_action |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
977 = help_menu->addAction (tr ("Visit Octave Forge")); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
978 QAction * agora_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
979 = help_menu->addAction (tr ("Visit Agora")); |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
980 |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
981 help_menu->addSeparator (); ///// |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
982 |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
983 QAction * about_octave_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
984 = help_menu->addAction (tr ("About Octave")); |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
985 |
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
986 // Toolbars |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
987 QToolBar *main_tool_bar = addToolBar ("Main"); |
15591
8be22193532b
Add object name for main tool bar so that Qt does not complain at exit (bug #37498)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15587
diff
changeset
|
988 main_tool_bar->setObjectName ("MainToolBar"); |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
989 main_tool_bar->addAction (new_script_action); |
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
990 main_tool_bar->addAction (open_action); |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
991 |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
992 main_tool_bar->addSeparator (); ///// |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
993 |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
994 main_tool_bar->addAction (cut_action); |
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
995 main_tool_bar->addAction (copy_action); |
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
996 main_tool_bar->addAction (paste_action); |
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
997 main_tool_bar->addAction (undo_action); |
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
998 main_tool_bar->addAction (redo_action); |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
999 |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
1000 main_tool_bar->addSeparator (); ///// |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
1001 |
15607
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
1002 // addWidget takes ownership of the objects so there is no |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
1003 // need to delete these upon destroying this main_window. |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
1004 main_tool_bar->addWidget (new QLabel (tr ("Current Directory:"))); |
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
1005 main_tool_bar->addWidget (_current_directory_combo_box); |
15607
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
1006 main_tool_bar->addWidget (current_directory_tool_button); |
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
1007 main_tool_bar->addWidget (current_directory_up_tool_button); |
13533
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
1008 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1009 connect (qApp, SIGNAL (aboutToQuit ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1010 this, SLOT (prepare_for_quit ())); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
1011 connect (preferences_action, SIGNAL (triggered ()), |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1012 this, SLOT (process_settings_dialog_request ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1013 connect (exit_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1014 this, SLOT (close ())); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
1015 connect (new_script_action, SIGNAL (triggered ()), |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1016 this, SLOT (new_file ())); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
1017 connect (open_action, SIGNAL (triggered ()), |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1018 this, SLOT (open_file ())); |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
1019 connect (online_documentation_action, SIGNAL (triggered ()), |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
1020 this, SLOT (open_online_documentation_page ())); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1021 connect (report_bug_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1022 this, SLOT (open_bug_tracker_page ())); |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
1023 connect (octave_forge_action, SIGNAL (triggered ()), |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
1024 this, SLOT (open_octave_forge_page ())); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1025 connect (agora_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1026 this, SLOT (open_agora_page ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1027 connect (about_octave_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1028 this, SLOT (show_about_octave ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1029 connect (show_command_window_action, SIGNAL (toggled (bool)), |
14716
572a707408b2
Patched qterminal for MacOS. Changed Qt3 compatibility slot to Qt4 slot.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14714
diff
changeset
|
1030 _terminal_dock_widget, SLOT (setVisible (bool))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1031 connect (_terminal_dock_widget, SIGNAL (active_changed (bool)), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1032 show_command_window_action, SLOT (setChecked (bool))); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1033 connect (show_workspace_action, SIGNAL (toggled (bool)), |
14716
572a707408b2
Patched qterminal for MacOS. Changed Qt3 compatibility slot to Qt4 slot.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14714
diff
changeset
|
1034 _workspace_view, SLOT (setVisible (bool))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1035 connect (_workspace_view, SIGNAL (active_changed (bool)), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1036 show_workspace_action, SLOT (setChecked (bool))); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1037 connect (show_history_action, SIGNAL (toggled (bool)), |
14716
572a707408b2
Patched qterminal for MacOS. Changed Qt3 compatibility slot to Qt4 slot.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14714
diff
changeset
|
1038 _history_dock_widget, SLOT (setVisible (bool))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1039 connect (_history_dock_widget, SIGNAL (active_changed (bool)), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1040 show_history_action, SLOT (setChecked (bool))); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1041 connect (show_file_browser_action, SIGNAL (toggled (bool)), |
14716
572a707408b2
Patched qterminal for MacOS. Changed Qt3 compatibility slot to Qt4 slot.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14714
diff
changeset
|
1042 _files_dock_widget, SLOT (setVisible (bool))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1043 connect (_files_dock_widget, SIGNAL (active_changed (bool)), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1044 show_file_browser_action, SLOT (setChecked (bool))); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
1045 #ifdef HAVE_QSCINTILLA |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1046 connect (show_editor_action, SIGNAL (toggled (bool)), |
14716
572a707408b2
Patched qterminal for MacOS. Changed Qt3 compatibility slot to Qt4 slot.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14714
diff
changeset
|
1047 _file_editor, SLOT (setVisible (bool))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1048 connect (_file_editor, SIGNAL (active_changed (bool)), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1049 show_editor_action, SLOT (setChecked (bool))); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
1050 #endif |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
1051 connect (show_documentation_action, SIGNAL (toggled (bool)), |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
1052 _documentation_dock_widget, SLOT (setVisible (bool))); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
1053 connect (_documentation_dock_widget, SIGNAL (active_changed (bool)), |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
1054 show_documentation_action, SLOT (setChecked (bool))); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
1055 |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
1056 connect (command_window_action, SIGNAL (triggered ()), |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
1057 this, SLOT (focus_command_window ())); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
1058 connect (workspace_action, SIGNAL (triggered ()), |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
1059 this, SLOT (focus_workspace ())); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
1060 connect (history_action, SIGNAL (triggered ()), |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
1061 this, SLOT (focus_command_history ())); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
1062 connect (file_browser_action, SIGNAL (triggered ()), |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
1063 this, SLOT (focus_current_directory ())); |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
1064 connect (editor_action, SIGNAL (triggered ()), |
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
1065 this, SLOT (focus_editor ())); |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
1066 connect (documentation_action, SIGNAL (triggered ()), |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
1067 this, SLOT (focus_documentation ())); |
15989
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
1068 connect (ondisk_documentation_action, SIGNAL (triggered ()), |
afc4e08f2143
Add access to documentation and to online html page via Help menu
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15987
diff
changeset
|
1069 this, SLOT (focus_documentation ())); |
14812
9d9eb9bac65e
Improved menu structure of file, edit and window menu. Removed ambiguous shortcuts, improved focus handling for operating the GUI with the keyboard. Added new shortcuts to focus subwindows directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14804
diff
changeset
|
1070 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1071 connect (reset_windows_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1072 this, SLOT (reset_windows ())); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
1073 #ifdef HAVE_QSCINTILLA |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1074 connect (this, SIGNAL (settings_changed (const QSettings *)), |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1075 _file_editor, SLOT (notice_settings (const QSettings *))); |
15873
7d300b85ee25
allow build to proceed if either Qt or QScintilla is missing
John W. Eaton <jwe@octave.org>
parents:
15848
diff
changeset
|
1076 #endif |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1077 connect (this, SIGNAL (settings_changed (const QSettings *)), |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1078 terminal, SLOT (notice_settings (const QSettings *))); |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1079 connect (this, SIGNAL (settings_changed (const QSettings *)), |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1080 _files_dock_widget, SLOT (notice_settings (const QSettings *))); |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1081 connect (this, SIGNAL (settings_changed (const QSettings *)), |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1082 this, SLOT (notice_settings (const QSettings *))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1083 connect (_files_dock_widget, SIGNAL (open_file (QString)), |
14875
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
1084 this, SLOT (open_file (QString))); |
14803
625be3eb27c5
Current directories now synchronize on top, in the file browser and the cwd in octave.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14795
diff
changeset
|
1085 connect (_files_dock_widget, SIGNAL (displayed_directory_changed(QString)), |
625be3eb27c5
Current directories now synchronize on top, in the file browser and the cwd in octave.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14795
diff
changeset
|
1086 this, SLOT (set_current_working_directory(QString))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1087 connect (_history_dock_widget, SIGNAL (information (QString)), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1088 this, SLOT (report_status_message (QString))); |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1089 connect (_history_dock_widget, SIGNAL (command_double_clicked (const QString&)), |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1090 this, SLOT (handle_command_double_clicked (const QString&))); |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1091 connect (_history_dock_widget, SIGNAL (command_double_clicked (const QString&)), |
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1092 terminal, SLOT (relay_command (const QString&))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1093 connect (save_workspace_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1094 this, SLOT (handle_save_workspace_request ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1095 connect (load_workspace_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1096 this, SLOT (handle_load_workspace_request ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1097 connect (clear_workspace_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1098 this, SLOT (handle_clear_workspace_request ())); |
15607
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
1099 connect (current_directory_tool_button, SIGNAL (clicked ()), |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
1100 this, SLOT (browse_for_directory ())); |
15607
c9c79d4a0a00
Delete dynamic objects in the main_window destructor for proper cleanup. (bug #37234)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15591
diff
changeset
|
1101 connect (current_directory_up_tool_button, SIGNAL (clicked ()), |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
1102 this, SLOT (change_directory_up ())); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1103 connect (copy_action, SIGNAL (triggered()), |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1104 terminal, SLOT (copyClipboard ())); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1105 connect (paste_action, SIGNAL (triggered()), |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
1106 terminal, SLOT (pasteClipboard ())); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1107 connect (_current_directory_combo_box, SIGNAL (activated (QString)), |
14803
625be3eb27c5
Current directories now synchronize on top, in the file browser and the cwd in octave.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14795
diff
changeset
|
1108 this, SLOT (set_current_working_directory (QString))); |
15626
1cc10ce368ea
enable entering a new directory in the current directory combobox
Torsten <ttl@justmail.de>
parents:
15607
diff
changeset
|
1109 connect (_current_directory_line_edit, SIGNAL (returnPressed ()), |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
1110 this, SLOT (accept_directory_line_edit ())); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
1111 connect (_debug_continue, SIGNAL (triggered ()), |
14752
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
1112 this, SLOT (debug_continue ())); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
1113 connect (_debug_step_into, SIGNAL (triggered ()), |
14752
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
1114 this, SLOT (debug_step_into ())); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
1115 connect (_debug_step_over, SIGNAL (triggered ()), |
14752
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
1116 this, SLOT (debug_step_over ())); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
1117 connect (_debug_step_out, SIGNAL (triggered ()), |
14752
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
1118 this, SLOT (debug_step_out ())); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
1119 connect (_debug_quit, SIGNAL (triggered ()), |
14752
564cc673bcc5
Added menu for debugging. Now sending debug control events, but these seem to not work flawlessly
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14727
diff
changeset
|
1120 this, SLOT (debug_quit ())); |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
1121 |
14814
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
1122 connect (clear_command_history, SIGNAL (triggered ()), |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
1123 this, SLOT (handle_clear_history_request ())); |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
1124 |
14601
772ce0204b3f
Removed version number and "Octave GUI"-labelling.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14599
diff
changeset
|
1125 setWindowTitle ("Octave"); |
14682
9ea75ea686b5
Allowing nested dock widgets and fixed small bug in loading a workspace.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14681
diff
changeset
|
1126 setDockOptions(QMainWindow::AnimatedDocks | QMainWindow::AllowNestedDocks | QMainWindow::AllowTabbedDocks); |
16379
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1127 addDockWidget (Qt::RightDockWidgetArea, _terminal_dock_widget); |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1128 addDockWidget (Qt::RightDockWidgetArea, _documentation_dock_widget); |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1129 tabifyDockWidget(_terminal_dock_widget,_documentation_dock_widget); |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1130 #ifdef HAVE_QSCINTILLA |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1131 addDockWidget (Qt::RightDockWidgetArea, _file_editor); |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1132 tabifyDockWidget(_terminal_dock_widget,_file_editor); |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1133 #endif |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1134 addDockWidget (Qt::LeftDockWidgetArea, _files_dock_widget); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1135 addDockWidget (Qt::LeftDockWidgetArea, _workspace_view); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1136 addDockWidget (Qt::LeftDockWidgetArea, _history_dock_widget); |
16379
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1137 |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1138 int win_x = QApplication::desktop()->width(); |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1139 int win_y = QApplication::desktop()->height(); |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1140 if (win_x > 960) |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1141 win_x = 960; |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1142 if (win_y > 720) |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1143 win_y = 720; |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1144 setGeometry (0,0,win_x,win_y); |
4bb1b82076e5
gui: provide defaults for all values read from the settings file
Torsten <ttl@justmail.de>
parents:
16377
diff
changeset
|
1145 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
1146 setStatusBar (_status_bar); |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
1147 |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
1148 _octave_qt_event_listener = new octave_qt_event_listener (); |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
1149 |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
1150 connect (_octave_qt_event_listener, |
16350
d4b6ad43bc87
use direct callbacks instead to handle history and workspace list updates
John W. Eaton <jwe@octave.org>
parents:
16290
diff
changeset
|
1151 SIGNAL (update_workspace_signal ()), |
d4b6ad43bc87
use direct callbacks instead to handle history and workspace list updates
John W. Eaton <jwe@octave.org>
parents:
16290
diff
changeset
|
1152 this, |
d4b6ad43bc87
use direct callbacks instead to handle history and workspace list updates
John W. Eaton <jwe@octave.org>
parents:
16290
diff
changeset
|
1153 SLOT (update_workspace ())); |
d4b6ad43bc87
use direct callbacks instead to handle history and workspace list updates
John W. Eaton <jwe@octave.org>
parents:
16290
diff
changeset
|
1154 |
16415
70032fc70bee
move octave-link and octave-event-listener classes to libinterp
John W. Eaton <jwe@octave.org>
parents:
16413
diff
changeset
|
1155 // FIXME -- is it possible to eliminate the event_listenter? |
70032fc70bee
move octave-link and octave-event-listener classes to libinterp
John W. Eaton <jwe@octave.org>
parents:
16413
diff
changeset
|
1156 |
16421
40d1ddca4db5
improve use of octave_link
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
1157 _octave_qt_link = new octave_qt_link (); |
40d1ddca4db5
improve use of octave_link
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
1158 |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
1159 connect (_octave_qt_link, SIGNAL (change_directory_signal (QString)), |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
1160 this, SLOT (change_directory (QString))); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
1161 |
16423
04c4dd7fd3ce
use signal for octave_link::update_dbstop_marker
John W. Eaton <jwe@octave.org>
parents:
16421
diff
changeset
|
1162 connect (_octave_qt_link, |
16431
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
1163 SIGNAL (set_history_signal (const QStringList&)), |
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
1164 _history_dock_widget, SLOT (set_history (const QStringList&))); |
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
1165 |
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
1166 connect (_octave_qt_link, |
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
1167 SIGNAL (append_history_signal (const QString&)), |
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
1168 _history_dock_widget, SLOT (append_history (const QString&))); |
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
1169 |
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
1170 connect (_octave_qt_link, |
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
1171 SIGNAL (clear_history_signal (void)), |
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
1172 _history_dock_widget, SLOT (clear_history (void))); |
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
1173 |
16438
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
1174 connect (_octave_qt_link, SIGNAL (enter_debugger_signal ()), |
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
1175 this, SLOT (handle_enter_debugger ())); |
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
1176 |
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
1177 connect (_octave_qt_link, SIGNAL (exit_debugger_signal ()), |
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
1178 this, SLOT (handle_exit_debugger ())); |
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
1179 |
16431
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
1180 connect (_octave_qt_link, |
16423
04c4dd7fd3ce
use signal for octave_link::update_dbstop_marker
John W. Eaton <jwe@octave.org>
parents:
16421
diff
changeset
|
1181 SIGNAL (update_dbstop_marker_signal (bool, const QString&, int)), |
04c4dd7fd3ce
use signal for octave_link::update_dbstop_marker
John W. Eaton <jwe@octave.org>
parents:
16421
diff
changeset
|
1182 _file_editor, |
04c4dd7fd3ce
use signal for octave_link::update_dbstop_marker
John W. Eaton <jwe@octave.org>
parents:
16421
diff
changeset
|
1183 SLOT (handle_update_dbstop_marker_request (bool, const QString&, int))); |
04c4dd7fd3ce
use signal for octave_link::update_dbstop_marker
John W. Eaton <jwe@octave.org>
parents:
16421
diff
changeset
|
1184 |
16424
ad052cdc89ad
use signal for octave_link::edit_file
John W. Eaton <jwe@octave.org>
parents:
16423
diff
changeset
|
1185 connect (_octave_qt_link, |
ad052cdc89ad
use signal for octave_link::edit_file
John W. Eaton <jwe@octave.org>
parents:
16423
diff
changeset
|
1186 SIGNAL (edit_file_signal (const QString&)), |
ad052cdc89ad
use signal for octave_link::edit_file
John W. Eaton <jwe@octave.org>
parents:
16423
diff
changeset
|
1187 _file_editor, |
ad052cdc89ad
use signal for octave_link::edit_file
John W. Eaton <jwe@octave.org>
parents:
16423
diff
changeset
|
1188 SLOT (handle_edit_file_request (const QString&))); |
ad052cdc89ad
use signal for octave_link::edit_file
John W. Eaton <jwe@octave.org>
parents:
16423
diff
changeset
|
1189 |
16426
203976ae18d1
use signals for octave_link::enter_debugger_event and octave_link::exit_debugger_event
John W. Eaton <jwe@octave.org>
parents:
16425
diff
changeset
|
1190 connect (_octave_qt_link, |
203976ae18d1
use signals for octave_link::enter_debugger_event and octave_link::exit_debugger_event
John W. Eaton <jwe@octave.org>
parents:
16425
diff
changeset
|
1191 SIGNAL (insert_debugger_pointer_signal (const QString&, int)), |
203976ae18d1
use signals for octave_link::enter_debugger_event and octave_link::exit_debugger_event
John W. Eaton <jwe@octave.org>
parents:
16425
diff
changeset
|
1192 _file_editor, |
203976ae18d1
use signals for octave_link::enter_debugger_event and octave_link::exit_debugger_event
John W. Eaton <jwe@octave.org>
parents:
16425
diff
changeset
|
1193 SLOT (handle_insert_debugger_pointer_request (const QString&, int))); |
203976ae18d1
use signals for octave_link::enter_debugger_event and octave_link::exit_debugger_event
John W. Eaton <jwe@octave.org>
parents:
16425
diff
changeset
|
1194 |
203976ae18d1
use signals for octave_link::enter_debugger_event and octave_link::exit_debugger_event
John W. Eaton <jwe@octave.org>
parents:
16425
diff
changeset
|
1195 connect (_octave_qt_link, |
203976ae18d1
use signals for octave_link::enter_debugger_event and octave_link::exit_debugger_event
John W. Eaton <jwe@octave.org>
parents:
16425
diff
changeset
|
1196 SIGNAL (delete_debugger_pointer_signal (const QString&, int)), |
203976ae18d1
use signals for octave_link::enter_debugger_event and octave_link::exit_debugger_event
John W. Eaton <jwe@octave.org>
parents:
16425
diff
changeset
|
1197 _file_editor, |
203976ae18d1
use signals for octave_link::enter_debugger_event and octave_link::exit_debugger_event
John W. Eaton <jwe@octave.org>
parents:
16425
diff
changeset
|
1198 SLOT (handle_delete_debugger_pointer_request (const QString&, int))); |
203976ae18d1
use signals for octave_link::enter_debugger_event and octave_link::exit_debugger_event
John W. Eaton <jwe@octave.org>
parents:
16425
diff
changeset
|
1199 |
16432
fe4cd846c3e7
separate octave interpreter thread creation from execution
John W. Eaton <jwe@octave.org>
parents:
16431
diff
changeset
|
1200 _octave_qt_link->execute_interpreter (); |
fe4cd846c3e7
separate octave interpreter thread creation from execution
John W. Eaton <jwe@octave.org>
parents:
16431
diff
changeset
|
1201 |
16421
40d1ddca4db5
improve use of octave_link
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
1202 octave_link::connect_link (_octave_qt_link); |
16415
70032fc70bee
move octave-link and octave-event-listener classes to libinterp
John W. Eaton <jwe@octave.org>
parents:
16413
diff
changeset
|
1203 |
70032fc70bee
move octave-link and octave-event-listener classes to libinterp
John W. Eaton <jwe@octave.org>
parents:
16413
diff
changeset
|
1204 octave_link::register_event_listener (_octave_qt_event_listener); |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
1205 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
1206 QDir curr_dir; |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16432
diff
changeset
|
1207 set_current_working_directory (curr_dir.absolutePath ()); |
13501 | 1208 } |
1209 | |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1210 void |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1211 main_window::save_workspace_callback (const std::string& file) |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1212 { |
15420
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15404
diff
changeset
|
1213 Fsave (ovl (file)); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1214 } |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1215 |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1216 void |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1217 main_window::load_workspace_callback (const std::string& file) |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1218 { |
15420
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15404
diff
changeset
|
1219 Fload (ovl (file)); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1220 } |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1221 |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1222 void |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1223 main_window::clear_workspace_callback (void) |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1224 { |
15420
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15404
diff
changeset
|
1225 Fclear (); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1226 } |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1227 |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1228 void |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1229 main_window::clear_history_callback (void) |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1230 { |
16431
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
1231 Fhistory (ovl ("-c")); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1232 } |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1233 |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1234 void |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1235 main_window::change_directory_callback (const std::string& directory) |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1236 { |
15420
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15404
diff
changeset
|
1237 Fcd (ovl (directory)); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1238 } |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1239 |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1240 void |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1241 main_window::debug_continue_callback (void) |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1242 { |
15420
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15404
diff
changeset
|
1243 Fdbcont (); |
16397
649d0b75ec06
allow continue and quit debug buttons to work
John W. Eaton <jwe@octave.org>
parents:
16395
diff
changeset
|
1244 |
649d0b75ec06
allow continue and quit debug buttons to work
John W. Eaton <jwe@octave.org>
parents:
16395
diff
changeset
|
1245 command_editor::interrupt (true); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1246 } |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1247 |
16382
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
1248 // The next three callbacks are invoked by GUI buttons. Those buttons |
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
1249 // should only be active when we are doing debugging, which means that |
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
1250 // Octave is waiting for input in get_debug_input. Calling |
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
1251 // command_editor::interrupt will force readline to return even if it |
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
1252 // has not read any input, and then get_debug_input will return, |
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
1253 // allowing the evaluator to continue and execute the next statement. |
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
1254 |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1255 void |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1256 main_window::debug_step_into_callback (void) |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1257 { |
15420
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15404
diff
changeset
|
1258 Fdbstep (ovl ("in")); |
16382
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
1259 |
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
1260 command_editor::interrupt (true); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1261 } |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1262 |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1263 void |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1264 main_window::debug_step_over_callback (void) |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1265 { |
15420
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15404
diff
changeset
|
1266 Fdbstep (); |
16382
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
1267 |
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
1268 command_editor::interrupt (true); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1269 } |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1270 |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1271 void |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1272 main_window::debug_step_out_callback (void) |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1273 { |
15420
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15404
diff
changeset
|
1274 Fdbstep (ovl ("out")); |
16382
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
1275 |
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
16380
diff
changeset
|
1276 command_editor::interrupt (true); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1277 } |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1278 |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1279 void |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1280 main_window::debug_quit_callback (void) |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1281 { |
15420
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15404
diff
changeset
|
1282 Fdbquit (); |
16397
649d0b75ec06
allow continue and quit debug buttons to work
John W. Eaton <jwe@octave.org>
parents:
16395
diff
changeset
|
1283 |
649d0b75ec06
allow continue and quit debug buttons to work
John W. Eaton <jwe@octave.org>
parents:
16395
diff
changeset
|
1284 command_editor::interrupt (true); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1285 } |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1286 |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1287 void |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1288 main_window::exit_callback (void) |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1289 { |
15420
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15404
diff
changeset
|
1290 Fquit (); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
1291 } |