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

#include "GraphicsItemDesignerDrawHandler.h"

Inheritance diagram for GraphicsItemDesignerDrawHandler:

Public Types

enum  DrawMode {
  NoMode , Line , Square , Rect ,
  Circle , Ellipse , Arc , Triangle ,
  Polygon , Shape , Text
}
 

Signals

void drawCompleted ()
 
void drawCancelled ()
 

Public Member Functions

 GraphicsItemDesignerDrawHandler (GraphicsItemDesignerView *_view)
 
virtual ~GraphicsItemDesignerDrawHandler ()
 
void startDraw (DrawMode _mode)
 
void cancelDraw (void)
 Cancels the current draw. The item will be removed.
 
GraphicsItemDesignerItemBasestopDraw (void)
 Stops the current draw and returns the drawn item if valid. The current preview item will be returned and forgotten by the handler. The caller takes ownership of the item. The returned item is still placed in the scene.
 
void checkStopDraw (void)
 Will check if the current draw is valid and emits drawCompleted if valid otherwise removes the item. The last control point of the item will be removed.
 
void updatePosition (const QPointF &_pos)
 
void positionSelected (const QPointF &_pos)
 
ot::UID generateUid (void)
 Generates the next available UID.
 
void resetUid (void)
 Resets the UID to the initial state.
 

Member Enumeration Documentation

◆ DrawMode

Enumerator
NoMode 
Line 
Square 
Rect 
Circle 
Ellipse 
Arc 
Triangle 
Polygon 
Shape 
Text 

Constructor & Destructor Documentation

◆ GraphicsItemDesignerDrawHandler()

GraphicsItemDesignerDrawHandler::GraphicsItemDesignerDrawHandler ( GraphicsItemDesignerView * _view)

◆ ~GraphicsItemDesignerDrawHandler()

GraphicsItemDesignerDrawHandler::~GraphicsItemDesignerDrawHandler ( )
virtual

Member Function Documentation

◆ cancelDraw()

void GraphicsItemDesignerDrawHandler::cancelDraw ( void )

Cancels the current draw. The item will be removed.

◆ checkStopDraw()

void GraphicsItemDesignerDrawHandler::checkStopDraw ( void )

Will check if the current draw is valid and emits drawCompleted if valid otherwise removes the item. The last control point of the item will be removed.

◆ drawCancelled

void GraphicsItemDesignerDrawHandler::drawCancelled ( )
signal

◆ drawCompleted

void GraphicsItemDesignerDrawHandler::drawCompleted ( )
signal

◆ generateUid()

ot::UID GraphicsItemDesignerDrawHandler::generateUid ( void )
inline

Generates the next available UID.

◆ positionSelected()

void GraphicsItemDesignerDrawHandler::positionSelected ( const QPointF & _pos)

◆ resetUid()

void GraphicsItemDesignerDrawHandler::resetUid ( void )
inline

Resets the UID to the initial state.

◆ startDraw()

void GraphicsItemDesignerDrawHandler::startDraw ( DrawMode _mode)

◆ stopDraw()

GraphicsItemDesignerItemBase * GraphicsItemDesignerDrawHandler::stopDraw ( void )

Stops the current draw and returns the drawn item if valid. The current preview item will be returned and forgotten by the handler. The caller takes ownership of the item. The returned item is still placed in the scene.

◆ updatePosition()

void GraphicsItemDesignerDrawHandler::updatePosition ( const QPointF & _pos)

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