The GraphicsScene class.
More...
#include <graphicsscene.h>
|
void | drawBackground (QPainter *painter, const QRectF &rect) noexcept override |
|
void | drawForeground (QPainter *painter, const QRectF &rect) noexcept override |
|
◆ GraphicsScene()
◆ ~GraphicsScene()
◆ getGridInterval()
◆ getGridStyle()
◆ setBackgroundColors()
void setBackgroundColors |
( |
const QColor & |
fill, |
|
|
const QColor & |
grid |
|
) |
| |
|
noexcept |
◆ setOverlayColors()
void setOverlayColors |
( |
const QColor & |
fill, |
|
|
const QColor & |
content |
|
) |
| |
|
noexcept |
◆ setSelectionRectColors()
void setSelectionRectColors |
( |
const QColor & |
line, |
|
|
const QColor & |
fill |
|
) |
| |
|
noexcept |
◆ setGridStyle()
◆ setGridInterval()
◆ setOriginCrossVisible()
void setOriginCrossVisible |
( |
bool |
visible | ) |
|
|
noexcept |
◆ setGrayOut()
void setGrayOut |
( |
bool |
grayOut | ) |
|
|
noexcept |
◆ setSelectionRect()
void setSelectionRect |
( |
const Point & |
p1, |
|
|
const Point & |
p2 |
|
) |
| |
|
noexcept |
◆ clearSelectionRect()
void clearSelectionRect |
( |
| ) |
|
|
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 Point & |
pos, |
|
|
bool |
cross, |
|
|
bool |
circle |
|
) |
| |
|
noexcept |
◆ setRulerPositions()
void setRulerPositions |
( |
const std::optional< std::pair< Point, Point > > & |
pos | ) |
|
|
noexcept |
◆ addItem()
void addItem |
( |
QGraphicsItem & |
item | ) |
|
|
noexcept |
◆ removeItem()
void removeItem |
( |
QGraphicsItem & |
item | ) |
|
|
noexcept |
◆ toPixmap() [1/2]
QPixmap toPixmap |
( |
int |
dpi, |
|
|
const QColor & |
background = Qt::transparent |
|
) |
| |
|
noexcept |
◆ toPixmap() [2/2]
QPixmap toPixmap |
( |
const QSize & |
size, |
|
|
const QColor & |
background = Qt::transparent |
|
) |
| |
|
noexcept |
◆ drawBackground()
void drawBackground |
( |
QPainter * |
painter, |
|
|
const QRectF & |
rect |
|
) |
| |
|
overrideprotectednoexcept |
◆ drawForeground()
void drawForeground |
( |
QPainter * |
painter, |
|
|
const QRectF & |
rect |
|
) |
| |
|
overrideprotectednoexcept |
◆ mGridStyle
◆ mGridInterval
◆ mBackgroundColor
◆ mGridColor
◆ mOverlayFillColor
◆ mOverlayContentColor
QColor mOverlayContentColor |
|
private |
◆ mSceneRectMarker
◆ mOriginCrossVisible
◆ mGrayOut
◆ mSelectionRectItem
std::unique_ptr<QGraphicsRectItem> mSelectionRectItem |
|
private |
◆ mSceneCursorPos
◆ mSceneCursorCross
◆ mSceneCursorCircle
◆ mRulerGauges
◆ mRulerPositions
std::optional<std::pair<Point, Point> > mRulerPositions |
|
private |
The documentation for this class was generated from the following files: