##// END OF EJS Templates
Updated private header warning...
Updated private header warning Removed 'Enterprise' from the Chart API name. Change-Id: Id6c7f3896bfcd72da2deebee430826b9c25793f6 Task-number: QTRD-3511 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>

File last commit:

r2807:a9a78a1d08bc
r2807:a9a78a1d08bc
Show More
piesliceitem_p.h
96 lines | 2.9 KiB | text/x-c | CLexer
Jani Honkonen
Add license headers
r794 /****************************************************************************
**
Titta Heikkala
Copyright header changes...
r2776 ** Copyright (C) 2015 The Qt Company Ltd
Jani Honkonen
Add license headers
r794 ** All rights reserved.
Titta Heikkala
Copyright header changes...
r2776 ** For any questions to The Qt Company, please use contact form at http://qt.io
Jani Honkonen
Add license headers
r794 **
Titta Heikkala
Updated license headers...
r2740 ** This file is part of the Qt Charts module.
Jani Honkonen
Add license headers
r794 **
Titta Heikkala
Updated license headers...
r2740 ** Licensees holding valid commercial license for Qt may use this file in
** accordance with the Qt License Agreement provided with the Software
** or, alternatively, in accordance with the terms contained in a written
Titta Heikkala
Copyright header changes...
r2776 ** agreement between you and The Qt Company.
Jani Honkonen
Add license headers
r794 **
** If you have questions regarding the use of this file, please use
Titta Heikkala
Updated license headers...
r2740 ** contact form at http://qt.io
Jani Honkonen
Add license headers
r794 **
****************************************************************************/
unknown
Added missing warning about private implementation
r1366 // W A R N I N G
// -------------
//
Titta Heikkala
Updated private header warning...
r2807 // This file is not part of the Qt Chart API. It exists purely as an
unknown
Added missing warning about private implementation
r1366 // implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
Jani Honkonen
rename PieSlice -> PieSliceItem
r673 #ifndef PIESLICEITEM_H
#define PIESLICEITEM_H
Tero Ahola
Integrated draft version of pie series
r51
Titta Heikkala
Fix include syntax...
r2714 #include <QtCharts/QChartGlobal>
#include <private/charttheme_p.h>
#include <QtCharts/QPieSeries>
#include <private/pieslicedata_p.h>
#include <QtWidgets/QGraphicsItem>
#include <QtCore/QRectF>
#include <QtGui/QColor>
#include <QtGui/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
Titta Heikkala
Qt Charts project file structure change...
r2712 QT_CHARTS_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
more coding style fixes for src-folder...
r2104 PieSliceItem(QGraphicsItem *parent = 0);
Jani Honkonen
rename PieSlice -> PieSliceItem
r673 ~PieSliceItem();
Tero Ahola
Integrated draft version of pie series
r51
Jani Honkonen
Refactor graphical side of pie to simplify the implementation.
r1074 // from QGraphicsItem
Tero Ahola
Integrated draft version of pie series
r51 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);
Titta Heikkala
Add pressed, released and doubleClicked signals...
r2739 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
Tero Ahola
Integrated draft version of pie series
r51
Jani Honkonen
Refactor graphical side of pie to simplify the implementation.
r1074 void setLayout(const PieSliceData &sliceData);
static QPointF sliceCenter(QPointF point, qreal radius, QPieSlice *slice);
Jani Honkonen
Refactoring piechart API (and internals)
r174 Q_SIGNALS:
Jani Honkonen
Add mousebuttons to pie clicked signals
r707 void clicked(Qt::MouseButtons buttons);
Jani Honkonen
API review changes for pie
r1009 void hovered(bool state);
Titta Heikkala
Add pressed, released and doubleClicked signals...
r2739 void pressed(Qt::MouseButtons buttons);
void released(Qt::MouseButtons buttons);
void doubleClicked(Qt::MouseButtons buttons);
Jani Honkonen
Use signals from pieseries, visible hover and exploding slices
r157
Jani Honkonen
Refactor graphical side of pie to simplify the implementation.
r1074 private:
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
Prevent slice label pointing straight down (because it looks bad).
r972 QPainterPath slicePath(QPointF center, qreal radius, qreal startAngle, qreal angleSpan, qreal *centerAngle, QPointF *armStart);
QPainterPath labelArmPath(QPointF start, qreal angle, qreal length, qreal textWidth, QPointF *textStart);
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;
Jani Honkonen
Emit hover leave signal from PieSliceItem when it gets destroyed....
r1083 bool m_hovered;
Titta Heikkala
Add HTML support for pie slice labels...
r2626 QGraphicsTextItem *m_labelItem;
Jani Honkonen
Fix pie animation chrash
r2321
Titta Heikkala
Add pressed, released and doubleClicked signals...
r2739 bool m_mousePressed;
Jani Honkonen
Fix pie animation chrash
r2321 friend class PieSliceAnimation;
Tero Ahola
Integrated draft version of pie series
r51 };
Titta Heikkala
Qt Charts project file structure change...
r2712 QT_CHARTS_END_NAMESPACE
Tero Ahola
Integrated draft version of pie series
r51
Jani Honkonen
rename PieSlice -> PieSliceItem
r673 #endif // PIESLICEITEM_H