Mercurial > octave
comparison libgui/src/m-editor/marker.h @ 21158:65827e9cccb8
Gui support for enhancement of dbstop.
* octave-qscintilla.cc (contextMenuEvent): Capture right-click in the
left margins to show a context menu for "dbstop if...".
* octave-qscintilla.{cc,h} (contextmenu_break_condition): new function
* file-editor-interface.h: pass condition to
handle_update_breakpoint_marker_request
* file-editor-tab.{cc,h}: (file_editor_tab, bp_info,
handle_request_add_breakpoint, next_breakpoint,
previous_breakpoint, do_breakpoint_marker,
add_breakpoint_callback):
Allow conditional breakpoint markers
* file-editor-tab.cc (handle_context_menu_break_condition): new function
* file-editor.{cc,h} (request_open_file, add_file_editor_tab,
handle_delete_debugger_pointer_request): pass bp conditions.
* marker.{cc,h} (marker, construct, handle_report_editor_linenr):
pass breakpoint conditions
* main-window.{cc,h} (handle_update_breakpoint_marker_request):
pass breakpoint condition.
* octave-link.h (update_breakpoint): pass breakpoint condition.
* octave-qt-link.{cc,h} (do_update_breakpoint): pass breakpoint condition.
author | Lachlan Andrew <lachlanbis@gmail.com> |
---|---|
date | Sat, 30 Jan 2016 10:13:34 +1100 |
parents | ea50940c362f |
children | aba2e6293dd8 |
comparison
equal
deleted
inserted
replaced
21157:94fc5f13d51b | 21158:65827e9cccb8 |
---|---|
44 | 44 |
45 enum editor_markers | 45 enum editor_markers |
46 { | 46 { |
47 bookmark, | 47 bookmark, |
48 breakpoint, | 48 breakpoint, |
49 cond_break, | |
49 unsure_breakpoint, | 50 unsure_breakpoint, |
50 debugger_position, | 51 debugger_position, |
51 unsure_debugger_position | 52 unsure_debugger_position |
52 }; | 53 }; |
53 | 54 |
54 marker (QsciScintilla *edit_area, int original_linenr, | 55 marker (QsciScintilla *edit_area, int original_linenr, |
55 editor_markers marker_type); | 56 editor_markers marker_type, const QString& condition = ""); |
56 marker (QsciScintilla *edit_area, int original_linenr, | 57 marker (QsciScintilla *edit_area, int original_linenr, |
57 editor_markers marker_type, int editor_linenr); | 58 editor_markers marker_type, int editor_linenr, |
59 const QString& condition = ""); | |
58 ~marker (void); | 60 ~marker (void); |
61 | |
62 const QString& get_cond (void) const { return _condition; } | |
63 | |
64 void set_cond (const QString& cond) { _condition = cond; } | |
59 | 65 |
60 public slots: | 66 public slots: |
61 void handle_remove_via_original_linenr (int original_linenr); | 67 void handle_remove_via_original_linenr (int original_linenr); |
62 void handle_request_remove_via_editor_linenr (int editor_linenr); | 68 void handle_request_remove_via_editor_linenr (int editor_linenr); |
63 void handle_remove (void); | 69 void handle_remove (void); |
64 void handle_find_translation (int original_linenr, int& editor_linenr); | 70 void handle_find_translation (int original_linenr, int& editor_linenr, |
71 marker*& bp); | |
65 void handle_find_just_before (int linenr, int& original_linenr, int& editor_linenr); | 72 void handle_find_just_before (int linenr, int& original_linenr, int& editor_linenr); |
66 void handle_find_just_after (int linenr, int& original_linenr, int& editor_linenr); | 73 void handle_find_just_after (int linenr, int& original_linenr, int& editor_linenr); |
67 /* void handle_lines_changed (void);*/ | 74 /* void handle_lines_changed (void);*/ |
68 void handle_marker_line_deleted (int mhandle); | 75 void handle_marker_line_deleted (int mhandle); |
69 void handle_marker_line_undeleted (int mhandle); | 76 void handle_marker_line_undeleted (int mhandle); |
70 void handle_report_editor_linenr (QIntList& int_list); | 77 void handle_report_editor_linenr (QIntList& lines, QStringList& conditions); |
71 | 78 |
72 signals: | 79 signals: |
73 void request_remove (int original_linenr); | 80 void request_remove (int original_linenr); |
74 | 81 |
75 private: | 82 private: |
76 void construct (QsciScintilla *edit_area, int original_linenr, | 83 void construct (QsciScintilla *edit_area, int original_linenr, |
77 editor_markers marker_type, int editor_linenr); | 84 editor_markers marker_type, int editor_linenr, |
85 const QString& condition); | |
78 | 86 |
79 QsciScintilla * _edit_area; | 87 QsciScintilla * _edit_area; |
80 int _original_linenr; | 88 int _original_linenr; |
81 editor_markers _marker_type; | 89 editor_markers _marker_type; |
82 int _mhandle; | 90 int _mhandle; |
91 QString _condition; | |
83 }; | 92 }; |
84 | 93 |
85 #endif // MARKER_H | 94 #endif // MARKER_H |