libs/flake

KoDeviceEvent Class Reference

Base class for events from custom input devices. More...

#include <KoDeviceEvent.h>

Inheritance diagram for KoDeviceEvent:

List of all members.

Public Types

enum  Type { ButtonPressed = QEvent::User + 2008, ButtonReleased, PositionChanged }

Public Member Functions

 KoDeviceEvent (Type type)
virtual ~KoDeviceEvent ()
Qt::MouseButton button () const
Qt::MouseButtons buttons () const
virtual KoPointerEventpointerEvent ()=0
void setButton (Qt::MouseButton)
void setButtons (Qt::MouseButtons)

Protected Attributes

KoPointerEventm_event

Detailed Description

Base class for events from custom input devices.

Definition at line 32 of file KoDeviceEvent.h.


Member Enumeration Documentation

Enumerator:
ButtonPressed 

a button was pressed

ButtonReleased 

a button was released

PositionChanged 

the position has changed

Definition at line 35 of file KoDeviceEvent.h.


Constructor & Destructor Documentation

KoDeviceEvent::KoDeviceEvent ( Type  type  ) 

Constructs a new device event of the given type.

Definition at line 35 of file KoDeviceEvent.cpp.

KoDeviceEvent::~KoDeviceEvent (  )  [virtual]

Definition at line 41 of file KoDeviceEvent.cpp.


Member Function Documentation

Qt::MouseButton KoDeviceEvent::button (  )  const

The device button which caused the event, Qt::NoButton if it is a move event.

Definition at line 47 of file KoDeviceEvent.cpp.

Qt::MouseButtons KoDeviceEvent::buttons (  )  const

The device button state when the event was generated.

Definition at line 52 of file KoDeviceEvent.cpp.

virtual KoPointerEvent* KoDeviceEvent::pointerEvent (  )  [pure virtual]

Creates and returns a KoPointerEvent for tools to consume.

void KoDeviceEvent::setButton ( Qt::MouseButton  b  ) 

Sets the device button causing the event.

Definition at line 57 of file KoDeviceEvent.cpp.

void KoDeviceEvent::setButtons ( Qt::MouseButtons  b  ) 

Sets the device button state.

Definition at line 62 of file KoDeviceEvent.cpp.


Member Data Documentation

Definition at line 60 of file KoDeviceEvent.h.


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