OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CSMPrefs::ShortcutManager Class Reference

Class used to track and update shortcuts/sequences. More...

#include <shortcutmanager.hpp>

Inheritance diagram for CSMPrefs::ShortcutManager:
Collaboration diagram for CSMPrefs::ShortcutManager:

Public Member Functions

 ShortcutManager ()
 
void addShortcut (Shortcut *shortcut)
 The shortcut class will do this automatically. More...
 
void removeShortcut (Shortcut *shortcut)
 The shortcut class will do this automatically. More...
 
bool getSequence (const std::string &name, QKeySequence &sequence) const
 
void setSequence (const std::string &name, const QKeySequence &sequence)
 
bool getModifier (const std::string &name, int &modifier) const
 
void setModifier (const std::string &name, int modifier)
 
std::string convertToString (const QKeySequence &sequence) const
 
std::string convertToString (int modifier) const
 
std::string convertToString (const QKeySequence &sequence, int modifier) const
 
void convertFromString (const std::string &data, QKeySequence &sequence) const
 
void convertFromString (const std::string &data, int &modifier) const
 
void convertFromString (const std::string &data, QKeySequence &sequence, int &modifier) const
 
QString processToolTip (const QString &toolTip) const
 Replaces "{sequence-name}" or "{modifier-name}" with the appropriate text. More...
 

Private Types

typedef std::multimap
< std::string, Shortcut * > 
ShortcutMap
 
typedef std::map< std::string,
QKeySequence > 
SequenceMap
 
typedef std::map< std::string,
int
ModifierMap
 
typedef std::map< int,
std::string > 
NameMap
 
typedef std::map< std::string,
int
KeyMap
 

Private Member Functions

void createLookupTables ()
 

Private Attributes

ShortcutMap mShortcuts
 
SequenceMap mSequences
 
ModifierMap mModifiers
 
NameMap mNames
 
KeyMap mKeys
 
ShortcutEventHandlermEventHandler
 

Static Private Attributes

static const std::pair< int,
const char * > 
QtKeys []
 

Detailed Description

Class used to track and update shortcuts/sequences.

Member Typedef Documentation

typedef std::map<std::string, int> CSMPrefs::ShortcutManager::KeyMap
private
typedef std::map<std::string, int> CSMPrefs::ShortcutManager::ModifierMap
private
typedef std::map<int, std::string> CSMPrefs::ShortcutManager::NameMap
private
typedef std::map<std::string, QKeySequence> CSMPrefs::ShortcutManager::SequenceMap
private
typedef std::multimap<std::string, Shortcut*> CSMPrefs::ShortcutManager::ShortcutMap
private

Constructor & Destructor Documentation

CSMPrefs::ShortcutManager::ShortcutManager ( )

Here is the call graph for this function:

Member Function Documentation

void CSMPrefs::ShortcutManager::addShortcut ( Shortcut shortcut)

The shortcut class will do this automatically.

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMPrefs::ShortcutManager::convertFromString ( const std::string &  data,
QKeySequence &  sequence 
) const

Here is the caller graph for this function:

void CSMPrefs::ShortcutManager::convertFromString ( const std::string &  data,
int modifier 
) const
void CSMPrefs::ShortcutManager::convertFromString ( const std::string &  data,
QKeySequence &  sequence,
int modifier 
) const

Here is the call graph for this function:

std::string CSMPrefs::ShortcutManager::convertToString ( const QKeySequence &  sequence) const

Here is the caller graph for this function:

std::string CSMPrefs::ShortcutManager::convertToString ( int  modifier) const
std::string CSMPrefs::ShortcutManager::convertToString ( const QKeySequence &  sequence,
int  modifier 
) const

Here is the call graph for this function:

void CSMPrefs::ShortcutManager::createLookupTables ( )
private

Here is the caller graph for this function:

bool CSMPrefs::ShortcutManager::getModifier ( const std::string &  name,
int modifier 
) const

Here is the caller graph for this function:

bool CSMPrefs::ShortcutManager::getSequence ( const std::string &  name,
QKeySequence &  sequence 
) const

Here is the caller graph for this function:

QString CSMPrefs::ShortcutManager::processToolTip ( const QString &  toolTip) const

Replaces "{sequence-name}" or "{modifier-name}" with the appropriate text.

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMPrefs::ShortcutManager::removeShortcut ( Shortcut shortcut)

The shortcut class will do this automatically.

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMPrefs::ShortcutManager::setModifier ( const std::string &  name,
int  modifier 
)

Here is the caller graph for this function:

void CSMPrefs::ShortcutManager::setSequence ( const std::string &  name,
const QKeySequence &  sequence 
)

Here is the caller graph for this function:

Member Data Documentation

ShortcutEventHandler* CSMPrefs::ShortcutManager::mEventHandler
private
KeyMap CSMPrefs::ShortcutManager::mKeys
private
ModifierMap CSMPrefs::ShortcutManager::mModifiers
private
NameMap CSMPrefs::ShortcutManager::mNames
private
SequenceMap CSMPrefs::ShortcutManager::mSequences
private
ShortcutMap CSMPrefs::ShortcutManager::mShortcuts
private
const std::pair< int, const char * > CSMPrefs::ShortcutManager::QtKeys
staticprivate

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