##// END OF EJS Templates
Set the first pie slice exploded and label visible in chartthemes demo
Set the first pie slice exploded and label visible in chartthemes demo

File last commit:

r673:e6252af95451
r699:367aeb7897cf
Show More
piesliceitem_p.h
59 lines | 1.6 KiB | text/x-c | CLexer
Jani Honkonen
rename PieSlice -> PieSliceItem
r673 #ifndef PIESLICEITEM_H
#define PIESLICEITEM_H
Tero Ahola
Integrated draft version of pie series
r51
#include "qchartglobal.h"
Tero Ahola
Refactored themes; now enabled for line, scatter and pies...
r103 #include "charttheme_p.h"
Jani Honkonen
Use signals from pieseries, visible hover and exploding slices
r157 #include "qpieseries.h"
Jani Honkonen
Adding PIMPL to pie
r669 #include "qpiesliceprivate_p.h"
Tero Ahola
Integrated draft version of pie series
r51 #include <QGraphicsItem>
#include <QRectF>
#include <QColor>
Jani Honkonen
Use signals from pieseries, visible hover and exploding slices
r157 #include <QPen>
Tero Ahola
Integrated draft version of pie series
r51
Jani Honkonen
Pie now actually withs the given rectangle and does not go over
r413 #define PIESLICE_LABEL_GAP 5
Tero Ahola
Integrated draft version of pie series
r51 QTCOMMERCIALCHART_BEGIN_NAMESPACE
Jani Honkonen
Rename piepresenter -> piechartitem
r568 class PieChartItem;
Jani Honkonen
Refactoring piechart API (and internals)
r174 class PieSliceLabel;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 class QPieSlice;
Tero Ahola
Integrated draft version of pie series
r51
Jani Honkonen
rename PieSlice -> PieSliceItem
r673 class PieSliceItem : public QGraphicsObject
Tero Ahola
Integrated draft version of pie series
r51 {
Jani Honkonen
Refactoring piechart API (and internals)
r174 Q_OBJECT
Tero Ahola
Integrated draft version of pie series
r51 public:
Jani Honkonen
rename PieSlice -> PieSliceItem
r673 PieSliceItem(QGraphicsItem* parent = 0);
~PieSliceItem();
Tero Ahola
Integrated draft version of pie series
r51
public: // from QGraphicsItem
QRectF boundingRect() const;
QPainterPath shape() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
Jani Honkonen
Pie chart refactoring
r142 void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
Jani Honkonen
Use signals from pieseries, visible hover and exploding slices
r157 void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
Jani Honkonen
Pie chart refactoring
r142 void mousePressEvent(QGraphicsSceneMouseEvent *event);
Tero Ahola
Integrated draft version of pie series
r51
Jani Honkonen
Refactoring piechart API (and internals)
r174 Q_SIGNALS:
void clicked();
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void hoverEnter();
void hoverLeave();
Jani Honkonen
Use signals from pieseries, visible hover and exploding slices
r157
Jani Honkonen
Refactoring the pie for animations (no actual animations yet)
r566 public:
Jani Honkonen
Rename PieSliceLayout -> PieSliceData. A "layout" is a bad name for this.
r668 void setSliceData(PieSliceData sliceData);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void updateGeometry();
Jani Honkonen
Refactoring the pie for animations (no actual animations yet)
r566 static QPointF sliceCenter(QPointF point, qreal radius, QPieSlice *slice);
static QPainterPath slicePath(QPointF center, qreal radius, qreal startAngle, qreal angleSpan, qreal* centerAngle, QPointF* armStart);
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 static QPainterPath labelArmPath(QPointF start, qreal angle, qreal length, qreal textWidth, QPointF* textStart);
static QRectF labelTextRect(QFont font, QString text);
Jani Honkonen
Make pie fit better inside its given rectangle. Label texts still go outside. Needs a bit more work...
r289
Jani Honkonen
Pie chart refactoring
r142 private:
Jani Honkonen
Rename PieSliceLayout -> PieSliceData. A "layout" is a bad name for this.
r668 PieSliceData m_data;
Jani Honkonen
Refactoring pie series and animations.
r621 QRectF m_boundingRect;
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 QPainterPath m_slicePath;
QPainterPath m_labelArmPath;
QRectF m_labelTextRect;
Tero Ahola
Integrated draft version of pie series
r51 };
QTCOMMERCIALCHART_END_NAMESPACE
Jani Honkonen
rename PieSlice -> PieSliceItem
r673 #endif // PIESLICEITEM_H