GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::shortcut_manager Class Reference

#include "shortcut-manager.h"

Inheritance diagram for octave::shortcut_manager:
Collaboration diagram for octave::shortcut_manager:

Classes

class  shortcut_t
 

Public Types

enum  { OSC_IMPORT = 0, OSC_EXPORT = 1, OSC_DEFAULT = 2 }
 

Public Slots

static void cleanup_instance (void)
 

Public Member Functions

 shortcut_manager (void)
 
 shortcut_manager (const shortcut_manager &)=delete
 
 ~shortcut_manager (void)=default
 
shortcut_manageroperator= (const shortcut_manager &)=delete
 

Static Public Member Functions

static void fill_treewidget (QTreeWidget *tree_view)
 
static void import_export (int action)
 
static void init_data (void)
 
static void set_shortcut (QAction *action, const QString &key)
 
static void write_shortcuts (QSettings *settings, bool closing)
 

Static Public Attributes

static shortcut_managerinstance = nullptr
 

Protected Slots

void handle_double_clicked (QTreeWidgetItem *, int)
 
void shortcut_dialog_finished (int)
 
void shortcut_dialog_set_default ()
 

Private Member Functions

void do_fill_treewidget (QTreeWidget *tree_view)
 
bool do_import_export (int action)
 
void do_init_data ()
 
void do_set_shortcut (QAction *action, const QString &key)
 
void do_write_shortcuts (QSettings *settings, bool closing)
 
void import_shortcuts (QSettings *settings)
 
void init (const QString &, const QString &, const QKeySequence &)
 
bool overwrite_all_shortcuts (void)
 
void shortcut_dialog (int)
 

Static Private Member Functions

static bool instance_ok (void)
 

Private Attributes

QHash< QString, int > m_action_hash
 
QDialogm_dialog
 
enter_shortcutm_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
 
QList< shortcut_tm_sc
 
QSettings * m_settings
 
QHash< QString, int > m_shortcut_hash
 

Detailed Description

Definition at line 57 of file shortcut-manager.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
OSC_IMPORT 
OSC_EXPORT 
OSC_DEFAULT 

Definition at line 63 of file shortcut-manager.h.

Constructor & Destructor Documentation

◆ shortcut_manager() [1/2]

octave::shortcut_manager::shortcut_manager ( void  )

Definition at line 97 of file shortcut-manager.cc.

References octave::resource_manager::get_settings(), and m_settings.

Referenced by instance_ok().

◆ shortcut_manager() [2/2]

octave::shortcut_manager::shortcut_manager ( const shortcut_manager )
delete

◆ ~shortcut_manager()

octave::shortcut_manager::~shortcut_manager ( void  )
default

Member Function Documentation

◆ cleanup_instance

static void octave::shortcut_manager::cleanup_instance ( void  )
inlinestaticslot

Definition at line 114 of file shortcut-manager.h.

References instance.

◆ do_fill_treewidget()

void octave::shortcut_manager::do_fill_treewidget ( QTreeWidget *  tree_view)
private

◆ do_import_export()

bool octave::shortcut_manager::do_import_export ( int  action)
private

◆ do_init_data()

void octave::shortcut_manager::do_init_data ( void  )
private

Definition at line 210 of file shortcut-manager.cc.

References init(), and m_settings.

Referenced by init_data().

◆ do_set_shortcut()

void octave::shortcut_manager::do_set_shortcut ( QAction *  action,
const QString &  key 
)
private

Definition at line 499 of file shortcut-manager.cc.

References m_action_hash, m_sc, and m_settings.

Referenced by set_shortcut().

◆ do_write_shortcuts()

void octave::shortcut_manager::do_write_shortcuts ( QSettings *  settings,
bool  closing 
)
private

Definition at line 473 of file shortcut-manager.cc.

References i, m_dialog, and m_sc.

Referenced by do_import_export(), and write_shortcuts().

◆ fill_treewidget()

static void octave::shortcut_manager::fill_treewidget ( QTreeWidget *  tree_view)
inlinestatic

Definition at line 98 of file shortcut-manager.h.

References do_fill_treewidget(), instance, and instance_ok().

◆ handle_double_clicked

void octave::shortcut_manager::handle_double_clicked ( QTreeWidgetItem *  item,
int  col 
)
protectedslot

Definition at line 109 of file shortcut-manager.cc.

References i, m_item_index_hash, and shortcut_dialog().

