@@ -104,14 +104,14 MainWidget::MainWidget(QWidget* parent) | |||
|
104 | 104 | m_sizeFactor->setValue(m_series->pieSize()); |
|
105 | 105 | |
|
106 | 106 | m_startAngle = new QDoubleSpinBox(); |
|
107 |
m_startAngle->setMinimum( |
|
|
108 |
m_startAngle->setMaximum( |
|
|
107 | m_startAngle->setMinimum(-720); | |
|
108 | m_startAngle->setMaximum(720); | |
|
109 | 109 | m_startAngle->setValue(m_series->pieStartAngle()); |
|
110 | 110 | m_startAngle->setSingleStep(1); |
|
111 | 111 | |
|
112 | 112 | m_endAngle = new QDoubleSpinBox(); |
|
113 |
m_endAngle->setMinimum( |
|
|
114 |
m_endAngle->setMaximum( |
|
|
113 | m_endAngle->setMinimum(-720); | |
|
114 | m_endAngle->setMaximum(720); | |
|
115 | 115 | m_endAngle->setValue(m_series->pieEndAngle()); |
|
116 | 116 | m_endAngle->setSingleStep(1); |
|
117 | 117 |
@@ -341,8 +341,10 qreal QPieSeries::pieSize() const | |||
|
341 | 341 | void QPieSeries::setPieStartAngle(qreal angle) |
|
342 | 342 | { |
|
343 | 343 | Q_D(QPieSeries); |
|
344 |
if ( |
|
|
345 | d->updateDerivativeData(); | |
|
344 | if (qFuzzyIsNull(d->m_pieStartAngle - angle)) | |
|
345 | return; | |
|
346 | d->m_pieStartAngle = angle; | |
|
347 | d->updateDerivativeData(); | |
|
346 | 348 | } |
|
347 | 349 | |
|
348 | 350 | qreal QPieSeries::pieStartAngle() const |
@@ -363,9 +365,10 qreal QPieSeries::pieStartAngle() const | |||
|
363 | 365 | void QPieSeries::setPieEndAngle(qreal angle) |
|
364 | 366 | { |
|
365 | 367 | Q_D(QPieSeries); |
|
366 | ||
|
367 | if (d->setRealValue(d->m_pieEndAngle, angle, 360.0, d->m_pieStartAngle)) | |
|
368 | d->updateDerivativeData(); | |
|
368 | if (qFuzzyIsNull(d->m_pieEndAngle - angle)) | |
|
369 | return; | |
|
370 | d->m_pieEndAngle = angle; | |
|
371 | d->updateDerivativeData(); | |
|
369 | 372 | } |
|
370 | 373 | |
|
371 | 374 | /*! |
@@ -234,6 +234,13 void tst_qpieseries::calculatedValues() | |||
|
234 | 234 | if (!ok) |
|
235 | 235 | return; |
|
236 | 236 | |
|
237 | // modify pie angles | |
|
238 | s.setPieStartAngle(-90); | |
|
239 | s.setPieEndAngle(90); | |
|
240 | verifyCalculatedData(s, &ok); | |
|
241 | if (!ok) | |
|
242 | return; | |
|
243 | ||
|
237 | 244 | // clear all |
|
238 | 245 | s.clear(); |
|
239 | 246 | verifyCalculatedData(s, &ok); |
General Comments 0
You need to be logged in to leave comments.
Login now