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

Users of this class should install it as an event handler. More...

#include <shortcuteventhandler.hpp>

Inheritance diagram for CSMPrefs::ShortcutEventHandler:
Collaboration diagram for CSMPrefs::ShortcutEventHandler:

Public Member Functions

 ShortcutEventHandler (QObject *parent)
 
void addShortcut (Shortcut *shortcut)
 
void removeShortcut (Shortcut *shortcut)
 

Protected Member Functions

bool eventFilter (QObject *watched, QEvent *event)
 

Private Types

enum  MatchResult { Matches_WithMod, Matches_NoMod, Matches_Not }
 
typedef std::vector< Shortcut * > ShortcutList
 
typedef std::map< QWidget
*, QWidget * > 
WidgetMap
 
typedef std::map< QWidget
*, ShortcutList
ShortcutMap
 

Private Slots

void widgetDestroyed ()
 

Private Member Functions

void updateParent (QWidget *widget)
 
bool activate (QWidget *widget, unsigned int mod, unsigned int button)
 
bool deactivate (QWidget *widget, unsigned int mod, unsigned int button)
 
bool checkModifier (unsigned int mod, unsigned int button, Shortcut *shortcut, bool activate)
 
MatchResult match (unsigned int mod, unsigned int button, unsigned int value)
 

Static Private Member Functions

static bool sort (const std::pair< MatchResult, Shortcut * > &left, const std::pair< MatchResult, Shortcut * > &right)
 

Private Attributes

WidgetMap mChildParentRelations
 
ShortcutMap mWidgetShortcuts
 

Detailed Description

Users of this class should install it as an event handler.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
Matches_WithMod 
Matches_NoMod 
Matches_Not 

Constructor & Destructor Documentation

CSMPrefs::ShortcutEventHandler::ShortcutEventHandler ( QObject parent)

Member Function Documentation

bool CSMPrefs::ShortcutEventHandler::activate ( QWidget widget,
unsigned int  mod,
unsigned int  button 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool CSMPrefs::ShortcutEventHandler::checkModifier ( unsigned int  mod,
unsigned int  button,
Shortcut shortcut,
bool  activate 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

bool CSMPrefs::ShortcutEventHandler::deactivate ( QWidget widget,
unsigned int  mod,
unsigned int  button 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

bool CSMPrefs::ShortcutEventHandler::eventFilter ( QObject watched,
QEvent *  event 
)
protected

Here is the call graph for this function:

ShortcutEventHandler::MatchResult CSMPrefs::ShortcutEventHandler::match ( unsigned int  mod,
unsigned int  button,
unsigned int  value 
)
private

Here is the caller graph for this function:

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

Here is the caller graph for this function:

bool CSMPrefs::ShortcutEventHandler::sort ( const std::pair< MatchResult, Shortcut * > &  left,
const std::pair< MatchResult, Shortcut * > &  right 
)
staticprivate

Here is the caller graph for this function:

void CSMPrefs::ShortcutEventHandler::updateParent ( QWidget widget)
private

Here is the caller graph for this function:

void CSMPrefs::ShortcutEventHandler::widgetDestroyed ( )
privateslot

Here is the caller graph for this function:

Member Data Documentation

WidgetMap CSMPrefs::ShortcutEventHandler::mChildParentRelations
private
ShortcutMap CSMPrefs::ShortcutEventHandler::mWidgetShortcuts
private

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