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++
1.3 KB
Raw Blame
/* This file is part of the KDE project
 *   SPDX-FileCopyrightText: 2006 Thorsten Zachmann <[email protected]>
 *   SPDX-FileCopyrightText: 2007 Thomas Zander <[email protected]>
 * 
 *   SPDX-License-Identifier: LGPL-2.0-or-later
 */

#ifndef KOPARAMETERCHANGESTRATEGYPRIVATE_H
#define KOPARAMETERCHANGESTRATEGYPRIVATE_H

#include "KoInteractionStrategy_p.h"
#include "KoParameterShape.h"

class KoParameterChangeStrategyPrivate : public KoInteractionStrategyPrivate
{
public:
    KoParameterChangeStrategyPrivate(KoToolBase *owner, KoParameterShape *paramShape, int handle)
        : KoInteractionStrategyPrivate(owner)
        , parameterShape(paramShape)
        , handleId(handle)
        , startPoint(paramShape->shapeToDocument(paramShape->handlePosition(handle)))
    {
        // initialize release point with start point position to prevent
        // change when just clicking a handle without moving the mouse
        releasePoint = startPoint;
    }
    KoParameterShape * const parameterShape; ///< the parametric shape we are working on
    const int handleId;                      ///< the id of the control point
    const QPointF startPoint;                ///< the starting position of the control point
    QPointF releasePoint;
    Qt::KeyboardModifiers lastModifierUsed;
};

#endif // KOPARAMETERCHANGESTRATEGYPRIVATE_H