OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
GraphicsItemDesignerScene Class Reference

#include "GraphicsItemDesignerScene.h"

Inheritance diagram for GraphicsItemDesignerScene:
ot::GraphicsScene

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 GridgetGrid (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::GridFlagsgetGridFlags (void) const
 
void setGridSnapMode (Grid::GridSnapMode _mode)
 
Grid::GridSnapMode getGridSnapMode (void) const
 
void setGridLineStyle (const OutlineF &_outline)
 
const OutlineFgetGridLineStyle (void) const
 
void setMultiselectionEnabled (bool _enabled)
 
bool getMultiselectionEnabled (void) const
 
void checkMaxTriggerDistance (double _triggerDistance)
 
void checkMaxTriggerDistance (const MarginsD &_triggerDistance)
 
GraphicsViewgetGraphicsView (void)
 
const GraphicsViewgetGraphicsView (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
 
GraphicsElementfindClosestConnectableElement (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)
 

Member Enumeration Documentation

◆ Mode

Enumerator
NoMode 
PointPickingMode 

Constructor & Destructor Documentation

◆ GraphicsItemDesignerScene()

GraphicsItemDesignerScene::GraphicsItemDesignerScene ( GraphicsItemDesignerView * _view)

◆ ~GraphicsItemDesignerScene()

GraphicsItemDesignerScene::~GraphicsItemDesignerScene ( )
virtual

Member Function Documentation

◆ disablePickingMode()

void GraphicsItemDesignerScene::disablePickingMode ( void )

◆ drawBackground()

void GraphicsItemDesignerScene::drawBackground ( QPainter * _painter,
const QRectF & _rect )
overrideprotectedvirtual

Reimplemented from ot::GraphicsScene.

◆ enablePickingMode()

void GraphicsItemDesignerScene::enablePickingMode ( void )

◆ exportAsImage()

QImage GraphicsItemDesignerScene::exportAsImage ( const GraphicsItemDesignerImageExportConfig & _exportConfig)

◆ getItemSize()

const QSizeF & GraphicsItemDesignerScene::getItemSize ( void ) const
inline

◆ mouseMoveEvent()

void GraphicsItemDesignerScene::mouseMoveEvent ( QGraphicsSceneMouseEvent * _event)
overrideprotectedvirtual

Reimplemented from ot::GraphicsScene.

◆ mousePressEvent()

void GraphicsItemDesignerScene::mousePressEvent ( QGraphicsSceneMouseEvent * _event)
overrideprotectedvirtual

Reimplemented from ot::GraphicsScene.

◆ mouseReleaseEvent()

void GraphicsItemDesignerScene::mouseReleaseEvent ( QGraphicsSceneMouseEvent * _event)
overrideprotectedvirtual

Reimplemented from ot::GraphicsScene.

◆ setItemSize()

void GraphicsItemDesignerScene::setItemSize ( const QSizeF & _size)

The documentation for this class was generated from the following files: