#include "GraphicsItemDesignerScene.h"
Public Types | |
| enum | Mode { NoMode , PointPickingMode } |
Public Member Functions | |
| GraphicsItemDesignerScene (GraphicsItemDesignerView *_view) | |
| virtual | ~GraphicsItemDesignerScene () |
| void | enablePickingMode (void) |
| void | disablePickingMode (void) |
| void | setItemSize (const QSizeF &_size) |
| const QSizeF & | getItemSize (void) const |
| QImage | exportAsImage (const GraphicsItemDesignerImageExportConfig &_exportConfig) |
Public Member Functions inherited from ot::GraphicsScene | |
| GraphicsScene (GraphicsView *_view) | |
| GraphicsScene (const QRectF &_sceneRect, GraphicsView *_view) | |
| virtual | ~GraphicsScene () |
| void | startConnection (ot::GraphicsItem *_item) |
| A connection line according to the current configuration will be drawn with the provided item as origin. | |
| void | startConnectionToConnection (ot::GraphicsConnectionItem *_targetedConnection, const Point2DD &_pos) |
| Will request a connection from the currently set origin to the provided target connection. The new control point is pos and should be the mouse press position. | |
| void | stopConnection (void) |
| void | setGrid (const Grid &_grid) |
| const Grid & | getGrid (void) const |
| void | setGridStep (int _step) |
| void | setGridStep (const Point2D &_step) |
| Point2D | getGridStep (void) const |
| void | setWideGridLineCounter (int _counter) |
| void | setWideGridLineCounter (const Point2D &_counter) |
| Point2D | getWideGridLineCounter (void) const |
| void | setGridFlag (Grid::GridFlag _flag, bool _active=true) |
| void | setGridFlags (const Grid::GridFlags &_flags) |
| const Grid::GridFlags & | getGridFlags (void) const |
| void | setGridSnapMode (Grid::GridSnapMode _mode) |
| Grid::GridSnapMode | getGridSnapMode (void) const |
| void | setGridLineStyle (const OutlineF &_outline) |
| const OutlineF & | getGridLineStyle (void) const |
| void | setMultiselectionEnabled (bool _enabled) |
| bool | getMultiselectionEnabled (void) const |
| void | checkMaxTriggerDistance (double _triggerDistance) |
| void | checkMaxTriggerDistance (const MarginsD &_triggerDistance) |
| GraphicsView * | getGraphicsView (void) |
| const GraphicsView * | getGraphicsView (void) const |
| void | setConnectionPreviewShape (GraphicsConnectionCfg::ConnectionShape _shape) |
| GraphicsConnectionCfg::ConnectionShape | getConnectionPreviewShape (void) const |
| void | setIgnoreEvents (bool _ignore) |
| bool | getIgnoreEvents (void) const |
| QPointF | snapToGrid (const QPointF &_pt) const |
| QPointF | snapToGrid (const GraphicsItem *_item) const |
| Snaps the item to the grid according to the item flags and returns the top left pos. | |
| void | deselectAll (void) |
| void | moveAllSelectedItems (const Point2DD &_delta) |
| void | rotateAllSelectedItems (double _relativeAngle) |
| void | flipAllSelectedItems (Qt::Orientation _flipAxis) |
| void | itemAboutToBeRemoved (GraphicsItem *_item) |
| void | connectionAboutToBeRemoved (GraphicsConnectionItem *_connection) |
| void | elementAboutToBeRemoved (GraphicsElement *_element) |
| void | handleSelectionChanged (void) |
Protected Member Functions | |
| virtual void | mousePressEvent (QGraphicsSceneMouseEvent *_event) override |
| virtual void | mouseMoveEvent (QGraphicsSceneMouseEvent *_event) override |
| virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *_event) override |
| virtual void | drawBackground (QPainter *_painter, const QRectF &_rect) override |
Protected Member Functions inherited from ot::GraphicsScene | |
| virtual void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *_event) override |
| void | drawGrid (QPainter *_painter, const QRectF &_rect) |
| qreal | calculateScaledGridLineWidth (QPainter *_painter, qreal _normalWidth) const |
| void | calculateGridLines (const QRectF &_painterRect, QList< QLineF > &_normalLines, QList< QLineF > &_wideLines, QList< QLineF > &_centerLines) const |
| Point2D | calculateScaledGridStepSize (const QRectF &_rect) const |
| GraphicsElement * | findClosestConnectableElement (const QPointF &_pos) const |
| QList< QGraphicsItem * > | findItemsInTriggerDistance (const QPointF &_pos) const |
Additional Inherited Members | |
Public Slots inherited from ot::GraphicsScene | |
| void | slotSelectionChanged (void) |
Signals inherited from ot::GraphicsScene | |
| void | selectionChangeFinished (void) |
| void | graphicsItemDoubleClicked (const ot::GraphicsItem *_item) |
| GraphicsItemDesignerScene::GraphicsItemDesignerScene | ( | GraphicsItemDesignerView * | _view | ) |
|
virtual |
| void GraphicsItemDesignerScene::disablePickingMode | ( | void | ) |
|
overrideprotectedvirtual |
Reimplemented from ot::GraphicsScene.
| void GraphicsItemDesignerScene::enablePickingMode | ( | void | ) |
| QImage GraphicsItemDesignerScene::exportAsImage | ( | const GraphicsItemDesignerImageExportConfig & | _exportConfig | ) |
|
inline |
|
overrideprotectedvirtual |
Reimplemented from ot::GraphicsScene.
|
overrideprotectedvirtual |
Reimplemented from ot::GraphicsScene.
|
overrideprotectedvirtual |
Reimplemented from ot::GraphicsScene.
| void GraphicsItemDesignerScene::setItemSize | ( | const QSizeF & | _size | ) |