KanoopGuiQt 1.3.0
Qt GUI utility library
Loading...
Searching...
No Matches
EllipseGraphicsItem Class Reference

QGraphicsEllipseItem with an application-defined type integer and appearance helpers. More...

#include <ellipsegraphicsitem.h>

+ Inheritance diagram for EllipseGraphicsItem:
+ Collaboration diagram for EllipseGraphicsItem:

Public Member Functions

 EllipseGraphicsItem (int type, QGraphicsItem *parent=nullptr)
 Construct with a type integer and optional parent item.
 
virtual int type () const override
 Return the application-defined type integer.
 
void setWidth (double width)
 Set the pen width of the ellipse outline.
 
void setColor (const QColor &color)
 Set the fill and outline color.
 

Detailed Description

QGraphicsEllipseItem with an application-defined type integer and appearance helpers.

EllipseGraphicsItem stores a type integer (returned by type()) that allows qgraphicsitem_cast<> and scene item-type filtering to work with custom types.

Definition at line 12 of file ellipsegraphicsitem.h.

Constructor & Destructor Documentation

◆ EllipseGraphicsItem()

EllipseGraphicsItem::EllipseGraphicsItem ( int  type,
QGraphicsItem *  parent = nullptr 
)

Construct with a type integer and optional parent item.

Parameters
typeApplication-defined graphics item type
parentOptional parent QGraphicsItem

Member Function Documentation

◆ setColor()

void EllipseGraphicsItem::setColor ( const QColor &  color)

Set the fill and outline color.

Parameters
colorColor to apply to the brush and pen

◆ setWidth()

void EllipseGraphicsItem::setWidth ( double  width)

Set the pen width of the ellipse outline.

Parameters
widthPen width in scene units

◆ type()

virtual int EllipseGraphicsItem::type ( ) const
inlineoverridevirtual

Return the application-defined type integer.

Returns
Item type value

Definition at line 26 of file ellipsegraphicsitem.h.


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