#include "octave-qscintilla.h"
Public Types | |
enum | { ST_NONE = 0 , ST_LINE_COMMENT , ST_BLOCK_COMMENT } |
Signals | |
void | context_menu_break_condition_signal (int) |
void | context_menu_break_once (int) |
void | context_menu_edit_signal (const QString &) |
void | create_context_menu_signal (QMenu *) |
void | ctx_menu_run_finished_signal (bool, int, QTemporaryFile *, QTemporaryFile *, bool, bool) |
void | execute_command_in_terminal_signal (const QString &) |
void | focus_console_after_command_signal (void) |
void | interpreter_event (const meth_callback &meth) |
void | qsci_has_focus_signal (bool) |
void | show_doc_signal (const QString &) |
void | status_update (bool, bool) |
Public Member Functions | |
octave_qscintilla (QWidget *p, base_qobject &oct_qobj) | |
~octave_qscintilla (void)=default | |
void | clear_selection_markers (void) |
QStringList | comment_string (bool comment=true) |
void | context_edit (void) |
void | context_help_doc (bool) |
void | context_run (void) |
virtual void | contextMenuEvent (QContextMenuEvent *e) |
bool | get_actual_word (void) |
void | get_current_position (int *pos, int *line, int *col) |
void | get_global_textcursor_pos (QPoint *global_pos, QPoint *local_pos) |
int | get_style (int pos=-1) |
int | is_style_comment (int pos=-1) |
void | set_selection_marker_color (const QColor &c) |
void | set_word_selection (const QString &word=QString()) |
void | show_selection_markers (int l1, int c1, int l2, int c2) |
void | smart_indent (bool do_smart_indent, int do_auto_close, int line, int ind_char_width) |
void | smart_indent_line_or_selected_text (int lineFrom, int lineTo) |
Protected Member Functions | |
void | dragEnterEvent (QDragEnterEvent *e) |
void | focusInEvent (QFocusEvent *focusEvent) |
void | keyPressEvent (QKeyEvent *e) |
void | show_replace_action_tooltip (void) |
Private Slots | |
void | contextmenu_break_condition (bool) |
void | contextmenu_break_once (const QPoint &) |
void | contextmenu_doc (bool) |
void | contextmenu_edit (bool) |
void | contextmenu_help (bool) |
void | contextmenu_help_doc (bool) |
void | contextmenu_run (bool) |
void | contextmenu_run_temp_error (void) |
void | ctx_menu_run_finished (bool, int, QTemporaryFile *, QTemporaryFile *, bool, bool) |
void | cursor_position_changed (int, int) |
void | text_changed (void) |
Private Member Functions | |
void | auto_close (int auto_endif, int l, const QString &line, QString &first_word) |
Private Attributes | |
int | m_indicator_id |
base_qobject & | m_octave_qobj |
QString | m_selection |
int | m_selection_col |
int | m_selection_line |
QString | m_selection_replacement |
QString | m_word_at_cursor |
Definition at line 43 of file octave-qscintilla.h.
anonymous enum |
Enumerator | |
---|---|
ST_NONE | |
ST_LINE_COMMENT | |
ST_BLOCK_COMMENT |
Definition at line 53 of file octave-qscintilla.h.
octave::octave_qscintilla::octave_qscintilla | ( | QWidget * | p, |
base_qobject & | oct_qobj | ||
) |
Definition at line 112 of file octave-qscintilla.cc.
References CTRL, ctx_menu_run_finished(), ctx_menu_run_finished_signal(), cursor_position_changed(), m_indicator_id, octave::marker::selection, status_update(), and text_changed().
|
default |
|
private |
Definition at line 1196 of file octave-qscintilla.cc.
References octave::is_end().
Referenced by smart_indent().
void octave::octave_qscintilla::clear_selection_markers | ( | void | ) |
Definition at line 374 of file octave-qscintilla.cc.
References m_indicator_id, and octave::marker::selection.
Referenced by octave::find_dialog::find(), octave::file_editor_tab::handle_double_click(), and set_word_selection().
QStringList octave::octave_qscintilla::comment_string | ( | bool | comment = true | ) |
Definition at line 394 of file octave-qscintilla.cc.
References gui_pref::def, ed_comment_str(), ed_comment_str_old(), ed_comment_strings(), ed_comment_strings_count, ed_uncomment_str(), octave::base_qobject::get_resource_manager(), octave::resource_manager::get_settings(), gui_pref::key, and m_octave_qobj.
Referenced by octave::file_editor_tab::do_comment_selected_text(), and octave::file_editor_tab::handle_char_added().
void octave::octave_qscintilla::context_edit | ( | void | ) |
Definition at line 333 of file octave-qscintilla.cc.
References contextmenu_edit(), and get_actual_word().
Referenced by octave::file_editor_tab::context_edit().
void octave::octave_qscintilla::context_help_doc | ( | bool | documentation | ) |
Definition at line 770 of file octave-qscintilla.cc.
References contextmenu_help_doc(), and get_actual_word().
Referenced by octave::file_editor_tab::context_help().
|
signal |
Referenced by contextmenu_break_condition().
|
signal |
Referenced by contextmenu_break_once().
|
signal |
Referenced by contextmenu_edit().
void octave::octave_qscintilla::context_run | ( | void | ) |
Definition at line 340 of file octave-qscintilla.cc.
References contextmenu_run(), octave::command_editor::erase_empty_line(), and interpreter_event().
Referenced by octave::file_editor_tab::context_run().
|
privateslot |
Definition at line 1013 of file octave-qscintilla.cc.
References context_menu_break_condition_signal().
Referenced by contextMenuEvent().
|
privateslot |
Definition at line 1027 of file octave-qscintilla.cc.
References context_menu_break_once().
|
privateslot |
Definition at line 765 of file octave-qscintilla.cc.
References contextmenu_help_doc().
Referenced by contextMenuEvent().
|
privateslot |
Definition at line 776 of file octave-qscintilla.cc.
References context_menu_edit_signal(), and m_word_at_cursor.
Referenced by context_edit(), and contextMenuEvent().
|
privateslot |
Definition at line 760 of file octave-qscintilla.cc.
References contextmenu_help_doc().
Referenced by contextMenuEvent().
|
privateslot |
Definition at line 324 of file octave-qscintilla.cc.
References execute_command_in_terminal_signal(), m_word_at_cursor, and show_doc_signal().
Referenced by context_help_doc(), contextmenu_doc(), and contextmenu_help().
|
privateslot |
Definition at line 790 of file octave-qscintilla.cc.
References octave::command_editor::accept_line(), contextmenu_run_temp_error(), octave::resource_manager::create_tmp_file(), ctx_menu_run_finished_signal(), ed_show_dbg_file(), octave::command_editor::erase_empty_line(), Fhistory(), Fisdebugmode(), QtHandles::Utils::fromStdString(), octave::command_editor::get_current_line(), octave::base_qobject::get_resource_manager(), octave::resource_manager::get_settings(), interpreter_event(), octave::command_editor::interrupt_event_loop(), gui_pref::key, m_octave_qobj, octave_stdout, ovl(), path, octave::command_editor::redisplay(), octave::command_editor::replace_line(), octave::command_editor::set_initial_input(), octave::interpreter::source_file(), and QtHandles::Utils::toStdString().
Referenced by context_run().
|
privateslot |
Definition at line 781 of file octave-qscintilla.cc.
Referenced by contextmenu_run().
|
virtual |
Definition at line 246 of file octave-qscintilla.cc.
References contextmenu_break_condition(), contextmenu_doc(), contextmenu_edit(), contextmenu_help(), create_context_menu_signal(), get_global_textcursor_pos(), lexer, and m_word_at_cursor.
|
signal |
Referenced by contextMenuEvent().
|
privateslot |
Definition at line 984 of file octave-qscintilla.cc.
References ed_show_dbg_file(), focus_console_after_command_signal(), octave::base_qobject::get_resource_manager(), octave::resource_manager::get_settings(), interpreter_event(), gui_pref::key, m_octave_qobj, ovl(), and octave::resource_manager::remove_tmp_file().
Referenced by octave_qscintilla().
|
signal |
Referenced by octave_qscintilla(), and contextmenu_run().
|
privateslot |
Definition at line 1039 of file octave-qscintilla.cc.
References m_selection, m_selection_col, m_selection_line, and set_word_selection().
Referenced by octave_qscintilla().
|
protected |
Definition at line 1280 of file octave-qscintilla.cc.
|
signal |
Referenced by contextmenu_help_doc().
|
signal |
Referenced by ctx_menu_run_finished().
|
protected |
Definition at line 1052 of file octave-qscintilla.cc.
References status_update().
bool octave::octave_qscintilla::get_actual_word | ( | void | ) |
Definition at line 363 of file octave-qscintilla.cc.
References get_global_textcursor_pos(), lexer, and m_word_at_cursor.
Referenced by context_edit(), and context_help_doc().
void octave::octave_qscintilla::get_current_position | ( | int * | pos, |
int * | line, | ||
int * | col | ||
) |
Definition at line 386 of file octave-qscintilla.cc.
Referenced by octave::file_editor_tab::handle_char_added(), keyPressEvent(), set_word_selection(), and show_replace_action_tooltip().
void octave::octave_qscintilla::get_global_textcursor_pos | ( | QPoint * | global_pos, |
QPoint * | local_pos | ||
) |
Definition at line 352 of file octave-qscintilla.cc.
Referenced by contextMenuEvent(), get_actual_word(), and show_replace_action_tooltip().
int octave::octave_qscintilla::get_style | ( | int | pos = -1 | ) |
Definition at line 460 of file octave-qscintilla.cc.
Referenced by is_style_comment().
|
signal |
Referenced by context_run(), contextmenu_run(), and ctx_menu_run_finished().
int octave::octave_qscintilla::is_style_comment | ( | int | pos = -1 | ) |
Definition at line 473 of file octave-qscintilla.cc.
References get_style(), ST_BLOCK_COMMENT, ST_LINE_COMMENT, and ST_NONE.
Referenced by octave::file_editor_tab::handle_char_added().
|
protected |
Definition at line 1088 of file octave-qscintilla.cc.
References text::text(), get_current_position(), m_selection, m_selection_replacement, set_word_selection(), and show_replace_action_tooltip().
|
signal |
void octave::octave_qscintilla::set_selection_marker_color | ( | const QColor & | c | ) |
Definition at line 234 of file octave-qscintilla.cc.
References m_indicator_id, and octave::marker::selection.
Referenced by octave::file_editor_tab::update_lexer_settings().
void octave::octave_qscintilla::set_word_selection | ( | const QString & | word = QString () | ) |
Definition at line 730 of file octave-qscintilla.cc.
References clear_selection_markers(), get_current_position(), m_selection, m_selection_col, m_selection_line, and m_selection_replacement.
Referenced by cursor_position_changed(), octave::file_editor_tab::handle_double_click(), and keyPressEvent().
|
signal |
Referenced by contextmenu_help_doc().
|
protected |
Definition at line 1059 of file octave-qscintilla.cc.
References get_current_position(), get_global_textcursor_pos(), m_selection, m_selection_col, m_selection_line, and m_selection_replacement.
Referenced by keyPressEvent().
void octave::octave_qscintilla::show_selection_markers | ( | int | l1, |
int | c1, | ||
int | l2, | ||
int | c2 | ||
) |
Definition at line 752 of file octave-qscintilla.cc.
References m_indicator_id, and octave::marker::selection.
Referenced by octave::find_dialog::find(), and octave::file_editor_tab::handle_double_click().
void octave::octave_qscintilla::smart_indent | ( | bool | do_smart_indent, |
int | do_auto_close, | ||
int | line, | ||
int | ind_char_width | ||
) |
Definition at line 515 of file octave-qscintilla.cc.
References auto_close(), and octave::is_end().
Referenced by octave::file_editor_tab::handle_cursor_moved().
void octave::octave_qscintilla::smart_indent_line_or_selected_text | ( | int | lineFrom, |
int | lineTo | ||
) |
Definition at line 615 of file octave-qscintilla.cc.
Referenced by octave::file_editor_tab::do_smart_indent_line_or_selected_text().
|
signal |
Referenced by octave_qscintilla(), focusInEvent(), and text_changed().
|
privateslot |
Definition at line 1034 of file octave-qscintilla.cc.
References status_update().
Referenced by octave_qscintilla().
|
private |
Definition at line 139 of file octave-qscintilla.h.
Referenced by octave_qscintilla(), clear_selection_markers(), set_selection_marker_color(), and show_selection_markers().
|
private |
Definition at line 131 of file octave-qscintilla.h.
Referenced by comment_string(), contextmenu_run(), and ctx_menu_run_finished().
|
private |
Definition at line 135 of file octave-qscintilla.h.
Referenced by cursor_position_changed(), keyPressEvent(), set_word_selection(), and show_replace_action_tooltip().
|
private |
Definition at line 138 of file octave-qscintilla.h.
Referenced by cursor_position_changed(), set_word_selection(), and show_replace_action_tooltip().
|
private |
Definition at line 137 of file octave-qscintilla.h.
Referenced by cursor_position_changed(), set_word_selection(), and show_replace_action_tooltip().
|
private |
Definition at line 136 of file octave-qscintilla.h.
Referenced by keyPressEvent(), set_word_selection(), and show_replace_action_tooltip().
|
private |
Definition at line 133 of file octave-qscintilla.h.
Referenced by contextmenu_edit(), contextmenu_help_doc(), contextMenuEvent(), and get_actual_word().