24 #include "KDChartAbstractPieDiagram_p.h" 32 #include <KDABLibFakes> 37 AbstractPieDiagram::Private::Private()
39 , autoRotateLabels( false )
43 AbstractPieDiagram::Private::~Private() {}
56 void AbstractPieDiagram::init()
63 if ( other ==
this )
return true;
87 d->granularity = value;
92 return (
d->granularity < 0.05 ||
d->granularity > 36.0)
101 qWarning() <<
"Deprecated AbstractPieDiagram::setStartPosition() called, setting ignored.";
106 qWarning() <<
"Deprecated AbstractPieDiagram::startPosition() called.";
112 d->autoRotateLabels = autoRotate;
117 return d->autoRotateLabels;
146 if ( attrs.isValid() )
153 return d->attributesModel->data(
154 d->attributesModel->mapFromSource( index ),
185 if ( attrs.isValid() )
192 return d->attributesModel->data(
193 d->attributesModel->mapFromSource( index ),
AbstractPieDiagram(QWidget *parent=0, PolarCoordinatePlane *plane=0)
~AbstractPieDiagram() override
bool compare(const AbstractPieDiagram *other) const
Returns true if both diagrams have the same settings.
qreal granularity() const
void setGranularity(qreal value)
Set the granularity: the smaller the granularity the more your diagram segments will show facettes in...
void setStartPosition(int degrees)
void setAutoRotateLabels(bool autoRotate)
If this property is set, and if a pie's TextAttributes have no rotation set, its labels will automati...
PieAttributes pieAttributes() const
Base class for diagrams based on a polar coordinate system.
void setThreeDPieAttributes(const ThreeDPieAttributes &a)
QModelIndex parent(const QModelIndex &index) const override
A set of attributes controlling the appearance of pie charts.
void setPieAttributes(const PieAttributes &a)
A set of 3D pie attributes.
int startPosition() const
Base class for any diagram type.
ThreeDPieAttributes threeDPieAttributes() const
bool autoRotateLabels() const
void layoutChanged(AbstractDiagram *)
Diagrams are supposed to emit this signal, when the layout of one of their element changes...