Krita Source Code Documentation
Loading...
Searching...
No Matches
KoInputDevice.cpp File Reference
#include "KoInputDevice.h"

Go to the source code of this file.

Classes

class  KoInputDevice
 

Functions

QDebug operator<< (QDebug dbg, const KoInputDevice &device)
 

Function Documentation

◆ operator<<()

QDebug operator<< ( QDebug dbg,
const KoInputDevice & device )

Definition at line 114 of file KoInputDevice.cpp.

115{
116 if (device.isMouse())
117 dbg.nospace() << "mouse";
118 else {
119 switch (device.pointer()) {
121 dbg.nospace() << "unknown pointer";
122 break;
124 dbg.nospace() << "pen";
125 break;
127 dbg.nospace() << "cursor";
128 break;
130 dbg.nospace() << "eraser";
131 break;
132 default:
133 dbg.space() << "Unsupported pointer type";
134 }
135 switch(device.device()) {
137 dbg.space() << "no device";
138 break;
140 dbg.space() << "puck";
141 break;
143 dbg.space() << "stylus";
144 break;
146 dbg.space() << "airbrush";
147 break;
148 default:
149 dbg.space() << "Unsupported device type";
150 }
151 dbg.space() << "(id: " << device.uniqueTabletId() << ")";
152 }
153 return dbg.space();
154}
KoInputDevice::InputDevice device
KoInputDevice::Pointer pointer
bool isMouse() const

References KoInputDevice::Airbrush, KoInputDevice::Cursor, KoInputDevice::device, KoInputDevice::Eraser, KoInputDevice::isMouse(), KoInputDevice::Pen, KoInputDevice::pointer, KoInputDevice::Puck, KoInputDevice::Stylus, KoInputDevice::uniqueTabletId, and KoInputDevice::Unknown.