##// END OF EJS Templates
Removed QDonutGroup class. Added Donut Drill down example
Marek Rosa -
r1697:b1c06caff815
parent child
Show More
@@ -0,0 +1,9
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
3 }
4
5 TARGET = donutdrilldown
6 SOURCES += main.cpp\
7 widget.cpp
8
9 HEADERS += widget.h
@@ -0,0 +1,11
1 #include <QApplication>
2 #include "widget.h"
3
4 int main(int argc, char *argv[])
5 {
6 QApplication a(argc, argv);
7 Widget w;
8 w.show();
9
10 return a.exec();
11 }
@@ -0,0 +1,120
1 #include "widget.h"
2 #include <QGridLayout>
3
4 #include <QPieSlice>
5 #include <QTime>
6 #include <QChartView>
7 #include <QTimer>
8
9 QTCOMMERCIALCHART_USE_NAMESPACE
10
11 Widget::Widget(QWidget *parent)
12 : QWidget(parent),
13 mainData(0)
14 {
15 setMinimumSize(800, 600);
16 qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
17
18 QChartView *chartView = new QChartView;
19 chartView->setRenderHint(QPainter::Antialiasing);
20 chartView->chart()->setAnimationOptions(QChart::AllAnimations);
21
22 mainData = new QPieSeries;
23 for (int j = 0; j < 4; j++) {
24
25 // create new slice for the mainData
26 QPieSlice *slice = new QPieSlice;
27 slice->setLabelPosition(QPieSlice::LabelInside);
28 slice->setLabelColor(Qt::white);
29 mainData->append(slice);
30
31 // create a new detailed data for the slice
32 QPieSeries *donut = new QPieSeries;
33 donut->setDonut();
34 donut->setLabelsVisible();
35 donut->setDonutInnerSize(mainData->pieSize());
36 donut->setPieSize(mainData->pieSize() + 0.2);
37
38 // when mainData slice is redrawn make sure the detailed data slices are aligned with it
39 connect(slice, SIGNAL(startAngleChanged()), this, SLOT(updatedStartAngle()));
40 connect(slice, SIGNAL(angleSpanChanged()), this, SLOT(updatedAngleSpan()));
41
42 // create the detailed data
43 for (int j = 0; j < 3; j++) {
44 qreal value = 10 + qrand() % 100;
45 QPieSlice *slice = new QPieSlice(QString("%1").arg(value), value);
46 donut->append(slice);
47 donut->slices().last()->setLabelVisible(true);
48 donut->slices().last()->setLabelColor(Qt::white);
49 }
50 detailedData.append(donut);
51
52 // update the value and label of mainData
53 slice->setValue(donut->sum());
54 slice->setLabel(QString("%1").arg(donut->sum()));
55 }
56
57 mainData->setLabelsVisible();
58 chartView->chart()->addSeries(mainData);
59 for (int i = 0; i < detailedData.count(); i++)
60 chartView->chart()->addSeries(detailedData.at(i));
61
62 // create main layout
63 QGridLayout* mainLayout = new QGridLayout;
64 mainLayout->addWidget(chartView, 1, 1);
65 setLayout(mainLayout);
66
67 // modify the value of one detailed slice every 2.5 sec
68 QTimer *updateTimer = new QTimer(this);
69 connect(updateTimer, SIGNAL(timeout()), this, SLOT(highlight()));
70 updateTimer->start(2500);
71 }
72
73 Widget::~Widget()
74 {
75
76 }
77
78 void Widget::updatedStartAngle()
79 {
80 // when the mainData slice has been updated the detailed data QPieSeries object as well
81 QPieSlice* slice = qobject_cast<QPieSlice *>(sender());
82 QPieSeries *detailsDonut = detailedData.at(slice->series()->slices().indexOf(slice));
83 detailsDonut->setPieStartAngle(slice->startAngle());
84 }
85
86 void Widget::updatedAngleSpan()
87 {
88 // when the mainData slice has been updated the detailed data QPieSeries object as well
89 QPieSlice* slice = qobject_cast<QPieSlice *>(sender());
90 QPieSeries *detailsDonut = detailedData.at(slice->series()->slices().indexOf(slice));
91 detailsDonut->setPieEndAngle(slice->startAngle() + slice->angleSpan());
92 }
93
94 void Widget::updateRotation()
95 {
96 // update the selected slice
97 qreal newValue = 10 + qrand() % 100;
98 detailedData.at(detailIndex)->slices().at(sliceIndex)->setValue(newValue);
99 detailedData.at(detailIndex)->slices().at(sliceIndex)->setLabel(QString("%1").arg(newValue));
100
101 // update the mainData slice with a new sum of the detailed data values
102 mainData->slices().at(detailIndex)->setValue(detailedData.at(detailIndex)->sum());
103 mainData->slices().at(detailIndex)->setLabel(QString("%1").arg(detailedData.at(detailIndex)->sum()));
104
105 // change the explode state of the selected slice back to normal
106 detailedData.at(detailIndex)->slices().at(sliceIndex)->setExploded(false);
107 }
108
109 void Widget::highlight()
110 {
111 // choose one random detailed data slice to be updated.
112 detailIndex = qrand() % mainData->count();
113 sliceIndex = qrand() % detailedData.at(detailIndex)->count();
114
115 // set the slice to exploded to make the change easier to observe
116 detailedData.at(detailIndex)->slices().at(sliceIndex)->setExploded();
117
118 // give the user time to focus on the slice that will be changed
119 QTimer::singleShot(1000, this, SLOT(updateRotation()));
120 }
@@ -0,0 +1,30
1 #ifndef WIDGET_H
2 #define WIDGET_H
3
4 #include <QWidget>
5 #include <QPieSeries>
6
7 QTCOMMERCIALCHART_USE_NAMESPACE
8
9 class Widget : public QWidget
10 {
11 Q_OBJECT
12
13 public:
14 Widget(QWidget *parent = 0);
15 ~Widget();
16
17 public slots:
18 void updatedStartAngle();
19 void updatedAngleSpan();
20 void updateRotation();
21 void highlight();
22
23 private:
24 QPieSeries *mainData;
25 QList<QPieSeries *> detailedData;
26 int detailIndex;
27 int sliceIndex;
28 };
29
30 #endif // WIDGET_H
@@ -1,65 +1,95
1 1 #include "widget.h"
2 2 #include <QChartView>
3 3 #include <QPieSeries>
4 4 #include <QPieSlice>
5 5 #include <QTime>
6 6 #include <QGridLayout>
7 7 #include <QTimer>
8 8
9 9 QTCOMMERCIALCHART_USE_NAMESPACE
10 10
11 11 Widget::Widget(QWidget *parent)
12 12 : QWidget(parent)
13 13 {
14 14 setMinimumSize(800, 600);
15 15 qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
16 16
17 17 QChartView *chartView = new QChartView;
18 18 chartView->setRenderHint(QPainter::Antialiasing);
19 19
20 for (int i = 0; i < 7; i++) {
20 qreal minSize = 0.1;
21 qreal maxSize = 0.9;
22 int donutsCount = 5;
23 for (int i = 0; i < donutsCount; i++) {
21 24 QPieSeries *donut = new QPieSeries;
25 donut->setDonut();
22 26 donut->setLabelsVisible();
23 for (int j = 0; j < 4; j++) {
27 int sliceCount = 3 + qrand() % 3;
28 for (int j = 0; j < sliceCount; j++) {
24 29 qreal value = 100 + qrand() % 100;
25 donut->append(QString("%1").arg(value), value);
30 QPieSlice *slice = new QPieSlice(QString("%1").arg(value), value);
31 connect(slice, SIGNAL(hovered(bool)), this, SLOT(explodeSlice(bool)));
32 donut->append(slice);
26 33 donut->slices().last()->setLabelVisible(true);
27 // QFont labelFont = donut->slices().last()->labelFont();
28 // // labelFont.setUnderline(true);
29 // labelFont.setBold(true);
30 // donut->slices().last()->setLabelFont(labelFont);
31 donut->slices().last()->setLabelColor(Qt::white);
34 donut->slices().last()->setLabelColor(Qt::white);
35 donut->setDonutInnerSize(minSize + i * (maxSize - minSize) / donutsCount);
36 donut->setPieSize(minSize + (i + 1) * (maxSize - minSize) / donutsCount);
32 37 }
38 m_donuts.append(donut);
33 39 qreal phase = qrand() % 180;
34 40 donut->setPieStartAngle(phase);
35 41 donut->setPieEndAngle(360 + phase);
36 42 chartView->chart()->addSeries(donut);
37 m_donutsGroup.append(donut);
38 43 }
39 44
40 45 // create main layout
41 46 QGridLayout* mainLayout = new QGridLayout;
42 47 mainLayout->addWidget(chartView, 1, 1);
43 48 setLayout(mainLayout);
44 49
45 50 chartView->chart()->setAnimationOptions(QChart::AllAnimations);
46 51
47 QTimer *updateTimer = new QTimer(this);
52 updateTimer = new QTimer(this);
48 53 connect(updateTimer, SIGNAL(timeout()), this, SLOT(updateRotation()));
49 54 updateTimer->start(750);
50 55 }
51 56
52 57 Widget::~Widget()
53 58 {
54 59
55 60 }
56 61
57 62 void Widget::updateRotation()
58 63 {
59 for (int i = 0; i < m_donutsGroup.count(); i++) {
60 QPieSeries *donut = m_donutsGroup.donuts().at(i);
64 // int tobeupdated = qrand() % m_donutsGroup.count();
65 for (int i = 0; i < m_donuts.count(); i++) {
66 QPieSeries *donut = m_donuts.at(i);
61 67 qreal phaseShift = -50 + qrand() % 100;
62 68 donut->setPieStartAngle(donut->pieStartAngle() + phaseShift);
63 69 donut->setPieEndAngle(donut->pieEndAngle() + phaseShift);
64 70 }
65 71 }
72
73 void Widget::explodeSlice(bool exploded)
74 {
75 QPieSlice *slice = qobject_cast<QPieSlice *>(sender());
76 if (exploded) {
77 updateTimer->stop();
78 qreal sliceStartAngle = slice->startAngle();
79 qreal sliceEndAngle = slice->startAngle() + slice->angleSpan();
80
81 QPieSeries *donut = slice->series();
82 qreal seriesIndex = m_donuts.indexOf(donut);
83 for (int i = seriesIndex + 1; i < m_donuts.count(); i++) {
84 m_donuts.at(i)->setPieStartAngle(sliceEndAngle);
85 m_donuts.at(i)->setPieEndAngle(360 + sliceStartAngle);
86 }
87 } else {
88 for (int i = 0; i < m_donuts.count(); i++) {
89 m_donuts.at(i)->setPieStartAngle(0);
90 m_donuts.at(i)->setPieEndAngle(360);
91 }
92 updateTimer->start();
93 }
94 slice->setExploded(exploded);
95 }
@@ -1,24 +1,28
1 1 #ifndef WIDGET_H
2 2 #define WIDGET_H
3 3
4 4 #include <QWidget>
5 #include <QDonutGroup>
5 #include <QPieSeries>
6
7 class QTimer;
6 8
7 9 QTCOMMERCIALCHART_USE_NAMESPACE
8 10
9 11 class Widget : public QWidget
10 12 {
11 13 Q_OBJECT
12 14
13 15 public:
14 16 Widget(QWidget *parent = 0);
15 17 ~Widget();
16 18
17 19 public slots:
18 20 void updateRotation();
21 void explodeSlice(bool exploded);
19 22
20 23 private:
21 QDonutGroup m_donutsGroup;
24 QList<QPieSeries *> m_donuts;
25 QTimer *updateTimer;
22 26 };
23 27
24 28 #endif // WIDGET_H
@@ -1,30 +1,31
1 1 CURRENTLY_BUILDING_COMPONENTS = "examples"
2 2 !include( ../config.pri ) {
3 3 error( "Couldn't find the config.pri file!" )
4 4 }
5 5
6 6 TEMPLATE = subdirs
7 7 SUBDIRS += \
8 8 areachart \
9 9 customchart \
10 10 linechart \
11 11 percentbarchart \
12 12 piechart \
13 13 piechartdrilldown \
14 14 presenterchart \
15 15 scatterchart \
16 16 scatterinteractions \
17 17 splinechart \
18 18 stackedbarchart \
19 19 stackedbarchartdrilldown \
20 20 zoomlinechart \
21 21 modeldata \
22 22 barchart \
23 23 legend \
24 24 barmodelmapper \
25 25 qmlpiechart \
26 26 lineandbar \
27 27 horizontalbarchart \
28 28 horizontalstackedbarchart \
29 29 horizontalpercentbarchart \
30 donut
30 donut \
31 donutdrilldown
@@ -1,29 +1,26
1 1 INCLUDEPATH += $$PWD
2 2 DEPENDPATH += $$PWD
3 3
4 4 SOURCES += \
5 5 $$PWD/qpieseries.cpp \
6 6 $$PWD/piesliceitem.cpp \
7 7 $$PWD/piechartitem.cpp \
8 8 $$PWD/qpieslice.cpp \
9 9 $$PWD/qpiemodelmapper.cpp \
10 10 $$PWD/qvpiemodelmapper.cpp \
11 $$PWD/qhpiemodelmapper.cpp \
12 piechart/qdonutgroup.cpp
11 $$PWD/qhpiemodelmapper.cpp
13 12
14 13 PRIVATE_HEADERS += \
15 14 $$PWD/pieslicedata_p.h \
16 15 $$PWD/piechartitem_p.h \
17 16 $$PWD/piesliceitem_p.h \
18 17 $$PWD/qpieslice_p.h \
19 18 $$PWD/qpieseries_p.h \
20 $$PWD/qpiemodelmapper_p.h \
21 $$PWD/qdonutgroup_p.h
19 $$PWD/qpiemodelmapper_p.h
22 20
23 21 PUBLIC_HEADERS += \
24 22 $$PWD/qpieseries.h \
25 23 $$PWD/qpieslice.h \
26 24 $$PWD/qpiemodelmapper.h \
27 25 $$PWD/qvpiemodelmapper.h \
28 $$PWD/qhpiemodelmapper.h \
29 $$PWD/qdonutgroup.h
26 $$PWD/qhpiemodelmapper.h
@@ -1,250 +1,250
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 2012 Digia Plc
4 4 ** All rights reserved.
5 5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 6 **
7 7 ** This file is part of the Qt Commercial Charts Add-on.
8 8 **
9 9 ** $QT_BEGIN_LICENSE$
10 10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 11 ** accordance with the Qt Commercial License Agreement provided with the
12 12 ** Software or, alternatively, in accordance with the terms contained in
13 13 ** a written agreement between you and Digia.
14 14 **
15 15 ** If you have questions regarding the use of this file, please use
16 16 ** contact form at http://qt.digia.com
17 17 ** $QT_END_LICENSE$
18 18 **
19 19 ****************************************************************************/
20 20
21 21 #include "piesliceitem_p.h"
22 22 #include "piechartitem_p.h"
23 23 #include "qpieseries.h"
24 24 #include "qpieslice.h"
25 25 #include "chartpresenter_p.h"
26 26 #include <QPainter>
27 27 #include <qmath.h>
28 28 #include <QGraphicsSceneEvent>
29 29 #include <QTime>
30 30 #include <QDebug>
31 31
32 32 QTCOMMERCIALCHART_BEGIN_NAMESPACE
33 33
34 34 QPointF offset(qreal angle, qreal length)
35 35 {
36 36 qreal dx = qSin(angle*(M_PI/180)) * length;
37 37 qreal dy = qCos(angle*(M_PI/180)) * length;
38 38 return QPointF(dx, -dy);
39 39 }
40 40
41 41 PieSliceItem::PieSliceItem(QGraphicsItem* parent)
42 42 :QGraphicsObject(parent),
43 43 m_hovered(false)
44 44 {
45 45 setAcceptHoverEvents(true);
46 46 setAcceptedMouseButtons(Qt::MouseButtonMask);
47 47 setZValue(ChartPresenter::PieSeriesZValue);
48 48 }
49 49
50 50 PieSliceItem::~PieSliceItem()
51 51 {
52 52 // If user is hovering over the slice and it gets destroyed we do
53 53 // not get a hover leave event. So we must emit the signal here.
54 54 if (m_hovered)
55 55 emit hovered(false);
56 56 }
57 57
58 58 QRectF PieSliceItem::boundingRect() const
59 59 {
60 60 return m_boundingRect;
61 61 }
62 62
63 63 QPainterPath PieSliceItem::shape() const
64 64 {
65 65 // Don't include the label and label arm.
66 66 // This is used to detect a mouse clicks. We do not want clicks from label.
67 67 return m_slicePath;
68 68 }
69 69
70 70 void PieSliceItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget* /*widget*/)
71 71 {
72 72 painter->save();
73 73 painter->setClipRect(parentItem()->boundingRect());
74 74 painter->setPen(m_data.m_slicePen);
75 75 painter->setBrush(m_data.m_sliceBrush);
76 76 painter->drawPath(m_slicePath);
77 77 painter->restore();
78 78
79 79 if (m_data.m_isLabelVisible) {
80 80 painter->save();
81 81
82 82 // Pen for label arm not defined in the QPieSeries api, let's use brush's color instead
83 83 // Also, the drawText actually uses the pen color for the text color (unlike QGraphicsSimpleTextItem)
84 84 painter->setPen(m_data.m_labelBrush.color());
85 85 painter->setBrush(m_data.m_labelBrush);
86 86 painter->setFont(m_data.m_labelFont);
87 87 if (m_data.m_donut) {
88 88 painter->translate(m_labelTextRect.center());
89 89 painter->rotate(m_data.m_startAngle + m_data.m_angleSpan / 2);
90 90 painter->drawText(-m_labelTextRect.width() / 2, -m_labelTextRect.height() / 2, m_labelTextRect.width(), m_labelTextRect.height(), Qt::AlignCenter, m_data.m_labelText);
91 }else if (m_data.m_labelPosition == QPieSlice::LabelOutside) {
91 } else if (m_data.m_labelPosition == QPieSlice::LabelOutside) {
92 92 painter->setClipRect(parentItem()->boundingRect());
93 93 painter->strokePath(m_labelArmPath, m_data.m_labelBrush.color());
94 94 painter->drawText(m_labelTextRect, Qt::AlignCenter, m_data.m_labelText);
95 95 } else { // QPieSlice::LabelInside
96 96 painter->setClipPath(m_slicePath);
97 97 painter->drawText(m_labelTextRect, Qt::AlignCenter, m_data.m_labelText);
98 98 }
99 99
100 100 painter->restore();
101 101 }
102 102 }
103 103
104 104 void PieSliceItem::hoverEnterEvent(QGraphicsSceneHoverEvent* /*event*/)
105 105 {
106 106 m_hovered = true;
107 107 emit hovered(true);
108 108 }
109 109
110 110 void PieSliceItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* /*event*/)
111 111 {
112 112 m_hovered = false;
113 113 emit hovered(false);
114 114 }
115 115
116 116 void PieSliceItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
117 117 {
118 118 emit clicked(event->buttons());
119 119 }
120 120
121 121 void PieSliceItem::setLayout(const PieSliceData &sliceData)
122 122 {
123 123 m_data = sliceData;
124 124 updateGeometry();
125 125 update();
126 126 }
127 127
128 128 void PieSliceItem::updateGeometry()
129 129 {
130 130 if (m_data.m_radius <= 0)
131 131 return;
132 132
133 133 prepareGeometryChange();
134 134
135 135 // slice path
136 136 qreal centerAngle;
137 137 QPointF armStart;
138 138 m_slicePath = slicePath(m_data.m_center, m_data.m_radius, m_data.m_startAngle, m_data.m_angleSpan, &centerAngle, &armStart);
139 139
140 140 // text rect
141 141 QFontMetricsF fm(m_data.m_labelFont);
142 142 m_labelTextRect = QRectF(0, 0, fm.width(m_data.m_labelText), fm.height());
143 143
144 144 // label arm path
145 145 QPointF labelTextStart;
146 146 m_labelArmPath = labelArmPath(armStart, centerAngle, m_data.m_radius * m_data.m_labelArmLengthFactor, m_labelTextRect.width(), &labelTextStart);
147 147
148 148 // text position
149 149 if (m_data.m_donut) {
150 150 QPointF donutCenter = m_data.m_center + offset(centerAngle, m_data.m_innerRadius + (m_data.m_radius - m_data.m_innerRadius) / 2);
151 151 m_labelTextRect.moveCenter(donutCenter);
152 152 } else if (m_data.m_labelPosition == QPieSlice::LabelOutside) {
153 153 m_labelTextRect.moveBottomLeft(labelTextStart);
154 154 } else {// QPieSlice::LabelInside
155 155 QPointF sliceCenter = m_data.m_center + offset(centerAngle, m_data.m_radius / 2);
156 156 m_labelTextRect.moveCenter(sliceCenter);
157 157 }
158 158
159 159 // bounding rect
160 160 if (m_data.m_isLabelVisible)
161 161 m_boundingRect = m_slicePath.boundingRect().united(m_labelArmPath.boundingRect()).united(m_labelTextRect);
162 162 else
163 163 m_boundingRect = m_slicePath.boundingRect();
164 164 }
165 165
166 166 QPointF PieSliceItem::sliceCenter(QPointF point, qreal radius, QPieSlice *slice)
167 167 {
168 168 if (slice->isExploded()) {
169 169 qreal centerAngle = slice->startAngle() + (slice->angleSpan()/2);
170 170 qreal len = radius * slice->explodeDistanceFactor();
171 171 point += offset(centerAngle, len);
172 172 }
173 173 return point;
174 174 }
175 175
176 176 QPainterPath PieSliceItem::slicePath(QPointF center, qreal radius, qreal startAngle, qreal angleSpan, qreal *centerAngle, QPointF* armStart)
177 177 {
178 178 // calculate center angle
179 179 *centerAngle = startAngle + (angleSpan/2);
180 180
181 181 // calculate slice rectangle
182 182 QRectF rect(center.x()-radius, center.y()-radius, radius*2, radius*2);
183 183
184 184 // slice path
185 185 QPainterPath path;
186 186 if (m_data.m_donut) {
187 187 QRectF insideRect(center.x() - m_data.m_innerRadius, center.y()-m_data.m_innerRadius, m_data.m_innerRadius*2, m_data.m_innerRadius*2);
188 188 path.arcMoveTo(rect, -startAngle + 90);
189 189 path.arcTo(rect, -startAngle + 90, -angleSpan);
190 190 path.arcTo(insideRect, -startAngle + 90 - angleSpan, angleSpan);
191 191 path.closeSubpath();
192 192 } else {
193 193 path.moveTo(rect.center());
194 194 path.arcTo(rect, -startAngle + 90, -angleSpan);
195 195 path.closeSubpath();
196 196 }
197 197
198 198 // calculate label arm start point
199 199 *armStart = center;
200 200 *armStart += offset(*centerAngle, radius + PIESLICE_LABEL_GAP);
201 201
202 202 return path;
203 203 }
204 204
205 205 QPainterPath PieSliceItem::labelArmPath(QPointF start, qreal angle, qreal length, qreal textWidth, QPointF *textStart)
206 206 {
207 207 // Normalize the angle to 0-360 range
208 208 // NOTE: We are using int here on purpose. Depenging on platform and hardware
209 209 // qreal can be a double, float or something the user gives to the Qt configure
210 210 // (QT_COORD_TYPE). Compilers do not seem to support modulo for double or float
211 211 // but there are fmod() and fmodf() functions for that. So instead of some #ifdef
212 212 // that might break we just use int. Precision for this is just fine for our needs.
213 213 int normalized = angle * 10.0;
214 214 normalized = normalized % 3600;
215 215 if (normalized < 0)
216 216 normalized += 3600;
217 217 angle = (qreal) normalized / 10.0;
218 218
219 219 // prevent label arm pointing straight down because it will look bad
220 220 if (angle < 180 && angle > 170)
221 221 angle = 170;
222 222 if (angle > 180 && angle < 190)
223 223 angle = 190;
224 224
225 225 // line from slice to label
226 226 QPointF parm1 = start + offset(angle, length);
227 227
228 228 // line to underline the label
229 229 QPointF parm2 = parm1;
230 230 if (angle < 180) { // arm swings the other way on the left side
231 231 parm2 += QPointF(textWidth, 0);
232 232 *textStart = parm1;
233 233 }
234 234 else {
235 235 parm2 += QPointF(-textWidth,0);
236 236 *textStart = parm2;
237 237 }
238 238
239 239 QPainterPath path;
240 240 path.moveTo(start);
241 241 path.lineTo(parm1);
242 242 path.lineTo(parm2);
243 243
244 244 return path;
245 245 }
246 246
247 247 #include "moc_piesliceitem_p.cpp"
248 248
249 249 QTCOMMERCIALCHART_END_NAMESPACE
250 250
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now