File indexing completed on 2024-05-12 04:19:52
0001 /* 0002 Gwenview: an image viewer 0003 Copyright 2019 Steffen Hartleib <steffenhartleib@t-online.de> 0004 Copyright 2022 Carl Schwan <carlschwan@kde.org> 0005 Copyright 2022 Bharadwaj Raju <bharadwaj.raju777@protonmail.com> 0006 0007 This program is free software; you can redistribute it and/or 0008 modify it under the terms of the GNU General Public License 0009 as published by the Free Software Foundation; either version 2 0010 of the License, or (at your option) any later version. 0011 0012 This program is distributed in the hope that it will be useful, 0013 but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0015 GNU General Public License for more details. 0016 0017 You should have received a copy of the GNU General Public License 0018 along with this program; if not, write to the Free Software 0019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA. 0020 0021 */ 0022 #pragma once 0023 0024 #include <lib/gwenviewlib_export.h> 0025 0026 #include <QObject> 0027 0028 class PointerGestures; 0029 class PinchGesture; 0030 0031 namespace Gwenview 0032 { 0033 class GWENVIEWLIB_EXPORT WaylandGestures : public QObject 0034 { 0035 Q_OBJECT 0036 public: 0037 WaylandGestures(QObject *parent = nullptr); 0038 ~WaylandGestures(); 0039 void init(); 0040 void setStartZoom(qreal); 0041 void setZoomModifier(qreal); 0042 void setRotationThreshold(qreal); 0043 0044 Q_SIGNALS: 0045 void pinchGestureStarted(); 0046 void pinchZoomChanged(double); 0047 0048 private: 0049 PointerGestures *m_pointerGestures; 0050 PinchGesture *m_pinchGesture; 0051 double m_startZoom; 0052 double m_zoomModifier; 0053 }; 0054 0055 } // namespace