Carousel
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Pages
Public Member Functions | List of all members
IInputDispatcher Class Referenceabstract

This abstract class provides interface to application widget events' manipulating and transfering them to the active application's tool. More...

#include <IInputDispatcher.h>

Inherited by InputDispatcher.

Public Member Functions

virtual void activate ()=0
 
virtual void deactivate ()=0
 
virtual bool isActive () const =0
 
virtual bool isWorking () const =0
 
virtual IInputReceiverreceiver () const =0
 
virtual QWidgetsender () const =0
 
virtual void setReceiver (IInputReceiver *receiver)=0
 
virtual void setSender (QWidget *interceptedWidget)=0
 

Detailed Description

This abstract class provides interface to application widget events' manipulating and transfering them to the active application's tool.

You can also use instance of this interface to handle user inputs

After activating events from the widget will be sent to the selected tool by InteracionService. There are following events, that will be intercepted from the widget:

All these events (except context menu event) will pass to the widget if dispatcher isActive(), and right after they will be handled by receiver. Also, if your receiver displays a custom context menu, it should let the application know that it handled the context menu event by returning true from the IInputReceiver::contextMenuFired() function. If you don't do this, the standard context menu will be displayed.

Member Function Documentation

virtual void IInputDispatcher::activate ( )
pure virtual

Starts intercept the widget events and passes them to the selected receiver if any.

Events will not be intercepted until sender or receiver is null. Deactivating by default.

Implemented in InputDispatcher.

virtual void IInputDispatcher::deactivate ( )
pure virtual

Stops invokes appropriate registered handlers by the widget events intercepting. It is a default state.

Implemented in InputDispatcher.

virtual bool IInputDispatcher::isActive ( ) const
pure virtual

Gets the value determinig whether events passed to receiver or not.

Note
IInputDispatcher might be active, but is not working. It is mean, than receiver or sender is null. As soon as they be set, it will start working.

Implemented in InputDispatcher.

virtual bool IInputDispatcher::isWorking ( ) const
pure virtual

Gets the value determinig whether events passed to receiver or not.

Returns true if active and widget events are intercepted and passed to the receiver. Returns false if is not active, or widget or receiver is null.

Implemented in InputDispatcher.

virtual void IInputDispatcher::setSender ( QWidget interceptedWidget)
pure virtual

Sets the reference to widget events will be intercepted from.

Implemented in InputDispatcher.

virtual void IInputDispatcher::setReceiver ( IInputReceiver receiver)
pure virtual

Sets the receiver events form widget will be sended to.

Implemented in InputDispatcher.

virtual QWidget* IInputDispatcher::sender ( ) const
pure virtual

Returns watched widget.

Implemented in InputDispatcher.

virtual IInputReceiver* IInputDispatcher::receiver ( ) const
pure virtual

Returns the received events object.

Implemented in InputDispatcher.