Envision
A visual programming IDE for object-oriented languages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
Interaction::ActionRegistry Class Reference

Classes

struct  RegisteredHandler
 

Public Types

using InputHandler = bool(*)(Visualization::Item *target, QKeySequence keys, InputState state)
 
enum  InputState { DefaultState , AnyState }
 

Public Member Functions

void enterChangeShortcutState (const QString &eventName)
 
bool handleKeyInput (Visualization::Item *target, QKeySequence keys, const QString &handlerName)
 
void registerInputHandler (const QString &eventName, const InputHandler handler)
 
void saveShortcuts ()
 
void setState (InputState state)
 
InputState state () const
 

Static Public Member Functions

static ActionRegistryinstance ()
 

Private Member Functions

 ActionRegistry ()
 

Static Private Member Functions

static const QHash< const QString, QKeySequence::StandardKey > & standardKeysMap ()
 

Private Attributes

QList< RegisteredHandler * > handlers_
 
InputState state_ {DefaultState}
 

Member Typedef Documentation

◆ InputHandler

using Interaction::ActionRegistry::InputHandler = bool (*) (Visualization::Item* target, QKeySequence keys, InputState state)

Member Enumeration Documentation

◆ InputState

Enumerator
DefaultState 
AnyState 

Constructor & Destructor Documentation

◆ ActionRegistry()

Interaction::ActionRegistry::ActionRegistry ( )
private

Member Function Documentation

◆ enterChangeShortcutState()

void Interaction::ActionRegistry::enterChangeShortcutState ( const QString &  eventName)

◆ handleKeyInput()

bool Interaction::ActionRegistry::handleKeyInput ( Visualization::Item target,
QKeySequence  keys,
const QString &  handlerName 
)

◆ instance()

ActionRegistry * Interaction::ActionRegistry::instance ( )
static

◆ registerInputHandler()

void Interaction::ActionRegistry::registerInputHandler ( const QString &  eventName,
const InputHandler  handler 
)

◆ saveShortcuts()

void Interaction::ActionRegistry::saveShortcuts ( )

◆ setState()

void Interaction::ActionRegistry::setState ( InputState  state)
inline

◆ standardKeysMap()

const QHash< const QString, QKeySequence::StandardKey > & Interaction::ActionRegistry::standardKeysMap ( )
staticprivate

◆ state()

ActionRegistry::InputState Interaction::ActionRegistry::state ( ) const
inline

Member Data Documentation

◆ handlers_

QList<RegisteredHandler*> Interaction::ActionRegistry::handlers_
private

◆ state_

InputState Interaction::ActionRegistry::state_ {DefaultState}
private