tests/manual/examples/widgets/touch/pinchzoom/graphicsview.h
raw| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause |
| 3 | |
| 4 | #pragma once |
| 5 | #include <QGraphicsView> |
| 6 | |
| 7 | class GraphicsView : public QGraphicsView |
| 8 | { |
| 9 | Q_OBJECT |
| 10 | |
| 11 | public: |
| 12 | GraphicsView(QGraphicsScene *scene = nullptr, QWidget *parent = nullptr); |
| 13 | |
| 14 | bool viewportEvent(QEvent *event) override; |
| 15 | |
| 16 | private: |
| 17 | qreal totalScaleFactor = 1; |
| 18 | }; |