|
MeVisLab Toolbox Reference
|
#include <ManagedKeyboardShortcut.h>
Public Member Functions | |
| ManagedKeyboardShortcut () | |
| The default constructor creates an invalid shortcut. | |
| ManagedKeyboardShortcut (int modifiers, SoKeyboardEvent::Key key) | |
Creates shortcut with given key and key modifiers; see SoInteraction for possible key modifiers. | |
| bool | matches (int modifiers, SoKeyboardEvent::Key key) const |
Returns whether the shortcut matches the given modifiers and key; see SoInteraction for possible modifiers. | |
| bool | isValid () const |
| Returns whether the shortcut is valid. | |
| int | getModifiers () const |
| Returns the required key modifiers. | |
| SoKeyboardEvent::Key | getKey () const |
| Returns the required key. | |
| std::string | toString () const |
| Returns a string representation of this shortcut (see fromString()). | |
Static Public Member Functions | |
| static ManagedKeyboardShortcut | fromString (const std::string &s) |
| Static Public Member Functions inherited from ManagedActionTrigger | |
| static std::list< std::string > | splitString (const std::string &s, char c, bool doNotSplitAtLastChar=false) |
| static std::string | strip (const std::string &s) |
| Strips whitespaces away. | |
| template<typename T> | |
| static std::string | join (const std::list< T > &l, const std::string &s) |
Joins a list of objects having a .toString() method, using a separator string s. | |
Additional Inherited Members | |
| Public Types inherited from ManagedActionTrigger | |
| enum | { NoModifier = 0 , ShiftModifier = 0x10 , ControlModifier = 0x20 , AltModifier = 0x40 , AllModifiersMask = 0x70 } |
| enum | { Button1Mask = 1 , Button2Mask = 2 , Button3Mask = 4 , AllButtonsMask = 0x07 } |
| Same for mouse buttons: More... | |
Class ManagedKeyboardShortcut encapsulates the combination of modifier keys and another key that activates a command.
Definition at line 26 of file ManagedKeyboardShortcut.h.
|
inline |
The default constructor creates an invalid shortcut.
Definition at line 30 of file ManagedKeyboardShortcut.h.
References ANY.
Referenced by fromString().
|
inline |
Creates shortcut with given key and key modifiers; see SoInteraction for possible key modifiers.
Definition at line 33 of file ManagedKeyboardShortcut.h.
|
static |
Creates a shortcut from a string.
Strings can take the form "[S[hift]-][C[trl]-][A[lt]-]Keyname". For acceptable keynames, look at ManagedKeyboardShortcut.cpp.
References ManagedKeyboardShortcut().
|
inline |
Returns the required key.
Definition at line 45 of file ManagedKeyboardShortcut.h.
|
inline |
Returns the required key modifiers.
Definition at line 42 of file ManagedKeyboardShortcut.h.
| bool ManagedKeyboardShortcut::isValid | ( | ) | const |
Returns whether the shortcut is valid.
| bool ManagedKeyboardShortcut::matches | ( | int | modifiers, |
| SoKeyboardEvent::Key | key ) const |
Returns whether the shortcut matches the given modifiers and key; see SoInteraction for possible modifiers.
| std::string ManagedKeyboardShortcut::toString | ( | ) | const |
Returns a string representation of this shortcut (see fromString()).