GNU Octave 7.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
marker.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2016-2022 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_marker_h)
27#define octave_marker_h 1
28
29#include <QObject>
30#include <Qsci/qsciscintilla.h>
31
32// Defined for purposes of sending QList<int> as part of signal.
33#include <QList>
35
36// The breakpoint class keeps track of the debug line number that Octave core
37// uses and the handle of the marker inside the editor file. If the editor
38// contents is modified, the debug line number and editor line number can be
39// out of alignment. The marker handle can be used to retrieve the editor
40// line.
41
42namespace octave
43{
44 class marker : public QObject
45 {
46 Q_OBJECT
47
48 public:
49
50 // List of all marker types
51 // If multiple markers are on the same line, the first one listed
52 // is drawn at the back, so big ones should be first.
54 {
62 };
63
64 marker (QsciScintilla *edit_area, int original_linenr,
65 editor_markers marker_type, const QString& condition = "");
66
67 marker (QsciScintilla *edit_area, int original_linenr,
68 editor_markers marker_type, int editor_linenr,
69 const QString& condition = "");
70
71 ~marker (void) = default;
72
73 const QString& get_cond (void) const { return m_condition; }
74
75 void set_cond (const QString& cond) { m_condition = cond; }
76
77 signals:
78
79 void request_remove (int original_linenr);
80
81 public slots:
82
83 void handle_remove_via_original_linenr (int original_linenr);
84 void handle_request_remove_via_editor_linenr (int editor_linenr);
85 void handle_remove (void);
86 void handle_find_translation (int original_linenr, int& editor_linenr,
87 marker*& bp);
88 void handle_find_just_before (int linenr, int& original_linenr,
89 int& editor_linenr);
90 void handle_find_just_after (int linenr, int& original_linenr,
91 int& editor_linenr);
92 /* void handle_lines_changed (void);*/
93 void handle_marker_line_deleted (int mhandle);
94 void handle_marker_line_undeleted (int mhandle);
95 void handle_report_editor_linenr (QIntList& lines, QStringList& conditions);
96
97 private:
98
99 void construct (QsciScintilla *edit_area, int original_linenr,
100 editor_markers marker_type, int editor_linenr,
101 const QString& condition);
102
107 QString m_condition;
108 };
109}
110
111#endif
void handle_report_editor_linenr(QIntList &lines, QStringList &conditions)
Definition: marker.cc:120
editor_markers m_marker_type
Definition: marker.h:105
void handle_marker_line_deleted(int mhandle)
Definition: marker.cc:127
void handle_find_just_before(int linenr, int &original_linenr, int &editor_linenr)
Definition: marker.cc:100
@ unsure_breakpoint
Definition: marker.h:57
@ unsure_debugger_position
Definition: marker.h:60
@ debugger_position
Definition: marker.h:59
int m_mhandle
Definition: marker.h:106
marker(QsciScintilla *edit_area, int original_linenr, editor_markers marker_type, const QString &condition="")
Definition: marker.cc:44
int m_original_linenr
Definition: marker.h:104
void handle_find_translation(int original_linenr, int &editor_linenr, marker *&bp)
Definition: marker.cc:90
QString m_condition
Definition: marker.h:107
QsciScintilla * m_edit_area
Definition: marker.h:103
~marker(void)=default
const QString & get_cond(void) const
Definition: marker.h:73
void handle_find_just_after(int linenr, int &original_linenr, int &editor_linenr)
Definition: marker.cc:110
void handle_marker_line_undeleted(int mhandle)
Definition: marker.cc:147
void handle_request_remove_via_editor_linenr(int editor_linenr)
Definition: marker.cc:71
void construct(QsciScintilla *edit_area, int original_linenr, editor_markers marker_type, int editor_linenr, const QString &condition)
Definition: marker.cc:51
void set_cond(const QString &cond)
Definition: marker.h:75
void handle_remove_via_original_linenr(int original_linenr)
Definition: marker.cc:62
void handle_remove(void)
Definition: marker.cc:84
void request_remove(int original_linenr)
QList< int > QIntList
Definition: dialog.h:40
QList< int > QIntList
Definition: marker.h:34