Mercurial > octave
annotate libgui/src/m-editor/file-editor.h @ 24020:387be1a6c3dc
style fixes for GUI editor
* file-editor-interface.h, file-editor.cc, file-editor.h, marker.cc,
marker.h, octave-qscintilla.cc, octave-qscintilla.h,
octave-txt-lexer.cc, octave-txt-lexer.h: Use m_ prefix for member
variables, order functions consistently in header and source files,
delete declarations for nonexistent functions, and follow more Octave
coding conventions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 07 Sep 2017 00:32:15 -0400 |
parents | 0b971884080c |
children | ba164db1c4a4 |
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 |
23219
3ac9f9ecfae5
maint: Update copyright dates.
John W. Eaton <jwe@octave.org>
parents:
23083
diff
changeset
|
3 Copyright (C) 2011-2017 Jacob Dawid |
15204
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 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22600
diff
changeset
|
8 under the terms of the GNU General Public License as published by |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22600
diff
changeset
|
9 the Free Software Foundation; either version 3 of the License, or |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22600
diff
changeset
|
10 (at your option) any later version. |
15204
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
11 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22600
diff
changeset
|
12 Octave is distributed in the hope that it will be useful, but |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22600
diff
changeset
|
13 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22600
diff
changeset
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22600
diff
changeset
|
15 GNU General Public License for more details. |
15204
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 |
21203
710e700cdd7f
maint: Clean up naming and indentation of #ifdef blocks in libgui
Rik <rik@octave.org>
parents:
21158
diff
changeset
|
23 #if ! defined (octave_file_editor_h) |
710e700cdd7f
maint: Clean up naming and indentation of #ifdef blocks in libgui
Rik <rik@octave.org>
parents:
21158
diff
changeset
|
24 #define octave_file_editor_h 1 |
13501 | 25 |
26 #include <QToolBar> | |
13584 | 27 #include <QAction> |
13562
a89aa9e05e19
editor: menu bar, run editor file in octave
ttl <ttl@justmail.de>
parents:
13558
diff
changeset
|
28 #include <QMenuBar> |
13501 | 29 #include <QStatusBar> |
13524
8c143d6d0330
gui-editor: improved behaviour when closing a modified file
ttl (Torsten) <ttl@justmail.de>
parents:
13506
diff
changeset
|
30 #include <QCloseEvent> |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14674
diff
changeset
|
31 #include <QTabWidget> |
18665
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
32 #include <QStackedWidget> |
13501 | 33 |
18651
992b6354c8c6
GUI: implement file drag and drop to command and edit window (Bug #41443)
John Donoghue
parents:
18560
diff
changeset
|
34 #include <QDragEnterEvent> |
992b6354c8c6
GUI: implement file drag and drop to command and edit window (Bug #41443)
John Donoghue
parents:
18560
diff
changeset
|
35 #include <QDropEvent> |
992b6354c8c6
GUI: implement file drag and drop to command and edit window (Bug #41443)
John Donoghue
parents:
18560
diff
changeset
|
36 |
16377
8430ea8c1594
open editor tab and insert marker for debugging with gui
John W. Eaton <jwe@octave.org>
parents:
16375
diff
changeset
|
37 #include <map> |
8430ea8c1594
open editor tab and insert marker for debugging with gui
John W. Eaton <jwe@octave.org>
parents:
16375
diff
changeset
|
38 |
15155
9e62d5a3a45e
partial cleanup of include files in gui sources
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
39 #include "file-editor-interface.h" |
9e62d5a3a45e
partial cleanup of include files in gui sources
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
40 #include "file-editor-tab.h" |
9e62d5a3a45e
partial cleanup of include files in gui sources
John W. Eaton <jwe@octave.org>
parents:
15106
diff
changeset
|
41 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
42 |
23304
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
43 // subclassed QTabBar for usable tab-bar and reimplemented mouse event |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
44 |
23304
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
45 class file_editor_tab_bar : public QTabBar |
20705
632683d6396f
provide actions for moving the editor tabs by shortscuts
Torsten <ttl@justmail.de>
parents:
20693
diff
changeset
|
46 { |
632683d6396f
provide actions for moving the editor tabs by shortscuts
Torsten <ttl@justmail.de>
parents:
20693
diff
changeset
|
47 Q_OBJECT |
632683d6396f
provide actions for moving the editor tabs by shortscuts
Torsten <ttl@justmail.de>
parents:
20693
diff
changeset
|
48 |
632683d6396f
provide actions for moving the editor tabs by shortscuts
Torsten <ttl@justmail.de>
parents:
20693
diff
changeset
|
49 public: |
23276
ea143f4f76a5
Allow to close an editor tab with the middle mouse button (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23220
diff
changeset
|
50 |
23304
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
51 file_editor_tab_bar (QWidget *p); |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
52 |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
53 ~file_editor_tab_bar (void); |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
54 |
23321
ac4d0a72927a
provide a context menu for the tab bar of the editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23304
diff
changeset
|
55 void create_context_menu (QList<QAction*> *actions); |
23276
ea143f4f76a5
Allow to close an editor tab with the middle mouse button (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23220
diff
changeset
|
56 |
ea143f4f76a5
Allow to close an editor tab with the middle mouse button (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23220
diff
changeset
|
57 signals: |
ea143f4f76a5
Allow to close an editor tab with the middle mouse button (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23220
diff
changeset
|
58 |
ea143f4f76a5
Allow to close an editor tab with the middle mouse button (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23220
diff
changeset
|
59 void close_current_tab_signal (bool); |
ea143f4f76a5
Allow to close an editor tab with the middle mouse button (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23220
diff
changeset
|
60 |
ea143f4f76a5
Allow to close an editor tab with the middle mouse button (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23220
diff
changeset
|
61 protected: |
ea143f4f76a5
Allow to close an editor tab with the middle mouse button (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23220
diff
changeset
|
62 |
ea143f4f76a5
Allow to close an editor tab with the middle mouse button (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23220
diff
changeset
|
63 void mousePressEvent(QMouseEvent *event); |
23304
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
64 |
23321
ac4d0a72927a
provide a context menu for the tab bar of the editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23304
diff
changeset
|
65 private: |
ac4d0a72927a
provide a context menu for the tab bar of the editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23304
diff
changeset
|
66 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
67 QMenu *m_context_menu; |
20705
632683d6396f
provide actions for moving the editor tabs by shortscuts
Torsten <ttl@justmail.de>
parents:
20693
diff
changeset
|
68 }; |
632683d6396f
provide actions for moving the editor tabs by shortscuts
Torsten <ttl@justmail.de>
parents:
20693
diff
changeset
|
69 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
70 // subclassed QTabWidget for using custom tabbar |
23304
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
71 |
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
72 class file_editor_tab_widget : public QTabWidget |
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
73 { |
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
74 Q_OBJECT |
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
75 |
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
76 public: |
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
77 |
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
78 file_editor_tab_widget (QWidget *p); |
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
79 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
80 ~file_editor_tab_widget (void) = default; |
23304
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
81 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
82 QTabBar * tabBar (void) const; |
23304
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
83 }; |
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
84 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
85 // the class for the file editor |
23304
fb495c47e82d
allow double left click for closing tabs in the file editor (bug #44605)
Torsten <mttl@mailbox.org>
parents:
23276
diff
changeset
|
86 |
14709
f50591409306
Started to rename class names and methods from camel case to underscore-
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14707
diff
changeset
|
87 class file_editor : public file_editor_interface |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
88 { |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15365
diff
changeset
|
89 Q_OBJECT |
14307
be3e1a14a6de
Added an interface settings tab to the settings dialog. Made a few improvements on the editor. Wrote a small welcome text in the welcome wizard. Moved configuration file to ~/.config/octave-gui/settings.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14290
diff
changeset
|
90 |
16457
10edb6f1ae98
improve encapsulation of file editor window object
John W. Eaton <jwe@octave.org>
parents:
16452
diff
changeset
|
91 public: |
10edb6f1ae98
improve encapsulation of file editor window object
John W. Eaton <jwe@octave.org>
parents:
16452
diff
changeset
|
92 |
20796
ed770c16a3e8
also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents:
20793
diff
changeset
|
93 struct tab_info |
22411
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
94 { |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
95 QWidget *fet_ID; |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
96 QString encoding; |
22411
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
97 }; |
20796
ed770c16a3e8
also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents:
20793
diff
changeset
|
98 |
ed770c16a3e8
also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents:
20793
diff
changeset
|
99 typedef std::map<QString, tab_info>::iterator editor_tab_map_iterator; |
ed770c16a3e8
also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents:
20793
diff
changeset
|
100 typedef std::map<QString, tab_info>::const_iterator editor_tab_map_const_iterator; |
ed770c16a3e8
also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents:
20793
diff
changeset
|
101 |
ed770c16a3e8
also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents:
20793
diff
changeset
|
102 // struct that allows to sort with respect to the tab index |
ed770c16a3e8
also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents:
20793
diff
changeset
|
103 struct session_data |
22411
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
104 { |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
105 QString index; |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
106 QString file_name; |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
107 QString encoding; |
22600
dd80fb1ef949
maint: minor style fixes for C++ code.
John W. Eaton <jwe@octave.org>
parents:
22411
diff
changeset
|
108 |
23433
c9fab0bc983e
maint: Use convention 'int& x' for naming references.
Rik <rik@octave.org>
parents:
23432
diff
changeset
|
109 bool operator < (const session_data& other) const |
20796
ed770c16a3e8
also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents:
20793
diff
changeset
|
110 { |
22411
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
111 return index < other.index; |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
112 } |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
113 }; |
16546
c1e90c7cfd30
try harder to find editor tab widgets for files with multiple names
John W. Eaton <jwe@octave.org>
parents:
16457
diff
changeset
|
114 |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15552
diff
changeset
|
115 file_editor (QWidget *p); |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
116 |
16558 | 117 ~file_editor (void); |
16457
10edb6f1ae98
improve encapsulation of file editor window object
John W. Eaton <jwe@octave.org>
parents:
16452
diff
changeset
|
118 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
119 QMenu * get_mru_menu (void) { return m_mru_file_menu; } |
14715
b4db843b1f26
Done some extra method renaming to fit the overall octave coding style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
120 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
121 QMenu * debug_menu (void) { return m_debug_menu; } |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
122 |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
123 QToolBar * toolbar (void) { return m_tool_bar; } |
20989
98e75f952a36
add find files action also to the editor menu
Torsten <ttl@justmail.de>
parents:
20986
diff
changeset
|
124 |
98e75f952a36
add find files action also to the editor menu
Torsten <ttl@justmail.de>
parents:
20986
diff
changeset
|
125 void insert_global_actions (QList<QAction*>); |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
126 |
20989
98e75f952a36
add find files action also to the editor menu
Torsten <ttl@justmail.de>
parents:
20986
diff
changeset
|
127 enum shared_actions_idx |
22411
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
128 { |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
129 NEW_SCRIPT_ACTION = 0, |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
130 NEW_FUNCTION_ACTION, |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
131 OPEN_ACTION, |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
132 FIND_FILES_ACTION, |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
133 UNDO_ACTION, |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
134 COPY_ACTION, |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
135 PASTE_ACTION, |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
136 SELECTALL_ACTION |
c69805d1fa64
maint: Style check C++ code in libgui/
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
137 }; |
13501 | 138 |
16438
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16413
diff
changeset
|
139 void handle_enter_debug_mode (void); |
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16413
diff
changeset
|
140 void handle_exit_debug_mode (void); |
14830
41b86dc61306
Removed run command, instead cding into the script directory and executing script directly.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14825
diff
changeset
|
141 |
17009
adf06e03fbdd
Enable/disable editor actions based on available editor windows
John Donoghue <john.donoghue@ieee.org>
parents:
16981
diff
changeset
|
142 void check_actions (void); |
18399
2ea741d22554
create empty script when editor becomes visible without open files (bug #41347)
Torsten <ttl@justmail.de>
parents:
18303
diff
changeset
|
143 void empty_script (bool startup, bool visible); |
23488
52a74f14345c
restore last editor session not before octave is ready
Torsten <mttl@mailbox.org>
parents:
23457
diff
changeset
|
144 void restore_session (QSettings *settings); |
18399
2ea741d22554
create empty script when editor becomes visible without open files (bug #41347)
Torsten <ttl@justmail.de>
parents:
18303
diff
changeset
|
145 |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15552
diff
changeset
|
146 signals: |
16558 | 147 |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
148 void fetab_settings_changed (const QSettings *settings); |
23449
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
149 void fetab_change_request (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
150 void fetab_file_name_query (const QWidget *ID); |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15552
diff
changeset
|
151 // Save is a ping-pong type of communication |
23449
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
152 void fetab_save_file (const QWidget *ID, const QString& fileName, |
16558 | 153 bool remove_on_success); |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15552
diff
changeset
|
154 // No fetab_open, functionality in editor |
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15552
diff
changeset
|
155 // No fetab_new, functionality in editor |
23449
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
156 void fetab_context_help (const QWidget *ID, bool); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
157 void fetab_context_edit (const QWidget *ID); |
19714
21015ca26566
Restructure shutdown flow and behavior for improved robustness
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
19697
diff
changeset
|
158 void fetab_check_modified_file (void); |
23449
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
159 void fetab_save_file (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
160 void fetab_save_file_as (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
161 void fetab_print_file (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
162 void fetab_run_file (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
163 void fetab_context_run (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
164 void fetab_toggle_bookmark (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
165 void fetab_next_bookmark (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
166 void fetab_previous_bookmark (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
167 void fetab_remove_bookmark (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
168 void fetab_toggle_breakpoint (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
169 void fetab_next_breakpoint (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
170 void fetab_previous_breakpoint (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
171 void fetab_remove_all_breakpoints (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
172 void fetab_comment_selected_text (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
173 void fetab_uncomment_selected_text (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
174 void fetab_indent_selected_text (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
175 void fetab_unindent_selected_text (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
176 void fetab_convert_eol (const QWidget *ID, QsciScintilla::EolMode eol_mode); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
177 void fetab_find (const QWidget *ID, QList<QAction *>); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
178 void fetab_find_next (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
179 void fetab_find_previous (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
180 void fetab_goto_line (const QWidget *ID, int line = -1); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
181 void fetab_move_match_brace (const QWidget *ID, bool select); |
18482
3a509de8e791
automatic completion list as user preference (bug #41469)
Torsten <ttl@justmail.de>
parents:
18460
diff
changeset
|
182 void fetab_completion (const QWidget*); |
23449
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
183 void fetab_insert_debugger_pointer (const QWidget *ID, int line = -1); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
184 void fetab_delete_debugger_pointer (const QWidget *ID, int line = -1); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
185 void fetab_do_breakpoint_marker (bool insert, const QWidget *ID, |
21158
65827e9cccb8
Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21054
diff
changeset
|
186 int line = -1, const QString& = ""); |
23449
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
187 void fetab_set_focus (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
188 void fetab_scintilla_command (const QWidget *ID, unsigned int sci_msg); |
18560
26d15a57f45b
add menu entries and shortcuts for zoom functions in the editor (bug #41516)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
189 |
23449
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
190 void fetab_zoom_in (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
191 void fetab_zoom_out (const QWidget *ID); |
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
192 void fetab_zoom_normal (const QWidget *ID); |
18560
26d15a57f45b
add menu entries and shortcuts for zoom functions in the editor (bug #41516)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
193 |
19803
415864f5b85f
communicating actual working directory to the editor (#44298)
Torsten <ttl@justmail.de>
parents:
19714
diff
changeset
|
194 void fetab_set_directory (const QString& dir); |
21054
221847e5f488
fix issues when restoring breakpoints and closing tabs or whole application
Torsten <ttl@justmail.de>
parents:
21002
diff
changeset
|
195 void fetab_recover_from_exit (void); |
19803
415864f5b85f
communicating actual working directory to the editor (#44298)
Torsten <ttl@justmail.de>
parents:
19714
diff
changeset
|
196 |
17676
c060ad097056
add menu entries to the editor for directly accessing the editor's settings
Torsten <ttl@justmail.de>
parents:
17635
diff
changeset
|
197 void request_settings_dialog (const QString&); |
17901
2c241092b47b
use edit.m for creating a new function with the gui (bug #40502)
Torsten <ttl@justmail.de>
parents:
17744
diff
changeset
|
198 void execute_command_in_terminal_signal (const QString&); |
23385
41639665aa34
improve opening files from gui when built without qscintilla (bug #39179)
Torsten <mttl@mailbox.org>
parents:
23380
diff
changeset
|
199 void request_open_file_external (const QString& file_name, int line); |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
200 void file_loaded_signal (void); |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15552
diff
changeset
|
201 |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13557
diff
changeset
|
202 public slots: |
19429
be53bf420464
fix access to already removed editor window at exit
Torsten <ttl@justmail.de>
parents:
19427
diff
changeset
|
203 |
16457
10edb6f1ae98
improve encapsulation of file editor window object
John W. Eaton <jwe@octave.org>
parents:
16452
diff
changeset
|
204 void focus (void); |
23449
c763214a8260
maint: Use convention 'int *x' for naming pointers.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
205 void set_focus (QWidget *fet); |
19429
be53bf420464
fix access to already removed editor window at exit
Torsten <ttl@justmail.de>
parents:
19427
diff
changeset
|
206 void enable_menu_shortcuts (bool); |
19714
21015ca26566
Restructure shutdown flow and behavior for improved robustness
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
19697
diff
changeset
|
207 bool check_closing (void); |
16457
10edb6f1ae98
improve encapsulation of file editor window object
John W. Eaton <jwe@octave.org>
parents:
16452
diff
changeset
|
208 |
16452
744ff2fe11ce
add create script context menu to history window
John Donoghue <john.donoghue@ieee.org>
parents:
16443
diff
changeset
|
209 void request_new_file (const QString& commands); |
16615
cb09eecbd84e
add close actions to the file menu of the editor
Torsten <ttl@justmail.de>
parents:
16614
diff
changeset
|
210 void request_close_file (bool); |
cb09eecbd84e
add close actions to the file menu of the editor
Torsten <ttl@justmail.de>
parents:
16614
diff
changeset
|
211 void request_close_all_files (bool); |
cb09eecbd84e
add close actions to the file menu of the editor
Torsten <ttl@justmail.de>
parents:
16614
diff
changeset
|
212 void request_close_other_files (bool); |
16614
49653ed9561b
Use menu triggered signal instead of action triggered signal to rid cast.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16611
diff
changeset
|
213 void request_mru_open_file (QAction *action); |
18665
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
214 void request_print_file (bool); |
13524
8c143d6d0330
gui-editor: improved behaviour when closing a modified file
ttl (Torsten) <ttl@justmail.de>
parents:
13506
diff
changeset
|
215 |
18665
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
216 void request_redo (bool); |
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
217 void request_cut (bool); |
17627
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
17009
diff
changeset
|
218 void request_context_help (bool); |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
17009
diff
changeset
|
219 void request_context_doc (bool); |
17628
99ffa521ecec
Add possibility to edit the function related to the actual keyword in editor
Torsten <ttl@justmail.de>
parents:
17627
diff
changeset
|
220 void request_context_edit (bool); |
18665
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
221 void request_save_file (bool); |
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
222 void request_save_file_as (bool); |
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
223 void request_run_file (bool); |
17635
7945344506ae
Add possibility to run selected text of the editor in the terminal
Torsten <ttl@justmail.de>
parents:
17628
diff
changeset
|
224 void request_context_run (bool); |
18665
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
225 void request_toggle_bookmark (bool); |
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
226 void request_next_bookmark (bool); |
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
227 void request_previous_bookmark (bool); |
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
228 void request_remove_bookmark (bool); |
14825
eae0e9f2a8c6
Added menus, markers and methods to visualize debugging in the editor and add, remove and navigate breakpoints* .
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14795
diff
changeset
|
229 |
19629
8ef79bc61d8a
add actions for moving/selecting to matching brace
Torsten <ttl@justmail.de>
parents:
19595
diff
changeset
|
230 void request_move_match_brace (bool); |
8ef79bc61d8a
add actions for moving/selecting to matching brace
Torsten <ttl@justmail.de>
parents:
19595
diff
changeset
|
231 void request_sel_match_brace (bool); |
18665
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
232 void request_toggle_breakpoint (bool); |
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
233 void request_next_breakpoint (bool); |
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
234 void request_previous_breakpoint (bool); |
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
235 void request_remove_breakpoint (bool); |
14825
eae0e9f2a8c6
Added menus, markers and methods to visualize debugging in the editor and add, remove and navigate breakpoints* .
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14795
diff
changeset
|
236 |
18656
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
237 void request_delete_start_word (bool); |
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
238 void request_delete_end_word (bool); |
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
239 void request_delete_start_line (bool); |
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
240 void request_delete_end_line (bool); |
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
241 void request_delete_line (bool); |
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
242 void request_copy_line (bool); |
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
243 void request_cut_line (bool); |
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
244 void request_duplicate_selection (bool); |
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
245 void request_transpose_line (bool); |
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
246 |
18665
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
247 void request_comment_selected_text (bool); |
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
248 void request_uncomment_selected_text (bool); |
18303
106da7544504
gui: Add indent/unindent edit menu to editor (Bug #41223)
John Donoghue <john.donoghue@ieee.org>
parents:
17903
diff
changeset
|
249 |
18656
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
250 void request_upper_case (bool); |
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
251 void request_lower_case (bool); |
18665
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
252 void request_indent_selected_text (bool); |
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
253 void request_unindent_selected_text (bool); |
19247
9582fad68730
add actions for converting the eol characters of the editor file
Torsten <ttl@justmail.de>
parents:
19246
diff
changeset
|
254 void request_conv_eol_windows (bool); |
9582fad68730
add actions for converting the eol characters of the editor file
Torsten <ttl@justmail.de>
parents:
19246
diff
changeset
|
255 void request_conv_eol_unix (bool); |
9582fad68730
add actions for converting the eol characters of the editor file
Torsten <ttl@justmail.de>
parents:
19246
diff
changeset
|
256 void request_conv_eol_mac (bool); |
18303
106da7544504
gui: Add indent/unindent edit menu to editor (Bug #41223)
John Donoghue <john.donoghue@ieee.org>
parents:
17903
diff
changeset
|
257 |
18665
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
258 void request_find (bool); |
22169
b3ced5e3cebb
Enable shortcuts for find next / find previous
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21203
diff
changeset
|
259 void request_find_next (bool); |
b3ced5e3cebb
Enable shortcuts for find next / find previous
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21203
diff
changeset
|
260 void request_find_previous (bool); |
13501 | 261 |
18665
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
262 void request_goto_line (bool); |
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
263 void request_completion (bool); |
16375
f482302d81c9
editor goto line menu item (bug #38590)
John Donoghue <john.donoghue@ieee.org>
parents:
16291
diff
changeset
|
264 |
16558 | 265 void handle_file_name_changed (const QString& fileName, |
266 const QString& toolTip); | |
14715
b4db843b1f26
Done some extra method renaming to fit the overall octave coding style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
267 void handle_tab_close_request (int index); |
16558 | 268 void handle_tab_remove_request (void); |
20796
ed770c16a3e8
also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents:
20793
diff
changeset
|
269 void handle_add_filename_to_list (const QString& fileName, |
ed770c16a3e8
also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents:
20793
diff
changeset
|
270 const QString& encoding, QWidget *ID); |
14715
b4db843b1f26
Done some extra method renaming to fit the overall octave coding style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
271 void active_tab_changed (int index); |
19803
415864f5b85f
communicating actual working directory to the editor (#44298)
Torsten <ttl@justmail.de>
parents:
19714
diff
changeset
|
272 void handle_editor_state_changed (bool enableCopy, bool is_octave_file); |
20814
2da4058d65c7
store the encoding of recent editor files in the mru list
Torsten <ttl@justmail.de>
parents:
20796
diff
changeset
|
273 void handle_mru_add_file (const QString& file_name, const QString& encoding); |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15552
diff
changeset
|
274 void check_conflict_save (const QString& fileName, bool remove_on_success); |
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15552
diff
changeset
|
275 |
16395
fc491da603f6
also provide a hook for exiting debugger
John W. Eaton <jwe@octave.org>
parents:
16386
diff
changeset
|
276 void handle_insert_debugger_pointer_request (const QString& file, int line); |
fc491da603f6
also provide a hook for exiting debugger
John W. Eaton <jwe@octave.org>
parents:
16386
diff
changeset
|
277 void handle_delete_debugger_pointer_request (const QString& file, int line); |
16558 | 278 void handle_update_breakpoint_marker_request (bool insert, |
21158
65827e9cccb8
Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21054
diff
changeset
|
279 const QString& file, int line, |
65827e9cccb8
Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21054
diff
changeset
|
280 const QString& cond); |
16558 | 281 |
16399
f9a737fd8829
allow command-line edit function to use GUI editor
John W. Eaton <jwe@octave.org>
parents:
16395
diff
changeset
|
282 void handle_edit_file_request (const QString& file); |
16377
8430ea8c1594
open editor tab and insert marker for debugging with gui
John W. Eaton <jwe@octave.org>
parents:
16375
diff
changeset
|
283 |
23892
ba46a8015b26
close editor tab when related file is deleted in file browser (bug #43922)
Torsten <mttl@mailbox.org>
parents:
23870
diff
changeset
|
284 void handle_file_remove (const QString&, const QString&); |
23920
0b971884080c
reload editor files when removing was not successful (bug #43922)
Torsten <mttl@mailbox.org>
parents:
23908
diff
changeset
|
285 void handle_file_renamed (bool load_new = true); |
23892
ba46a8015b26
close editor tab when related file is deleted in file browser (bug #43922)
Torsten <mttl@mailbox.org>
parents:
23870
diff
changeset
|
286 |
16558 | 287 // Tells the editor to react on changed settings. |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
288 void notice_settings (const QSettings *settings); |
13524
8c143d6d0330
gui-editor: improved behaviour when closing a modified file
ttl (Torsten) <ttl@justmail.de>
parents:
13506
diff
changeset
|
289 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
290 void set_shortcuts (void); |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16881
diff
changeset
|
291 |
18399
2ea741d22554
create empty script when editor becomes visible without open files (bug #41347)
Torsten <ttl@justmail.de>
parents:
18303
diff
changeset
|
292 void handle_visibility (bool visible); |
2ea741d22554
create empty script when editor becomes visible without open files (bug #41347)
Torsten <ttl@justmail.de>
parents:
18303
diff
changeset
|
293 |
19803
415864f5b85f
communicating actual working directory to the editor (#44298)
Torsten <ttl@justmail.de>
parents:
19714
diff
changeset
|
294 void update_octave_directory (const QString& dir); |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16881
diff
changeset
|
295 |
16881
944ade6e7f66
Make main window copy and paste global for current focused window
John Donoghue <john.donoghue@ieee.org>
parents:
16809
diff
changeset
|
296 protected slots: |
23204
75515a7b1b4b
add preference for closing files when editor is closed/hidden (bug #50106)
Torsten <mttl@mailbox.org>
parents:
23177
diff
changeset
|
297 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
298 void copyClipboard (void); |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
299 void pasteClipboard (void); |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
300 void selectAll (void); |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
301 void do_undo (void); |
16881
944ade6e7f66
Make main window copy and paste global for current focused window
John Donoghue <john.donoghue@ieee.org>
parents:
16809
diff
changeset
|
302 |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15552
diff
changeset
|
303 private slots: |
16558 | 304 |
20796
ed770c16a3e8
also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents:
20793
diff
changeset
|
305 void request_open_file (const QString& fileName, |
ed770c16a3e8
also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents:
20793
diff
changeset
|
306 const QString& encoding = QString (), |
ed770c16a3e8
also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents:
20793
diff
changeset
|
307 int line = -1, bool debug_pointer = false, |
21158
65827e9cccb8
Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21054
diff
changeset
|
308 bool breakpoint_marker = false, bool insert = true, |
65827e9cccb8
Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21054
diff
changeset
|
309 const QString& cond = ""); |
17676
c060ad097056
add menu entries to the editor for directly accessing the editor's settings
Torsten <ttl@justmail.de>
parents:
17635
diff
changeset
|
310 void request_preferences (bool); |
c060ad097056
add menu entries to the editor for directly accessing the editor's settings
Torsten <ttl@justmail.de>
parents:
17635
diff
changeset
|
311 void request_styles_preferences (bool); |
23379
2a122c3fd80f
Backed out changeset 2cee3976d88f
Torsten <mttl@mailbox.org>
parents:
23378
diff
changeset
|
312 |
19246
62756ba9e4e5
add actions for showing text formatting chars and guides in the editor
Torsten <ttl@justmail.de>
parents:
18944
diff
changeset
|
313 void show_line_numbers (bool); |
62756ba9e4e5
add actions for showing text formatting chars and guides in the editor
Torsten <ttl@justmail.de>
parents:
18944
diff
changeset
|
314 void show_white_space (bool); |
62756ba9e4e5
add actions for showing text formatting chars and guides in the editor
Torsten <ttl@justmail.de>
parents:
18944
diff
changeset
|
315 void show_eol_chars (bool); |
62756ba9e4e5
add actions for showing text formatting chars and guides in the editor
Torsten <ttl@justmail.de>
parents:
18944
diff
changeset
|
316 void show_indent_guides (bool); |
62756ba9e4e5
add actions for showing text formatting chars and guides in the editor
Torsten <ttl@justmail.de>
parents:
18944
diff
changeset
|
317 void show_long_line (bool); |
20992
73e92fca3c78
GUI: add editor toolbar display option (Bug #46705)
John Donoghue <john.donoghue@ieee.org>
parents:
20989
diff
changeset
|
318 void show_toolbar (bool); |
21001
1c91ff4cf9ec
add a menu entry for showing/hiding the editor status bar
Torsten <ttl@justmail.de>
parents:
20995
diff
changeset
|
319 void show_statusbar (bool); |
21002
314245afff3a
add a menu entry for showing/hiding the editor horizontal scrollbar
Torsten <ttl@justmail.de>
parents:
21001
diff
changeset
|
320 void show_hscrollbar (bool); |
18560
26d15a57f45b
add menu entries and shortcuts for zoom functions in the editor (bug #41516)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
321 void zoom_in (bool); |
26d15a57f45b
add menu entries and shortcuts for zoom functions in the editor (bug #41516)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
322 void zoom_out (bool); |
26d15a57f45b
add menu entries and shortcuts for zoom functions in the editor (bug #41516)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
323 void zoom_normal (bool); |
26d15a57f45b
add menu entries and shortcuts for zoom functions in the editor (bug #41516)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
324 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
325 void switch_left_tab (void); |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
326 void switch_right_tab (void); |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
327 void move_tab_left (void); |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
328 void move_tab_right (void); |
20693
7751bd56d0be
added actions and shortcuts for switching editor tabs
Torsten <ttl@justmail.de>
parents:
19945
diff
changeset
|
329 |
18687
99e26cb0f87f
use the actions from the editor for the context menu
Torsten <ttl@justmail.de>
parents:
18686
diff
changeset
|
330 void create_context_menu (QMenu *); |
18689
fac35875f6eb
update enabled status of undo/redo actions in the editor
Torsten <ttl@justmail.de>
parents:
18687
diff
changeset
|
331 void edit_status_update (bool, bool); |
18687
99e26cb0f87f
use the actions from the editor for the context menu
Torsten <ttl@justmail.de>
parents:
18686
diff
changeset
|
332 |
18651
992b6354c8c6
GUI: implement file drag and drop to command and edit window (Bug #41443)
John Donoghue
parents:
18560
diff
changeset
|
333 protected: |
992b6354c8c6
GUI: implement file drag and drop to command and edit window (Bug #41443)
John Donoghue
parents:
18560
diff
changeset
|
334 |
23204
75515a7b1b4b
add preference for closing files when editor is closed/hidden (bug #50106)
Torsten <mttl@mailbox.org>
parents:
23177
diff
changeset
|
335 void closeEvent (QCloseEvent *event); |
23070
bef714f45999
maint: Use space after function name/before parenthesis in libgui.
Rik <rik@octave.org>
parents:
22755
diff
changeset
|
336 void dragEnterEvent (QDragEnterEvent *event); |
bef714f45999
maint: Use space after function name/before parenthesis in libgui.
Rik <rik@octave.org>
parents:
22755
diff
changeset
|
337 void dropEvent (QDropEvent *event); |
19595
be7ac98fab43
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19429
diff
changeset
|
338 |
13501 | 339 private: |
16558 | 340 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
341 bool is_editor_console_tabbed (void); |
16558 | 342 void construct (void); |
343 void add_file_editor_tab (file_editor_tab *f, const QString& fn); | |
344 void mru_menu_update (void); | |
17903
de8591a19bc6
check for custom editor when opening a new file from the gui (bug #40496)
Torsten <ttl@justmail.de>
parents:
17901
diff
changeset
|
345 bool call_custom_editor (const QString& file_name = QString (), int line = -1); |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15552
diff
changeset
|
346 |
19246
62756ba9e4e5
add actions for showing text formatting chars and guides in the editor
Torsten <ttl@justmail.de>
parents:
18944
diff
changeset
|
347 void toggle_preference (const QString& preference, bool def); |
62756ba9e4e5
add actions for showing text formatting chars and guides in the editor
Torsten <ttl@justmail.de>
parents:
18944
diff
changeset
|
348 |
20720
7c21b151b8b4
build: Fix warning messages from compiler.
Rik <rik@octave.org>
parents:
20705
diff
changeset
|
349 void switch_tab (int direction, bool movetab = false); |
20693
7751bd56d0be
added actions and shortcuts for switching editor tabs
Torsten <ttl@justmail.de>
parents:
19945
diff
changeset
|
350 |
23908
1e54d9aba433
reload editor tabs when the path is renamed in file browser (bug #43922)
Torsten <mttl@mailbox.org>
parents:
23907
diff
changeset
|
351 void handle_dir_remove (const QString& old_name, const QString& new_name); |
1e54d9aba433
reload editor tabs when the path is renamed in file browser (bug #43922)
Torsten <mttl@mailbox.org>
parents:
23907
diff
changeset
|
352 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
353 bool editor_tab_has_focus (void); |
19945
f7a805f02723
link undo in main window to editor if the latter has focus (bug #44402)
Torsten <ttl@justmail.de>
parents:
19803
diff
changeset
|
354 |
23870
a5ec1fc3d9a5
editor: use function instead several occurrences of identical code
Torsten <mttl@mailbox.org>
parents:
23488
diff
changeset
|
355 QWidget * find_tab_widget (const QString& openFileName); |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
356 QAction * add_action (QMenu *menu, const QIcon& icon, const QString& text, |
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
357 const char *member); |
16546
c1e90c7cfd30
try harder to find editor tab widgets for files with multiple names
John W. Eaton <jwe@octave.org>
parents:
16457
diff
changeset
|
358 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
359 QMenu * add_menu (QMenuBar *p, QString text); |
18944
b2c4d6d461f0
fix conflict between main and editor menus when using alt keys (bug #42659)
Torsten <ttl@justmail.de>
parents:
18767
diff
changeset
|
360 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
361 std::map<QString, tab_info> m_editor_tab_map; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
362 QHash<QMenu*, QStringList> m_hash_menu_text; |
16377
8430ea8c1594
open editor tab and insert marker for debugging with gui
John W. Eaton <jwe@octave.org>
parents:
16375
diff
changeset
|
363 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
364 QString m_ced; |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14674
diff
changeset
|
365 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
366 QMenuBar *m_menu_bar; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
367 QToolBar *m_tool_bar; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
368 QMenu *m_debug_menu; |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16881
diff
changeset
|
369 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
370 QAction *m_new_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
371 QAction *m_new_function_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
372 QAction *m_open_action; |
18665
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
373 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
374 QAction *m_upper_case_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
375 QAction *m_lower_case_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
376 QAction *m_comment_selection_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
377 QAction *m_uncomment_selection_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
378 QAction *m_indent_selection_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
379 QAction *m_unindent_selection_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
380 QAction *m_conv_eol_windows_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
381 QAction *m_conv_eol_unix_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
382 QAction *m_conv_eol_mac_action; |
18303
106da7544504
gui: Add indent/unindent edit menu to editor (Bug #41223)
John Donoghue <john.donoghue@ieee.org>
parents:
17903
diff
changeset
|
383 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
384 QAction *m_copy_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
385 QAction *m_cut_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
386 QAction *m_paste_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
387 QAction *m_selectall_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
388 QAction *m_context_help_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
389 QAction *m_context_doc_action; |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16881
diff
changeset
|
390 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
391 QAction *m_show_linenum_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
392 QAction *m_show_whitespace_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
393 QAction *m_show_eol_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
394 QAction *m_show_indguide_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
395 QAction *m_show_longline_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
396 QAction *m_show_toolbar_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
397 QAction *m_show_statusbar_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
398 QAction *m_show_hscrollbar_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
399 QAction *m_zoom_in_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
400 QAction *m_zoom_out_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
401 QAction *m_zoom_normal_action; |
18560
26d15a57f45b
add menu entries and shortcuts for zoom functions in the editor (bug #41516)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
402 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
403 QAction *m_delete_start_word_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
404 QAction *m_delete_end_word_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
405 QAction *m_delete_start_line_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
406 QAction *m_delete_end_line_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
407 QAction *m_delete_line_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
408 QAction *m_copy_line_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
409 QAction *m_cut_line_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
410 QAction *m_duplicate_selection_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
411 QAction *m_transpose_line_action; |
18656
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
412 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
413 QAction *m_find_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
414 QAction *m_find_next_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
415 QAction *m_find_previous_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
416 QAction *m_find_files_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
417 QAction *m_goto_line_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
418 QAction *m_completion_action; |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16881
diff
changeset
|
419 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
420 QAction *m_move_to_matching_brace; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
421 QAction *m_sel_to_matching_brace; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
422 QAction *m_next_bookmark_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
423 QAction *m_previous_bookmark_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
424 QAction *m_toggle_bookmark_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
425 QAction *m_remove_bookmark_action; |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16881
diff
changeset
|
426 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
427 QAction *m_print_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
428 QAction *m_run_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
429 QAction *m_run_selection_action; |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16881
diff
changeset
|
430 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
431 QAction *m_edit_function_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
432 QAction *m_popdown_mru_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
433 QAction *m_save_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
434 QAction *m_save_as_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
435 QAction *m_close_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
436 QAction *m_close_all_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
437 QAction *m_close_others_action; |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16881
diff
changeset
|
438 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
439 QAction *m_redo_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
440 QAction *m_undo_action; |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16881
diff
changeset
|
441 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
442 QAction *m_preferences_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
443 QAction *m_styles_preferences_action; |
17676
c060ad097056
add menu entries to the editor for directly accessing the editor's settings
Torsten <ttl@justmail.de>
parents:
17635
diff
changeset
|
444 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
445 QAction *m_switch_left_tab_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
446 QAction *m_switch_right_tab_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
447 QAction *m_move_tab_left_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
448 QAction *m_move_tab_right_action; |
20693
7751bd56d0be
added actions and shortcuts for switching editor tabs
Torsten <ttl@justmail.de>
parents:
19945
diff
changeset
|
449 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
450 QAction *m_toggle_breakpoint_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
451 QAction *m_next_breakpoint_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
452 QAction *m_previous_breakpoint_action; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
453 QAction *m_remove_all_breakpoints_action; |
18665
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18656
diff
changeset
|
454 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
455 QMenu *m_edit_menu; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
456 QMenu *m_edit_cmd_menu; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
457 QMenu *m_edit_fmt_menu; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
458 QMenu *m_edit_nav_menu; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
459 QMenu *m_fileMenu; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
460 QMenu *m_view_editor_menu; |
18656
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18651
diff
changeset
|
461 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
462 QList<QAction*> m_fetab_actions; |
22169
b3ced5e3cebb
Enable shortcuts for find next / find previous
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21203
diff
changeset
|
463 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
464 file_editor_tab_widget *m_tab_widget; |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16881
diff
changeset
|
465 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
466 int m_marker_breakpoint; |
15860
feba9ff6e6a8
editor: add list of recently used files to the file menu
Torsten <ttl@justmail.de>
parents:
15848
diff
changeset
|
467 |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
468 bool m_closed; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
469 bool m_no_focus; |
23204
75515a7b1b4b
add preference for closing files when editor is closed/hidden (bug #50106)
Torsten <mttl@mailbox.org>
parents:
23177
diff
changeset
|
470 |
15860
feba9ff6e6a8
editor: add list of recently used files to the file menu
Torsten <ttl@justmail.de>
parents:
15848
diff
changeset
|
471 enum { MaxMRUFiles = 10 }; |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
472 QMenu *m_mru_file_menu; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
473 QAction *m_mru_file_actions[MaxMRUFiles]; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
474 QStringList m_mru_files; |
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
475 QStringList m_mru_files_encodings; |
23907
8fa415ff2cb3
reload editor tab when related file is renamed in file browser (bug #43922)
Torsten <mttl@mailbox.org>
parents:
23892
diff
changeset
|
476 |
23920
0b971884080c
reload editor files when removing was not successful (bug #43922)
Torsten <mttl@mailbox.org>
parents:
23908
diff
changeset
|
477 // List of temporarily closed files for later reloading. |
0b971884080c
reload editor files when removing was not successful (bug #43922)
Torsten <mttl@mailbox.org>
parents:
23908
diff
changeset
|
478 // Order: first closed old file |
0b971884080c
reload editor files when removing was not successful (bug #43922)
Torsten <mttl@mailbox.org>
parents:
23908
diff
changeset
|
479 // first new location of closed file |
0b971884080c
reload editor files when removing was not successful (bug #43922)
Torsten <mttl@mailbox.org>
parents:
23908
diff
changeset
|
480 // encoding to use for reload |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
481 QStringList m_tmp_closed_files; |
13501 | 482 }; |
483 | |
20945
9d9270e2f98f
eliminate comments after preprocessor conditionals
John W. Eaton <jwe@octave.org>
parents:
20814
diff
changeset
|
484 #endif |