Referenced by do_fill_treewidget().

◆ import_export()

static void octave::shortcut_manager::import_export ( int  action)
inlinestatic

Definition at line 104 of file shortcut-manager.h.

References do_import_export(), instance, and instance_ok().

◆ import_shortcuts()

void octave::shortcut_manager::import_shortcuts ( QSettings *  settings)
private

Definition at line 737 of file shortcut-manager.cc.

References i, m_index_item_hash, m_sc, and sc.

Referenced by do_import_export().

◆ init()

void octave::shortcut_manager::init ( const QString &  description,
const QString &  key,
const QKeySequence &  def_sc 
)
private

◆ init_data()

static void octave::shortcut_manager::init_data ( void  )
inlinestatic

Definition at line 80 of file shortcut-manager.h.

References do_init_data(), instance, and instance_ok().

Referenced by octave::gui_application::execute().

◆ instance_ok()

bool octave::shortcut_manager::instance_ok ( void  )
staticprivate

◆ operator=()

shortcut_manager& octave::shortcut_manager::operator= ( const shortcut_manager )
delete

◆ overwrite_all_shortcuts()

bool octave::shortcut_manager::overwrite_all_shortcuts ( void  )
private

Definition at line 761 of file shortcut-manager.cc.

References do_import_export(), and OSC_EXPORT.

Referenced by do_import_export().

◆ set_shortcut()

static void octave::shortcut_manager::set_shortcut ( QAction *  action,
const QString &  key 
)
inlinestatic

◆ shortcut_dialog()

void octave::shortcut_manager::shortcut_dialog ( int  index)
private

◆ shortcut_dialog_finished

void octave::shortcut_manager::shortcut_dialog_finished ( int  result)
protectedslot

◆ shortcut_dialog_set_default

void octave::shortcut_manager::shortcut_dialog_set_default ( void  )
protectedslot

Definition at line 163 of file shortcut-manager.cc.

References m_edit_actual, and m_label_default.

Referenced by shortcut_dialog().

◆ write_shortcuts()

static void octave::shortcut_manager::write_shortcuts ( QSettings *  settings,
bool  closing 
)
inlinestatic

Definition at line 86 of file shortcut-manager.h.

References do_write_shortcuts(), instance, and instance_ok().

Member Data Documentation

◆ instance

shortcut_manager * octave::shortcut_manager::instance = nullptr
static

◆ m_action_hash

QHash<QString, int> octave::shortcut_manager::m_action_hash
private

Definition at line 182 of file shortcut-manager.h.

Referenced by do_set_shortcut(), and init().

◆ m_dialog

QDialog* octave::shortcut_manager::m_dialog
private

Definition at line 187 of file shortcut-manager.h.

Referenced by do_fill_treewidget(), do_write_shortcuts(), and shortcut_dialog().

◆ m_edit_actual

enter_shortcut* octave::shortcut_manager::m_edit_actual
private

◆ m_handled_index

int octave::shortcut_manager::m_handled_index
private

Definition at line 190 of file shortcut-manager.h.

Referenced by shortcut_dialog(), and shortcut_dialog_finished().

◆ m_index_item_hash

QHash<int, QTreeWidgetItem*> octave::shortcut_manager::m_index_item_hash
private

◆ m_item_index_hash

QHash<QTreeWidgetItem*, int> octave::shortcut_manager::m_item_index_hash
private

Definition at line 185 of file shortcut-manager.h.

Referenced by do_fill_treewidget(), and handle_double_clicked().

◆ m_label_default

QLabel* octave::shortcut_manager::m_label_default
private

Definition at line 189 of file shortcut-manager.h.

Referenced by shortcut_dialog(), and shortcut_dialog_set_default().

◆ m_level_hash

QHash<QString, QTreeWidgetItem*> octave::shortcut_manager::m_level_hash
private

Definition at line 183 of file shortcut-manager.h.

Referenced by do_fill_treewidget().

◆ m_sc

◆ m_settings

QSettings* octave::shortcut_manager::m_settings
private

Definition at line 192 of file shortcut-manager.h.

Referenced by do_init_data(), do_set_shortcut(), init(), and shortcut_manager().

◆ m_shortcut_hash

QHash<QString, int> octave::shortcut_manager::m_shortcut_hash
private

Definition at line 181 of file shortcut-manager.h.

Referenced by init(), and shortcut_dialog_finished().


The documentation for this class was generated from the following files: