Mercurial > octave
annotate libgui/src/main-window.cc @ 15257:7ee62f559a73
Fix compilation under Windows with GUI and LLVM enabled.
* configure.ac (OCTGUI_DLL_DEFS): New substituted variabled. Define it to
-DOCTGUI_DLL under MinGW and MSVC platforms.
(QT_INCDIR, QT_LIBDIR): Replace backslash with forward slash characters.
(OCTGUI_API): New config.h macro.
* src/Makefile.am (MOC_CPPFLAGS): New variable. Define it to -DWIN32 when
compiling Win32 terminal implementation.
(moc-%.cc rule): Use it.
(libqterminal_la_CPPFLAGS): New variable defined to -DWIN32 when compiling
the win32 terminal implementation.
(liboctgui_la_CPPFLAGS): Add @OCTGUI_DLL_DEFS@.
* libgui/src/m-editor/file-editor-tab.cc (QApplication, QFileDialog,
QTextStream): New includes.
* libgui/src/m-editor/find-dialog.cc (find_dialog::search_next): Temporary
fix for compilation with QScintilla < 2.6.
* libgui/src/main-window.cc (QApplication, QLabel): New includes.
* libgui/src/octave-gui.h (octave_start_gui): Decorate with OCTGUI_API.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Thu, 30 Aug 2012 15:52:44 +0100 |
parents | 359098ad343e |
children | c5d09a57ceb2 |
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 |
15257
7ee62f559a73
Fix compilation under Windows with GUI and LLVM enabled.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
15204
diff
changeset
|
23 #include <QApplication> |
7ee62f559a73
Fix compilation under Windows with GUI and LLVM enabled.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
15204
diff
changeset
|
24 #include <QLabel> |
13501 | 25 #include <QMenuBar> |
26 #include <QMenu> | |
27 #include <QAction> | |
28 #include <QSettings> | |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
29 #include <QStyle> |
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
30 #include <QToolBar> |
13501 | 31 #include <QDesktopServices> |
32 #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
|
33 #include <QMessageBox> |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
34 #include <QIcon> |
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
35 |
14707
674740c44c09
Changed various files to matche file naming conventions.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14703
diff
changeset
|
36 #include "main-window.h" |
674740c44c09
Changed various files to matche file naming conventions.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14703
diff
changeset
|
37 #include "file-editor.h" |
674740c44c09
Changed various files to matche file naming conventions.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14703
diff
changeset
|
38 #include "settings-dialog.h" |
13501 | 39 |
14721
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
40 main_window::main_window (QWidget * parent) |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
41 : QMainWindow (parent), octave_event_observer () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
42 { |
14599
97cb9286919c
Cleaned up code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14588
diff
changeset
|
43 // 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
|
44 construct (); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
45 octave_link::instance ()->launch_octave(); |
13501 | 46 } |
47 | |
14709
f50591409306
Started to rename class names and methods from camel case to underscore-
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14707
diff
changeset
|
48 main_window::~main_window () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
49 { |
13501 | 50 } |
51 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
52 void |
14721
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
53 main_window::event_accepted (octave_event *e) |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
54 { |
14814
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
55 if (dynamic_cast<octave_clear_history_event*> (e)) |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
56 { |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
57 // After clearing the history, we need to reset the model. |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
58 _history_dock_widget->reset_model (); |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
59 } |
14721
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
60 delete e; |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
61 } |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
62 |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
63 void |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
64 main_window::event_reject (octave_event *e) |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
65 { |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
66 delete e; |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
67 } |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
68 |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
69 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
70 main_window::new_file () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
71 { |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
72 _file_editor->request_new_file (); |
14875
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
73 focus_editor (); |
13501 | 74 } |
75 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
76 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
77 main_window::open_file () |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
78 { |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
79 _file_editor->request_open_file (); |
14875
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
80 focus_editor (); |
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
81 } |
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
82 |
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
83 void |
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
84 main_window::open_file (QString file_name) |
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
85 { |
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
86 _file_editor->request_open_file (file_name); |
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
87 focus_editor (); |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
88 } |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
89 |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
90 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
91 main_window::report_status_message (QString statusMessage) |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
92 { |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
93 _status_bar->showMessage (statusMessage, 1000); |
13501 | 94 } |
95 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
96 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
97 main_window::handle_save_workspace_request () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
98 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
99 QString selectedFile = |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
100 QFileDialog::getSaveFileName (this, tr ("Save Workspace"), |
15164
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
101 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
|
102 if (!selectedFile.isEmpty ()) |
9c0959a1dc7b
Not attempint to save workspace when no filename provided.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14814
diff
changeset
|
103 { |
9c0959a1dc7b
Not attempint to save workspace when no filename provided.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14814
diff
changeset
|
104 octave_link::instance () |
9c0959a1dc7b
Not attempint to save workspace when no filename provided.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14814
diff
changeset
|
105 ->post_event (new octave_save_workspace_event (*this, |
9c0959a1dc7b
Not attempint to save workspace when no filename provided.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14814
diff
changeset
|
106 selectedFile.toStdString())); |
9c0959a1dc7b
Not attempint to save workspace when no filename provided.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14814
diff
changeset
|
107 } |
13501 | 108 } |
109 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
110 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
111 main_window::handle_load_workspace_request () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
112 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
113 QString selectedFile = |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
114 QFileDialog::getOpenFileName (this, tr ("Load Workspace"), |
15164
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
115 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
|
116 if (!selectedFile.isEmpty ()) |
9ea75ea686b5
Allowing nested dock widgets and fixed small bug in loading a workspace.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14681
diff
changeset
|
117 { |
14804
a565c560e654
Replaced a lot of terminal interaction with events: Clearing, loading and saving workspace, running a file. Default location for saving a new file is now the current working directory. Fixed bad settings with a fresh installation of the GUI by providing a file with default settings and installing it when appropriate.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14803
diff
changeset
|
118 octave_link::instance () |
a565c560e654
Replaced a lot of terminal interaction with events: Clearing, loading and saving workspace, running a file. Default location for saving a new file is now the current working directory. Fixed bad settings with a fresh installation of the GUI by providing a file with default settings and installing it when appropriate.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14803
diff
changeset
|
119 ->post_event (new octave_load_workspace_event (*this, |
a565c560e654
Replaced a lot of terminal interaction with events: Clearing, loading and saving workspace, running a file. Default location for saving a new file is now the current working directory. Fixed bad settings with a fresh installation of the GUI by providing a file with default settings and installing it when appropriate.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14803
diff
changeset
|
120 selectedFile.toStdString())); |
14682
9ea75ea686b5
Allowing nested dock widgets and fixed small bug in loading a workspace.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14681
diff
changeset
|
121 } |
13501 | 122 } |
123 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
124 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
125 main_window::handle_clear_workspace_request () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
126 { |
14804
a565c560e654
Replaced a lot of terminal interaction with events: Clearing, loading and saving workspace, running a file. Default location for saving a new file is now the current working directory. Fixed bad settings with a fresh installation of the GUI by providing a file with default settings and installing it when appropriate.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14803
diff
changeset
|
127 octave_link::instance () |
a565c560e654
Replaced a lot of terminal interaction with events: Clearing, loading and saving workspace, running a file. Default location for saving a new file is now the current working directory. Fixed bad settings with a fresh installation of the GUI by providing a file with default settings and installing it when appropriate.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14803
diff
changeset
|
128 ->post_event (new octave_clear_workspace_event (*this)); |
13501 | 129 } |
130 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
131 void |
14814
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
132 main_window::handle_clear_history_request() |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
133 { |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
134 octave_link::instance () |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
135 ->post_event (new octave_clear_history_event (*this)); |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
136 } |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
137 |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
138 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
139 main_window::handle_command_double_clicked (QString command) |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
140 { |
14996 | 141 _terminal->sendText (command); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
142 _terminal->setFocus (); |
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 |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
145 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
146 main_window::open_bug_tracker_page () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
147 { |
15044
b7b1ffc88086
Update urls to Agora and bug tracker
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15041
diff
changeset
|
148 QDesktopServices::openUrl (QUrl ("http://bugs.octave.org")); |
13501 | 149 } |
150 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
151 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
152 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
|
153 { |
15044
b7b1ffc88086
Update urls to Agora and bug tracker
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15041
diff
changeset
|
154 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
|
155 } |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
156 |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
157 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
158 main_window::open_octave_forge_page () |
13533
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
159 { |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
160 QDesktopServices::openUrl (QUrl ("http://octave.sourceforge.net/")); |
13533
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
161 } |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
162 |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
163 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
164 main_window::process_settings_dialog_request () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
165 { |
14709
f50591409306
Started to rename class names and methods from camel case to underscore-
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14707
diff
changeset
|
166 settings_dialog *settingsDialog = new settings_dialog (this); |
14586
8e9823066dad
Fixed bug with not correctly syncing settings.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14308
diff
changeset
|
167 settingsDialog->exec (); |
8e9823066dad
Fixed bug with not correctly syncing settings.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14308
diff
changeset
|
168 delete settingsDialog; |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
169 emit settings_changed (); |
14588
fa52c6e84ae0
Added controls and settings for changing the terminal font.
"Israel Herraiz <israel.herraiz@upm.es>"
parents:
14586
diff
changeset
|
170 } |
fa52c6e84ae0
Added controls and settings for changing the terminal font.
"Israel Herraiz <israel.herraiz@upm.es>"
parents:
14586
diff
changeset
|
171 |
fa52c6e84ae0
Added controls and settings for changing the terminal font.
"Israel Herraiz <israel.herraiz@upm.es>"
parents:
14586
diff
changeset
|
172 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
173 main_window::notice_settings () |
14588
fa52c6e84ae0
Added controls and settings for changing the terminal font.
"Israel Herraiz <israel.herraiz@upm.es>"
parents:
14586
diff
changeset
|
174 { |
14695
55f88d2236b6
Added copy and paste context menu for the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14694
diff
changeset
|
175 // Set terminal font: |
15164
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
176 QSettings *settings = resource_manager::get_settings (); |
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
177 |
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
178 // FIXME -- what should happen if settings is 0? |
14998
de3a318128f2
Added support for changing the terminal cursor and the cursor blinking.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14996
diff
changeset
|
179 |
14588
fa52c6e84ae0
Added controls and settings for changing the terminal font.
"Israel Herraiz <israel.herraiz@upm.es>"
parents:
14586
diff
changeset
|
180 QFont font = QFont(); |
fa52c6e84ae0
Added controls and settings for changing the terminal font.
"Israel Herraiz <israel.herraiz@upm.es>"
parents:
14586
diff
changeset
|
181 font.setFamily(settings->value("terminal/fontName").toString()); |
fa52c6e84ae0
Added controls and settings for changing the terminal font.
"Israel Herraiz <israel.herraiz@upm.es>"
parents:
14586
diff
changeset
|
182 font.setPointSize(settings->value("terminal/fontSize").toInt ()); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
183 _terminal->setTerminalFont(font); |
14998
de3a318128f2
Added support for changing the terminal cursor and the cursor blinking.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14996
diff
changeset
|
184 |
de3a318128f2
Added support for changing the terminal cursor and the cursor blinking.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14996
diff
changeset
|
185 QString cursorType = settings->value ("terminal/cursorType").toString (); |
de3a318128f2
Added support for changing the terminal cursor and the cursor blinking.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14996
diff
changeset
|
186 bool cursorBlinking = settings->value ("terminal/cursorBlinking").toBool (); |
de3a318128f2
Added support for changing the terminal cursor and the cursor blinking.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14996
diff
changeset
|
187 if (cursorType == "ibeam") |
de3a318128f2
Added support for changing the terminal cursor and the cursor blinking.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14996
diff
changeset
|
188 _terminal->setCursorType(QTerminalInterface::IBeamCursor, cursorBlinking); |
de3a318128f2
Added support for changing the terminal cursor and the cursor blinking.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14996
diff
changeset
|
189 else if (cursorType == "block") |
de3a318128f2
Added support for changing the terminal cursor and the cursor blinking.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14996
diff
changeset
|
190 _terminal->setCursorType(QTerminalInterface::BlockCursor, cursorBlinking); |
de3a318128f2
Added support for changing the terminal cursor and the cursor blinking.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14996
diff
changeset
|
191 else if (cursorType == "underline") |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
192 _terminal->setCursorType(QTerminalInterface::UnderlineCursor, |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
193 cursorBlinking); |
14998
de3a318128f2
Added support for changing the terminal cursor and the cursor blinking.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14996
diff
changeset
|
194 |
15164
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
195 resource_manager::update_network_settings (); |
13501 | 196 } |
197 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
198 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
199 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
|
200 { |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
201 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
|
202 } |
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
|
203 |
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
|
204 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
205 main_window::reset_windows () |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
206 { |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
207 // TODO: Implement. |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
208 } |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
209 |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
210 void |
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
|
211 main_window::current_working_directory_has_changed (QString directory) |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
212 { |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
213 if (_current_directory_combo_box->count () > 31) |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
214 { |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
215 _current_directory_combo_box->removeItem (0); |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
216 } |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
217 _current_directory_combo_box->addItem (directory); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
218 int index = _current_directory_combo_box->findText (directory); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
219 _current_directory_combo_box->setCurrentIndex (index); |
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
|
220 |
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
|
221 _files_dock_widget->set_current_directory (directory); |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
222 } |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
223 |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
224 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
225 main_window::change_current_working_directory () |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
226 { |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
227 QString selectedDirectory = |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
228 QFileDialog::getExistingDirectory(this, tr ("Set working direcotry")); |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
229 |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
230 if (!selectedDirectory.isEmpty ()) |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
231 { |
14719
89c64340e9ab
Extended event based communication model.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14718
diff
changeset
|
232 octave_link::instance () |
14721
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
233 ->post_event (new octave_change_directory_event (*this, |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
234 selectedDirectory.toStdString ())); |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
235 } |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
236 } |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
237 |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
238 void |
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
|
239 main_window::set_current_working_directory (QString directory) |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
240 { |
14721
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
241 octave_link::instance () |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
242 ->post_event (new octave_change_directory_event (*this, |
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
243 directory.toStdString ())); |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
244 } |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
245 |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
246 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
247 main_window::current_working_directory_up () |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
248 { |
14875
3fd857c284fe
Editor now gets focussed when opening a file.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14831
diff
changeset
|
249 set_current_working_directory (".."); |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
250 } |
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
251 |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
252 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
|
253 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
|
254 { |
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
|
255 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
|
256 { |
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
|
257 _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
|
258 } |
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
|
259 |
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
|
260 _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
|
261 _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
|
262 _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
|
263 |
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
|
264 _terminal->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
|
265 _terminal->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
|
266 _terminal->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
|
267 } |
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
|
268 |
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
|
269 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
|
270 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
|
271 { |
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
|
272 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
|
273 { |
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
|
274 _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
|
275 } |
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
|
276 |
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
|
277 _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
|
278 _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
|
279 _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
|
280 } |
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
|
281 |
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
|
282 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
|
283 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
|
284 { |
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
|
285 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
|
286 { |
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
|
287 _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
|
288 } |
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
|
289 |
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
|
290 _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
|
291 _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
|
292 _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
|
293 } |
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
|
294 |
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
|
295 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
|
296 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
|
297 { |
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
|
298 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
|
299 { |
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
|
300 _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
|
301 } |
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
|
302 |
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
|
303 _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
|
304 _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
|
305 _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
|
306 } |
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
|
307 |
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
|
308 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
|
309 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
|
310 { |
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
|
311 if (!_file_editor->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
|
312 { |
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
|
313 _file_editor->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
|
314 } |
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
|
315 |
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
|
316 _file_editor->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
|
317 _file_editor->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
|
318 _file_editor->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
|
319 } |
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
|
320 |
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
|
321 void |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
322 main_window::focus_documentation () |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
323 { |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
324 if (!_documentation_dock_widget->isVisible ()) |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
325 { |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
326 _documentation_dock_widget->setVisible (true); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
327 } |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
328 |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
329 _documentation_dock_widget->setFocus (); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
330 _documentation_dock_widget->activateWindow (); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
331 _documentation_dock_widget->raise (); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
332 } |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
333 |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
334 void |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
335 main_window::handle_entered_debug_mode () |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
336 { |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
337 setWindowTitle ("Octave (Debugging)"); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
338 _debug_continue->setEnabled (true); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
339 _debug_step_into->setEnabled (true); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
340 _debug_step_over->setEnabled (true); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
341 _debug_step_out->setEnabled (true); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
342 _debug_quit->setEnabled (true); |
14830
41b86dc61306
Removed run command, instead cding into the script directory and executing script directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14824
diff
changeset
|
343 _file_editor->handle_entered_debug_mode (); |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
344 } |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
345 |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
346 void |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
347 main_window::handle_quit_debug_mode () |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
348 { |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
349 setWindowTitle ("Octave"); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
350 _debug_continue->setEnabled (false); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
351 _debug_step_into->setEnabled (false); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
352 _debug_step_over->setEnabled (false); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
353 _debug_step_out->setEnabled (false); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
354 _debug_quit->setEnabled (false); |
14830
41b86dc61306
Removed run command, instead cding into the script directory and executing script directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14824
diff
changeset
|
355 _file_editor->handle_quit_debug_mode (); |
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
|
356 } |
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
|
357 |
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
|
358 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
|
359 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
|
360 { |
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
|
361 octave_link::instance () |
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
|
362 ->post_event (new octave_debug_continue_event (*this)); |
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
|
363 } |
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
|
364 |
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
|
365 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
|
366 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
|
367 { |
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
|
368 octave_link::instance () |
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
|
369 ->post_event (new octave_debug_step_into_event (*this)); |
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
|
370 } |
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
|
371 |
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
|
372 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
|
373 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
|
374 { |
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
|
375 octave_link::instance () |
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
|
376 ->post_event (new octave_debug_step_over_event (*this)); |
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
|
377 } |
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
|
378 |
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
|
379 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
|
380 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
|
381 { |
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
|
382 octave_link::instance () |
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
|
383 ->post_event (new octave_debug_step_out_event (*this)); |
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
|
384 } |
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
|
385 |
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
|
386 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
|
387 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
|
388 { |
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
|
389 octave_link::instance () |
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
|
390 ->post_event (new octave_debug_quit_event (*this)); |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
391 } |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
392 |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
393 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
394 main_window::show_about_octave () |
13548
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
395 { |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
396 QString message = |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
397 "GNU Octave\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
398 "Copyright (C) 2009 John W. Eaton and others.\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
399 "This is free software; see the source code for copying conditions." |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
400 "There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
401 "FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
402 "\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
403 "Additional information about Octave is available at http://www.octave.org.\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
404 "\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
405 "Please contribute if you find this software useful." |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
406 "For more information, visit http://www.octave.org/help-wanted.html\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
407 "\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
408 "Report bugs to <bug@octave.org> (but first, please read" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
409 "http://www.octave.org/bugs.html to learn how to write a helpful report).\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
410 "\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
411 "For information about changes from previous versions, type `news'.\n"; |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
412 |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
413 QMessageBox::about (this, tr ("About Octave"), message); |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
414 } |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
415 |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
416 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
|
417 main_window::closeEvent (QCloseEvent * closeEvent) |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
418 { |
14714
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14712
diff
changeset
|
419 closeEvent->ignore (); |
14721
ec76264adca9
Removed last bits of Qt from octave_link.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
420 octave_link::instance ()->post_event (new octave_exit_event (*this)); |
14718
3df7ef0080c7
Added event based processing and implement exit and change directory event.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14716
diff
changeset
|
421 } |
13501 | 422 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
423 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
424 main_window::read_settings () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
425 { |
15164
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
426 QSettings *settings = resource_manager::get_settings (); |
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
427 |
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
428 // FIXME -- what should happen if settings is 0? |
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
429 |
13537
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
430 restoreGeometry (settings->value ("MainWindow/geometry").toByteArray ()); |
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
431 restoreState (settings->value ("MainWindow/windowState").toByteArray ()); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
432 emit settings_changed (); |
13501 | 433 } |
434 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
435 void |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
436 main_window::write_settings () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
437 { |
15164
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
438 QSettings *settings = resource_manager::get_settings (); |
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
439 |
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
440 // FIXME -- what should happen if settings is 0? |
bc801a44bb1f
follow Octave pattern for resource_manager singleton
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
441 |
13537
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
442 settings->setValue ("MainWindow/geometry", saveGeometry ()); |
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
443 settings->setValue ("MainWindow/windowState", saveState ()); |
14694
ea11c9d8aa47
Calling qApp->quit () via QMetaObject::invoke caused a segfault, now exits cleanly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14693
diff
changeset
|
444 settings->sync (); |
13501 | 445 } |
446 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
447 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
|
448 main_window::construct () |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
449 { |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
450 _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
|
451 setWindowIcon (QIcon(":/actions/icons/logo.png")); |
13501 | 452 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
453 // Setup dockable widgets and the status bar. |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
454 _workspace_view = new workspace_view (this); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
455 _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
|
456 _history_dock_widget = new history_dock_widget (this); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
457 _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
|
458 _files_dock_widget = new files_dock_widget (this); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
459 _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
|
460 _documentation_dock_widget= new documentation_dock_widget (this); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
461 _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
|
462 _status_bar = new QStatusBar (this); |
13501 | 463 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
464 _current_directory_combo_box = new QComboBox (this); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
465 _current_directory_combo_box->setFixedWidth (300); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
466 _current_directory_combo_box->setEditable (true); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
467 _current_directory_combo_box->setInsertPolicy (QComboBox::InsertAtTop); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
468 _current_directory_combo_box->setMaxVisibleItems (14); |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
469 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
470 _current_directory_tool_button = new QToolButton (this); |
14727
f34984656658
Added crystal project icons.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
471 _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
|
472 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
473 _current_directory_up_tool_button = new QToolButton (this); |
14727
f34984656658
Added crystal project icons.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
474 _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
|
475 |
13550
cd66481d55b0
Added close button to file editor, assorted subwindows after importance.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13549
diff
changeset
|
476 // Octave Terminal subwindow. |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
477 _terminal = new QTerminal (this); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
478 _terminal->setObjectName ("OctaveTerminal"); |
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
|
479 _terminal->setFocusPolicy (Qt::StrongFocus); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
480 _terminal_dock_widget = new terminal_dock_widget (_terminal, this); |
15081
d02b229ce693
Cleaned up icon positions. Removed icon loading from resource manager.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15055
diff
changeset
|
481 _terminal_dock_widget->setWindowIcon (QIcon(":/actions/icons/terminal.png")); |
13501 | 482 |
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
|
483 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
|
484 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
|
485 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
|
486 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
|
487 dummyWidget->hide (); |
79c9a6d06590
Wrote SymbolInformation struct and refactored code that updates the symbol table.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14695
diff
changeset
|
488 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
|
489 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
490 _file_editor = new file_editor (_terminal, this); |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
491 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
492 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
|
493 |
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
|
494 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
|
495 |
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
|
496 QAction *new_script_action |
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
|
497 = new_menu->addAction (QIcon(":/actions/icons/filenew.png"), tr ("Script")); |
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
|
498 new_script_action->setShortcut (Qt::ControlModifier + Qt::Key_N); |
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
|
499 |
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
|
500 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
|
501 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
|
502 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
|
503 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
|
504 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
|
505 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
|
506 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
|
507 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
|
508 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
|
509 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
|
510 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
|
511 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
|
512 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
|
513 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
|
514 |
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
|
515 QAction *open_action |
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
|
516 = file_menu->addAction (QIcon(":/actions/icons/fileopen.png"), tr ("Open...")); |
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
|
517 open_action->setShortcut (Qt::ControlModifier + Qt::Key_O); |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
518 |
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
|
519 QAction *close_command_window_action |
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
|
520 = file_menu->addAction (tr ("Close 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
|
521 close_command_window_action->setShortcut (Qt::ControlModifier + Qt::Key_W); |
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
|
522 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
|
523 |
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
|
524 file_menu->addSeparator (); |
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
|
525 QAction *import_data_action |
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
|
526 = file_menu->addAction (tr ("Import Data...")); |
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
|
527 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
|
528 |
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
|
529 QAction *save_workspace_action |
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
|
530 = file_menu->addAction (tr ("Save 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
|
531 save_workspace_action->setShortcut (Qt::ControlModifier + Qt::Key_S); |
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
|
532 file_menu->addSeparator (); |
13501 | 533 |
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
|
534 QAction *preferences_action |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
535 = file_menu->addAction (QIcon(":/actions/icons/configure.png"), |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
536 tr ("Preferences...")); |
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
|
537 file_menu->addSeparator (); |
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
|
538 QAction *page_setup_action |
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
|
539 = file_menu->addAction (tr ("Page Setup...")); |
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
|
540 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
|
541 QAction *print_action |
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
|
542 = file_menu->addAction (tr ("Print")); |
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
|
543 print_action->setShortcut (Qt::ControlModifier + Qt::Key_P); |
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
|
544 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
|
545 QAction *print_selection_action |
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
|
546 = file_menu->addAction (tr ("Print Selection...")); |
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
|
547 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
|
548 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
549 file_menu->addSeparator (); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
550 QAction *exit_action = file_menu->addAction (tr ("Exit")); |
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
|
551 exit_action->setShortcut (Qt::ControlModifier + Qt::Key_Q); |
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
|
552 |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
553 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
554 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
|
555 QAction *undo_action |
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
|
556 = edit_menu->addAction (QIcon(":/actions/icons/undo.png"), tr ("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
|
557 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
|
558 |
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
|
559 QAction *redo_action |
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
|
560 = edit_menu->addAction (QIcon(":/actions/icons/redo.png"), tr ("Redo")); |
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
|
561 redo_action->setShortcut (QKeySequence::Redo); |
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
|
562 edit_menu->addSeparator (); |
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
|
563 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
564 QAction *cut_action |
14727
f34984656658
Added crystal project icons.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
565 = 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
|
566 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
|
567 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
568 QAction *copy_action |
14727
f34984656658
Added crystal project icons.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
569 = 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
|
570 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
|
571 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
572 QAction *paste_action |
14727
f34984656658
Added crystal project icons.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
573 = 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
|
574 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
|
575 |
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
|
576 QAction *paste_to_workspace_action |
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
|
577 = edit_menu->addAction (tr ("Paste To 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
|
578 paste_to_workspace_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
|
579 edit_menu->addSeparator (); |
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
|
580 |
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
|
581 QAction *select_all_action |
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
|
582 = edit_menu->addAction (tr ("Select All")); |
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
|
583 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
|
584 QAction *delete_action |
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
|
585 = edit_menu->addAction (tr ("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
|
586 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
|
587 delete_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
|
588 edit_menu->addSeparator (); |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
589 |
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
|
590 QAction *find_action |
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
|
591 = edit_menu->addAction (tr ("Find...")); |
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
|
592 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
|
593 QAction *find_files_action |
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
|
594 = 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
|
595 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
|
596 + 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
|
597 find_files_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
|
598 edit_menu->addSeparator (); |
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
|
599 |
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
|
600 QAction *clear_command_window_action |
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
|
601 = edit_menu->addAction (tr ("Clear 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
|
602 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
|
603 QAction *clear_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
|
604 = edit_menu->addAction(tr ("Clear 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
|
605 QAction * clear_workspace_action |
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
|
606 = 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
|
607 |
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
|
608 _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
|
609 |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
610 _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
|
611 _debug_step_over->setEnabled (false); |
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
612 _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
|
613 _file_editor->toolbar ()->addAction (_debug_step_over); |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
614 _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
|
615 |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
616 _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
|
617 _debug_step_into->setEnabled (false); |
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
618 _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
|
619 _file_editor->toolbar ()->addAction (_debug_step_into); |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
620 _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
|
621 |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
622 _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
|
623 _debug_step_out->setEnabled (false); |
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
624 _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
|
625 _file_editor->toolbar ()->addAction (_debug_step_out); |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
626 _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
|
627 |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
628 _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
|
629 _debug_continue->setEnabled (false); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
630 _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
|
631 _file_editor->toolbar ()->addAction (_debug_continue); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
632 _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
|
633 |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
634 _debug_menu->addSeparator (); |
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
635 _file_editor->debug_menu ()->addSeparator (); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
636 |
15106
59175df7dcf6
Created and added debug action icons.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15081
diff
changeset
|
637 _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
|
638 _debug_quit->setEnabled (false); |
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
639 _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
|
640 _file_editor->toolbar ()->addAction (_debug_quit); |
14831
cff522bf80c5
Fixed debugging shortcuts and debug menu item order.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14830
diff
changeset
|
641 _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
|
642 |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
643 //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
|
644 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
645 QMenu * desktop_menu = menuBar ()->addMenu (tr ("&Desktop")); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
646 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
|
647 |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
648 |
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
649 // Window menu |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
650 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
|
651 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
|
652 = 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
|
653 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
|
654 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
|
655 + Qt::ShiftModifier + Qt::Key_0); |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
656 |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
657 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
|
658 = 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
|
659 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
|
660 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
|
661 + Qt::ShiftModifier + Qt::Key_1); |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
662 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
|
663 = 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
|
664 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
|
665 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
|
666 + Qt::ShiftModifier + Qt::Key_2); |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
667 |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
668 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
|
669 = 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
|
670 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
|
671 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
|
672 + Qt::ShiftModifier + Qt::Key_3); |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
673 |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
674 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
|
675 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
|
676 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
|
677 + Qt::Key_4); |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
678 |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
679 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
|
680 show_documentation_action->setCheckable (true); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
681 show_documentation_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
682 + Qt::Key_5); |
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
|
683 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
|
684 |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
685 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
|
686 = 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
|
687 command_window_action->setShortcut (Qt::ControlModifier + Qt::Key_0); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
688 |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
689 QAction * history_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
690 = 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
|
691 history_action->setShortcut (Qt::ControlModifier + Qt::Key_1); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
692 |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
693 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
|
694 = 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
|
695 file_browser_action->setShortcut (Qt::ControlModifier + Qt::Key_2); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
696 |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
697 QAction * workspace_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
698 = 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
|
699 workspace_action->setShortcut (Qt::ControlModifier + Qt::Key_3); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
700 |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
701 QAction * editor_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
702 = 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
|
703 editor_action->setShortcut (Qt::ControlModifier + Qt::Key_4); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
704 |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
705 QAction * documentation_action |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
706 = window_menu->addAction (tr ("Documentation")); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
707 documentation_action->setShortcut (Qt::ControlModifier + Qt::Key_5); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
708 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
709 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
|
710 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
|
711 = 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
|
712 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
|
713 |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
714 // Help menu |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
715 QMenu * help_menu = menuBar ()->addMenu (tr ("&Help")); |
15045
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
716 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
|
717 = help_menu->addAction (tr ("Report Bug")); |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
718 QAction * agora_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
719 = help_menu->addAction (tr ("Visit Agora")); |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
720 QAction * octave_forge_action |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
721 = help_menu->addAction (tr ("Visit Octave Forge")); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
722 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
|
723 |
1ffaad442161
Source code formatting (80-column lines, mostly whitespace changes)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15044
diff
changeset
|
724 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
|
725 = 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
|
726 |
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14669
diff
changeset
|
727 // Toolbars |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
728 QToolBar *main_tool_bar = addToolBar ("Main"); |
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
|
729 main_tool_bar->addAction (new_script_action); |
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 main_tool_bar->addAction (open_action); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
731 main_tool_bar->addSeparator (); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
732 main_tool_bar->addAction (cut_action); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
733 main_tool_bar->addAction (copy_action); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
734 main_tool_bar->addAction (paste_action); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
735 main_tool_bar->addAction (undo_action); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
736 main_tool_bar->addAction (redo_action); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
737 main_tool_bar->addSeparator (); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
738 main_tool_bar->addWidget (new QLabel (tr ("Current Directory:"))); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
739 main_tool_bar->addWidget (_current_directory_combo_box); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
740 main_tool_bar->addWidget (_current_directory_tool_button); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
741 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
|
742 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
743 connect (qApp, SIGNAL (aboutToQuit ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
744 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
|
745 connect (preferences_action, SIGNAL (triggered ()), |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
746 this, SLOT (process_settings_dialog_request ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
747 connect (exit_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
748 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
|
749 connect (new_script_action, SIGNAL (triggered ()), |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
750 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
|
751 connect (open_action, SIGNAL (triggered ()), |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
752 this, SLOT (open_file ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
753 connect (report_bug_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
754 this, SLOT (open_bug_tracker_page ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
755 connect (agora_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
756 this, SLOT (open_agora_page ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
757 connect (octave_forge_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
758 this, SLOT (open_octave_forge_page ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
759 connect (about_octave_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
760 this, SLOT (show_about_octave ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
761 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
|
762 _terminal_dock_widget, SLOT (setVisible (bool))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
763 connect (_terminal_dock_widget, SIGNAL (active_changed (bool)), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
764 show_command_window_action, SLOT (setChecked (bool))); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
765 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
|
766 _workspace_view, SLOT (setVisible (bool))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
767 connect (_workspace_view, SIGNAL (active_changed (bool)), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
768 show_workspace_action, SLOT (setChecked (bool))); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
769 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
|
770 _history_dock_widget, SLOT (setVisible (bool))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
771 connect (_history_dock_widget, SIGNAL (active_changed (bool)), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
772 show_history_action, SLOT (setChecked (bool))); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
773 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
|
774 _files_dock_widget, SLOT (setVisible (bool))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
775 connect (_files_dock_widget, SIGNAL (active_changed (bool)), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
776 show_file_browser_action, SLOT (setChecked (bool))); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
777 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
|
778 _file_editor, SLOT (setVisible (bool))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
779 connect (_file_editor, SIGNAL (active_changed (bool)), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
780 show_editor_action, SLOT (setChecked (bool))); |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
781 connect (show_documentation_action, SIGNAL (toggled (bool)), |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
782 _documentation_dock_widget, SLOT (setVisible (bool))); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
783 connect (_documentation_dock_widget, SIGNAL (active_changed (bool)), |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
784 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
|
785 |
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 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
|
787 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
|
788 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
|
789 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
|
790 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
|
791 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
|
792 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
|
793 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
|
794 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
|
795 this, SLOT (focus_editor ())); |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
796 connect (documentation_action, SIGNAL (triggered ()), |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
797 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
|
798 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
799 connect (reset_windows_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
800 this, SLOT (reset_windows ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
801 connect (this, SIGNAL (settings_changed ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
802 _files_dock_widget, SLOT (notice_settings ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
803 connect (this, SIGNAL (settings_changed ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
804 this, SLOT (notice_settings ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
805 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
|
806 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
|
807 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
|
808 this, SLOT (set_current_working_directory(QString))); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
809 connect (_history_dock_widget, SIGNAL (information (QString)), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
810 this, SLOT (report_status_message (QString))); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
811 connect (_history_dock_widget, SIGNAL (command_double_clicked (QString)), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
812 this, SLOT (handle_command_double_clicked (QString))); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
813 connect (save_workspace_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
814 this, SLOT (handle_save_workspace_request ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
815 connect (load_workspace_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
816 this, SLOT (handle_load_workspace_request ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
817 connect (clear_workspace_action, SIGNAL (triggered ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
818 this, SLOT (handle_clear_workspace_request ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
819 connect (_current_directory_tool_button, SIGNAL (clicked ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
820 this, SLOT (change_current_working_directory ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
821 connect (_current_directory_up_tool_button, SIGNAL (clicked ()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
822 this, SLOT (current_working_directory_up())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
823 connect (copy_action, SIGNAL (triggered()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
824 _terminal, SLOT (copyClipboard ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
825 connect (paste_action, SIGNAL (triggered()), |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
826 _terminal, SLOT (pasteClipboard ())); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
827 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
|
828 this, SLOT (set_current_working_directory (QString))); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
829 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
|
830 this, SLOT (debug_continue ())); |
14795
e3ae0850b105
Fixed integrating debug menu in the editor window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14784
diff
changeset
|
831 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
|
832 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
|
833 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
|
834 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
|
835 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
|
836 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
|
837 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
|
838 this, SLOT (debug_quit ())); |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14698
diff
changeset
|
839 |
14814
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
840 connect (clear_command_history, SIGNAL (triggered ()), |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
841 this, SLOT (handle_clear_history_request ())); |
61c80e9326a8
Clearing the command history works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14813
diff
changeset
|
842 |
14601
772ce0204b3f
Removed version number and "Octave GUI"-labelling.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14599
diff
changeset
|
843 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
|
844 setDockOptions(QMainWindow::AnimatedDocks | QMainWindow::AllowNestedDocks | QMainWindow::AllowTabbedDocks); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
845 addDockWidget (Qt::LeftDockWidgetArea, _workspace_view); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
846 addDockWidget (Qt::LeftDockWidgetArea, _history_dock_widget); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
847 addDockWidget (Qt::RightDockWidgetArea, _files_dock_widget); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
848 addDockWidget (Qt::RightDockWidgetArea, _file_editor); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
849 addDockWidget (Qt::BottomDockWidgetArea, _terminal_dock_widget); |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15045
diff
changeset
|
850 addDockWidget (Qt::RightDockWidgetArea, _documentation_dock_widget); |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
851 setStatusBar (_status_bar); |
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
852 read_settings (); |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
853 |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
854 _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
|
855 octave_link::instance ()->register_event_listener (_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
|
856 |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
857 connect (_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
|
858 SIGNAL (current_directory_has_changed_signal (QString)), |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
859 this, |
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
|
860 SLOT (current_working_directory_has_changed (QString))); |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
861 |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
862 connect (_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
|
863 SIGNAL (entered_debug_mode_signal ()), |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
864 this, |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
865 SLOT(handle_entered_debug_mode ())); |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
866 |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
867 connect (_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
|
868 SIGNAL (quit_debug_mode_signal ()), |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
869 this, |
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
870 SLOT (handle_quit_debug_mode ())); |
13501 | 871 } |
872 |