20#ifndef LIBREPCB_EDITOR_SLINTGRAPHICSVIEW_H
21#define LIBREPCB_EDITOR_SLINTGRAPHICSVIEW_H
42class IF_GraphicsViewEventHandler;
59 qreal factor)
const noexcept {
62 scale + delta.scale * factor,
66 return (
offset != rhs.offset) || (
scale != rhs.scale);
85 qreal multiplier)
const noexcept;
92 slint::private_api::PointerEvent e)
noexcept;
94 slint::private_api::PointerScrollEvent e)
noexcept;
95 bool keyEvent(
const slint::private_api::KeyEvent& e)
noexcept;
112 void scroll(const QPointF& delta) noexcept;
113 void zoom(const QPointF& center, qreal factor) noexcept;
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
The GraphicsScene class.
Definition graphicsscene.h:64
The IF_GraphicsViewEventHandler class.
Definition if_graphicsvieweventhandler.h:45
The SlintGraphicsView class.
Definition slintgraphicsview.h:51
bool keyEvent(const slint::private_api::KeyEvent &e) noexcept
Definition slintgraphicsview.cpp:237
void setEventHandler(IF_GraphicsViewEventHandler *obj) noexcept
Definition slintgraphicsview.cpp:93
QPointF mPanningStartScreenPos
Definition slintgraphicsview.h:126
slint::Image render(GraphicsScene &scene, float width, float height) noexcept
Definition slintgraphicsview.cpp:98
void scroll(const QPointF &delta) noexcept
Definition slintgraphicsview.cpp:298
void scrollRight() noexcept
Definition slintgraphicsview.cpp:258
Point mapToScenePos(const QPointF &pos) const noexcept
Definition slintgraphicsview.cpp:82
QSizeF mViewSize
Definition slintgraphicsview.h:120
void zoomOut() noexcept
Definition slintgraphicsview.cpp:274
GraphicsSceneMouseEvent mMouseEvent
Definition slintgraphicsview.h:122
QPainterPath calcPosWithTolerance(const Point &pos, qreal multiplier) const noexcept
Definition slintgraphicsview.cpp:72
bool applyProjection(const Projection &projection) noexcept
Definition slintgraphicsview.cpp:332
void scrollLeft() noexcept
Definition slintgraphicsview.cpp:254
QDeadlineTimer mLeftMouseButtonDoubleClickTimer
Definition slintgraphicsview.h:123
QPointF mPanningStartScenePos
Definition slintgraphicsview.h:127
void zoomIn() noexcept
Definition slintgraphicsview.cpp:270
Projection mAnimationDataStart
Definition slintgraphicsview.h:129
Projection mAnimationDataDelta
Definition slintgraphicsview.h:130
bool isPanning() const noexcept
Definition slintgraphicsview.h:83
void scrollDown() noexcept
Definition slintgraphicsview.cpp:266
void zoomToSceneRect(const QRectF &r) noexcept
Definition slintgraphicsview.cpp:278
void smoothTo(const Projection &projection) noexcept
Definition slintgraphicsview.cpp:322
void scrollUp() noexcept
Definition slintgraphicsview.cpp:262
std::unique_ptr< QVariantAnimation > mAnimation
Definition slintgraphicsview.h:131
IF_GraphicsViewEventHandler * mEventHandler
Definition slintgraphicsview.h:118
Projection mProjection
Definition slintgraphicsview.h:119
bool scrollEvent(const QPointF &pos, slint::private_api::PointerScrollEvent e) noexcept
Definition slintgraphicsview.cpp:220
bool mPanning
Definition slintgraphicsview.h:125
bool pointerEvent(const QPointF &pos, slint::private_api::PointerEvent e) noexcept
Definition slintgraphicsview.cpp:126
void zoom(const QPointF ¢er, qreal factor) noexcept
Definition slintgraphicsview.cpp:304
Definition occmodel.cpp:77
Definition graphicsscene.h:45
Definition slintgraphicsview.h:54
Projection interpolated(const Projection &delta, qreal factor) const noexcept
Definition slintgraphicsview.h:58
QPointF offset
Definition slintgraphicsview.h:55
Projection operator-(const Projection &rhs) const noexcept
Definition slintgraphicsview.h:68
qreal scale
Definition slintgraphicsview.h:56
bool operator!=(const Projection &rhs) const noexcept
Definition slintgraphicsview.h:65