void QAbstractPageSetupDialog_QtDShell::__override_tabletEvent(QTabletEvent*  arg__1, bool static_call)
{
    if (static_call) {
        QWidget::tabletEvent((QTabletEvent* )arg__1);
    } else {
        tabletEvent((QTabletEvent* )arg__1);
    }
}
Exemplo n.º 2
0
void QDateEdit_QtDShell::__override_tabletEvent(QTabletEvent*  arg__1, bool static_call)
{
    if (static_call) {
        QWidget::tabletEvent((QTabletEvent* )arg__1);
    } else {
        tabletEvent((QTabletEvent* )arg__1);
    }
}
Exemplo n.º 3
0
void DhQGLWidget::DvhtabletEvent(QTabletEvent* x1) {
  return tabletEvent(x1);
}
Exemplo n.º 4
0
void DhQPushButton::DvhtabletEvent(QTabletEvent* x1) {
  return tabletEvent(x1);
}
Exemplo n.º 5
0
void DhQAbstractSpinBox::DvhtabletEvent(QTabletEvent* x1) {
  return tabletEvent(x1);
}
Exemplo n.º 6
0
void DhQGroupBox::DvhtabletEvent(QTabletEvent* x1) {
  return tabletEvent(x1);
}
Exemplo n.º 7
0
void DhQSlider::DvhtabletEvent(QTabletEvent* x1) {
  return tabletEvent(x1);
}
Exemplo n.º 8
0
void DhQScrollArea::DvhtabletEvent(QTabletEvent* x1) {
  return tabletEvent(x1);
}
Exemplo n.º 9
0
void DhQStackedWidget::DvhtabletEvent(QTabletEvent* x1) {
    return tabletEvent(x1);
}
void KisInputManagerTest::testMouseMoves()
{
    KisShortcutMatcher m;

    TestingAction *a = new TestingAction();
    m.addAction(a);

    m.addShortcut(
        createStrokeShortcut(a, 13,
                             QList<Qt::Key>() << Qt::Key_Shift << Qt::Key_Control,
                             Qt::LeftButton));

    // Test event with random values
    QMouseEvent mouseEvent(QEvent::MouseMove, QPoint(),
                           Qt::LeftButton, Qt::NoButton, Qt::NoModifier);


    // Press Ctrl+Shift
    QVERIFY(!m.keyPressed(Qt::Key_Shift));
    QCOMPARE(a->m_beginIndex, -1);

    QVERIFY(!m.keyPressed(Qt::Key_Control));
    QCOMPARE(a->m_beginIndex, -1);

    QVERIFY(!m.mouseMoved(&mouseEvent));
    QCOMPARE(a->m_gotInput, false);

    // Complete Ctrl+Shift+LB shortcut
    QVERIFY(m.buttonPressed(Qt::LeftButton, &mouseEvent));
    QCOMPARE(a->m_beginIndex, 13);
    QCOMPARE(a->m_ended, false);
    QCOMPARE(a->m_gotInput, false);
    a->reset();

    QVERIFY(m.mouseMoved(&mouseEvent));
    QCOMPARE(a->m_gotInput, true);
    a->reset();

    // Check High Resolution events for usual action
    QTabletEvent tabletEvent(QEvent::TabletMove, QPoint(), QPoint(), QPointF(),
                             0, 0, 0.0, 0, 0, 0.0, 0.0, 0, Qt::NoModifier, 0);
    QVERIFY(!m.tabletMoved(&tabletEvent));
    QCOMPARE(a->m_gotInput, false);
    a->reset();

    // Check usual events for High Resolution actions
    a->setHighResInputEvents(true);
    QVERIFY(m.mouseMoved(&mouseEvent));
    QCOMPARE(a->m_gotInput, true);
    a->reset();
    a->setHighResInputEvents(false);

    // Check High Resolution for High Resolution actions
    a->setHighResInputEvents(true);
    QVERIFY(m.tabletMoved(&tabletEvent));
    QCOMPARE(a->m_gotInput, true);
    a->reset();
    a->setHighResInputEvents(false);


    // Release Ctrl
    QVERIFY(!m.keyReleased(Qt::Key_Control));
    QCOMPARE(a->m_beginIndex, -1);
    QCOMPARE(a->m_ended, false);
    QCOMPARE(a->m_gotInput, false);

    // Release Shift
    QVERIFY(!m.keyReleased(Qt::Key_Shift));
    QCOMPARE(a->m_beginIndex, -1);
    QCOMPARE(a->m_ended, false);

    // Release LB, now it should end
    QVERIFY(m.buttonReleased(Qt::LeftButton, &mouseEvent));
    QCOMPARE(a->m_beginIndex, -1);
    QCOMPARE(a->m_ended, true);
    a->reset();
}