1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3#ifndef QBARLEGENDMARKER_H
4#define QBARLEGENDMARKER_H
5
6#include <QtCharts/QChartGlobal>
7#include <QtCharts/QLegendMarker>
8#include <QtCharts/QAbstractBarSeries>
9#include <QtCharts/QBarSet>
10
11QT_BEGIN_NAMESPACE
12
13class QLegend;
14class QBarLegendMarkerPrivate;
15
16class Q_CHARTS_EXPORT QBarLegendMarker : public QLegendMarker
17{
18 Q_OBJECT
19public:
20 explicit QBarLegendMarker(QAbstractBarSeries *series, QBarSet *barset, QLegend *legend, QObject *parent = nullptr);
21 virtual ~QBarLegendMarker();
22
23 LegendMarkerType type() override { return LegendMarkerTypeBar; }
24
25 // Related series and barset
26 QAbstractBarSeries* series() override;
27 QBarSet* barset();
28
29protected:
30 QBarLegendMarker(QBarLegendMarkerPrivate &d, QObject *parent = nullptr);
31
32private:
33 Q_DECLARE_PRIVATE(QBarLegendMarker)
34 Q_DISABLE_COPY(QBarLegendMarker)
35
36};
37
38QT_END_NAMESPACE
39
40#endif // QBARLEGENDMARKER_H
41

source code of qtcharts/src/charts/legend/qbarlegendmarker.h