/usr/include/x86_64-linux-gnu/qt5/QtCharts/qchart.h is in libqt5charts5-dev 5.9.5-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | /****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Charts module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:GPL$
** 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 https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QCHART_H
#define QCHART_H
#include <QtCharts/QAbstractSeries>
#include <QtCharts/QLegend>
#include <QtWidgets/QGraphicsWidget>
#include <QtCore/QMargins>
QT_BEGIN_NAMESPACE
class QGraphicsSceneResizeEvent;
QT_END_NAMESPACE
QT_CHARTS_BEGIN_NAMESPACE
class QAbstractSeries;
class QAbstractAxis;
class QLegend;
class QChartPrivate;
class QBoxPlotSeries;
class QT_CHARTS_EXPORT QChart : public QGraphicsWidget
{
Q_OBJECT
Q_PROPERTY(QChart::ChartTheme theme READ theme WRITE setTheme)
Q_PROPERTY(QString title READ title WRITE setTitle)
Q_PROPERTY(bool backgroundVisible READ isBackgroundVisible WRITE setBackgroundVisible)
Q_PROPERTY(bool dropShadowEnabled READ isDropShadowEnabled WRITE setDropShadowEnabled)
Q_PROPERTY(qreal backgroundRoundness READ backgroundRoundness WRITE setBackgroundRoundness)
Q_PROPERTY(QChart::AnimationOptions animationOptions READ animationOptions WRITE setAnimationOptions)
Q_PROPERTY(int animationDuration READ animationDuration WRITE setAnimationDuration)
Q_PROPERTY(QEasingCurve animationEasingCurve READ animationEasingCurve WRITE setAnimationEasingCurve)
Q_PROPERTY(QMargins margins READ margins WRITE setMargins)
Q_PROPERTY(QChart::ChartType chartType READ chartType)
Q_PROPERTY(bool plotAreaBackgroundVisible READ isPlotAreaBackgroundVisible WRITE setPlotAreaBackgroundVisible)
Q_PROPERTY(bool localizeNumbers READ localizeNumbers WRITE setLocalizeNumbers)
Q_PROPERTY(QLocale locale READ locale WRITE setLocale)
Q_PROPERTY(QRectF plotArea READ plotArea NOTIFY plotAreaChanged)
Q_ENUMS(ChartTheme)
Q_ENUMS(AnimationOption)
Q_ENUMS(ChartType)
public:
enum ChartType {
ChartTypeUndefined = 0,
ChartTypeCartesian,
ChartTypePolar
};
enum ChartTheme {
ChartThemeLight = 0,
ChartThemeBlueCerulean,
ChartThemeDark,
ChartThemeBrownSand,
ChartThemeBlueNcs,
ChartThemeHighContrast,
ChartThemeBlueIcy,
ChartThemeQt
};
enum AnimationOption {
NoAnimation = 0x0,
GridAxisAnimations = 0x1,
SeriesAnimations = 0x2,
AllAnimations = 0x3
};
Q_DECLARE_FLAGS(AnimationOptions, AnimationOption)
public:
explicit QChart(QGraphicsItem *parent = Q_NULLPTR, Qt::WindowFlags wFlags = Qt::WindowFlags());
~QChart();
void addSeries(QAbstractSeries *series);
void removeSeries(QAbstractSeries *series);
void removeAllSeries();
QList<QAbstractSeries *> series() const;
// *** deprecated ***
void setAxisX(QAbstractAxis *axis, QAbstractSeries *series = Q_NULLPTR);
void setAxisY(QAbstractAxis *axis, QAbstractSeries *series = Q_NULLPTR);
QAbstractAxis *axisX(QAbstractSeries *series = Q_NULLPTR) const;
QAbstractAxis *axisY(QAbstractSeries *series = Q_NULLPTR) const;
// ******************
void addAxis(QAbstractAxis *axis, Qt::Alignment alignment);
void removeAxis(QAbstractAxis *axis);
QList<QAbstractAxis*> axes(Qt::Orientations orientation = Qt::Horizontal|Qt::Vertical, QAbstractSeries *series = Q_NULLPTR) const;
void createDefaultAxes();
void setTheme(QChart::ChartTheme theme);
QChart::ChartTheme theme() const;
void setTitle(const QString &title);
QString title() const;
void setTitleFont(const QFont &font);
QFont titleFont() const;
void setTitleBrush(const QBrush &brush);
QBrush titleBrush() const;
void setBackgroundBrush(const QBrush &brush);
QBrush backgroundBrush() const;
void setBackgroundPen(const QPen &pen);
QPen backgroundPen() const;
void setBackgroundVisible(bool visible = true);
bool isBackgroundVisible() const;
void setDropShadowEnabled(bool enabled = true);
bool isDropShadowEnabled() const;
void setBackgroundRoundness(qreal diameter);
qreal backgroundRoundness() const;
void setAnimationOptions(AnimationOptions options);
AnimationOptions animationOptions() const;
void setAnimationDuration(int msecs);
int animationDuration() const;
void setAnimationEasingCurve(const QEasingCurve &curve);
QEasingCurve animationEasingCurve() const;
void zoomIn();
void zoomOut();
void zoomIn(const QRectF &rect);
void zoom(qreal factor);
void zoomReset();
bool isZoomed();
void scroll(qreal dx, qreal dy);
QLegend *legend() const;
void setMargins(const QMargins &margins);
QMargins margins() const;
QRectF plotArea() const;
void setPlotAreaBackgroundBrush(const QBrush &brush);
QBrush plotAreaBackgroundBrush() const;
void setPlotAreaBackgroundPen(const QPen &pen);
QPen plotAreaBackgroundPen() const;
void setPlotAreaBackgroundVisible(bool visible = true);
bool isPlotAreaBackgroundVisible() const;
void setLocalizeNumbers(bool localize);
bool localizeNumbers() const;
void setLocale(const QLocale &locale);
QLocale locale() const;
QPointF mapToValue(const QPointF &position, QAbstractSeries *series = Q_NULLPTR);
QPointF mapToPosition(const QPointF &value, QAbstractSeries *series = Q_NULLPTR);
ChartType chartType() const;
Q_SIGNALS:
void plotAreaChanged(const QRectF &plotArea);
protected:
explicit QChart(QChart::ChartType type, QGraphicsItem *parent, Qt::WindowFlags wFlags);
QScopedPointer<QChartPrivate> d_ptr;
friend class QLegend;
friend class DeclarativeChart;
friend class ChartDataSet;
friend class ChartPresenter;
friend class ChartThemeManager;
friend class QAbstractSeries;
friend class QBoxPlotSeriesPrivate;
friend class QCandlestickSeriesPrivate;
friend class AbstractBarChartItem;
private:
Q_DISABLE_COPY(QChart)
};
QT_CHARTS_END_NAMESPACE
Q_DECLARE_OPERATORS_FOR_FLAGS(QT_CHARTS_NAMESPACE::QChart::AnimationOptions)
#endif // QCHART_H
|