|
Krita Source Code Documentation
|
#include <KoInputDevice.h>
Inheritance diagram for KoInputDevice:Public Types | |
| enum class | InputDevice { Unknown = 0x0000 , Mouse = 0x0001 , TouchScreen = 0x0002 , TouchPad = 0x0004 , Puck = 0x0008 , Stylus = 0x0010 , Airbrush = 0x0020 , Keyboard = 0x1000 , AllDevices = 0x7FFFFFFF } |
| enum class | Pointer { Unknown = 0 , Generic = 0x0001 , Finger = 0x0002 , Pen = 0x0004 , Eraser = 0x0008 , Cursor = 0x0010 , AllPointerTypes = 0x7FFF } |
Public Member Functions | |
| InputDevice | device () const |
| bool | isMouse () const |
| KoInputDevice () | |
| KoInputDevice (const KoInputDevice &other) | |
| KoInputDevice (InputDevice device, Pointer pointer, qint64 uniqueTabletId=-1) | |
| KoInputDevice & | operator= (const KoInputDevice &) |
| assignment | |
| bool | operator== (const KoInputDevice &) const |
| equal | |
| Pointer | pointer () const |
| Private (KoInputDevice::InputDevice d, KoInputDevice::Pointer p, qint64 id, bool m) | |
| qint64 | uniqueTabletId () const |
| ~KoInputDevice () | |
Static Public Member Functions | |
| static InputDevice | convertDeviceType (QTabletEvent *event) |
| static Pointer | convertPointerType (QTabletEvent *event) |
| static KoInputDevice | eraser () |
| Wacom eraser. | |
| static KoInputDevice | invalid () |
| invalid input device | |
| static KoInputDevice | mouse () |
| Standard mouse. | |
| static KoInputDevice | stylus () |
| Wacom style/pen. | |
Public Attributes | |
| KoInputDevice::InputDevice | device |
| bool | mouse |
| KoInputDevice::Pointer | pointer |
| qint64 | uniqueTabletId |
Private Attributes | |
| Private *const | d |
Private Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Additional Inherited Members | |
Private Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
This class represents an input device. A user can manipulate flake-shapes using a large variety of input devices. This ranges from a mouse to a paintbrush-like tool connected to a tablet.
Definition at line 9 of file KoInputDevice.cpp.
|
strong |
| Enumerator | |
|---|---|
| Unknown | |
| Mouse | |
| TouchScreen | |
| TouchPad | |
| Puck | |
| Stylus | |
| Airbrush | |
| Keyboard | |
| AllDevices | |
Definition at line 36 of file KoInputDevice.h.
|
strong |
| Enumerator | |
|---|---|
| Unknown | |
| Generic | |
| Finger | |
| Pen | |
| Eraser | |
| Cursor | |
| AllPointerTypes | |
Definition at line 26 of file KoInputDevice.h.
| KoInputDevice::KoInputDevice | ( | const KoInputDevice & | other | ) |
Copy constructor.
Definition at line 34 of file KoInputDevice.cpp.
|
explicit |
Constructor for a tablet. Create a new input device with one of the many types that the tablet can have.
| device | the device as found on a QTabletEvent |
| pointer | the pointer as found on a QTabletEvent |
| uniqueTabletId | the uniqueId as found on a QTabletEvent |
Definition at line 24 of file KoInputDevice.cpp.
| KoInputDevice::KoInputDevice | ( | ) |
Constructor for the mouse as input device.
Definition at line 29 of file KoInputDevice.cpp.
| KoInputDevice::~KoInputDevice | ( | ) |
|
inlinestatic |
Definition at line 101 of file KoInputDevice.h.
|
inlinestatic |
Definition at line 48 of file KoInputDevice.h.
| InputDevice KoInputDevice::device | ( | ) | const |
Return the tablet device used
|
static |
Wacom eraser.
Definition at line 108 of file KoInputDevice.cpp.
|
static |
invalid input device
Definition at line 86 of file KoInputDevice.cpp.
References Unknown.
| bool KoInputDevice::isMouse | ( | ) | const |
Return if this is a mouse device.
Definition at line 60 of file KoInputDevice.cpp.
|
static |
Standard mouse.
| KoInputDevice & KoInputDevice::operator= | ( | const KoInputDevice & | other | ) |
| bool KoInputDevice::operator== | ( | const KoInputDevice & | other | ) | const |
| Pointer KoInputDevice::pointer | ( | ) | const |
Return the pointer used
|
inline |
Definition at line 12 of file KoInputDevice.cpp.
|
static |
| qint64 KoInputDevice::uniqueTabletId | ( | ) | const |
Return the unique tablet id as registered by QTabletEvents. Note that this id can change randomly, so it's not dependable.
|
private |
Definition at line 237 of file KoInputDevice.h.
| KoInputDevice::InputDevice KoInputDevice::device |
Definition at line 18 of file KoInputDevice.cpp.
| KoInputDevice KoInputDevice::mouse |
Definition at line 21 of file KoInputDevice.cpp.
| KoInputDevice::Pointer KoInputDevice::pointer |
Definition at line 19 of file KoInputDevice.cpp.
| qint64 KoInputDevice::uniqueTabletId |
Definition at line 20 of file KoInputDevice.cpp.