qbarset.h
123 lines
| 3.8 KiB
| text/x-c
|
CLexer
|
r2845 | /****************************************************************************** | ||
|
r794 | ** | ||
|
r2845 | ** Copyright (C) 2015 The Qt Company Ltd. | ||
** Contact: http://www.qt.io/licensing/ | ||||
|
r794 | ** | ||
|
r2740 | ** This file is part of the Qt Charts module. | ||
|
r794 | ** | ||
|
r2845 | ** $QT_BEGIN_LICENSE:COMM$ | ||
|
r794 | ** | ||
|
r2845 | ** Commercial License Usage | ||
** Licensees holding valid commercial Qt licenses may use this file in | ||||
** accordance with the commercial license agreement provided with the | ||||
** Software or, alternatively, in accordance with the terms contained in | ||||
** a written agreement between you and The Qt Company. For licensing terms | ||||
** and conditions see http://www.qt.io/terms-conditions. For further | ||||
** information use the contact form at http://www.qt.io/contact-us. | ||||
|
r794 | ** | ||
|
r2845 | ** $QT_END_LICENSE$ | ||
** | ||||
******************************************************************************/ | ||||
|
r794 | |||
|
r169 | #ifndef QBARSET_H | ||
#define QBARSET_H | ||||
|
r2714 | #include <QtCharts/QChartGlobal> | ||
#include <QtGui/QPen> | ||||
#include <QtGui/QBrush> | ||||
#include <QtGui/QFont> | ||||
|
r169 | |||
|
r2712 | QT_CHARTS_BEGIN_NAMESPACE | ||
|
r934 | class QBarSetPrivate; | ||
|
r169 | |||
|
r2712 | class QT_CHARTS_EXPORT QBarSet : public QObject | ||
|
r169 | { | ||
|
r240 | Q_OBJECT | ||
|
r1429 | Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY labelChanged) | ||
Q_PROPERTY(QPen pen READ pen WRITE setPen NOTIFY penChanged) | ||||
Q_PROPERTY(QBrush brush READ brush WRITE setBrush NOTIFY brushChanged) | ||||
Q_PROPERTY(QBrush labelBrush READ labelBrush WRITE setLabelBrush NOTIFY labelBrushChanged) | ||||
Q_PROPERTY(QFont labelFont READ labelFont WRITE setLabelFont NOTIFY labelFontChanged) | ||||
|
r1465 | Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) | ||
Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged) | ||||
Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor NOTIFY labelColorChanged) | ||||
|
r938 | |||
|
r169 | public: | ||
|
r1429 | explicit QBarSet(const QString label, QObject *parent = 0); | ||
|
r980 | virtual ~QBarSet(); | ||
|
r169 | |||
|
r1429 | void setLabel(const QString label); | ||
QString label() const; | ||||
|
r1159 | |||
|
r1246 | void append(const qreal value); | ||
|
r1500 | void append(const QList<qreal> &values); | ||
|
r1159 | |||
|
r2104 | QBarSet &operator << (const qreal &value); | ||
|
r1159 | |||
|
r1246 | void insert(const int index, const qreal value); | ||
|
r1514 | void remove(const int index, const int count = 1); | ||
|
r993 | void replace(const int index, const qreal value); | ||
|
r1580 | qreal at(const int index) const; | ||
|
r2097 | qreal 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; | ||||
|
r1465 | QColor color(); | ||
void setColor(QColor color); | ||||
QColor borderColor(); | ||||
void setBorderColor(QColor color); | ||||
QColor labelColor(); | ||||
void setLabelColor(QColor color); | ||||
|
r1353 | Q_SIGNALS: | ||
|
r1490 | void clicked(int index); | ||
|
r2600 | void hovered(bool status, int index); | ||
|
r2739 | void pressed(int index); | ||
void released(int index); | ||||
void doubleClicked(int index); | ||||
|
r1353 | void penChanged(); | ||
void brushChanged(); | ||||
void labelChanged(); | ||||
void labelBrushChanged(); | ||||
void labelFontChanged(); | ||||
|
r1465 | void colorChanged(QColor color); | ||
void borderColorChanged(QColor color); | ||||
void labelColorChanged(QColor color); | ||||
|
r1353 | |||
void valuesAdded(int index, int count); | ||||
void valuesRemoved(int index, int count); | ||||
void valueChanged(int index); | ||||
|
r171 | private: | ||
|
r938 | QScopedPointer<QBarSetPrivate> d_ptr; | ||
|
r934 | Q_DISABLE_COPY(QBarSet) | ||
|
r1586 | friend class QAbstractBarSeries; | ||
|
r953 | friend class BarLegendMarker; | ||
|
r1674 | friend class AbstractBarChartItem; | ||
|
r1584 | friend class QAbstractBarSeriesPrivate; | ||
|
r1580 | friend class StackedBarChartItem; | ||
friend class PercentBarChartItem; | ||||
|
r1674 | friend class BarChartItem; | ||
|
r1681 | friend class HorizontalBarChartItem; | ||
|
r1685 | friend class HorizontalStackedBarChartItem; | ||
|
r1688 | friend class HorizontalPercentBarChartItem; | ||
|
r2548 | friend class BoxPlotChartItem; | ||
|
r169 | }; | ||
|
r2712 | QT_CHARTS_END_NAMESPACE | ||
|
r169 | |||
#endif // QBARSET_H | ||||