Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
GraphicsArcItem Class Reference

Draw an arc as an ellipse but without lines from the center to the start and end points. More...

#include <GraphicsArcItem.h>

Inheritance diagram for GraphicsArcItem:
Inheritance graph
Collaboration diagram for GraphicsArcItem:
Collaboration graph

Public Member Functions

 GraphicsArcItem (double x, double y, double width, double height, QGraphicsItem *parent=0)
 Constructor with individual coordinates.
 
 GraphicsArcItem (const QRectF &rect, QGraphicsItem *parent=0)
 Constructor with coordinates specified as rectangle.
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 Paint without interior fill.
 

Detailed Description

Draw an arc as an ellipse but without lines from the center to the start and end points.

Originally this class overrode QGraphicsEllipseItem::boundingRect and called QGraphicsScene::boundingRect. However, that led to an infinite loop since QGraphicsScene::boundingRect looped back around to QGraphicsEllipseItem::boundingRect

Definition at line 17 of file GraphicsArcItem.h.

Constructor & Destructor Documentation

◆ GraphicsArcItem() [1/2]

GraphicsArcItem::GraphicsArcItem ( double x,
double y,
double width,
double height,
QGraphicsItem * parent = 0 )

Constructor with individual coordinates.

Definition at line 12 of file GraphicsArcItem.cpp.

16 :
17 QGraphicsEllipseItem(x,
18 y,
19 width,
20 height,
21 parent)
22{
23}
const int INNER_RADIUS_MIN

◆ GraphicsArcItem() [2/2]

GraphicsArcItem::GraphicsArcItem ( const QRectF & rect,
QGraphicsItem * parent = 0 )

Constructor with coordinates specified as rectangle.

Definition at line 25 of file GraphicsArcItem.cpp.

26 :
27 QGraphicsEllipseItem (rect,
28 parent)
29{
30}

Member Function Documentation

◆ paint()

void GraphicsArcItem::paint ( QPainter * painter,
const QStyleOptionGraphicsItem * option,
QWidget * widget )
virtual

Paint without interior fill.

Definition at line 32 of file GraphicsArcItem.cpp.

35{
36 painter->setPen (pen ());
37 painter->drawArc (rect(),
38 startAngle (),
39 spanAngle());
40}

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