20#ifndef LIBREPCB_EDITOR_SLINTGRAPHICSVIEW_H
21#define LIBREPCB_EDITOR_SLINTGRAPHICSVIEW_H
43class IF_GraphicsViewEventHandler;
60 qreal factor)
const noexcept {
63 scale + delta.scale * factor,
67 return (
offset != rhs.offset) || (
scale != rhs.scale);
86 qreal multiplier)
const noexcept;
94 slint::private_api::PointerEvent e)
noexcept;
96 slint::private_api::PointerScrollEvent e)
noexcept;
97 bool keyEvent(
const slint::private_api::KeyEvent& e)
noexcept;
114 void scroll(const QPointF& delta) noexcept;
115 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:52
bool keyEvent(const slint::private_api::KeyEvent &e) noexcept
Definition slintgraphicsview.cpp:303
void setEventHandler(IF_GraphicsViewEventHandler *obj) noexcept
Definition slintgraphicsview.cpp:119
QPointF mPanningStartScreenPos
Definition slintgraphicsview.h:132
slint::Image render(GraphicsScene &scene, float width, float height) noexcept
Definition slintgraphicsview.cpp:124
void scroll(const QPointF &delta) noexcept
Definition slintgraphicsview.cpp:364
void scrollRight() noexcept
Definition slintgraphicsview.cpp:324
Point mapToScenePos(const QPointF &pos) const noexcept
Definition slintgraphicsview.cpp:82
std::unique_ptr< QOpenGLFramebufferObject > mGlFbo
Definition slintgraphicsview.h:123
QSizeF mViewSize
Definition slintgraphicsview.h:126
std::unique_ptr< QOffscreenSurface > mGlSurface
Definition slintgraphicsview.h:121
void zoomOut() noexcept
Definition slintgraphicsview.cpp:340
GraphicsSceneMouseEvent mMouseEvent
Definition slintgraphicsview.h:128
QPainterPath calcPosWithTolerance(const Point &pos, qreal multiplier) const noexcept
Definition slintgraphicsview.cpp:72
bool applyProjection(const Projection &projection) noexcept
Definition slintgraphicsview.cpp:398
void setUseOpenGl(bool use) noexcept
Definition slintgraphicsview.cpp:93
void scrollLeft() noexcept
Definition slintgraphicsview.cpp:320
QDeadlineTimer mLeftMouseButtonDoubleClickTimer
Definition slintgraphicsview.h:129
std::unique_ptr< QOpenGLContext > mGlContext
Definition slintgraphicsview.h:122
QString mGlError
Definition slintgraphicsview.h:124
QPointF mPanningStartScenePos
Definition slintgraphicsview.h:133
void zoomIn() noexcept
Definition slintgraphicsview.cpp:336
Projection mAnimationDataStart
Definition slintgraphicsview.h:135
Projection mAnimationDataDelta
Definition slintgraphicsview.h:136
bool isPanning() const noexcept
Definition slintgraphicsview.h:84
void scrollDown() noexcept
Definition slintgraphicsview.cpp:332
void zoomToSceneRect(const QRectF &r) noexcept
Definition slintgraphicsview.cpp:344
void smoothTo(const Projection &projection) noexcept
Definition slintgraphicsview.cpp:388
void scrollUp() noexcept
Definition slintgraphicsview.cpp:328
std::unique_ptr< QVariantAnimation > mAnimation
Definition slintgraphicsview.h:137
IF_GraphicsViewEventHandler * mEventHandler
Definition slintgraphicsview.h:120
Projection mProjection
Definition slintgraphicsview.h:125
bool scrollEvent(const QPointF &pos, slint::private_api::PointerScrollEvent e) noexcept
Definition slintgraphicsview.cpp:286
bool mPanning
Definition slintgraphicsview.h:131
bool pointerEvent(const QPointF &pos, slint::private_api::PointerEvent e) noexcept
Definition slintgraphicsview.cpp:192
void zoom(const QPointF ¢er, qreal factor) noexcept
Definition slintgraphicsview.cpp:370
Definition occmodel.cpp:77
Definition graphicsscene.h:45
Definition slintgraphicsview.h:55
Projection interpolated(const Projection &delta, qreal factor) const noexcept
Definition slintgraphicsview.h:59
QPointF offset
Definition slintgraphicsview.h:56
Projection operator-(const Projection &rhs) const noexcept
Definition slintgraphicsview.h:69
qreal scale
Definition slintgraphicsview.h:57
bool operator!=(const Projection &rhs) const noexcept
Definition slintgraphicsview.h:66