##// END OF EJS Templates
Fix grid animation to do not go out of bound
Fix grid animation to do not go out of bound

File last commit:

r469:bfbe6f34c25e
r504:142210a64aff
Show More
pieslice_p.h
74 lines | 1.8 KiB | text/x-c | CLexer
Tero Ahola
Integrated draft version of pie series
r51 #ifndef PIESLICE_H
#define PIESLICE_H
#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"
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
Moved pie stuff to own .pri file and rename stuff
r146 class PiePresenter;
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
Refactoring piechart API (and internals)
r174 class PieSlice : 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
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 PieSlice(QGraphicsItem* parent = 0);
Tero Ahola
Integrated draft version of pie series
r51 ~PieSlice();
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
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 public Q_SLOTS:
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 void setPieCenterAndRadius(QPointF center, qreal radius);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void updateGeometry();
void updateData(const QPieSlice *sliceData);
Jani Honkonen
Use signals from pieseries, visible hover and exploding slices
r157
Jani Honkonen
Make pie fit better inside its given rectangle. Label texts still go outside. Needs a bit more work...
r289 public:
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 static QPainterPath slicePath(QPointF center, qreal radius, qreal startAngle, qreal angleSpan, bool exploded, qreal explodeDistance, qreal* centerAngle, QPointF* armStart);
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
Introducing vertical and horizontal factors to control the position of the pie.
r454 QPointF m_pieCenter;
qreal m_pieRadius;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 QPainterPath m_slicePath;
Jani Honkonen
QPieSlice: angle() -> startAngle(), angleSpan() -> endAngle()
r355 qreal m_startAngle;
Jani Honkonen
Make pie fit better inside its given rectangle. Label texts still go outside. Needs a bit more work...
r289 qreal m_angleSpan;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 bool m_isExploded;
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 qreal m_explodeDistanceFactor;
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 bool m_labelVisible;
Jani Honkonen
Renaming pen & brush functions for pie and adding const
r469 QPen m_slicePen;
QBrush m_sliceBrush;
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437
QPainterPath m_labelArmPath;
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 qreal m_labelArmLengthFactor;
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 QPen m_labelArmPen;
QRectF m_labelTextRect;
QFont m_labelFont;
QString m_labelText;
Tero Ahola
Integrated draft version of pie series
r51 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // PIESLICE_H