Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
999 B
Raw Blame
/*
 * SPDX-FileCopyrightText: 2026 Dmitry Kazakov <[email protected]>
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef KISCANVASNAVIGATIONACTIONSTRATEGYNATIVEGESTURE_H
#define KISCANVASNAVIGATIONACTIONSTRATEGYNATIVEGESTURE_H

#include <QPointF>
#include <KoViewTransformStillPoint.h>
#include "KisCanvasNavigationActionStrategy.h"

class QEvent;
class KisCanvas2;

class KisCanvasNavigationActionStrategyNativeGesture : public KisCanvasNavigationActionStrategy
{
public:
    KisCanvasNavigationActionStrategyNativeGesture(Flags flags, const QPointF &startViewPos, KisCanvas2 *canvas);

    bool supportsEvent(QEvent* event) const override;
    void inputEvent(QEvent* event) override;

private:
    KisCanvas2 *m_canvas;

    QPointF m_accumulatedPan;
    qreal m_nonRoundedZoom {0.0};
    qreal m_nonRoundedRelativeRotation {0.0};
    KoViewTransformStillPoint m_actionStillPoint;

    SnappedRotationData m_rotationData;
};

#endif // KISCANVASNAVIGATIONACTIONSTRATEGYNATIVEGESTURE_H