#include "shortcut-manager.h"
Classes | |
class | shortcut_t |
Public Types | |
enum | { OSC_IMPORT = 0 , OSC_EXPORT = 1 , OSC_DEFAULT = 2 } |
Public Member Functions | |
shortcut_manager (base_qobject &oct_qobj) | |
shortcut_manager (const shortcut_manager &)=delete | |
~shortcut_manager (void)=default | |
void | fill_treewidget (QTreeWidget *tree_view) |
bool | import_export (int action) |
void | init_data (void) |
shortcut_manager & | operator= (const shortcut_manager &)=delete |
void | set_shortcut (QAction *action, const sc_pref &scpref) |
void | shortcut (QShortcut *sc, const sc_pref &scpref) |
void | write_shortcuts (gui_settings *settings, bool closing) |
Protected Slots | |
void | handle_double_clicked (QTreeWidgetItem *, int) |
void | shortcut_dialog_finished (int) |
void | shortcut_dialog_set_default () |
Private Member Functions | |
void | import_shortcuts (gui_settings *settings) |
void | init (const QString &, const sc_pref &scpref) |
bool | overwrite_all_shortcuts (void) |
void | shortcut_dialog (int) |
Private Attributes | |
QHash< QString, int > | m_action_hash |
QDialog * | m_dialog |
enter_shortcut * | m_edit_actual |
int | m_handled_index |
QHash< int, QTreeWidgetItem * > | m_index_item_hash |
QHash< QTreeWidgetItem *, int > | m_item_index_hash |
QLabel * | m_label_default |
QHash< QString, QTreeWidgetItem * > | m_level_hash |
base_qobject & | m_octave_qobj |
QList< shortcut_t > | m_sc |
QHash< QString, int > | m_shortcut_hash |
Definition at line 66 of file shortcut-manager.h.
anonymous enum |
Enumerator | |
---|---|
OSC_IMPORT | |
OSC_EXPORT | |
OSC_DEFAULT |
Definition at line 72 of file shortcut-manager.h.
octave::shortcut_manager::shortcut_manager | ( | base_qobject & | oct_qobj | ) |
Definition at line 116 of file shortcut-manager.cc.
|
delete |
|
default |
void octave::shortcut_manager::fill_treewidget | ( | QTreeWidget * | tree_view | ) |
Definition at line 370 of file shortcut-manager.cc.
References handle_double_clicked(), octave::shortcut_manager::shortcut_t::m_actual_sc, octave::shortcut_manager::shortcut_t::m_default_sc, octave::shortcut_manager::shortcut_t::m_description, m_dialog, m_index_item_hash, m_item_index_hash, m_level_hash, m_sc, octave::shortcut_manager::shortcut_t::m_settings_key, main(), sc_doc(), sc_dock_widget(), sc_edit_debug(), sc_edit_edit(), sc_edit_edit_find(), sc_edit_file(), sc_edit_file_cl(), sc_edit_find(), sc_edit_help(), sc_edit_run(), sc_edit_tabs(), sc_edit_view(), sc_edit_view_zoom(), sc_edit_zoom(), sc_main_debug(), sc_main_edit(), sc_main_file(), sc_main_help(), sc_main_news(), and sc_main_window().
Referenced by octave::settings_dialog::settings_dialog().
|
protectedslot |
Definition at line 559 of file shortcut-manager.cc.
References m_item_index_hash, and shortcut_dialog().
Referenced by fill_treewidget().
bool octave::shortcut_manager::import_export | ( | int | action | ) |
Definition at line 499 of file shortcut-manager.cc.
References octave::base_qobject::get_resource_manager(), octave::resource_manager::get_settings(), global_use_native_dialogs(), import_shortcuts(), m_octave_qobj, OSC_DEFAULT, OSC_EXPORT, OSC_IMPORT, overwrite_all_shortcuts(), and write_shortcuts().
Referenced by octave::settings_dialog::default_shortcut_set(), octave::settings_dialog::export_shortcut_set(), octave::settings_dialog::import_shortcut_set(), and overwrite_all_shortcuts().
|
private |
Definition at line 738 of file shortcut-manager.cc.
References octave::shortcut_manager::shortcut_t::m_actual_sc, octave::shortcut_manager::shortcut_t::m_default_sc, m_index_item_hash, m_sc, octave::shortcut_manager::shortcut_t::m_settings_key, and sc_group().
Referenced by import_export().
|
private |
Definition at line 618 of file shortcut-manager.cc.
References octave::base_qobject::get_resource_manager(), octave::resource_manager::get_settings(), gui_pref::key, sc_pref::key, m_action_hash, octave::shortcut_manager::shortcut_t::m_actual_sc, octave::shortcut_manager::shortcut_t::m_default_sc, octave::shortcut_manager::shortcut_t::m_description, m_octave_qobj, m_sc, octave::shortcut_manager::shortcut_t::m_settings_key, m_shortcut_hash, sc_main_ctrld(), and sc_main_file().
Referenced by init_data().
void octave::shortcut_manager::init_data | ( | void | ) |
Definition at line 127 of file shortcut-manager.cc.
References octave::base_qobject::get_resource_manager(), octave::resource_manager::get_settings(), init(), gui_pref::key, m_octave_qobj, sc_doc_go_back(), sc_doc_go_home(), sc_doc_go_next(), sc_dock_widget_close(), sc_dock_widget_dock(), sc_edit_debug_next_breakpoint(), sc_edit_debug_previous_breakpoint(), sc_edit_debug_remove_breakpoints(), sc_edit_debug_toggle_breakpoint(), sc_edit_edit_comment_selection(), sc_edit_edit_comment_var_selection(), sc_edit_edit_completion_list(), sc_edit_edit_conv_eol_mac(), sc_edit_edit_conv_eol_unix(), sc_edit_edit_conv_eol_winows(), sc_edit_edit_copy_line(), sc_edit_edit_cut(), sc_edit_edit_cut_line(), sc_edit_edit_delete_end_line(), sc_edit_edit_delete_end_word(), sc_edit_edit_delete_line(), sc_edit_edit_delete_start_line(), sc_edit_edit_delete_start_word(), sc_edit_edit_duplicate_selection(), sc_edit_edit_find_next(), sc_edit_edit_find_previous(), sc_edit_edit_find_replace(), sc_edit_edit_goto_line(), sc_edit_edit_indent_selection(), sc_edit_edit_lower_case(), sc_edit_edit_move_to_brace(), sc_edit_edit_next_bookmark(), sc_edit_edit_preferences(), sc_edit_edit_previous_bookmark(), sc_edit_edit_redo(), sc_edit_edit_remove_bookmark(), sc_edit_edit_select_to_brace(), sc_edit_edit_smart_indent_line_or_selection(), sc_edit_edit_styles_preferences(), sc_edit_edit_toggle_bookmark(), sc_edit_edit_transpose_line(), sc_edit_edit_uncomment_selection(), sc_edit_edit_unindent_selection(), sc_edit_edit_upper_case(), sc_edit_file_close(), sc_edit_file_close_all(), sc_edit_file_close_other(), sc_edit_file_edit_function(), sc_edit_file_print(), sc_edit_file_save(), sc_edit_file_save_as(), sc_edit_help_doc_keyword(), sc_edit_help_help_keyword(), sc_edit_run_run_file(), sc_edit_run_run_selection(), sc_edit_tabs_move_tab_left(), sc_edit_tabs_move_tab_right(), sc_edit_tabs_switch_left_tab(), sc_edit_tabs_switch_right_tab(), sc_edit_view_show_eol_chars(), sc_edit_view_show_hscrollbar(), sc_edit_view_show_ind_guides(), sc_edit_view_show_line_numbers(), sc_edit_view_show_long_line(), sc_edit_view_show_statusbar(), sc_edit_view_show_toolbar(), sc_edit_view_show_white_spaces(), sc_edit_view_sort_tabs(), sc_edit_view_zoom_in(), sc_edit_view_zoom_normal(), sc_edit_view_zoom_out(), sc_main_ctrld(), sc_main_debug_continue(), sc_main_debug_quit(), sc_main_debug_step_into(), sc_main_debug_step_out(), sc_main_debug_step_over(), sc_main_edit_clear_clipboard(), sc_main_edit_clear_command_window(), sc_main_edit_clear_history(), sc_main_edit_clear_workspace(), sc_main_edit_copy(), sc_main_edit_find_in_files(), sc_main_edit_paste(), sc_main_edit_preferences(), sc_main_edit_select_all(), sc_main_edit_set_path(), sc_main_edit_undo(), sc_main_file_exit(), sc_main_file_load_workspace(), sc_main_file_new_figure(), sc_main_file_new_file(), sc_main_file_new_function(), sc_main_file_open_file(), sc_main_file_save_workspace(), sc_main_help_about(), sc_main_help_contribute(), sc_main_help_developer(), sc_main_help_ondisk_doc(), sc_main_help_online_doc(), sc_main_help_packages(), sc_main_help_report_bug(), sc_main_news_community_news(), sc_main_news_release_notes(), sc_main_window_command(), sc_main_window_doc(), sc_main_window_editor(), sc_main_window_file_browser(), sc_main_window_history(), sc_main_window_previous_dock(), sc_main_window_reset(), sc_main_window_show_command(), sc_main_window_show_doc(), sc_main_window_show_editor(), sc_main_window_show_file_browser(), sc_main_window_show_history(), sc_main_window_show_variable_editor(), sc_main_window_show_workspace(), sc_main_window_variable_editor(), and sc_main_window_workspace().
Referenced by octave::main_window::main_window().
|
delete |
|
private |
Definition at line 762 of file shortcut-manager.cc.
References import_export(), and OSC_EXPORT.
Referenced by import_export().
void octave::shortcut_manager::set_shortcut | ( | QAction * | action, |
const sc_pref & | scpref | ||
) |
Definition at line 338 of file shortcut-manager.cc.
References octave::base_qobject::get_resource_manager(), octave::resource_manager::get_settings(), sc_pref::key, m_action_hash, m_octave_qobj, and m_sc.
Referenced by octave::octave_dock_widget::octave_dock_widget(), octave::main_window::configure_shortcuts(), octave::file_editor::handle_exit_debug_mode(), octave::dw_main_window::notice_settings(), octave::documentation::notice_settings(), and octave::file_editor::set_shortcuts().
void octave::shortcut_manager::shortcut | ( | QShortcut * | sc, |
const sc_pref & | scpref | ||
) |
Definition at line 354 of file shortcut-manager.cc.
References octave::base_qobject::get_resource_manager(), octave::resource_manager::get_settings(), sc_pref::key, m_action_hash, m_octave_qobj, and m_sc.
Referenced by octave::documentation::notice_settings(), and shortcut_dialog_finished().
|
private |
Definition at line 646 of file shortcut-manager.cc.
References box(), m_dialog, m_edit_actual, m_handled_index, m_label_default, m_sc, shortcut_dialog_finished(), and shortcut_dialog_set_default().
Referenced by handle_double_clicked().
|
protectedslot |
Definition at line 571 of file shortcut-manager.cc.
References octave::shortcut_manager::shortcut_t::m_actual_sc, m_edit_actual, m_handled_index, m_index_item_hash, m_sc, m_shortcut_hash, shortcut(), and warning().
Referenced by shortcut_dialog().
|
protectedslot |
Definition at line 613 of file shortcut-manager.cc.
References m_edit_actual, and m_label_default.
Referenced by shortcut_dialog().
void octave::shortcut_manager::write_shortcuts | ( | gui_settings * | settings, |
bool | closing | ||
) |
Definition at line 310 of file shortcut-manager.cc.
References gui_pref::key, m_dialog, m_sc, sc_group(), sc_main_ctrld(), and sc_main_file().
Referenced by import_export(), and octave::settings_dialog::write_changed_settings().
|
private |
Definition at line 162 of file shortcut-manager.h.
Referenced by init(), set_shortcut(), and shortcut().
|
private |
Definition at line 167 of file shortcut-manager.h.
Referenced by fill_treewidget(), shortcut_dialog(), and write_shortcuts().
|
private |
Definition at line 168 of file shortcut-manager.h.
Referenced by shortcut_dialog(), shortcut_dialog_finished(), and shortcut_dialog_set_default().
|
private |
Definition at line 170 of file shortcut-manager.h.
Referenced by shortcut_dialog(), and shortcut_dialog_finished().
|
private |
Definition at line 164 of file shortcut-manager.h.
Referenced by fill_treewidget(), import_shortcuts(), and shortcut_dialog_finished().
|
private |
Definition at line 165 of file shortcut-manager.h.
Referenced by fill_treewidget(), and handle_double_clicked().
|
private |
Definition at line 169 of file shortcut-manager.h.
Referenced by shortcut_dialog(), and shortcut_dialog_set_default().
|
private |
Definition at line 163 of file shortcut-manager.h.
Referenced by fill_treewidget().
|
private |
Definition at line 158 of file shortcut-manager.h.
Referenced by import_export(), init(), init_data(), set_shortcut(), and shortcut().
|
private |
Definition at line 160 of file shortcut-manager.h.
Referenced by fill_treewidget(), import_shortcuts(), init(), set_shortcut(), shortcut(), shortcut_dialog(), shortcut_dialog_finished(), and write_shortcuts().
|
private |
Definition at line 161 of file shortcut-manager.h.
Referenced by init(), and shortcut_dialog_finished().