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: 2007 Jan Hambrecht <[email protected]>
 *
 * SPDX-License-Identifier: LGPL-2.0-or-later
 */

#ifndef RECTANGLESHAPECONFIGWIDGET_H
#define RECTANGLESHAPECONFIGWIDGET_H

#include <ui_RectangleShapeConfigWidget.h>

#include <KoShapeConfigWidgetBase.h>
#include <KoShape.h>

class RectangleShape;

class RectangleShapeConfigWidget : public KoShapeConfigWidgetBase, public KoShape::ShapeChangeListener
{
    Q_OBJECT
public:
    RectangleShapeConfigWidget();
    /// reimplemented
    void open(KoShape *shape) override;
    /// reimplemented
    void save() override;
    /// reimplemented
    void setUnit(const KoUnit &unit) override;
    /// reimplemented
    bool showOnShapeCreate() override
    {
        return false;
    }
    /// reimplemented
    KUndo2Command *createCommand() override;

    void notifyShapeChanged(KoShape::ChangeType type, KoShape *shape) override;

private:
    void loadPropertiesFromShape(RectangleShape *shape);

private:
    Ui::RectangleShapeConfigWidget widget;
    RectangleShape *m_rectangle;
};

#endif // RECTANGLESHAPECONFIGWIDGET_H