qbarset.h
91 lines
| 2.6 KiB
| text/x-c
|
CLexer
|
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$ | ||||
** | ||||
****************************************************************************/ | ||||
|
r169 | #ifndef QBARSET_H | ||
#define QBARSET_H | ||||
|
r276 | #include <qchartglobal.h> | ||
|
r183 | #include <QPen> | ||
#include <QBrush> | ||||
|
r820 | #include <QFont> | ||
|
r169 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
|
r934 | class QBarSetPrivate; | ||
|
r169 | |||
|
r239 | class QTCOMMERCIALCHART_EXPORT QBarSet : public QObject | ||
|
r169 | { | ||
|
r240 | Q_OBJECT | ||
|
r1162 | Q_PROPERTY(QString name READ name WRITE setName) | ||
|
r1308 | Q_PROPERTY(QPen pen READ pen WRITE setPen) | ||
Q_PROPERTY(QBrush brush READ brush WRITE setBrush) | ||||
Q_PROPERTY(QBrush labelBrush READ labelBrush WRITE setLabelBrush) | ||||
Q_PROPERTY(QFont labelFont READ labelFont WRITE setLabelFont) | ||||
|
r938 | |||
|
r169 | public: | ||
|
r993 | explicit QBarSet(const QString name, QObject *parent = 0); | ||
|
r980 | virtual ~QBarSet(); | ||
|
r169 | |||
|
r993 | void setName(const QString name); | ||
|
r776 | QString name() const; | ||
|
r1159 | |||
|
r1246 | void append(const QPointF value); | ||
void append(const QList<QPointF> values); | ||||
void append(const qreal value); | ||||
void append(const QList<qreal> values); | ||||
|
r1159 | |||
|
r1246 | QBarSet& operator << (const qreal &value); | ||
QBarSet& operator << (const QPointF &value); | ||||
|
r1159 | |||
|
r1246 | void insert(const int index, const qreal value); | ||
void remove(const int index); | ||||
|
r993 | void replace(const int index, const qreal value); | ||
|
r1167 | QPointF at(const int index) const; | ||
QPointF operator [] (const int index) const; | ||||
|
r993 | int count() const; | ||
qreal sum() const; | ||||
|
r430 | |||
|
r763 | void setPen(const QPen &pen); | ||
|
r473 | QPen pen() const; | ||
|
r214 | |||
|
r763 | void setBrush(const QBrush &brush); | ||
|
r473 | QBrush brush() const; | ||
|
r214 | |||
|
r820 | void setLabelBrush(const QBrush &brush); | ||
QBrush labelBrush() const; | ||||
void setLabelFont(const QFont &font); | ||||
QFont labelFont() const; | ||||
|
r1282 | //Q_SIGNALS: | ||
// void clicked(QString category); | ||||
// void hovered(bool status); | ||||
|
r239 | |||
|
r171 | private: | ||
|
r938 | QScopedPointer<QBarSetPrivate> d_ptr; | ||
|
r934 | Q_DISABLE_COPY(QBarSet) | ||
|
r938 | friend class QBarSeries; | ||
|
r953 | friend class BarLegendMarker; | ||
|
r962 | friend class BarChartItem; | ||
|
r968 | friend class QBarSeriesPrivate; | ||
|
r169 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // QBARSET_H | ||||