File indexing completed on 2024-12-22 04:15:26

0001 /*
0002  *  SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef IMAGESHAPE_H
0008 #define IMAGESHAPE_H
0009 
0010 #include <QSharedDataPointer>
0011 
0012 #include "KoTosContainer.h"
0013 #include <SvgShape.h>
0014 
0015 #define ImageShapeId "ImageShape"
0016 
0017 
0018 class ImageShape : public KoTosContainer, public SvgShape
0019 {
0020 public:
0021     ImageShape();
0022     ~ImageShape() override;
0023 
0024     KoShape *cloneShape() const override;
0025 
0026     void paint(QPainter &painter) const override;
0027 
0028     void setSize(const QSizeF &size) override;
0029 
0030     bool saveSvg(SvgSavingContext &context) override;
0031     bool loadSvg(const QDomElement &element, SvgLoadingContext &context) override;
0032 
0033 private:
0034     ImageShape(const ImageShape &rhs);
0035 
0036 private:
0037     struct Private;
0038     QSharedDataPointer<Private> m_d;
0039 };
0040 
0041 #endif // IMAGESHAPE_H