Mercurial > octave
annotate libgui/src/m-editor/file-editor-tab.h @ 27398:db22b63b9c59
attempt to fix threading issues when setting conditional breakpoints in GUI
* file-editor-tab.h, file-editor-tab.cc (file_editor_tab::dbstop_if,
file_editor_tab::request_add_breakpoint): New signals.
(file_editor_tab::handle_dbstop_if): New slot.
(file_editor_tab::file_editor_tab): Connect dbstop_if signal to
handle_dbstop_if slot. Connect request_add_breakpoint to
handle_request_add_breakpoint.
(file_editor_tab::handle_context_menu_break_condition): Don't attempt
to process everything in the GUI thread. Instead, emit dbstop_if
signal to get condition and set breakpoint.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 12 Sep 2019 13:28:12 -0400 |
parents | 8132797b4a6a |
children | 1f595192b5a5 |
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 |
26376
00f796120a6d
maint: Update copyright dates in all source files.
John W. Eaton <jwe@octave.org>
parents:
26291
diff
changeset
|
3 Copyright (C) 2011-2019 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 |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24484
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:
22411
diff
changeset
|
8 under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24484
diff
changeset
|
9 the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22411
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:
22411
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:
22411
diff
changeset
|
13 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22411
diff
changeset
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22411
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 |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24484
diff
changeset
|
19 <https://www.gnu.org/licenses/>. |
15204
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 */ |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
22 |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
20783
diff
changeset
|
23 #if ! defined (octave_file_editor_tab_h) |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17790
diff
changeset
|
24 #define octave_file_editor_tab_h 1 |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
25 |
25883
cfdc768b661c
allow native dialogs for remaining file open/save dialogs (bug #5
Torsten <mttl@mailbox.org>
parents:
25369
diff
changeset
|
26 #include <QAbstractButton> |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
27 #include <QWidget> |
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
28 #include <QCloseEvent> |
25369
c89fa0989e7b
prevent notifications on externally changed editor files (bug 53539)
Torsten <mttl@mailbox.org>
parents:
25054
diff
changeset
|
29 #include <QDateTime> |
14690
ca733a66be7a
Fixed bug with not opening the editor when clicking a file from the file browser. Implemented watching the file on disk.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14680
diff
changeset
|
30 #include <QFileSystemWatcher> |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16395
diff
changeset
|
31 #include <QSettings> |
16635
25e418d23a4b
fix running files from file browser's context menu
Torsten <ttl@justmail.de>
parents:
16570
diff
changeset
|
32 #include <QFileInfo> |
16704
e38a0fa08368
fix restoring editor files from previous session and speedup lexer preparation
Torsten <ttl@justmail.de>
parents:
16638
diff
changeset
|
33 #include <Qsci/qsciapis.h> |
17962
4a53bcc1a4ae
GUI: Add statusbar with line/col indicator to editor window (Bug #40626)
John Donoghue <john.donoghue@ieee.org>
parents:
17822
diff
changeset
|
34 #include <QStatusBar> |
4a53bcc1a4ae
GUI: Add statusbar with line/col indicator to editor window (Bug #40626)
John Donoghue <john.donoghue@ieee.org>
parents:
17822
diff
changeset
|
35 #include <QLabel> |
16558 | 36 |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15425
diff
changeset
|
37 #include "find-dialog.h" |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
16719
diff
changeset
|
38 #include "octave-qscintilla.h" |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27255
diff
changeset
|
39 // Only needed for typedef of "QIntList", which may be typedefed |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27255
diff
changeset
|
40 // elsewhere. Could use common location. |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27255
diff
changeset
|
41 #include "marker.h" |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27255
diff
changeset
|
42 #include "qt-interpreter-events.h" |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15425
diff
changeset
|
43 |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27255
diff
changeset
|
44 #include "builtin-defun-decls.h" |
21007
0a09c3cae800
New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
20995
diff
changeset
|
45 |
21692
de138ebaa7a9
avoid including config.h multiple times
John W. Eaton <jwe@octave.org>
parents:
21578
diff
changeset
|
46 class octave_value_list; |
de138ebaa7a9
avoid including config.h multiple times
John W. Eaton <jwe@octave.org>
parents:
21578
diff
changeset
|
47 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
48 namespace octave |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
49 { |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
50 class file_editor; |
16558 | 51 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
52 class file_editor_tab : public QWidget |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
53 { |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
54 Q_OBJECT |
16558 | 55 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
56 public: |
16558 | 57 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
58 file_editor_tab (const QString& directory = ""); |
16558 | 59 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
60 ~file_editor_tab (void); |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
61 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
62 octave_qscintilla * qsci_edit_area (void) { return m_edit_area; } |
18689
fac35875f6eb
update enabled status of undo/redo actions in the editor
Torsten <ttl@justmail.de>
parents:
18687
diff
changeset
|
63 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
64 // Will initiate close if associated with the identifier tag. |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
65 bool conditional_close (void); |
19411
ed0df431631b
allow to cancel exiting if editor tabs are modified and exit is requested in gui
Torsten <ttl@justmail.de>
parents:
19256
diff
changeset
|
66 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
67 static void reset_cancel (void) { m_cancelled = false; } |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
68 static bool was_cancelled (void) { return m_cancelled; } |
19411
ed0df431631b
allow to cancel exiting if editor tabs are modified and exit is requested in gui
Torsten <ttl@justmail.de>
parents:
19256
diff
changeset
|
69 |
25923
a7511a1489b8
call octave functions with return value from GUI (bug #47585)
Torsten <mttl@mailbox.org>
parents:
25914
diff
changeset
|
70 void update_breakpoints (); |
a7511a1489b8
call octave functions with return value from GUI (bug #47585)
Torsten <mttl@mailbox.org>
parents:
25914
diff
changeset
|
71 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
72 public slots: |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15425
diff
changeset
|
73 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
74 void update_window_title (bool modified); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
75 void handle_copy_available (bool enableCopy); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
76 void handle_margin_clicked (int line, int margin, |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
77 Qt::KeyboardModifiers state); |
16558 | 78 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
79 // Tells the editor tab to react on changed settings. |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
80 void notice_settings (const QSettings *settings, bool init = false); |
16558 | 81 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
82 // Change to a different editor tab by identifier tag. |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
83 void change_editor_state (const QWidget *ID); |
16558 | 84 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
85 // Simply transmit filename. |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
86 void 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:
15425
diff
changeset
|
87 |
27089
9326c2258e60
fix visibility of find dialog when editor is docked/undocked (bug #5)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27053
diff
changeset
|
88 void handle_toplevel_changed (bool); |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
89 void set_focus (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
90 void set_current_directory (const QString& dir); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
91 void context_help (const QWidget *ID, bool); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
92 void context_edit (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
93 void check_modified_file (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
94 void save_file (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
95 void save_file (const QWidget *ID, const QString& fileName, |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
96 bool remove_on_success); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
97 void save_file_as (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
98 void print_file (const QWidget *ID); |
26873
9ec36417c262
debug step starts script if not already running in debug mode (bug #44728)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
26376
diff
changeset
|
99 void run_file (const QWidget *ID, bool step_into = false); |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
100 void context_run (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
101 void toggle_bookmark (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
102 void next_bookmark (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
103 void previous_bookmark (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
104 void remove_bookmark (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:
15425
diff
changeset
|
105 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
106 void toggle_breakpoint (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
107 void next_breakpoint (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
108 void previous_breakpoint (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
109 void remove_all_breakpoints (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:
15425
diff
changeset
|
110 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
111 void scintilla_command (const QWidget *, unsigned int); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
112 |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
113 void comment_selected_text (const QWidget *ID, bool input_str); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
114 void uncomment_selected_text (const QWidget *ID); |
18656
1b289f45187f
add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents:
18560
diff
changeset
|
115 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
116 void indent_selected_text (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
117 void unindent_selected_text (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
118 void smart_indent_line_or_selected_text (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
119 void convert_eol (const QWidget *ID, QsciScintilla::EolMode); |
18303
106da7544504
gui: Add indent/unindent edit menu to editor (Bug #41223)
John Donoghue <john.donoghue@ieee.org>
parents:
18275
diff
changeset
|
120 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
121 void zoom_in (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
122 void zoom_out (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
123 void zoom_normal (const QWidget *ID); |
18303
106da7544504
gui: Add indent/unindent edit menu to editor (Bug #41223)
John Donoghue <john.donoghue@ieee.org>
parents:
18275
diff
changeset
|
124 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
125 void find (const QWidget *ID, QList<QAction *>); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
126 void find_next (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
127 void find_previous (const QWidget *ID); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
128 void goto_line (const QWidget *ID, int line = -1); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
129 void move_match_brace (const QWidget *ID, bool select); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
130 void show_auto_completion (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
|
131 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
132 void insert_debugger_pointer (const QWidget *ID, int line = -1); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
133 void delete_debugger_pointer (const QWidget *ID, int line = -1); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
134 |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
135 void do_breakpoint_marker (bool insert, const QWidget *ID, int line = -1, |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
136 const QString& cond = ""); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
137 |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
138 void recover_from_exit (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
139 void set_modified (bool modified = true); |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15425
diff
changeset
|
140 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
141 void set_encoding (const QString& new_encoding); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
142 |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
143 QString load_file (const QString& fileName); |
16395
fc491da603f6
also provide a hook for exiting debugger
John W. Eaton <jwe@octave.org>
parents:
16389
diff
changeset
|
144 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
145 void new_file (const QString& commands = QString ()); |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
146 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
147 void file_has_changed (const QString& path, bool do_close = false); |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
148 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
149 void handle_context_menu_edit (const QString&); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
150 void handle_context_menu_break_condition (int linenr); |
20793
f7b0572fff6e
allow to select an encoding when opening a file
Torsten <ttl@justmail.de>
parents:
20791
diff
changeset
|
151 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
152 void handle_request_add_breakpoint (int line, const QString& cond); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
153 void handle_request_remove_breakpoint (int line); |
14690
ca733a66be7a
Fixed bug with not opening the editor when clicking a file from the file browser. Implemented watching the file on disk.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14680
diff
changeset
|
154 |
25923
a7511a1489b8
call octave functions with return value from GUI (bug #47585)
Torsten <mttl@mailbox.org>
parents:
25914
diff
changeset
|
155 void update_breakpoints_handler (const octave_value_list& argout); |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
16719
diff
changeset
|
156 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
157 signals: |
21007
0a09c3cae800
New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
20995
diff
changeset
|
158 |
27053
1bdfd2b523c9
use tab icon for indicating a modified editor file (bug #56158)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27008
diff
changeset
|
159 void file_name_changed (const QString& fileName, |
1bdfd2b523c9
use tab icon for indicating a modified editor file (bug #56158)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27008
diff
changeset
|
160 const QString& toolTip, |
1bdfd2b523c9
use tab icon for indicating a modified editor file (bug #56158)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27008
diff
changeset
|
161 bool modified); |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
162 void editor_state_changed (bool copy_available, bool is_octave_file); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
163 void set_focus_editor_signal (QWidget *); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
164 void tab_remove_request (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
165 void add_filename_to_list (const QString&, const QString&, QWidget *); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
166 void mru_add_file (const QString& file_name, const QString& encoding); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
167 void editor_check_conflict_save (const QString& saveFileName, |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
168 bool remove_on_success); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
169 void run_file_signal (const QFileInfo& info); |
25895
bb0c58796275
allow to change the encoding when editor detects decoding errors (bug #54607)
Torsten <mttl@mailbox.org>
parents:
25883
diff
changeset
|
170 void request_open_file (const QString&, const QString& = QString ()); |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
171 void edit_mfile_request (const QString&, const QString&, |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
172 const QString&, int); |
16558 | 173 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
174 void request_find_next (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
175 void request_find_previous (void); |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
176 |
27255
420611c61298
eliminate octave_cmd classes
John W. Eaton <jwe@octave.org>
parents:
27247
diff
changeset
|
177 void update_breakpoints_signal (const octave_value_list& args); |
420611c61298
eliminate octave_cmd classes
John W. Eaton <jwe@octave.org>
parents:
27247
diff
changeset
|
178 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
179 void remove_breakpoint_via_debugger_linenr (int debugger_linenr); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
180 void request_remove_breakpoint_via_editor_linenr (int editor_linenr); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
181 void remove_all_breakpoints (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
182 void find_translated_line_number (int original_linenr, |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
183 int& translated_linenr, marker*&); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
184 void find_linenr_just_before (int linenr, int& original_linenr, |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
185 int& editor_linenr); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
186 void report_marker_linenr (QIntList& lines, QStringList& conditions); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
187 void remove_position_via_debugger_linenr (int debugger_linenr); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
188 void remove_all_positions (void); |
27255
420611c61298
eliminate octave_cmd classes
John W. Eaton <jwe@octave.org>
parents:
27247
diff
changeset
|
189 |
420611c61298
eliminate octave_cmd classes
John W. Eaton <jwe@octave.org>
parents:
27247
diff
changeset
|
190 void debug_quit_signal (void); |
22169
b3ced5e3cebb
Enable shortcuts for find next / find previous
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21692
diff
changeset
|
191 |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27255
diff
changeset
|
192 void interpreter_event (const fcn_callback& fcn); |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27255
diff
changeset
|
193 void interpreter_event (const meth_callback& meth); |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27255
diff
changeset
|
194 |
27397
8132797b4a6a
use signal/slot connection in file-editor-tab for thread safety
John W. Eaton <jwe@octave.org>
parents:
27378
diff
changeset
|
195 void maybe_remove_next (int remove_line); |
8132797b4a6a
use signal/slot connection in file-editor-tab for thread safety
John W. Eaton <jwe@octave.org>
parents:
27378
diff
changeset
|
196 |
27398
db22b63b9c59
attempt to fix threading issues when setting conditional breakpoints in GUI
John W. Eaton <jwe@octave.org>
parents:
27397
diff
changeset
|
197 void dbstop_if (const QString& prompt, int line, const QString& cond); |
db22b63b9c59
attempt to fix threading issues when setting conditional breakpoints in GUI
John W. Eaton <jwe@octave.org>
parents:
27397
diff
changeset
|
198 void request_add_breakpoint (int line, const QString& cond); |
db22b63b9c59
attempt to fix threading issues when setting conditional breakpoints in GUI
John W. Eaton <jwe@octave.org>
parents:
27397
diff
changeset
|
199 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
200 // FIXME: The following is similar to "process_octave_code" |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
201 // signal. However, currently that signal is connected to |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
202 // something that simply focuses a window and not actually |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
203 // communicate with Octave. |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
204 // |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
205 // void evaluate_octave_command (const QString& command); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
206 |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
207 protected: |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
208 |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
209 void closeEvent (QCloseEvent *event); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
210 void set_file_name (const QString& fileName); |
21007
0a09c3cae800
New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
20995
diff
changeset
|
211 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
212 private slots: |
16558 | 213 |
25883
cfdc768b661c
allow native dialogs for remaining file open/save dialogs (bug #5
Torsten <mttl@mailbox.org>
parents:
25369
diff
changeset
|
214 // When user closes message box for decoding problems |
cfdc768b661c
allow native dialogs for remaining file open/save dialogs (bug #5
Torsten <mttl@mailbox.org>
parents:
25369
diff
changeset
|
215 void handle_decode_warning_answer (QAbstractButton *btn); |
cfdc768b661c
allow native dialogs for remaining file open/save dialogs (bug #5
Torsten <mttl@mailbox.org>
parents:
25369
diff
changeset
|
216 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
217 // When user closes message box for reload question. |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
218 void handle_file_reload_answer (int decision); |
16558 | 219 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
220 // When user closes message box for resave question. |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
221 void handle_file_resave_answer (int decision); |
16558 | 222 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
223 // When user closes message box for modified question. |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
224 void handle_file_modified_answer (int decision); |
16558 | 225 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
226 // When user closes find_dialog box. |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
227 void handle_find_dialog_finished (int decision); |
16558 | 228 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
229 // When user closes QFileDialog box. |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
230 void handle_save_file_as_answer (const QString& fileName); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
231 void handle_save_file_as_answer_close (const QString& fileName); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
232 void handle_save_file_as_answer_cancel (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
233 void handle_save_as_filter_selected (const QString& filter); |
16558 | 234 |
25895
bb0c58796275
allow to change the encoding when editor detects decoding errors (bug #54607)
Torsten <mttl@mailbox.org>
parents:
25883
diff
changeset
|
235 // When user changes encoding after decoding errors where found |
bb0c58796275
allow to change the encoding when editor detects decoding errors (bug #54607)
Torsten <mttl@mailbox.org>
parents:
25883
diff
changeset
|
236 void handle_current_enc_changed (const QString& enc); |
bb0c58796275
allow to change the encoding when editor detects decoding errors (bug #54607)
Torsten <mttl@mailbox.org>
parents:
25883
diff
changeset
|
237 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
238 // When apis preparation has finished and is ready to save |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
239 void save_apis_info (void); |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15425
diff
changeset
|
240 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
241 // When the numer of lines changes -> adapt width of margin |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
242 void auto_margin_width (void); |
16704
e38a0fa08368
fix restoring editor files from previous session and speedup lexer preparation
Torsten <ttl@justmail.de>
parents:
16638
diff
changeset
|
243 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
244 void handle_cursor_moved (int line, int col); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
245 void handle_char_added (int character); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
246 void handle_double_click (int p, int l, int modifier); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
247 void handle_lines_changed (void); |
16716
23b5dde25367
make octave lexer the default and dynamically set margin width for line numbers
Torsten <ttl@justmail.de>
parents:
16715
diff
changeset
|
248 |
27397
8132797b4a6a
use signal/slot connection in file-editor-tab for thread safety
John W. Eaton <jwe@octave.org>
parents:
27378
diff
changeset
|
249 void handle_remove_next (int remove_line); |
27398
db22b63b9c59
attempt to fix threading issues when setting conditional breakpoints in GUI
John W. Eaton <jwe@octave.org>
parents:
27397
diff
changeset
|
250 void handle_dbstop_if (const QString& prompt, int line, |
db22b63b9c59
attempt to fix threading issues when setting conditional breakpoints in GUI
John W. Eaton <jwe@octave.org>
parents:
27397
diff
changeset
|
251 const QString& cond); |
27397
8132797b4a6a
use signal/slot connection in file-editor-tab for thread safety
John W. Eaton <jwe@octave.org>
parents:
27378
diff
changeset
|
252 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
253 private: |
17962
4a53bcc1a4ae
GUI: Add statusbar with line/col indicator to editor window (Bug #40626)
John Donoghue <john.donoghue@ieee.org>
parents:
17822
diff
changeset
|
254 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
255 struct bp_info |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
256 { |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
257 bp_info (const QString& fname, int l = 0, const QString& cond = ""); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
258 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
259 int line; |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
260 std::string file; |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
261 std::string dir; |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
262 std::string function_name; |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
263 std::string condition; |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
264 }; |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
265 |
27247
9e5a825bb966
replace more explicit callback functions with lambda expressions
John W. Eaton <jwe@octave.org>
parents:
27198
diff
changeset
|
266 void add_breakpoint_event (const bp_info& info); |
9e5a825bb966
replace more explicit callback functions with lambda expressions
John W. Eaton <jwe@octave.org>
parents:
27198
diff
changeset
|
267 |
27089
9326c2258e60
fix visibility of find dialog when editor is docked/undocked (bug #5)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27053
diff
changeset
|
268 void find_create (void); |
9326c2258e60
fix visibility of find dialog when editor is docked/undocked (bug #5)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27053
diff
changeset
|
269 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
270 bool valid_file_name (const QString& file = QString ()); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
271 bool exit_debug_and_clear (const QString& full_name, |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
272 const QString& base_name); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
273 void save_file (const QString& saveFileName, bool remove_on_success = false, |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
274 bool restore_breakpoints = true); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
275 void save_file_as (bool remove_on_success = false); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
276 bool check_valid_identifier (QString file_name); |
26291
f73bcf1d0b5a
make SYSTEM alias for locale encoding if not suported on windows (bug #55139)
Torsten <mttl@mailbox.org>
parents:
25923
diff
changeset
|
277 QTextCodec* check_valid_codec (void); |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
278 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
279 bool unchanged_or_saved (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
280 |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
281 void update_lexer (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
282 void update_lexer_settings (void); |
15848
424edeca3c66
Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15425
diff
changeset
|
283 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
284 void show_dialog (QDialog *dlg, bool modal); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
285 int check_file_modified (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
286 void do_comment_selected_text (bool comment, bool input_str = false); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
287 void do_indent_selected_text (bool indent); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
288 void do_smart_indent_line_or_selected_text (void); |
14827
6b90737f69cc
Very basic breakpoint setting and removing in the editor works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14825
diff
changeset
|
289 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
290 void check_restore_breakpoints (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
291 void center_current_line (bool always=true); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
292 |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
293 void add_octave_apis (octave_value_list key_ovl); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
294 QString get_function_name (void); |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
295 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
296 QsciScintilla::EolMode detect_eol_mode (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
297 void update_eol_indicator (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
298 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
299 octave_qscintilla *m_edit_area; |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
300 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
301 QStatusBar *m_status_bar; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
302 QLabel *m_row_indicator; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
303 QLabel *m_col_indicator; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
304 QLabel *m_eol_indicator; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
305 QLabel *m_enc_indicator; |
18833
6504a1932637
auto completion offers builtins and file functions for octave (bug #41371)
Torsten <ttl@justmail.de>
parents:
18767
diff
changeset
|
306 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
307 QsciScintilla::EolMode m_save_as_desired_eol; |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
308 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
309 QString m_file_name; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
310 QString m_file_name_short; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
311 QString m_ced; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
312 QString m_encoding; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
313 QString m_new_encoding; |
25369
c89fa0989e7b
prevent notifications on externally changed editor files (bug 53539)
Torsten <mttl@mailbox.org>
parents:
25054
diff
changeset
|
314 QDateTime m_last_modified; |
19249
d10c711a08d8
add a drop down menu with the eol mode in the save-file-as-dialog
Torsten <ttl@justmail.de>
parents:
19247
diff
changeset
|
315 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
316 bool m_long_title; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
317 bool m_copy_available; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
318 bool m_is_octave_file; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
319 bool m_always_reload_changed_files; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
320 bool m_smart_indent; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
321 int m_auto_endif; |
27198
dffdabfd0213
fix cursor position for editor smart indent after keyword (bug #56533)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27089
diff
changeset
|
322 int m_ind_char_width; |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
323 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
324 QFileSystemWatcher m_file_system_watcher; |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
325 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
326 QIntList m_bp_lines; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
327 QStringList m_bp_conditions; |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
328 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
329 QsciAPIs *m_lexer_apis; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
330 QString m_prep_apis_file; |
16704
e38a0fa08368
fix restoring editor files from previous session and speedup lexer preparation
Torsten <ttl@justmail.de>
parents:
16638
diff
changeset
|
331 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
332 static bool m_cancelled; |
19714
21015ca26566
Restructure shutdown flow and behavior for improved robustness
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
19697
diff
changeset
|
333 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
334 int m_line_break; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
335 bool m_line_break_comments; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
336 int m_line; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
337 int m_col; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
338 bool m_lines_changed; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
339 bool m_highlight_all_occurrences; |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
340 int m_bp_restore_count; |
27008
e93b8887fedf
remove additionally added breakpoint when stepping into a file (bug #44728)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
26873
diff
changeset
|
341 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
342 struct breakpoint_info |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
343 { |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
344 bool remove_next; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
345 int remove_line; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
346 int do_not_remove_line; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
347 }; |
27089
9326c2258e60
fix visibility of find dialog when editor is docked/undocked (bug #5)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27053
diff
changeset
|
348 |
27378
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
349 breakpoint_info m_breakpoint_info; |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
350 |
6d0585c8ee11
use m_ prefix for data members in file_editor_tab class
John W. Eaton <jwe@octave.org>
parents:
27302
diff
changeset
|
351 find_dialog *m_find_dialog; |
27089
9326c2258e60
fix visibility of find dialog when editor is docked/undocked (bug #5)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27053
diff
changeset
|
352 find_dialog::find_dialog_data m_find_dlg_data; |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
353 }; |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
354 } |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
355 |
16558 | 356 #endif |