Loading...
Searching...
No Matches
BALL::VIEW::ShortcutRegistry Class Reference

`#include <BALL/VIEW/KERNEL/shortcutRegistry.h>`

Inheritance diagram for BALL::VIEW::ShortcutRegistry:

## Signals

void | shortcutChanged ()

## Public Member Functions

| ShortcutRegistry ()
virtual | ~ShortcutRegistry ()
void | registerShortcut (String description, QAction *shortcut)
void | clear ()
void | clearKeySequences ()
| Clear all key sequences for all registered QActions.
bool | readShortcutsFromFile (const String &filename)
| Read the shortcuts from a data file.
bool | writeShortcutsToFile (const String &filename)
| Write the shortcuts to a data file.
bool | changeShortcut (QAction *shortcut, const String &new_sequence)
bool | changeShortcut (int index, const String &new_sequence)
size_t | size ()
bool | hasDescription (const String &description)
bool | hasKey (const QString &key_seq)
bool | hasKey (const QKeySequence &key_seq)
bool | hasKey (const String &key_seq)
std::pair< String, QAction * > | operator[] (Index i)
virtual bool | getValue (String &) const
| Overload this in derived classes!
virtual bool | setValue (const String &)
| Overload this in derived classes!
Public Member Functions inherited from BALL::Embeddable
| Embeddable (const String &identifier="<Embeddable>")
| Embeddable (const Embeddable &embeddable)
virtual | ~Embeddable ()
void | setIdentifier (const String &identifier)
const String & | getIdentifier () const
void | unregisterThis ()
virtual void | registerThis ()
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const
Public Member Functions inherited from BALL::VIEW::PreferencesEntry::ExtendedPreferencesObject
| ExtendedPreferencesObject ()
virtual | ~ExtendedPreferencesObject ()

## Protected Member Functions

std::pair< String, QAction * > | getEntry_ (Index pos)

## Protected Attributes

std::map< String, QAction * > | shortcuts_
std::map< String, String > | unknown_shortcuts_
HashSet< String > | shortcut_keys_

## Static Protected Attributes

static const char * | BETWEEN_SC_SEPERATOR
static const char * | IN_SC_SEPERATOR

## Additional Inherited Members

Public Types inherited from BALL::Embeddable
typedef std::vector< Embeddable * > | EmbeddableVector
static void | registerInstance_ (const std::type_info &type, const Embeddable *instance)
static void | unregisterInstance_ (const Embeddable *instance)
static Size | countInstances_ (const std::type_info &type)
static Embeddable * | getInstance_ (const std::type_info &type, Position index)
static Embeddable * | getInstance_ (const std::type_info &type, const String &identifier)

## Detailed Description

ShortcutRegistry. It takes care of handling all shortcuts. It is responsible for registering, changing single shortcuts or loading entire shortcut-configuration files.

Definition at line 36 of file shortcutRegistry.h.

## Constructor & Destructor Documentation

## ShortcutRegistry()

BALL::VIEW::ShortcutRegistry::ShortcutRegistry | ( |  | ) |

## ~ShortcutRegistry()

virtual BALL::VIEW::ShortcutRegistry::~ShortcutRegistry | ( |  | ) |

virtual

Destructor

## Member Function Documentation

## changeShortcut() [1/2]

bool BALL::VIEW::ShortcutRegistry::changeShortcut | ( | int | index,
|  | const String & | new_sequence )

## changeShortcut() [2/2]

bool BALL::VIEW::ShortcutRegistry::changeShortcut | ( | QAction * | shortcut,
|  | const String & | new_sequence )

## clear()

void BALL::VIEW::ShortcutRegistry::clear | ( |  | ) |

## clearKeySequences()

void BALL::VIEW::ShortcutRegistry::clearKeySequences | ( |  | ) |

Clear all key sequences for all registered QActions.

## getEntry_()

std::pair< String, QAction * > BALL::VIEW::ShortcutRegistry::getEntry_ | ( | Index | pos | ) |

protected

## getValue()

virtual bool BALL::VIEW::ShortcutRegistry::getValue | ( | String & |  | ) | const

virtual

Overload this in derived classes!

Implements BALL::VIEW::PreferencesEntry::ExtendedPreferencesObject.

## hasDescription()

bool BALL::VIEW::ShortcutRegistry::hasDescription | ( | const String & | description | ) |

## hasKey() [1/3]

bool BALL::VIEW::ShortcutRegistry::hasKey | ( | const QKeySequence & | key_seq | ) |

## hasKey() [2/3]

bool BALL::VIEW::ShortcutRegistry::hasKey | ( | const QString & | key_seq | ) |

## hasKey() [3/3]

bool BALL::VIEW::ShortcutRegistry::hasKey | ( | const String & | key_seq | ) |

## operator[]()

std::pair< String, QAction * > BALL::VIEW::ShortcutRegistry::operator[] | ( | Index | i | ) |

## readShortcutsFromFile()

bool BALL::VIEW::ShortcutRegistry::readShortcutsFromFile | ( | const String & | filename | ) |

Read the shortcuts from a data file.

## registerShortcut()

void BALL::VIEW::ShortcutRegistry::registerShortcut | ( | String | description,
|  | QAction * | shortcut )

## setValue()

virtual bool BALL::VIEW::ShortcutRegistry::setValue | ( | const String & |  | ) |

virtual

Overload this in derived classes!

Implements BALL::VIEW::PreferencesEntry::ExtendedPreferencesObject.

## shortcutChanged

void BALL::VIEW::ShortcutRegistry::shortcutChanged | ( |  | ) |

signal

## size()

size_t BALL::VIEW::ShortcutRegistry::size | ( |  | ) |

## writeShortcutsToFile()

bool BALL::VIEW::ShortcutRegistry::writeShortcutsToFile | ( | const String & | filename | ) |

Write the shortcuts to a data file.

## Member Data Documentation

## BETWEEN_SC_SEPERATOR

const char* BALL::VIEW::ShortcutRegistry::BETWEEN_SC_SEPERATOR

static protected

Definition at line 89 of file shortcutRegistry.h.

## IN_SC_SEPERATOR

const char* BALL::VIEW::ShortcutRegistry::IN_SC_SEPERATOR

static protected

Definition at line 90 of file shortcutRegistry.h.

## shortcut_keys_

HashSet<String> BALL::VIEW::ShortcutRegistry::shortcut_keys_

protected

Definition at line 96 of file shortcutRegistry.h.

## shortcuts_

std::map<String, QAction*> BALL::VIEW::ShortcutRegistry::shortcuts_

protected

Definition at line 94 of file shortcutRegistry.h.

## unknown_shortcuts_

std::map<String, String> BALL::VIEW::ShortcutRegistry::unknown_shortcuts_

protected

Definition at line 95 of file shortcutRegistry.h.