Engauge Digitizer  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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. More...
 
 GraphicsArcItem (const QRectF &rect, QGraphicsItem *parent=0)
 Constructor with coordinates specified as rectangle. More...
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 Paint without interior fill. More...
 

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::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 }
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

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: