QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | 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>

Inherits QGraphicsObject.

Collaboration diagram for QetGraphicsHandlerItem:
Collaboration graph

Public Types

enum  { Type = UserType + 1200 }
 

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
 QetGraphicsHandlerItem::paint.
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 
qreal currentSize () const
 
void setCurrentSize (qreal size)
 

Properties

qreal currentSize
 

Private Attributes

QRectF m_handler_rect
 
QRectF m_br
 
qreal m_current_size
 
qreal m_original_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.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Constructor & Destructor Documentation

◆ QetGraphicsHandlerItem()

QetGraphicsHandlerItem::QetGraphicsHandlerItem ( qreal  size = 10)

QetGraphicsHandlerItem::QetGraphicsHandlerItem.

Parameters
size: the size of the handler
Here is the call graph for this function:

Member Function Documentation

◆ boundingRect()

QRectF QetGraphicsHandlerItem::boundingRect ( ) const
override

◆ currentSize()

qreal QetGraphicsHandlerItem::currentSize ( ) const
inlineprotected

◆ handlerForPoint()

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

QetGraphicsHandlerItem::handlerForPoint.

Parameters
points
size
Returns
A list of handler with pos at point
Here is the caller graph for this function:

◆ hoverEnterEvent()

void QetGraphicsHandlerItem::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

◆ hoverLeaveEvent()

void QetGraphicsHandlerItem::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

◆ paint()

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

QetGraphicsHandlerItem::paint.

Parameters
painter
option
widget

◆ setColor()

void QetGraphicsHandlerItem::setColor ( QColor  color)

QetGraphicsHandlerItem::setColor.

Parameters
color: set the color of the handler
Here is the caller graph for this function:

◆ setCurrentSize()

void QetGraphicsHandlerItem::setCurrentSize ( qreal  size)
protected

◆ setSize()

void QetGraphicsHandlerItem::setSize ( qreal  size)
Here is the caller graph for this function:

◆ type()

int QetGraphicsHandlerItem::type ( ) const
inlineoverride

Member Data Documentation

◆ m_br

QRectF QetGraphicsHandlerItem::m_br
private

◆ m_color

QColor QetGraphicsHandlerItem::m_color
private

◆ m_current_size

qreal QetGraphicsHandlerItem::m_current_size
private

◆ m_handler_rect

QRectF QetGraphicsHandlerItem::m_handler_rect
private

◆ m_original_size

qreal QetGraphicsHandlerItem::m_original_size
private

◆ m_pen

QPen QetGraphicsHandlerItem::m_pen
private

Property Documentation

◆ currentSize

qreal QetGraphicsHandlerItem::currentSize
readwrite

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