##// END OF EJS Templates
Revert "Enabled building of qml auto test module on OSX"...
Revert "Enabled building of qml auto test module on OSX" This reverts commit 7a0ee9611522981553ccedcfc48f4d3e81974892.

File last commit:

r2104:f8a933676fbd
r2212:85a13d18e131
Show More
piesliceitem_p.h
88 lines | 2.5 KiB | text/x-c | CLexer
Jani Honkonen
Add license headers
r794 /****************************************************************************
**
** Copyright (C) 2012 Digia Plc
** All rights reserved.
** For any questions to Digia, please use contact form at http://qt.digia.com
**
** This file is part of the Qt Commercial Charts Add-on.
**
** $QT_BEGIN_LICENSE$
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
** contact form at http://qt.digia.com
** $QT_END_LICENSE$
**
****************************************************************************/
unknown
Added missing warning about private implementation
r1366 // W A R N I N G
// -------------
//
// This file is not part of the QtCommercial Chart API. It exists purely as an
// 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
#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
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 #include "pieslicedata_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
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);
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);
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;
Tero Ahola
Integrated draft version of pie series
r51 };
QTCOMMERCIALCHART_END_NAMESPACE
Jani Honkonen
rename PieSlice -> PieSliceItem
r673 #endif // PIESLICEITEM_H