qbarset.h
79 lines
| 2.3 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 | ||
|
r938 | |||
|
r169 | public: | ||
|
r280 | QBarSet(QString name, QObject *parent = 0); | ||
|
r169 | |||
void setName(QString name); | ||||
|
r776 | QString name() const; | ||
|
r183 | QBarSet& operator << (const qreal &value); // appends new value to set | ||
|
r662 | void insertValue(int i, qreal value); | ||
|
r663 | void removeValue(int i); | ||
|
r776 | int count() const; // count of values in set | ||
|
r934 | qreal valueAt(int index) const; // for modifying individual values | ||
|
r280 | void setValue(int index, qreal value); // setter for individual value | ||
|
r934 | qreal sum() const; // sum of all values in the set | ||
|
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 setLabelPen(const QPen &pen); | ||
QPen labelPen() const; | ||||
|
r512 | |||
|
r820 | void setLabelBrush(const QBrush &brush); | ||
QBrush labelBrush() const; | ||||
void setLabelFont(const QFont &font); | ||||
QFont labelFont() const; | ||||
void setLabelsVisible(bool visible = true); | ||||
bool labelsVisible() const; | ||||
|
r813 | |||
|
r263 | Q_SIGNALS: | ||
|
r812 | void clicked(QString category, Qt::MouseButtons button); // Clicked and hover signals exposed to user | ||
|
r239 | |||
|
r171 | private: | ||
|
r938 | QScopedPointer<QBarSetPrivate> d_ptr; | ||
|
r934 | Q_DISABLE_COPY(QBarSet) | ||
|
r938 | friend class QBarSeries; | ||
|
r169 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // QBARSET_H | ||||