GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave-qscintilla.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2013-2018 Torsten
4 
5 This file is part of Octave.
6 
7 Octave is free software: you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 // Author: Torsten <ttl@justmail.de>
24 
25 #if ! defined (octave_octave_qscintilla_h)
26 #define octave_octave_qscintilla_h 1
27 
28 #include <Qsci/qsciscintilla.h>
29 
30 #include <QContextMenuEvent>
31 #include <QKeyEvent>
32 #include <QLabel>
33 #include <QMenu>
34 
35 namespace octave
36 {
38  {
39  Q_OBJECT
40 
41  public:
42 
44 
45  ~octave_qscintilla (void) = default;
46 
47  enum
48  {
49  ST_NONE = 0,
52  };
53 
54  virtual void contextMenuEvent (QContextMenuEvent *e);
55 
56  void context_help_doc (bool);
57  void context_edit (void);
58  void context_run (void);
59  void get_global_textcursor_pos (QPoint *global_pos, QPoint *local_pos);
60  bool get_actual_word (void);
61  void clear_selection_markers (void);
62  void get_current_position (int *pos, int *line, int *col);
63  QStringList comment_string (bool comment = true);
64  int get_style (int pos = -1);
65  int is_style_comment (int pos = -1);
66  void smart_indent (bool do_smart_indent, int do_auto_close, int line);
67 
68  void smart_indent_line_or_selected_text (int lineFrom, int lineTo);
69 
70  void set_word_selection (const QString& word = QString ());
71 
72  void show_selection_markers (int line, int col, int len);
73 
74  void set_selection_marker_color (const QColor& c);
75 
76  signals:
77 
78  void execute_command_in_terminal_signal (const QString&);
80  void context_menu_edit_signal (const QString&);
81  void qsci_has_focus_signal (bool);
82  void status_update (bool, bool);
83  void show_doc_signal (const QString&);
85  void context_menu_break_once (int);
86 
87  private slots:
88 
89  void contextmenu_help (bool);
90  void contextmenu_doc (bool);
91  void contextmenu_help_doc (bool);
92  void contextmenu_edit (bool);
93  void contextmenu_run (bool);
94 
95  void contextmenu_break_condition (bool);
96  void contextmenu_break_once (const QPoint&);
97 
98  void text_changed (void);
99  void cursor_position_changed (int, int);
100 
101  protected:
102 
103  void focusInEvent (QFocusEvent *focusEvent);
104 
105  void show_replace_action_tooltip (void);
106 
107  void keyPressEvent (QKeyEvent *e);
108 
109  void dragEnterEvent (QDragEnterEvent *e);
110 
111  private:
112 
113  void auto_close (int auto_endif, int l,
114  const QString& line, QString& first_word);
115 
117 
118  QString m_selection;
123  };
124 }
125 
126 #endif
void execute_command_in_terminal_signal(const QString &)
void status_update(bool, bool)
void set_word_selection(const QString &word=QString())
void get_global_textcursor_pos(QPoint *global_pos, QPoint *local_pos)
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
Definition: file-io.cc:587
i e
Definition: data.cc:2591
void dragEnterEvent(QDragEnterEvent *e)
void focusInEvent(QFocusEvent *focusEvent)
void get_current_position(int *pos, int *line, int *col)
QStringList comment_string(bool comment=true)
~octave_qscintilla(void)=default
void qsci_has_focus_signal(bool)
void create_context_menu_signal(QMenu *)
void cursor_position_changed(int, int)
p
Definition: lu.cc:138
void contextmenu_break_once(const QPoint &)
void context_menu_break_condition_signal(int)
void show_doc_signal(const QString &)
void smart_indent(bool do_smart_indent, int do_auto_close, int line)
void auto_close(int auto_endif, int l, const QString &line, QString &first_word)
void keyPressEvent(QKeyEvent *e)
void smart_indent_line_or_selected_text(int lineFrom, int lineTo)
void set_selection_marker_color(const QColor &c)
void show_selection_markers(int line, int col, int len)
virtual void contextMenuEvent(QContextMenuEvent *e)
void context_menu_edit_signal(const QString &)