20#ifndef LIBREPCB_EDITOR_GRAPHICSVIEW_H
21#define LIBREPCB_EDITOR_GRAPHICSVIEW_H
42class IF_GraphicsViewEventHandler;
43class WaitingSpinnerWidget;
66 QWidget* parent =
nullptr,
105 const std::optional<std::pair<Point, CursorOptions>>& cursor)
noexcept;
107 const std::optional<std::pair<Point, Point>>& pos)
noexcept;
115 bool mapToGrid)
const noexcept;
117 qreal multiplier = 1) const noexcept;
The Circle class.
Definition circle.h:46
The Length class is used to represent a length (for example 12.75 millimeters)
Definition length.h:82
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition lengthunit.h:60
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
Theme class as used by librepcb::WorkspaceSettingsItem_Themes.
Definition theme.h:44
GridStyle
Definition theme.h:49
The GraphicsScene class.
Definition graphicsscene.h:45
The GraphicsView class.
Definition graphicsview.h:52
void zoomToRect(const QRectF &rect) noexcept
Definition graphicsview.cpp:316
QCursor mCursorBeforePanning
Definition graphicsview.h:188
std::optional< std::pair< Point, CursorOptions > > mSceneCursor
If not nullopt, a cursor will be shown at the given position.
Definition graphicsview.h:171
Theme::GridStyle getGridStyle() const noexcept
Definition graphicsview.h:77
bool mUseOpenGl
Definition graphicsview.h:167
void zoomAll() noexcept
Definition graphicsview.cpp:305
QColor mOverlayFillColor
Definition graphicsview.h:163
void setRulerPositions(const std::optional< std::pair< Point, Point > > &pos) noexcept
Definition graphicsview.cpp:212
QColor mGridColor
Definition graphicsview.h:162
QVector< RulerGauge > mRulerGauges
Definition graphicsview.h:181
PositiveLength mGridInterval
Definition graphicsview.h:160
const PositiveLength & getGridInterval() const noexcept
Definition graphicsview.h:74
void setGridStyle(Theme::GridStyle style) noexcept
Definition graphicsview.cpp:179
QPainterPath calcPosWithTolerance(const Point &pos, qreal multiplier=1) const noexcept
Definition graphicsview.cpp:253
IF_GraphicsViewEventHandler * mEventHandlerObject
Definition graphicsview.h:156
void setUseOpenGl(bool useOpenGl) noexcept
Definition graphicsview.cpp:153
void setOriginCrossVisible(bool visible) noexcept
Definition graphicsview.cpp:224
void hideWaitingSpinner() noexcept
Definition graphicsview.cpp:329
void zoomOut() noexcept
Definition graphicsview.cpp:299
void zoomAnimationValueChanged(const QVariant &value) noexcept
Definition graphicsview.cpp:337
Theme::GridStyle mGridStyle
Definition graphicsview.h:159
void setSceneCursor(const std::optional< std::pair< Point, CursorOptions > > &cursor) noexcept
Definition graphicsview.cpp:206
void setSceneRectMarker(const QRectF &rect) noexcept
Setup the marker for a specific scene rect.
Definition graphicsview.cpp:201
void handleMouseWheelEvent(QGraphicsSceneWheelEvent *event) noexcept
Definition graphicsview.cpp:265
QScopedPointer< WaitingSpinnerWidget > mWaitingSpinnerWidget
Definition graphicsview.h:154
QColor mOverlayContentColor
Definition graphicsview.h:164
void setOverlayColors(const QColor &fill, const QColor &content) noexcept
Definition graphicsview.cpp:133
QRectF getVisibleSceneRect() const noexcept
Definition graphicsview.cpp:117
Qt::MouseButton mPanningButton
Definition graphicsview.h:186
void setGrayOut(bool grayOut) noexcept
Definition graphicsview.cpp:174
void cursorScenePositionChanged(const Point &pos)
Cursor scene position changed signal.
bool mGrayOut
Definition graphicsview.h:168
void drawBackground(QPainter *painter, const QRectF &rect)
Definition graphicsview.cpp:449
bool mOriginCrossVisible
Definition graphicsview.h:166
qint64 mIdleTimeMs
Definition graphicsview.h:189
void zoomIn() noexcept
Definition graphicsview.cpp:293
static constexpr qreal sZoomStepFactor
Definition graphicsview.h:192
QVariantAnimation * mZoomAnimation
Definition graphicsview.h:158
volatile bool mPanningActive
Definition graphicsview.h:185
void setBackgroundColors(const QColor &fill, const QColor &grid) noexcept
Definition graphicsview.cpp:125
void drawForeground(QPainter *painter, const QRectF &rect)
Definition graphicsview.cpp:498
void setInfoBoxColors(const QColor &fill, const QColor &text) noexcept
Definition graphicsview.cpp:140
GraphicsScene * getScene() const noexcept
Definition graphicsview.h:71
QRectF mSceneRectMarker
Definition graphicsview.h:165
std::optional< std::pair< Point, Point > > mRulerPositions
Definition graphicsview.h:182
void wheelEvent(QWheelEvent *event)
Definition graphicsview.cpp:348
bool getUseOpenGl() const noexcept
Definition graphicsview.h:73
CursorOption
Definition graphicsview.h:57
void showWaitingSpinner() noexcept
Definition graphicsview.cpp:325
void setInfoBoxText(const QString &text) noexcept
Definition graphicsview.cpp:218
bool eventFilter(QObject *obj, QEvent *event)
Definition graphicsview.cpp:356
QScopedPointer< QLabel > mInfoBoxLabel
Definition graphicsview.h:155
void setVisibleSceneRect(const QRectF &rect) noexcept
Definition graphicsview.cpp:197
qint64 getIdleTimeMs() const noexcept
Definition graphicsview.h:81
Point mapGlobalPosToScenePos(const QPoint &globalPosPx, bool boundToView, bool mapToGrid) const noexcept
Definition graphicsview.cpp:238
void setGridInterval(const PositiveLength &interval) noexcept
Definition graphicsview.cpp:184
QColor mBackgroundColor
Definition graphicsview.h:161
void setScene(GraphicsScene *scene) noexcept
Definition graphicsview.cpp:189
GraphicsScene * mScene
Definition graphicsview.h:157
Qt::MouseButtons mPressedMouseButtons
Definition graphicsview.h:187
bool isMouseButtonPressed(Qt::MouseButtons btn) const noexcept
Definition graphicsview.h:78
void setEventHandlerObject(IF_GraphicsViewEventHandler *eventHandler) noexcept
Definition graphicsview.cpp:229
The IF_GraphicsViewEventHandler class.
Definition if_graphicsvieweventhandler.h:41
Definition occmodel.cpp:76
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
Definition graphicsview.h:174
QString unitSeparator
Definition graphicsview.h:177
LengthUnit unit
Definition graphicsview.h:176
Length currentTickInterval
Definition graphicsview.h:179
int xScale
Definition graphicsview.h:175
Length minTickInterval
Definition graphicsview.h:178