MCPcopy Create free account
hub / github.com/Sonic-DE/sonic-win / componentComplete

Method componentComplete

src/scripting/gesturehandler.cpp:28–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28void SwipeGestureHandler::componentComplete()
29{
30 m_gesture = std::make_unique<SwipeGesture>();
31 m_gesture->setDirection(SwipeDirection(m_direction));
32 m_gesture->setMinimumDelta(QPointF(200, 200));
33 m_gesture->setMaximumFingerCount(m_fingerCount);
34 m_gesture->setMinimumFingerCount(m_fingerCount);
35
36 connect(m_gesture.get(), &SwipeGesture::triggered, this, &SwipeGestureHandler::activated);
37 connect(m_gesture.get(), &SwipeGesture::cancelled, this, &SwipeGestureHandler::cancelled);
38 connect(m_gesture.get(), &SwipeGesture::progress, this, &SwipeGestureHandler::setProgress);
39
40 switch (m_deviceType) {
41 case Device::Touchpad:
42 input()->shortcuts()->registerTouchpadSwipe(m_gesture.get());
43 break;
44 case Device::Touchscreen:
45 input()->shortcuts()->registerTouchscreenSwipe(m_gesture.get());
46 break;
47 }
48}
49
50SwipeGestureHandler::Direction SwipeGestureHandler::direction() const
51{

Callers

nothing calls this directly

Calls 12

SwipeDirectionEnum · 0.85
inputFunction · 0.85
PinchDirectionEnum · 0.85
setMinimumDeltaMethod · 0.80
setMaximumFingerCountMethod · 0.80
setMinimumFingerCountMethod · 0.80
registerTouchpadSwipeMethod · 0.80
registerTouchpadPinchMethod · 0.80
QPointFClass · 0.50
setDirectionMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected