qareaseries.h
115 lines
| 4.0 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 | |||
|
r969 | #ifndef QAREASERIES_H | ||
#define QAREASERIES_H | ||||
|
r421 | |||
|
r2714 | #include <QtCharts/QChartGlobal> | ||
#include <QtCharts/QAbstractSeries> | ||||
#include <QtGui/QPen> | ||||
#include <QtGui/QBrush> | ||||
|
r421 | |||
|
r2712 | QT_CHARTS_BEGIN_NAMESPACE | ||
|
r421 | class QLineSeries; | ||
|
r938 | class QAreaSeriesPrivate; | ||
|
r421 | |||
|
r2712 | class QT_CHARTS_EXPORT QAreaSeries : public QAbstractSeries | ||
|
r421 | { | ||
Q_OBJECT | ||||
|
r1498 | Q_PROPERTY(QLineSeries *upperSeries READ upperSeries) | ||
Q_PROPERTY(QLineSeries *lowerSeries READ lowerSeries) | ||||
|
r1481 | Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) | ||
Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged) | ||||
|
r2692 | Q_PROPERTY(QString pointLabelsFormat READ pointLabelsFormat WRITE setPointLabelsFormat NOTIFY pointLabelsFormatChanged) | ||
Q_PROPERTY(bool pointLabelsVisible READ pointLabelsVisible WRITE setPointLabelsVisible NOTIFY pointLabelsVisibilityChanged) | ||||
Q_PROPERTY(QFont pointLabelsFont READ pointLabelsFont WRITE setPointLabelsFont NOTIFY pointLabelsFontChanged) | ||||
Q_PROPERTY(QColor pointLabelsColor READ pointLabelsColor WRITE setPointLabelsColor NOTIFY pointLabelsColorChanged) | ||||
|
r2815 | Q_PROPERTY(bool pointLabelsClipping READ pointLabelsClipping WRITE setPointLabelsClipping NOTIFY pointLabelsClippingChanged) | ||
|
r1308 | |||
|
r421 | public: | ||
|
r1202 | explicit QAreaSeries(QObject *parent = 0); | ||
|
r970 | explicit QAreaSeries(QLineSeries *upperSeries, QLineSeries *lowerSeries = 0); | ||
~QAreaSeries(); | ||||
|
r421 | |||
|
r938 | public: | ||
|
r1107 | QAbstractSeries::SeriesType type() const; | ||
|
r421 | |||
|
r2104 | void setUpperSeries(QLineSeries *series); | ||
QLineSeries *upperSeries() const; | ||||
void setLowerSeries(QLineSeries *series); | ||||
QLineSeries *lowerSeries() const; | ||||
|
r421 | |||
|
r743 | void setPen(const QPen &pen); | ||
|
r938 | QPen pen() const; | ||
|
r421 | |||
|
r743 | void setBrush(const QBrush &brush); | ||
|
r938 | QBrush brush() const; | ||
|
r421 | |||
|
r1481 | void setColor(const QColor &color); | ||
QColor color() const; | ||||
void setBorderColor(const QColor &color); | ||||
QColor borderColor() const; | ||||
|
r987 | void setPointsVisible(bool visible = true); | ||
|
r938 | bool pointsVisible() const; | ||
|
r2689 | void setPointLabelsFormat(const QString &format); | ||
QString pointLabelsFormat() const; | ||||
void setPointLabelsVisible(bool visible = true); | ||||
bool pointLabelsVisible() const; | ||||
void setPointLabelsFont(const QFont &font); | ||||
QFont pointLabelsFont() const; | ||||
void setPointLabelsColor(const QColor &color); | ||||
QColor pointLabelsColor() const; | ||||
|
r2815 | void setPointLabelsClipping(bool enabled = true); | ||
bool pointLabelsClipping() const; | ||||
|
r775 | Q_SIGNALS: | ||
|
r2712 | void clicked(const QPointF &point); | ||
|
r2264 | void hovered(const QPointF &point, bool state); | ||
|
r2739 | void pressed(const QPointF &point); | ||
void released(const QPointF &point); | ||||
void doubleClicked(const QPointF &point); | ||||
|
r855 | void selected(); | ||
|
r1481 | void colorChanged(QColor color); | ||
void borderColorChanged(QColor color); | ||||
|
r2689 | void pointLabelsFormatChanged(const QString &format); | ||
void pointLabelsVisibilityChanged(bool visible); | ||||
void pointLabelsFontChanged(const QFont &font); | ||||
void pointLabelsColorChanged(const QColor &color); | ||||
|
r2815 | void pointLabelsClippingChanged(bool clipping); | ||
|
r421 | |||
private: | ||||
|
r1481 | Q_DECLARE_PRIVATE(QAreaSeries) | ||
Q_DISABLE_COPY(QAreaSeries) | ||||
|
r938 | friend class AreaLegendMarker; | ||
friend class AreaChartItem; | ||||
|
r2176 | friend class QAreaLegendMarkerPrivate; | ||
|
r421 | }; | ||
|
r2712 | QT_CHARTS_END_NAMESPACE | ||
|
r421 | |||
|
r2046 | #endif // QAREASERIES_H | ||