##// END OF EJS Templates
minor. Release polishing
minor. Release polishing

File last commit:

r1009:983f422506c5
r1049:4e3b4d910737
Show More
qpieslice.h
84 lines | 2.3 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$
**
****************************************************************************/
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 #ifndef QPIESLICE_H
#define QPIESLICE_H
#include <qchartglobal.h>
#include <QObject>
#include <QPen>
#include <QBrush>
#include <QFont>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 class PieSliceData;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
class QTCOMMERCIALCHART_EXPORT QPieSlice : public QObject
{
Q_OBJECT
Jani Honkonen
Add documentation to pie
r314 Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY changed)
Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY changed)
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
public:
Michal Klocek
Fixes explicit issues in cstr
r970 explicit QPieSlice(QObject *parent = 0);
Jani Honkonen
Add documentation to pie
r314 QPieSlice(qreal value, QString label, QObject *parent = 0);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 virtual ~QPieSlice();
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 void setValue(qreal value);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 qreal value() const;
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 void setLabel(QString label);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QString label() const;
Jani Honkonen
Add some default values to pie slice setters
r696 void setLabelVisible(bool visible = true);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 bool isLabelVisible() const;
Jani Honkonen
Add some default values to pie slice setters
r696 void setExploded(bool exploded = true);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 bool isExploded() const;
Jani Honkonen
remove "slice" word from pen/brush setters/getters
r756 void setPen(const QPen &pen);
QPen pen() const;
void setBrush(const QBrush &brush);
QBrush brush() const;
Jani Honkonen
Get pie slice label font and pen from theme
r714 void setLabelPen(const QPen &pen);
QPen labelPen() const;
Jani Honkonen
Renaming pen & brush functions for pie and adding const
r469 void 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 QFont labelFont() const;
Jani Honkonen
API review changes for pie
r1009
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 void setLabelArmLengthFactor(qreal factor);
qreal labelArmLengthFactor() const;
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618 void setExplodeDistanceFactor(qreal factor);
qreal explodeDistanceFactor() const;
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437
Jani Honkonen
API review changes for pie
r1009 qreal percentage() const;
qreal startAngle() const;
qreal endAngle() const;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 Q_SIGNALS:
Jani Honkonen
API review changes for pie
r1009 void clicked();
void hovered(bool state);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void changed();
private:
Jani Honkonen
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
r818 friend class PieSliceData;
PieSliceData * const d;
Jani Honkonen
Adding PIMPL to pie
r669 Q_DISABLE_COPY(QPieSlice)
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // QPIESLICE_H