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

A class similar in purpose to QShortcut, but with the ability to use mouse buttons. More...

#include <shortcut.hpp>

Inheritance diagram for CSMPrefs::Shortcut:
Collaboration diagram for CSMPrefs::Shortcut:

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
 
QActionmAction
 
QString mActionText
 

Detailed Description

A class similar in purpose to QShortcut, but with the ability to use mouse buttons.

Member Enumeration Documentation

Enumerator
AS_Regular 
AS_Secondary 
AS_Inactive 
Enumerator
SM_Replace 

The secondary signal replaces the regular signal when the modifier is active.

SM_Detach 

The secondary signal is emitted independent of the regular signal, even if not active.

SM_Ignore 

The secondary signal will not ever be emitted.

Constructor & Destructor Documentation

CSMPrefs::Shortcut::Shortcut ( const std::string &  name,
QWidget parent 
)

Here is the call graph for this function:

CSMPrefs::Shortcut::Shortcut ( const std::string &  name,
const std::string &  modName,
QWidget parent 
)

Here is the call graph for this function:

CSMPrefs::Shortcut::Shortcut ( const std::string &  name,
const std::string &  modName,
SecondaryMode  secMode,
QWidget parent 
)

Here is the call graph for this function:

CSMPrefs::Shortcut::~Shortcut ( )

Here is the call graph for this function:

Member Function Documentation

void CSMPrefs::Shortcut::actionDeleted ( )
privateslot

Here is the caller graph for this function:

void CSMPrefs::Shortcut::activated ( bool  state)
signal

Triggered when the shortcut is activated or deactivated; can be determined from state.

void CSMPrefs::Shortcut::activated ( )
signal

Convenience signal.

Here is the caller graph for this function:

void CSMPrefs::Shortcut::associateAction ( QAction action)

Appends the sequence to the QAction text, also keeps it up to date.

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMPrefs::Shortcut::enable ( bool  state)

Here is the caller graph for this function:

Shortcut::ActivationStatus CSMPrefs::Shortcut::getActivationStatus ( ) const

Here is the caller graph for this function:

int CSMPrefs::Shortcut::getLastPosition ( ) const

The position in the sequence.

Here is the caller graph for this function:

int CSMPrefs::Shortcut::getModifier ( ) const

Here is the caller graph for this function:

const std::string & CSMPrefs::Shortcut::getModifierName ( ) const

Here is the caller graph for this function:

bool CSMPrefs::Shortcut::getModifierStatus ( ) const

Here is the caller graph for this function:

const std::string & CSMPrefs::Shortcut::getName ( ) const

Here is the caller graph for this function:

int CSMPrefs::Shortcut::getPosition ( ) const

The position in the sequence.

Here is the caller graph for this function:

Shortcut::SecondaryMode CSMPrefs::Shortcut::getSecondaryMode ( ) const

Here is the caller graph for this function:

const QKeySequence & CSMPrefs::Shortcut::getSequence ( ) const

Here is the caller graph for this function:

bool CSMPrefs::Shortcut::isEnabled ( ) const

Here is the caller graph for this function:

void CSMPrefs::Shortcut::secondary ( bool  state)
signal

Triggered depending on SecondaryMode.

void CSMPrefs::Shortcut::secondary ( )
signal

Convenience signal.

Here is the caller graph for this function:

void CSMPrefs::Shortcut::setActivationStatus ( ActivationStatus  status)

Here is the caller graph for this function:

void CSMPrefs::Shortcut::setModifier ( int  modifier)
void CSMPrefs::Shortcut::setModifierStatus ( bool  status)

Here is the caller graph for this function:

void CSMPrefs::Shortcut::setPosition ( int  pos)

The position in the sequence.

Here is the caller graph for this function:

void CSMPrefs::Shortcut::setSequence ( const QKeySequence &  sequence)

Here is the call graph for this function:

void CSMPrefs::Shortcut::signalActivated ( bool  state)

Here is the caller graph for this function:

void CSMPrefs::Shortcut::signalActivated ( )
void CSMPrefs::Shortcut::signalSecondary ( bool  state)

Here is the caller graph for this function:

void CSMPrefs::Shortcut::signalSecondary ( )
QString CSMPrefs::Shortcut::toString ( ) const

Here is the call graph for this function:

Member Data Documentation

QAction* CSMPrefs::Shortcut::mAction
private
QString CSMPrefs::Shortcut::mActionText
private
ActivationStatus CSMPrefs::Shortcut::mActivationStatus
private
int CSMPrefs::Shortcut::mCurrentPos
private
bool CSMPrefs::Shortcut::mEnabled
private
int CSMPrefs::Shortcut::mLastPos
private
int CSMPrefs::Shortcut::mModifier
private
bool CSMPrefs::Shortcut::mModifierStatus
private
std::string CSMPrefs::Shortcut::mModName
private
std::string CSMPrefs::Shortcut::mName
private
SecondaryMode CSMPrefs::Shortcut::mSecondaryMode
private
QKeySequence CSMPrefs::Shortcut::mSequence
private

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