Go to the documentation of this file.
61 const std::string& action,
66 action_(action), fKey_(fKey), ctrl_(ctrl), alt_(alt), key_(key) {
69 if (
key <
'0' &&
key != 0) {
72 if (
key >
'9' &&
key <
'A') {
75 if (
key >
'Z' &&
key <
'a') {
78 if (
key >
'z' &&
key != 127) {
88 if (this->
fKey() != 0) {
91 if (this->
key() != 0) {
150 if (fKey_ < 1 || fKey_ > 12) {
234 if (fKey < 0 || fKey > 12) {
269 const string procName =
"KeyboardShortcut::loadState";
bool hasAttribute(const std::string &name) const
bool ctrl_
True if Ctrl button is used in the key combination.
std::string stringAttribute(const std::string &name) const
static const std::string OSKEY_KEY
ObjectState attribute key for normal letter or number key.
static const std::string OSKEY_ACTION
ObjectState attribute key for action name.
static const std::string OSNAME_KEYBOARD_SHORTCUT
ObjectState name for keyboard shortcut.
void loadState(const ObjectState *state)
virtual ~KeyboardShortcut()
#define assert(condition)
static const std::string OSKEY_ALT
ObjectState attribute key for alt key.
std::string action_
Name of the action which is performed by the key combination.
bool equals(const KeyboardShortcut &sc) const
std::string action() const
static const std::string OSKEY_CTRL
ObjectState attribute key for ctrl key.
KeyboardShortcut(const std::string &action, int fKey, bool ctrl, bool alt, char key)
int fKey_
Number of the function key if it is used, 0 otherwise.
static const std::string OSKEY_FKEY
ObjectState attribute key for function key number.
bool alt_
True if Alt button is used in the key combination.
ObjectState * saveState() const
int intAttribute(const std::string &name) const
void setAttribute(const std::string &name, const std::string &value)