20#ifndef LIBREPCB_EDITOR_IMAGEGRAPHICSITEM_H
21#define LIBREPCB_EDITOR_IMAGEGRAPHICSITEM_H
36class TransactionalDirectory;
41class GraphicsLayerList;
42class OriginCrossGraphicsItem;
58 const std::shared_ptr<Image>& image,
60 QGraphicsItem* parent =
nullptr) noexcept;
87 QPainterPath
shape() const noexcept
override {
return mShape; }
94 const QVariant& value)
noexcept override;
95 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option,
96 QWidget* widget = 0) noexcept override;
The Image class.
Definition image.h:49
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
Helper class to access a subdirectory of TransactionalFileSystem.
Definition transactionaldirectory.h:51
The GraphicsLayer class represents a graphical layer used in schematics and boards.
Definition graphicslayer.h:53
The GraphicsLayerList class.
Definition graphicslayerlist.h:48
The ImageGraphicsItem class is the graphical representation of a librepcb::Image.
Definition imagegraphicsitem.h:52
ImageGraphicsItem & operator=(const ImageGraphicsItem &rhs)=delete
void updatePixmap() noexcept
Definition imagegraphicsitem.cpp:200
bool isResizeHandleAtPosition(const Point &pos) const noexcept
Definition imagegraphicsitem.cpp:89
QRectF boundingRect() const noexcept override
Definition imagegraphicsitem.h:86
std::shared_ptr< Image > mImage
Definition imagegraphicsitem.h:103
QVariant itemChange(GraphicsItemChange change, const QVariant &value) noexcept override
Definition imagegraphicsitem.cpp:108
const std::shared_ptr< Image > & getObj() noexcept
Definition imagegraphicsitem.h:64
QPainterPath mShape
Definition imagegraphicsitem.h:112
qreal mVertexHandleRadiusPx
Definition imagegraphicsitem.h:113
QPainterPath shape() const noexcept override
Definition imagegraphicsitem.h:87
Image::OnEditedSlot mOnEditedSlot
Definition imagegraphicsitem.h:117
QRectF mBoundingRect
Definition imagegraphicsitem.h:111
const TransactionalDirectory & mDir
Definition imagegraphicsitem.h:102
bool mInvalidImage
Definition imagegraphicsitem.h:114
ImageGraphicsItem()=delete
ImageGraphicsItem(const ImageGraphicsItem &other)=delete
QPixmap mPixmap
Definition imagegraphicsitem.h:109
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) noexcept override
Definition imagegraphicsitem.cpp:116
std::shared_ptr< const GraphicsLayer > mBordersLayer
Definition imagegraphicsitem.h:105
QRectF mImageRectPx
Definition imagegraphicsitem.h:110
std::unique_ptr< OriginCrossGraphicsItem > mOriginCrossGraphicsItem
Definition imagegraphicsitem.h:106
void imageEdited(const Image &image, Image::Event event) noexcept
Definition imagegraphicsitem.cpp:173
bool mEditable
Definition imagegraphicsitem.h:104
void setEditable(bool editable) noexcept
Definition imagegraphicsitem.cpp:99
void updateBoundingRectAndShape() noexcept
Definition imagegraphicsitem.cpp:215
The OriginCrossGraphicsItem class.
Definition origincrossgraphicsitem.h:50
Definition occmodel.cpp:77