本文整理汇总了C++中KisConfig::disableTouchOnCanvas方法的典型用法代码示例。如果您正苦于以下问题:C++ KisConfig::disableTouchOnCanvas方法的具体用法?C++ KisConfig::disableTouchOnCanvas怎么用?C++ KisConfig::disableTouchOnCanvas使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KisConfig
的用法示例。
在下文中一共展示了KisConfig::disableTouchOnCanvas方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: q
KisInputManager::Private::Private(KisInputManager *qq)
: q(qq)
, canvas(0)
, toolProxy(0)
, forwardAllEventsToTool(false)
, disableTouchOnCanvas(false)
, touchHasBlockedPressEvents(false)
, lastTouchEvent(0)
, defaultInputAction(0)
, eventsReceiver(0)
, moveEventCompressor(10 /* ms */, KisSignalCompressor::FIRST_ACTIVE)
, testingAcceptCompressedTabletEvents(false)
, testingCompressBrushEvents(false)
, focusOnEnter(true)
, containsPointer(true)
{
KisConfig cfg;
disableTouchOnCanvas = cfg.disableTouchOnCanvas();
moveEventCompressor.setDelay(cfg.tabletEventsDelay());
testingAcceptCompressedTabletEvents = cfg.testingAcceptCompressedTabletEvents();
testingCompressBrushEvents = cfg.testingCompressBrushEvents();
setupActions();
canvasSwitcher = new CanvasSwitcher(this, q);
qApp->installEventFilter(globalEventEater);
}
示例2: q
KisInputManager::Private::Private(KisInputManager *qq)
: q(qq)
, moveEventCompressor(10 /* ms */, KisSignalCompressor::FIRST_ACTIVE)
, canvasSwitcher(this, qq)
{
KisConfig cfg;
disableTouchOnCanvas = cfg.disableTouchOnCanvas();
moveEventCompressor.setDelay(cfg.tabletEventsDelay());
testingAcceptCompressedTabletEvents = cfg.testingAcceptCompressedTabletEvents();
testingCompressBrushEvents = cfg.testingCompressBrushEvents();
setupActions();
}
示例3: kis_x11_init_tablet
void kis_x11_init_tablet()
{
KisConfig cfg;
bool disableTouchOnCanvas = cfg.disableTouchOnCanvas();
// TODO: free this structure on exit
KIS_X11 = new KisX11Data;
KIS_X11->display = QX11Info::display();
kis_x11_create_intern_atoms();
// XInputExtension
KIS_X11->use_xinput = false;
KIS_X11->xinput_major = 0;
KIS_X11->xinput_eventbase = 0;
KIS_X11->xinput_errorbase = 0;
// See if Xinput is supported on the connected display
KIS_X11->ptrXCloseDevice = 0;
KIS_X11->ptrXListInputDevices = 0;
KIS_X11->ptrXOpenDevice = 0;
KIS_X11->ptrXFreeDeviceList = 0;
KIS_X11->ptrXSelectExtensionEvent = 0;
KIS_X11->use_xinput = XQueryExtension(KIS_X11->display, "XInputExtension", &KIS_X11->xinput_major,
&KIS_X11->xinput_eventbase, &KIS_X11->xinput_errorbase);
if (KIS_X11->use_xinput) {
KIS_X11->ptrXCloseDevice = XINPUT_LOAD(XCloseDevice);
KIS_X11->ptrXListInputDevices = XINPUT_LOAD(XListInputDevices);
KIS_X11->ptrXOpenDevice = XINPUT_LOAD(XOpenDevice);
KIS_X11->ptrXFreeDeviceList = XINPUT_LOAD(XFreeDeviceList);
KIS_X11->ptrXSelectExtensionEvent = XINPUT_LOAD(XSelectExtensionEvent);
}
if (KIS_X11->use_xinput) {
int ndev,
i,
j;
bool gotStylus,
gotEraser;
XDeviceInfo *devices = 0, *devs;
XInputClassInfo *ip;
XAnyClassPtr any;
XValuatorInfoPtr v;
XAxisInfoPtr a;
XDevice *dev = 0;
bool needCheckIfItIsReallyATablet;
bool touchWacomTabletWorkaround;
if (KIS_X11->ptrXListInputDevices) {
devices = KIS_X11->ptrXListInputDevices(KIS_X11->display, &ndev);
if (!devices)
qWarning("QApplication: Failed to get list of tablet devices");
}
if (!devices)
ndev = -1;
QTabletEvent::TabletDevice deviceType;
for (devs = devices, i = 0; i < ndev && devs; i++, devs++) {
dev = 0;
deviceType = QTabletEvent::NoDevice;
gotStylus = false;
gotEraser = false;
needCheckIfItIsReallyATablet = false;
touchWacomTabletWorkaround = false;
#if defined(Q_OS_IRIX)
#else
if (devs->type == KIS_ATOM(XWacomStylus) || devs->type == KIS_ATOM(XTabletStylus) ||devs->type == KIS_ATOM(XInputTablet)) {
if (devs->type == KIS_ATOM(XInputTablet)) {
kis_haveEvdevTablets = true;
}
deviceType = QTabletEvent::Stylus;
gotStylus = true;
} else if (devs->type == KIS_ATOM(XWacomEraser) || devs->type == KIS_ATOM(XTabletEraser)) {
deviceType = QTabletEvent::XFreeEraser;
gotEraser = true;
} else if ((devs->type == KIS_ATOM(XInputKeyboard) ||
devs->type == KIS_ATOM(AiptekStylus))
&& QString(devs->name) == "Aiptek") {
/**
* Some really "nice" tablets (more precisely,
* Genius G-Pen 510 (aiptek driver)) report that
* they are a "keyboard". Well, we cannot convince
* them that they are not, so just check if this
* "keyboard" has motion and proximity events. If
* it looks like a duck... :)
*/
kis_haveEvdevTablets = true;
deviceType = QTabletEvent::Stylus;
gotStylus = true;
needCheckIfItIsReallyATablet = true;
} else if (disableTouchOnCanvas &&
devs->type == KIS_ATOM(WacomTouch) &&
QString(devs->name).contains("Wacom")) {
kis_haveEvdevTablets = true;
deviceType = QTabletEvent::Stylus;
//.........这里部分代码省略.........