GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Public Types | Public Slots | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Slots | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
shortcut_manager Class Reference

#include "shortcut-manager.h"

Inheritance diagram for shortcut_manager:
Inheritance graph
[legend]
Collaboration diagram for shortcut_manager:
Collaboration graph
[legend]

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 ()
 
 ~shortcut_manager ()
 

Static Public Member Functions

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

Static Public Attributes

static shortcut_managerinstance = 0
 

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_action_hash
 
QDialog_dialog
 
enter_shortcut_edit_actual
 
int _handled_index
 
QHash< int, QTreeWidgetItem * > _index_item_hash
 
QHash< QTreeWidgetItem *, int_item_index_hash
 
QLabel * _label_default
 
QHash< QString, QTreeWidgetItem * > _level_hash
 
QList< shortcut_t_sc
 
QSettings * _settings
 
QHash< QString, int_shortcut_hash
 

Detailed Description

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

Member Enumeration Documentation

anonymous enum
Enumerator
OSC_IMPORT 
OSC_EXPORT 
OSC_DEFAULT 

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

Constructor & Destructor Documentation

shortcut_manager::shortcut_manager ( )

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

References _settings, and resource_manager::get_settings().

Referenced by instance_ok().

shortcut_manager::~shortcut_manager ( )

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

Member Function Documentation

static void shortcut_manager::cleanup_instance ( void  )
inlinestaticslot

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

References instance.

void shortcut_manager::do_fill_treewidget ( QTreeWidget *  tree_view)
private
bool shortcut_manager::do_import_export ( int  action)
private
void shortcut_manager::do_init_data ( )
private

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

References _settings, and init().

Referenced by init_data().

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

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

References _action_hash, _sc, and _settings.

Referenced by set_shortcut().

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

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

References _dialog, and _sc.

Referenced by do_import_export(), and write_shortcuts().

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

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

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

Referenced by settings_dialog::settings_dialog().

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

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

References _item_index_hash, and shortcut_dialog().

Referenced by do_fill_treewidget().

static void shortcut_manager::import_export ( int  action)
inlinestatic
void shortcut_manager::import_shortcuts ( QSettings *  settings)
private
void shortcut_manager::init ( const QString &  description,
const QString &  key,
const QKeySequence &  def_sc 
)
private
static void shortcut_manager::init_data ( )
inlinestatic

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

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

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

bool shortcut_manager::instance_ok ( void  )
staticprivate
bool shortcut_manager::overwrite_all_shortcuts ( void  )
private

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

References do_import_export(), and OSC_EXPORT.

Referenced by do_import_export().

static void shortcut_manager::set_shortcut ( QAction *  action,
const QString &  key 
)
inlinestatic
void shortcut_manager::shortcut_dialog ( int  index)
private
void shortcut_manager::shortcut_dialog_finished ( int  result)
protectedslot
void shortcut_manager::shortcut_dialog_set_default ( )
protectedslot

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

References _edit_actual, and _label_default.

Referenced by shortcut_dialog().

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

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

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

Referenced by settings_dialog::write_changed_settings().

Member Data Documentation

QHash<QString, int> shortcut_manager::_action_hash
private

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

Referenced by do_set_shortcut(), and init().

QDialog* shortcut_manager::_dialog
private

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

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

enter_shortcut* shortcut_manager::_edit_actual
private
int shortcut_manager::_handled_index
private

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

Referenced by shortcut_dialog(), and shortcut_dialog_finished().

QHash<int, QTreeWidgetItem*> shortcut_manager::_index_item_hash
private
QHash<QTreeWidgetItem*, int> shortcut_manager::_item_index_hash
private

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

Referenced by do_fill_treewidget(), and handle_double_clicked().

QLabel* shortcut_manager::_label_default
private

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

Referenced by shortcut_dialog(), and shortcut_dialog_set_default().

QHash<QString, QTreeWidgetItem*> shortcut_manager::_level_hash
private

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

Referenced by do_fill_treewidget().

QList<shortcut_t> shortcut_manager::_sc
private
QSettings* shortcut_manager::_settings
private

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

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

QHash<QString, int> shortcut_manager::_shortcut_hash
private

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

Referenced by init(), and shortcut_dialog_finished().

shortcut_manager * shortcut_manager::instance = 0
static

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