The GraphicsView class.
More...
#include <graphicsview.h>
Inherits QGraphicsView.
◆ CursorOption
◆ GraphicsView() [1/2]
◆ GraphicsView() [2/2]
◆ ~GraphicsView()
◆ getScene()
◆ getVisibleSceneRect()
QRectF getVisibleSceneRect |
( |
| ) |
const |
|
noexcept |
◆ getUseOpenGl()
bool getUseOpenGl |
( |
| ) |
const |
|
inlinenoexcept |
◆ getGridInterval()
◆ getGridStyle()
◆ isMouseButtonPressed()
bool isMouseButtonPressed |
( |
Qt::MouseButtons |
btn | ) |
const |
|
inlinenoexcept |
◆ getIdleTimeMs()
qint64 getIdleTimeMs |
( |
| ) |
const |
|
inlinenoexcept |
◆ setBackgroundColors()
void setBackgroundColors |
( |
const QColor & |
fill, |
|
|
const QColor & |
grid |
|
) |
| |
|
noexcept |
◆ setOverlayColors()
void setOverlayColors |
( |
const QColor & |
fill, |
|
|
const QColor & |
content |
|
) |
| |
|
noexcept |
◆ setInfoBoxColors()
void setInfoBoxColors |
( |
const QColor & |
fill, |
|
|
const QColor & |
text |
|
) |
| |
|
noexcept |
◆ setUseOpenGl()
void setUseOpenGl |
( |
bool |
useOpenGl | ) |
|
|
noexcept |
◆ setGrayOut()
void setGrayOut |
( |
bool |
grayOut | ) |
|
|
noexcept |
◆ setGridStyle()
◆ setGridInterval()
◆ setScene()
◆ setVisibleSceneRect()
void setVisibleSceneRect |
( |
const QRectF & |
rect | ) |
|
|
noexcept |
◆ setSceneRectMarker()
void setSceneRectMarker |
( |
const QRectF & |
rect | ) |
|
|
noexcept |
Setup the marker for a specific scene rect.
This is intended to mark a specific area in a scene, with a line starting from the top left of the view, so the user can easily locate the specified area, even if it is very small.
- Parameters
-
rect | The rect to mark. Pass an empty rect to clear the marker. |
◆ setSceneCursor()
void setSceneCursor |
( |
const std::optional< std::pair< Point, CursorOptions > > & |
cursor | ) |
|
|
noexcept |
◆ setRulerPositions()
void setRulerPositions |
( |
const std::optional< std::pair< Point, Point > > & |
pos | ) |
|
|
noexcept |
◆ setInfoBoxText()
void setInfoBoxText |
( |
const QString & |
text | ) |
|
|
noexcept |
◆ setOriginCrossVisible()
void setOriginCrossVisible |
( |
bool |
visible | ) |
|
|
noexcept |
◆ setEventHandlerObject()
◆ mapGlobalPosToScenePos()
Point mapGlobalPosToScenePos |
( |
const QPoint & |
globalPosPx, |
|
|
bool |
boundToView, |
|
|
bool |
mapToGrid |
|
) |
| const |
|
noexcept |
◆ calcPosWithTolerance()
QPainterPath calcPosWithTolerance |
( |
const Point & |
pos, |
|
|
qreal |
multiplier = 1 |
|
) |
| const |
|
noexcept |
◆ handleMouseWheelEvent()
void handleMouseWheelEvent |
( |
QGraphicsSceneWheelEvent * |
event | ) |
|
|
noexcept |
◆ operator=()
◆ zoomIn
◆ zoomOut
◆ zoomAll
◆ zoomToRect
void zoomToRect |
( |
const QRectF & |
rect | ) |
|
|
slotnoexcept |
◆ showWaitingSpinner
void showWaitingSpinner |
( |
| ) |
|
|
slotnoexcept |
◆ hideWaitingSpinner
void hideWaitingSpinner |
( |
| ) |
|
|
slotnoexcept |
◆ cursorScenePositionChanged
void cursorScenePositionChanged |
( |
const Point & |
pos | ) |
|
|
signal |
Cursor scene position changed signal.
- Parameters
-
pos | The new cursor position (not mapped to grid!) |
◆ zoomAnimationValueChanged
void zoomAnimationValueChanged |
( |
const QVariant & |
value | ) |
|
|
privateslotnoexcept |
◆ wheelEvent()
void wheelEvent |
( |
QWheelEvent * |
event | ) |
|
|
private |
◆ eventFilter()
bool eventFilter |
( |
QObject * |
obj, |
|
|
QEvent * |
event |
|
) |
| |
|
private |
◆ drawBackground()
void drawBackground |
( |
QPainter * |
painter, |
|
|
const QRectF & |
rect |
|
) |
| |
|
private |
◆ drawForeground()
void drawForeground |
( |
QPainter * |
painter, |
|
|
const QRectF & |
rect |
|
) |
| |
|
private |
◆ mWaitingSpinnerWidget
◆ mInfoBoxLabel
QScopedPointer<QLabel> mInfoBoxLabel |
|
private |
◆ mEventHandlerObject
◆ mScene
◆ mZoomAnimation
QVariantAnimation* mZoomAnimation |
|
private |
◆ mGridStyle
◆ mGridInterval
◆ mBackgroundColor
◆ mGridColor
◆ mOverlayFillColor
◆ mOverlayContentColor
QColor mOverlayContentColor |
|
private |
◆ mSceneRectMarker
◆ mOriginCrossVisible
◆ mUseOpenGl
◆ mGrayOut
◆ mSceneCursor
std::optional<std::pair<Point, CursorOptions> > mSceneCursor |
|
private |
If not nullopt, a cursor will be shown at the given position.
◆ mRulerGauges
◆ mRulerPositions
std::optional<std::pair<Point, Point> > mRulerPositions |
|
private |
◆ mPanningActive
volatile bool mPanningActive |
|
private |
◆ mPanningButton
Qt::MouseButton mPanningButton |
|
private |
◆ mPressedMouseButtons
Qt::MouseButtons mPressedMouseButtons |
|
private |
◆ mCursorBeforePanning
QCursor mCursorBeforePanning |
|
private |
◆ mIdleTimeMs
◆ sZoomStepFactor
constexpr qreal sZoomStepFactor = 1.3 |
|
staticconstexprprivate |
The documentation for this class was generated from the following files: