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

#ifndef KOPATHBASECOMMAND_H
#define KOPATHBASECOMMAND_H

#include <kundo2command.h>
#include <QSet>

class KoPathShape;

/// the base command for commands altering a path shape
class KoPathBaseCommand : public KUndo2Command
{
public:
    /**
     * @param parent the parent command used for macro commands
     */
    explicit KoPathBaseCommand(KUndo2Command *parent = 0);

    /** initialize the base command with a single shape
     * @param shape the shape
     * @param parent the parent command used for macro commands
     */
    explicit KoPathBaseCommand(KoPathShape *shape, KUndo2Command *parent = 0);

protected:
    /**
     * Schedules repainting of all shapes control point rects.
     * @param normalizeShapes controls if paths are normalized before painting
     */
    void repaint(bool normalizeShapes);

    QSet<KoPathShape*> m_shapes; ///< the shapes the command operates on
};

#endif // KOPATHBASECOMMAND_H