File indexing completed on 2024-04-28 05:52:37
0001 /* 0002 This file is part of the Okteta Gui library, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2021 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #include "touchonlytapandholdgesture.hpp" 0010 0011 // Qt 0012 #include <QTapAndHoldGesture> 0013 0014 namespace Okteta { 0015 0016 void TouchOnlyTapAndHoldGesture::beginHoldTimeer() 0017 { 0018 if (m_timerId != 0) { 0019 killTimer(m_timerId); 0020 } 0021 m_timerId = startTimer(QTapAndHoldGesture::timeout()); 0022 } 0023 0024 void TouchOnlyTapAndHoldGesture::cancelHoldTimer() 0025 { 0026 if (m_timerId != 0) { 0027 killTimer(m_timerId); 0028 } 0029 m_timerId = 0; 0030 } 0031 0032 void TouchOnlyTapAndHoldGesture::reset() 0033 { 0034 m_position = QPointF(); 0035 cancelHoldTimer(); 0036 } 0037 0038 } 0039 0040 #include "moc_touchonlytapandholdgesture.cpp"