20#ifndef LIBREPCB_EDITOR_BACKGROUNDIMAGESETUPDIALOG_H
21#define LIBREPCB_EDITOR_BACKGROUNDIMAGESETUPDIALOG_H
26#include "../widgets/if_graphicsvieweventhandler.h"
41class BackgroundImageSetupDialog;
69 QWidget* parent =
nullptr) noexcept;
75 const QList<std::pair<QPointF, Point>>&
getReferences() const noexcept {
79 const QList<std::pair<QPointF, Point>>& references)
noexcept;
93 void updateUi(QString msg = QString()) noexcept;
97 static QImage
cropImage(const QImage& img, const QPainterPath& p) noexcept;
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
Dialog (GUI) to configure the background image of a 2D view.
Definition backgroundimagesetupdialog.h:52
bool graphicsViewEventHandler(QEvent *event) noexcept override
The event handler method.
Definition backgroundimagesetupdialog.cpp:260
void screenshotCountdownTick() noexcept
Definition backgroundimagesetupdialog.cpp:340
int mCountdownSecs
Definition backgroundimagesetupdialog.h:109
const Angle & getRotation() const noexcept
Definition backgroundimagesetupdialog.h:74
QScopedPointer< QGraphicsPixmapItem > mImageGraphicsItem
Definition backgroundimagesetupdialog.h:113
const QImage & getImage() const noexcept
Definition backgroundimagesetupdialog.h:73
std::shared_ptr< QGraphicsPathItem > mCursorGraphicsItem
Definition backgroundimagesetupdialog.h:114
BackgroundImageSetupDialog()=delete
QList< std::shared_ptr< QGraphicsPathItem > > mReferenceGraphicsItems
Definition backgroundimagesetupdialog.h:118
void updateStatusMsg() noexcept
Definition backgroundimagesetupdialog.cpp:527
State mState
Definition backgroundimagesetupdialog.h:103
QList< std::pair< QPointF, Point > > mLoadedReferences
Definition backgroundimagesetupdialog.h:106
void fitImageInView() noexcept
Definition backgroundimagesetupdialog.cpp:507
QScopedPointer< QGraphicsPathItem > mCropGraphicsItem
Definition backgroundimagesetupdialog.h:115
void setData(const QImage &image, const Angle &rotation, const QList< std::pair< QPointF, Point > > &references) noexcept
Definition backgroundimagesetupdialog.cpp:229
QList< std::pair< QPointF, Point > > mReferences
Definition backgroundimagesetupdialog.h:107
State
Definition backgroundimagesetupdialog.h:57
void updateUi(QString msg=QString()) noexcept
Definition backgroundimagesetupdialog.cpp:410
const QString mSettingsPrefix
Definition backgroundimagesetupdialog.h:100
static QImage cropImage(const QImage &img, const QPainterPath &p) noexcept
Definition backgroundimagesetupdialog.cpp:593
Angle mRotation
Definition backgroundimagesetupdialog.h:105
void takeScreenshot() noexcept
Definition backgroundimagesetupdialog.cpp:354
QList< std::shared_ptr< QGraphicsLineItem > > mReferenceLineGraphicsItems
Definition backgroundimagesetupdialog.h:119
QPointer< QScreen > mScreen
Definition backgroundimagesetupdialog.h:108
void startScreenshot() noexcept
Definition backgroundimagesetupdialog.cpp:317
BackgroundImageSetupDialog(const BackgroundImageSetupDialog &other)=delete
void loadFromFile() noexcept
Definition backgroundimagesetupdialog.cpp:386
void keyPressEvent(QKeyEvent *event) noexcept override
Definition backgroundimagesetupdialog.cpp:244
const QList< std::pair< QPointF, Point > > & getReferences() const noexcept
Definition backgroundimagesetupdialog.h:75
void pasteFromClipboard() noexcept
Definition backgroundimagesetupdialog.cpp:373
QImage mImage
Definition backgroundimagesetupdialog.h:104
QList< std::shared_ptr< QWidget > > mReferenceWidgets
Definition backgroundimagesetupdialog.h:120
void updateAnchors() noexcept
Definition backgroundimagesetupdialog.cpp:516
BackgroundImageSetupDialog & operator=(const BackgroundImageSetupDialog &rhs)=delete
QScopedPointer< Ui::BackgroundImageSetupDialog > mUi
Definition backgroundimagesetupdialog.h:99
QScopedPointer< QWidget > mRotateWidget
Definition backgroundimagesetupdialog.h:112
The IF_GraphicsViewEventHandler class.
Definition if_graphicsvieweventhandler.h:41
Definition occmodel.cpp:76