QElectroTech  0.70
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
QetGraphicsHandlerItem Class Reference

The QetGraphicsHandlerItem class This graphics item represents a point, destined to be used as an handler, for modifie the geometrie of a another graphics item (like shapes). The graphics item to be modified, must call "installSceneEventFilter" of this item with itself for argument,. The ghraphics item to be modified, need to reimplement "sceneEventFilter" for create the modification behavior. More...

#include <qetgraphicshandleritem.h>

Public Types

enum  { Type = UserType + 1200 }
 

Public Member Functions

 QetGraphicsHandlerItem (qreal size=10)
 QetGraphicsHandlerItem::QetGraphicsHandlerItem. More...
 
QRectF boundingRect () const override
 QetGraphicsHandlerItem::boundingRect. More...
 
int type () const override
 
void setColor (QColor color)
 QetGraphicsHandlerItem::setColor. More...
 

Static Public Member Functions

static QVector< QetGraphicsHandlerItem * > handlerForPoint (const QVector< QPointF > &points, int size=10)
 QetGraphicsHandlerItem::handlerForPoint. More...
 

Protected Member Functions

void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
 QetGraphicsHandlerItem::paint. More...
 

Private Attributes

QRectF m_handler_rect
 
QRectF m_br
 
qreal m_size
 
QColor m_color
 
QPen m_pen
 

Detailed Description

The QetGraphicsHandlerItem class This graphics item represents a point, destined to be used as an handler, for modifie the geometrie of a another graphics item (like shapes). The graphics item to be modified, must call "installSceneEventFilter" of this item with itself for argument,. The ghraphics item to be modified, need to reimplement "sceneEventFilter" for create the modification behavior.

Definition at line 31 of file qetgraphicshandleritem.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Definition at line 37 of file qetgraphicshandleritem.h.

Constructor & Destructor Documentation

◆ QetGraphicsHandlerItem()

QetGraphicsHandlerItem::QetGraphicsHandlerItem ( qreal  size = 10)

QetGraphicsHandlerItem::QetGraphicsHandlerItem.

Parameters
size,thesize of the handler

Definition at line 27 of file qetgraphicshandleritem.cpp.

References m_br, m_handler_rect, and m_size.

Referenced by handlerForPoint().

Member Function Documentation

◆ boundingRect()

QRectF QetGraphicsHandlerItem::boundingRect ( ) const
override

QetGraphicsHandlerItem::boundingRect.

Returns

Definition at line 40 of file qetgraphicshandleritem.cpp.

References m_br.

◆ handlerForPoint()

QVector< QetGraphicsHandlerItem * > QetGraphicsHandlerItem::handlerForPoint ( const QVector< QPointF > &  points,
int  size = 10 
)
static

◆ paint()

void QetGraphicsHandlerItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
overrideprotected

QetGraphicsHandlerItem::paint.

Parameters
painter
option
widget

Definition at line 60 of file qetgraphicshandleritem.cpp.

References m_color, and m_handler_rect.

◆ setColor()

void QetGraphicsHandlerItem::setColor ( QColor  color)

QetGraphicsHandlerItem::setColor.

Parameters
color,setthe color of the handler

Definition at line 48 of file qetgraphicshandleritem.cpp.

References m_color.

Referenced by Conductor::handlerMousePressEvent().

◆ type()

int QetGraphicsHandlerItem::type ( ) const
inlineoverride

Definition at line 38 of file qetgraphicshandleritem.h.

References Type.

Member Data Documentation

◆ m_br

QRectF QetGraphicsHandlerItem::m_br
private

Definition at line 46 of file qetgraphicshandleritem.h.

Referenced by boundingRect(), and QetGraphicsHandlerItem().

◆ m_color

QColor QetGraphicsHandlerItem::m_color
private

Definition at line 49 of file qetgraphicshandleritem.h.

Referenced by paint(), and setColor().

◆ m_handler_rect

QRectF QetGraphicsHandlerItem::m_handler_rect
private

Definition at line 46 of file qetgraphicshandleritem.h.

Referenced by paint(), and QetGraphicsHandlerItem().

◆ m_pen

QPen QetGraphicsHandlerItem::m_pen
private

Definition at line 50 of file qetgraphicshandleritem.h.

◆ m_size

qreal QetGraphicsHandlerItem::m_size
private

Definition at line 48 of file qetgraphicshandleritem.h.

Referenced by QetGraphicsHandlerItem().


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