OpenMW
|
A class similar in purpose to QShortcut, but with the ability to use mouse buttons. More...
#include <shortcut.hpp>
Public Types | |
enum | ActivationStatus { AS_Regular, AS_Secondary, AS_Inactive } |
enum | SecondaryMode { SM_Replace, SM_Detach, SM_Ignore } |
Signals | |
void | activated (bool state) |
Triggered when the shortcut is activated or deactivated; can be determined from state . More... | |
void | activated () |
Convenience signal. More... | |
void | secondary (bool state) |
Triggered depending on SecondaryMode. More... | |
void | secondary () |
Convenience signal. More... | |
Public Member Functions | |
Shortcut (const std::string &name, QWidget *parent) | |
Shortcut (const std::string &name, const std::string &modName, QWidget *parent) | |
Shortcut (const std::string &name, const std::string &modName, SecondaryMode secMode, QWidget *parent) | |
~Shortcut () | |
bool | isEnabled () const |
const std::string & | getName () const |
const std::string & | getModifierName () const |
SecondaryMode | getSecondaryMode () const |
const QKeySequence & | getSequence () const |
int | getModifier () const |
int | getPosition () const |
The position in the sequence. More... | |
int | getLastPosition () const |
The position in the sequence. More... | |
ActivationStatus | getActivationStatus () const |
bool | getModifierStatus () const |
void | enable (bool state) |
void | setSequence (const QKeySequence &sequence) |
void | setModifier (int modifier) |
void | setPosition (int pos) |
The position in the sequence. More... | |
void | setActivationStatus (ActivationStatus status) |
void | setModifierStatus (bool status) |
void | associateAction (QAction *action) |
Appends the sequence to the QAction text, also keeps it up to date. More... | |
void | signalActivated (bool state) |
void | signalActivated () |
void | signalSecondary (bool state) |
void | signalSecondary () |
QString | toString () const |
Private Slots | |
void | actionDeleted () |
Private Attributes | |
bool | mEnabled |
std::string | mName |
std::string | mModName |
SecondaryMode | mSecondaryMode |
QKeySequence | mSequence |
int | mModifier |
int | mCurrentPos |
int | mLastPos |
ActivationStatus | mActivationStatus |
bool | mModifierStatus |
QAction * | mAction |
QString | mActionText |
A class similar in purpose to QShortcut, but with the ability to use mouse buttons.
CSMPrefs::Shortcut::Shortcut | ( | const std::string & | name, |
QWidget * | parent | ||
) |
CSMPrefs::Shortcut::Shortcut | ( | const std::string & | name, |
const std::string & | modName, | ||
QWidget * | parent | ||
) |
CSMPrefs::Shortcut::Shortcut | ( | const std::string & | name, |
const std::string & | modName, | ||
SecondaryMode | secMode, | ||
QWidget * | parent | ||
) |
CSMPrefs::Shortcut::~Shortcut | ( | ) |
|
privateslot |
|
signal |
Triggered when the shortcut is activated or deactivated; can be determined from state
.
|
signal |
Convenience signal.
void CSMPrefs::Shortcut::associateAction | ( | QAction * | action | ) |
Appends the sequence to the QAction text, also keeps it up to date.
void CSMPrefs::Shortcut::enable | ( | bool | state | ) |
Shortcut::ActivationStatus CSMPrefs::Shortcut::getActivationStatus | ( | ) | const |
int CSMPrefs::Shortcut::getLastPosition | ( | ) | const |
The position in the sequence.
int CSMPrefs::Shortcut::getModifier | ( | ) | const |
const std::string & CSMPrefs::Shortcut::getModifierName | ( | ) | const |
bool CSMPrefs::Shortcut::getModifierStatus | ( | ) | const |
const std::string & CSMPrefs::Shortcut::getName | ( | ) | const |
int CSMPrefs::Shortcut::getPosition | ( | ) | const |
The position in the sequence.
Shortcut::SecondaryMode CSMPrefs::Shortcut::getSecondaryMode | ( | ) | const |
const QKeySequence & CSMPrefs::Shortcut::getSequence | ( | ) | const |
bool CSMPrefs::Shortcut::isEnabled | ( | ) | const |
|
signal |
Triggered depending on SecondaryMode.
|
signal |
Convenience signal.
void CSMPrefs::Shortcut::setActivationStatus | ( | ActivationStatus | status | ) |
void CSMPrefs::Shortcut::setModifier | ( | int | modifier | ) |
void CSMPrefs::Shortcut::setModifierStatus | ( | bool | status | ) |
void CSMPrefs::Shortcut::setPosition | ( | int | pos | ) |
The position in the sequence.
void CSMPrefs::Shortcut::setSequence | ( | const QKeySequence & | sequence | ) |
void CSMPrefs::Shortcut::signalActivated | ( | bool | state | ) |
void CSMPrefs::Shortcut::signalActivated | ( | ) |
void CSMPrefs::Shortcut::signalSecondary | ( | bool | state | ) |
void CSMPrefs::Shortcut::signalSecondary | ( | ) |
QString CSMPrefs::Shortcut::toString | ( | ) | const |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |