comparison libgui/src/m-editor/octave-qscintilla.h @ 31648:29d734430e5f stable

maint: Re-indent code after switch to using namespace macros. * BaseControl.cc, BaseControl.h, ButtonControl.cc, ButtonControl.h, ButtonGroup.cc, ButtonGroup.h, Canvas.cc, Canvas.h, CheckBoxControl.cc, CheckBoxControl.h, Container.cc, Container.h, ContextMenu.cc, ContextMenu.h, EditControl.cc, EditControl.h, Figure.cc, Figure.h, FigureWindow.cc, FigureWindow.h, GLCanvas.cc, GLCanvas.h, GenericEventNotify.h, KeyMap.cc, KeyMap.h, ListBoxControl.cc, ListBoxControl.h, Logger.cc, Logger.h, Menu.cc, Menu.h, MenuContainer.h, Object.cc, Object.h, ObjectProxy.cc, ObjectProxy.h, Panel.cc, Panel.h, PopupMenuControl.cc, PopupMenuControl.h, PushButtonControl.cc, PushButtonControl.h, PushTool.cc, PushTool.h, QtHandlesUtils.cc, QtHandlesUtils.h, RadioButtonControl.cc, RadioButtonControl.h, SliderControl.cc, SliderControl.h, Table.cc, Table.h, TextControl.cc, TextControl.h, TextEdit.cc, TextEdit.h, ToggleButtonControl.cc, ToggleButtonControl.h, ToggleTool.cc, ToggleTool.h, ToolBar.cc, ToolBar.h, ToolBarButton.cc, ToolBarButton.h, annotation-dialog.cc, annotation-dialog.h, gl-select.cc, gl-select.h, qopengl-functions.h, qt-graphics-toolkit.cc, qt-graphics-toolkit.h, module.mk, QTerminal.h, color-picker.cc, color-picker.h, command-widget.cc, command-widget.h, community-news.cc, community-news.h, dialog.cc, dialog.h, documentation-bookmarks.cc, documentation-bookmarks.h, documentation-dock-widget.cc, documentation-dock-widget.h, documentation.cc, documentation.h, dw-main-window.cc, dw-main-window.h, external-editor-interface.cc, external-editor-interface.h, files-dock-widget.cc, files-dock-widget.h, find-files-dialog.cc, find-files-dialog.h, find-files-model.cc, find-files-model.h, graphics-init.cc, graphics-init.h, gui-settings.cc, gui-settings.h, gui-utils.cc, gui-utils.h, history-dock-widget.cc, history-dock-widget.h, interpreter-qobject.cc, interpreter-qobject.h, led-indicator.cc, led-indicator.h, file-editor-interface.h, file-editor-tab.cc, file-editor-tab.h, file-editor.cc, file-editor.h, find-dialog.cc, find-dialog.h, marker.cc, marker.h, octave-qscintilla.cc, octave-qscintilla.h, octave-txt-lexer.cc, octave-txt-lexer.h, main-window.cc, main-window.h, news-reader.cc, news-reader.h, octave-dock-widget.cc, octave-dock-widget.h, octave-qobject.cc, octave-qobject.h, qt-application.cc, qt-application.h, qt-interpreter-events.cc, qt-interpreter-events.h, qt-utils.h, release-notes.cc, release-notes.h, resource-manager.cc, resource-manager.h, set-path-dialog.cc, set-path-dialog.h, set-path-model.cc, set-path-model.h, settings-dialog.cc, settings-dialog.h, shortcut-manager.cc, shortcut-manager.h, tab-bar.cc, tab-bar.h, terminal-dock-widget.cc, terminal-dock-widget.h, variable-editor-model.cc, variable-editor-model.h, variable-editor.cc, variable-editor.h, welcome-wizard.cc, welcome-wizard.h, workspace-model.cc, workspace-model.h, workspace-view.cc, workspace-view.h: Re-indent code after switch to using namespace macros.
author John W. Eaton <jwe@octave.org>
date Tue, 06 Dec 2022 14:53:00 -0500
parents c6d54dd31a7e
children 1a1f47f17ed4 597f3ee61a48
comparison
equal deleted inserted replaced
31646:c6d54dd31a7e 31648:29d734430e5f
36 #include "gui-settings.h" 36 #include "gui-settings.h"
37 #include "qt-interpreter-events.h" 37 #include "qt-interpreter-events.h"
38 38
39 OCTAVE_BEGIN_NAMESPACE(octave) 39 OCTAVE_BEGIN_NAMESPACE(octave)
40 40
41 class base_qobject; 41 class base_qobject;
42 42
43 class octave_qscintilla : public QsciScintilla 43 class octave_qscintilla : public QsciScintilla
44 { 44 {
45 Q_OBJECT 45 Q_OBJECT
46 46
47 public: 47 public:
48 48
49 octave_qscintilla (QWidget *p, base_qobject& oct_qobj); 49 octave_qscintilla (QWidget *p, base_qobject& oct_qobj);
50 50
51 ~octave_qscintilla (void) = default; 51 ~octave_qscintilla (void) = default;
52 52
53 enum 53 enum
54 { 54 {
55 ST_NONE = 0, 55 ST_NONE = 0,
56 ST_LINE_COMMENT, 56 ST_LINE_COMMENT,
57 ST_BLOCK_COMMENT 57 ST_BLOCK_COMMENT
58 }; 58 };
59 59
60 virtual void contextMenuEvent (QContextMenuEvent *e); 60 virtual void contextMenuEvent (QContextMenuEvent *e);
61 virtual void setCursorPosition (int line, int col); 61 virtual void setCursorPosition (int line, int col);
62 62
63 void context_help_doc (bool); 63 void context_help_doc (bool);
64 void context_edit (void); 64 void context_edit (void);
65 void context_run (void); 65 void context_run (void);
66 void get_global_textcursor_pos (QPoint *global_pos, QPoint *local_pos); 66 void get_global_textcursor_pos (QPoint *global_pos, QPoint *local_pos);
67 bool get_actual_word (void); 67 bool get_actual_word (void);
68 void clear_selection_markers (void); 68 void clear_selection_markers (void);
69 QString eol_string (void); 69 QString eol_string (void);
70 void get_current_position (int *pos, int *line, int *col); 70 void get_current_position (int *pos, int *line, int *col);
71 QStringList comment_string (bool comment = true); 71 QStringList comment_string (bool comment = true);
72 int get_style (int pos = -1); 72 int get_style (int pos = -1);
73 int is_style_comment (int pos = -1); 73 int is_style_comment (int pos = -1);
74 void smart_indent (bool do_smart_indent, int do_auto_close, 74 void smart_indent (bool do_smart_indent, int do_auto_close,
75 int line, int ind_char_width); 75 int line, int ind_char_width);
76 76
77 void smart_indent_line_or_selected_text (int lineFrom, int lineTo); 77 void smart_indent_line_or_selected_text (int lineFrom, int lineTo);
78 78
79 void set_word_selection (const QString& word = QString ()); 79 void set_word_selection (const QString& word = QString ());
80 80
81 void show_selection_markers (int l1, int c1, int l2, int c2); 81 void show_selection_markers (int l1, int c1, int l2, int c2);
82 82
83 void set_selection_marker_color (const QColor& c); 83 void set_selection_marker_color (const QColor& c);
84 84
85 void replace_all (const QString& o_str, const QString& n_str, 85 void replace_all (const QString& o_str, const QString& n_str,
86 bool re, bool cs, bool wo); 86 bool re, bool cs, bool wo);
87 87
88 signals: 88 signals:
89 89
90 void update_rowcol_indicator_signal (int line, int col); 90 void update_rowcol_indicator_signal (int line, int col);
91 void execute_command_in_terminal_signal (const QString&); 91 void execute_command_in_terminal_signal (const QString&);
92 void create_context_menu_signal (QMenu *); 92 void create_context_menu_signal (QMenu *);
93 void context_menu_edit_signal (const QString&); 93 void context_menu_edit_signal (const QString&);
94 void qsci_has_focus_signal (bool); 94 void qsci_has_focus_signal (bool);
95 void status_update (bool, bool); 95 void status_update (bool, bool);
96 void show_doc_signal (const QString&); 96 void show_doc_signal (const QString&);
97 void context_menu_break_condition_signal (int); 97 void context_menu_break_condition_signal (int);
98 void context_menu_break_once (int); 98 void context_menu_break_once (int);
99 void ctx_menu_run_finished_signal (bool, int, QTemporaryFile *, 99 void ctx_menu_run_finished_signal (bool, int, QTemporaryFile *,
100 QTemporaryFile *, bool, bool); 100 QTemporaryFile *, bool, bool);
101 void focus_console_after_command_signal (void); 101 void focus_console_after_command_signal (void);
102 102
103 void interpreter_event (const fcn_callback& fcn); 103 void interpreter_event (const fcn_callback& fcn);
104 void interpreter_event (const meth_callback& meth); 104 void interpreter_event (const meth_callback& meth);
105 105
106 public slots: 106 public slots:
107 107
108 void handle_enter_debug_mode (void); 108 void handle_enter_debug_mode (void);
109 void handle_exit_debug_mode (void); 109 void handle_exit_debug_mode (void);
110 110
111 private slots: 111 private slots:
112 112
113 void ctx_menu_run_finished (bool, int, QTemporaryFile *, QTemporaryFile *, 113 void ctx_menu_run_finished (bool, int, QTemporaryFile *, QTemporaryFile *,
114 bool, bool); 114 bool, bool);
115 115
116 void contextmenu_help (bool); 116 void contextmenu_help (bool);
117 void contextmenu_doc (bool); 117 void contextmenu_doc (bool);
118 void contextmenu_help_doc (bool); 118 void contextmenu_help_doc (bool);
119 void contextmenu_edit (bool); 119 void contextmenu_edit (bool);
120 void contextmenu_run (bool); 120 void contextmenu_run (bool);
121 void contextmenu_run_temp_error (void); 121 void contextmenu_run_temp_error (void);
122 122
123 void contextmenu_break_condition (bool); 123 void contextmenu_break_condition (bool);
124 void contextmenu_break_once (const QPoint&); 124 void contextmenu_break_once (const QPoint&);
125 125
126 void text_changed (void); 126 void text_changed (void);
127 void cursor_position_changed (int, int); 127 void cursor_position_changed (int, int);
128 128
129 protected: 129 protected:
130 130
131 void focusInEvent (QFocusEvent *focusEvent); 131 void focusInEvent (QFocusEvent *focusEvent);
132 132
133 void show_replace_action_tooltip (void); 133 void show_replace_action_tooltip (void);
134 134
135 bool event (QEvent *e); 135 bool event (QEvent *e);
136 136
137 void keyPressEvent (QKeyEvent *e); 137 void keyPressEvent (QKeyEvent *e);
138 138
139 void dragEnterEvent (QDragEnterEvent *e); 139 void dragEnterEvent (QDragEnterEvent *e);
140 140
141 private: 141 private:
142 142
143 void auto_close (int auto_endif, int l, 143 void auto_close (int auto_endif, int l,
144 const QString& line, QString& first_word); 144 const QString& line, QString& first_word);
145 145
146 base_qobject& m_octave_qobj; 146 base_qobject& m_octave_qobj;
147 147
148 bool m_debug_mode; 148 bool m_debug_mode;
149 149
150 QString m_word_at_cursor; 150 QString m_word_at_cursor;
151 151
152 QString m_selection; 152 QString m_selection;
153 QString m_selection_replacement; 153 QString m_selection_replacement;
154 int m_selection_line; 154 int m_selection_line;
155 int m_selection_col; 155 int m_selection_col;
156 int m_indicator_id; 156 int m_indicator_id;
157 }; 157 };
158 158
159 OCTAVE_END_NAMESPACE(octave) 159 OCTAVE_END_NAMESPACE(octave)
160 160
161 #endif 161 #endif