##// END OF EJS Templates
Fix falling unit test
Fix falling unit test

File last commit:

r1013:bd5d49d1f7af
r1048:91742fa35f1c
Show More
qpieslice.cpp
410 lines | 8.7 KiB | text/x-c | CppLexer
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$
**
****************************************************************************/
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 #include "qpieslice.h"
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 #include "pieslicedata_p.h"
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Jani Honkonen
Add documentation to pie
r314 /*!
\class QPieSlice
Jani Honkonen
Typo fix for slice doc
r339 \brief Defines a slice in pie series.
Jani Honkonen
Add documentation to pie
r314
Jani Honkonen
Pie doc updates
r952 This object defines the properties of a single slice in a QPieSeries.
Jani Honkonen
More documentation for pie
r320
Jani Honkonen
Pie doc updates
r952 In addition to the obvious value and label properties the user can also control
the visual appearance of a slice. By modifying the visual appearance also means that
the user is overriding the default appearance set by the theme. Even if the theme is
changed users settings will persist.
To enable user interaction customization with the slices some basic signals
are provided about clicking and hovering.
Jani Honkonen
Add documentation to pie
r314 */
/*!
\property QPieSlice::label
Label of the slice.
*/
/*!
\property QPieSlice::value
Value of the slice.
Jani Honkonen
Pie doc updates
r952
\sa percentage(), QPieSeries::sum()
Jani Honkonen
Add documentation to pie
r314 */
/*!
Constructs an empty slice with a \a parent.
Jani Honkonen
More documentation for pie
r320
Jani Honkonen
Remove QPieSeries::replace(). The function does not really make sense with the pie.
r1013 \sa QPieSeries::append(), QPieSeries::insert()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QPieSlice::QPieSlice(QObject *parent)
:QObject(parent),
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 d(new PieSliceData())
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 {
}
Jani Honkonen
Add documentation to pie
r314 /*!
Constructs an empty slice with given \a value, \a label and a \a parent.
Jani Honkonen
Remove QPieSeries::replace(). The function does not really make sense with the pie.
r1013 \sa QPieSeries::append(), QPieSeries::insert()
Jani Honkonen
Add documentation to pie
r314 */
QPieSlice::QPieSlice(qreal value, QString label, QObject *parent)
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 :QObject(parent),
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 d(new PieSliceData())
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 d->m_value = value;
d->m_labelText = label;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Destroys the slice.
User should not delete the slice if it has been added to the series.
*/
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QPieSlice::~QPieSlice()
{
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 delete d;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Gets the value of the slice.
Note that all values in the series
\sa setValue()
*/
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 qreal QPieSlice::value() const
{
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 return d->m_value;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Gets the label of the slice.
\sa setLabel()
*/
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QString QPieSlice::label() const
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 {
return d->m_labelText;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Returns true if label is set as visible.
\sa setLabelVisible()
*/
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 bool QPieSlice::isLabelVisible() const
{
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 return d->m_isLabelVisible;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Returns true if slice is exloded from the pie.
Jani Honkonen
Pie doc updates
r952 \sa setExploded(), explodeDistanceFactor(), setExplodeDistanceFactor()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 bool QPieSlice::isExploded() const
{
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 return d->m_isExploded;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 Returns the explode distance factor.
The factor is relative to pie radius. For example:
1.0 means the distance is the same as the radius.
0.5 means the distance is half of the radius.
Default value is 0.15.
Jani Honkonen
Pie doc updates
r952 \sa setExplodeDistanceFactor(), isExploded(), setExploded()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 qreal QPieSlice::explodeDistanceFactor() const
Jani Honkonen
Make pie fit better inside its given rectangle. Label texts still go outside. Needs a bit more work...
r289 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 return d->m_explodeDistanceFactor;
Jani Honkonen
Make pie fit better inside its given rectangle. Label texts still go outside. Needs a bit more work...
r289 }
Jani Honkonen
Add documentation to pie
r314 /*!
Jani Honkonen
Pie doc updates
r952 Returns the percentage of this slice compared to the sum of all slices in the same series.
Jani Honkonen
Review corrections for pie
r386 The returned value ranges from 0 to 1.0.
Jani Honkonen
More documentation for pie
r320
Jani Honkonen
Add documentation to pie
r314 Updated internally after the slice is added to the series.
Jani Honkonen
Pie doc updates
r952
\sa QPieSeries::sum()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 qreal QPieSlice::percentage() const
{
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 return d->m_percentage;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Returns the starting angle of this slice in the series it belongs to.
Jani Honkonen
More documentation for pie
r320
Full pie is 360 degrees where 0 degrees is at 12 a'clock.
Jani Honkonen
Add documentation to pie
r314 Updated internally after the slice is added to the series.
*/
Jani Honkonen
QPieSlice: angle() -> startAngle(), angleSpan() -> endAngle()
r355 qreal QPieSlice::startAngle() const
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 return d->m_startAngle;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Jani Honkonen
QPieSlice: angle() -> startAngle(), angleSpan() -> endAngle()
r355 Returns the end angle of this slice in the series it belongs to.
Jani Honkonen
More documentation for pie
r320
Full pie is 360 degrees where 0 degrees is at 12 a'clock.
Jani Honkonen
Add documentation to pie
r314 Updated internally after the slice is added to the series.
*/
Jani Honkonen
QPieSlice: angle() -> startAngle(), angleSpan() -> endAngle()
r355 qreal QPieSlice::endAngle() const
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 return d->m_startAngle + d->m_angleSpan;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Returns the pen used to draw this slice.
Jani Honkonen
Doc fixes for pie
r809 \sa setPen()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
remove "slice" word from pen/brush setters/getters
r756 QPen QPieSlice::pen() const
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 return d->m_slicePen;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Returns the brush used to draw this slice.
Jani Honkonen
Doc fixes for pie
r809 \sa setBrush()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
remove "slice" word from pen/brush setters/getters
r756 QBrush QPieSlice::brush() const
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 return d->m_sliceBrush;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Jani Honkonen
Get pie slice label font and pen from theme
r714 Returns the pen used to draw the label in this slice.
Jani Honkonen
Doc fixes for pie
r809 \sa setLabelPen()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
Get pie slice label font and pen from theme
r714 QPen QPieSlice::labelPen() const
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 return d->m_labelPen;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Returns the font used to draw label in this slice.
\sa setLabelFont()
*/
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QFont QPieSlice::labelFont() const
{
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 return d->m_labelFont;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Jani Honkonen
Fix setting custom color to pie. Now the pie knows if the color is set by the user.
r691 Gets the label arm length factor.
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454
The factor is relative to pie radius. For example:
1.0 means the length is the same as the radius.
0.5 means the length is half of the radius.
Default value is 0.15
\sa setLabelArmLengthFactor()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 qreal QPieSlice::labelArmLengthFactor() const
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 return d->m_labelArmLengthFactor;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
Jani Honkonen
Add documentation to pie
r314 /*!
Jani Honkonen
API review changes for pie
r1009 \fn void QPieSlice::clicked()
Jani Honkonen
Add documentation to pie
r314
This signal is emitted when user has clicked the slice.
\sa QPieSeries::clicked()
*/
/*!
Jani Honkonen
API review changes for pie
r1009 \fn void QPieSlice::hovered(bool state)
Jani Honkonen
Add documentation to pie
r314
Jani Honkonen
API review changes for pie
r1009 This signal is emitted when user has hovered over or away from the slice.
Jani Honkonen
Add documentation to pie
r314
Jani Honkonen
API review changes for pie
r1009 \a state is true when user has hovered over the slice and false when hover has moved away from the slice.
Jani Honkonen
Add documentation to pie
r314
Jani Honkonen
API review changes for pie
r1009 \sa QPieSeries::hovered()
Jani Honkonen
Add documentation to pie
r314 */
/*!
\fn void QPieSlice::changed()
This signal emitted when something has changed in the slice.
*/
/*!
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 Sets the \a value of this slice.
Jani Honkonen
Add documentation to pie
r314 \sa value()
*/
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void QPieSlice::setValue(qreal value)
{
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 if (!qFuzzyIsNull(d->m_value - value)) {
d->m_value = value;
emit changed();
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 }
}
Jani Honkonen
Add documentation to pie
r314 /*!
Sets the \a label of the slice.
\sa label()
*/
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void QPieSlice::setLabel(QString label)
{
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 if (d->m_labelText != label) {
d->m_labelText = label;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 emit changed();
}
}
Jani Honkonen
Add documentation to pie
r314 /*!
Sets the label \a visible in this slice.
\sa isLabelVisible(), QPieSeries::setLabelsVisible()
*/
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void QPieSlice::setLabelVisible(bool visible)
{
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 if (d->m_isLabelVisible != visible) {
d->m_isLabelVisible = visible;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 emit changed();
}
}
Jani Honkonen
Add documentation to pie
r314 /*!
Jani Honkonen
Pie doc updates
r952 Sets this slices \a exploded state.
If the slice is exploded it is moved away from the pie center. The distance is defined by the explode distance factor.
\sa isExploded(), explodeDistanceFactor(), setExplodeDistanceFactor()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void QPieSlice::setExploded(bool exploded)
{
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 if (d->m_isExploded != exploded) {
d->m_isExploded = exploded;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 emit changed();
}
}
Jani Honkonen
Add documentation to pie
r314 /*!
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 Sets the explode distance \a factor.
The factor is relative to pie radius. For example:
1.0 means the distance is the same as the radius.
0.5 means the distance is half of the radius.
Default value is 0.15
Jani Honkonen
Pie doc updates
r952 \sa explodeDistanceFactor(), isExploded(), setExploded()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 void QPieSlice::setExplodeDistanceFactor(qreal factor)
Jani Honkonen
Make pie fit better inside its given rectangle. Label texts still go outside. Needs a bit more work...
r289 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 if (!qFuzzyIsNull(d->m_explodeDistanceFactor - factor)) {
d->m_explodeDistanceFactor = factor;
Jani Honkonen
Make pie fit better inside its given rectangle. Label texts still go outside. Needs a bit more work...
r289 emit changed();
}
}
Jani Honkonen
Add documentation to pie
r314 /*!
Sets the \a pen used to draw this slice.
Jani Honkonen
Pie doc updates
r952
Overrides the pen set by the theme.
Jani Honkonen
Doc fixes for pie
r809 \sa pen()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
remove "slice" word from pen/brush setters/getters
r756 void QPieSlice::setPen(const QPen &pen)
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 if (d->m_slicePen != pen) {
d->m_slicePen = pen;
d->m_slicePen.setThemed(false);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 emit changed();
}
}
Jani Honkonen
Add documentation to pie
r314 /*!
Sets the \a brush used to draw this slice.
Jani Honkonen
Pie doc updates
r952
Overrides the brush set by the theme.
Jani Honkonen
Doc fixes for pie
r809 \sa brush()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
remove "slice" word from pen/brush setters/getters
r756 void QPieSlice::setBrush(const QBrush &brush)
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 if (d->m_sliceBrush != brush) {
d->m_sliceBrush = brush;
d->m_sliceBrush.setThemed(false);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 emit changed();
}
}
Jani Honkonen
Add documentation to pie
r314 /*!
Jani Honkonen
Get pie slice label font and pen from theme
r714 Sets the \a pen used to draw the label in this slice.
Jani Honkonen
Pie doc updates
r952
Overrides the pen set by the theme.
Jani Honkonen
Doc fixes for pie
r809 \sa labelPen()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
Get pie slice label font and pen from theme
r714 void QPieSlice::setLabelPen(const QPen &pen)
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 if (d->m_labelPen != pen) {
d->m_labelPen = pen;
d->m_labelPen.setThemed(false);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 emit changed();
}
}
Jani Honkonen
Add documentation to pie
r314 /*!
Sets the \a font used to draw the label in this slice.
Jani Honkonen
Pie doc updates
r952
Overrides the font set by the theme.
Jani Honkonen
Add documentation to pie
r314 \sa labelFont()
*/
Jani Honkonen
Renaming pen & brush functions for pie and adding const
r469 void QPieSlice::setLabelFont(const QFont &font)
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 if (d->m_labelFont != font) {
d->m_labelFont = font;
d->m_labelFont.setThemed(false);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 emit changed();
}
}
Jani Honkonen
Add documentation to pie
r314 /*!
Jani Honkonen
Fix setting custom color to pie. Now the pie knows if the color is set by the user.
r691 Sets the label arm length \a factor.
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454
The factor is relative to pie radius. For example:
1.0 means the length is the same as the radius.
0.5 means the length is half of the radius.
Default value is 0.15
\sa labelArmLengthFactor()
Jani Honkonen
Add documentation to pie
r314 */
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 void QPieSlice::setLabelArmLengthFactor(qreal factor)
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 {
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 if (!qFuzzyIsNull(d->m_labelArmLengthFactor - factor)) {
d->m_labelArmLengthFactor = factor;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 emit changed();
}
}
QTCOMMERCIALCHART_END_NAMESPACE
Tero Ahola
Fixed compilation issue on Qt 4.7
r837
QTCOMMERCIALCHART_USE_NAMESPACE
#include "moc_qpieslice.cpp"