QSint Library  0.2.2
ringchart.h
1 #ifndef RINGCHART_H
2 #define RINGCHART_H
3 
4 
5 #include "plotterbase.h"
6 
7 
8 namespace QSint
9 {
10 
11 
23 class RingChart : public PlotterBase
24 {
25  Q_OBJECT
26 
27 public:
28  RingChart(QWidget *parent = 0);
29 
31  void setMargin(int margin);
33  inline int margin() const { return m_margin; }
34 
35 protected:
36  virtual void drawContent(QPainter &p);
37 
38  virtual void drawRing(QPainter &p, const QPoint &center, int ring, int radius1, int radius2, bool checkHighlight, double mouseAngle);
39 
40  virtual void drawSegment(QPainter &p, const QRect& pieRect,
41  const QModelIndex &index, double value,
42  double angle1, double angle2,
43  bool isHighlighted);
44 
45  virtual void drawValue(QPainter &p, const QRect& pieRect,
46  const QModelIndex &index, double value,
47  double angle1, double angle2,
48  bool isHighlighted);
49 protected:
50  int m_margin;
51 };
52 
53 
54 }
55 
56 
57 #endif
Class representing a ringchart widget.
Definition: ringchart.h:23
virtual void drawContent(QPainter &p)
Draws content of the plotter.
Definition: ringchart.cpp:30
void setMargin(int margin)
Sets margins between the widget borders and piechart to margin (default is 3).
Definition: ringchart.cpp:19
int margin() const
Retrieves current value of the margins between the widget borders and piechart.
Definition: ringchart.h:33
Base class for 2-dimensional plotter widgets.
Definition: plotterbase.h:36

© Sintegrial Technologies 2011-2014
http://www.sintegrial.com