1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4// W A R N I N G
5// -------------
6//
7// This file is not part of the Qt Chart API. It exists purely as an
8// implementation detail. This header file may change from version to
9// version without notice, or even be removed.
10//
11// We mean it.
12
13
14#ifndef STACKEDBARCHARTITEM_H
15#define STACKEDBARCHARTITEM_H
16
17#include <private/abstractbarchartitem_p.h>
18#include <QtCharts/QStackedBarSeries>
19#include <QtWidgets/QGraphicsItem>
20#include <QtCharts/private/qchartglobal_p.h>
21
22QT_BEGIN_NAMESPACE
23
24class Q_CHARTS_PRIVATE_EXPORT StackedBarChartItem : public AbstractBarChartItem
25{
26 Q_OBJECT
27public:
28 StackedBarChartItem(QAbstractBarSeries *series, QGraphicsItem* item =0);
29
30private Q_SLOTS:
31 void handleLabelsPositionChanged();
32 void positionLabels() override;
33
34private:
35 QList<QRectF> calculateLayout() override;
36 void initializeLayout(int set, int category, int layoutIndex, bool resetAnimation) override;
37 QPointF topLeftPoint(int category, qreal barWidth, qreal value);
38 QPointF bottomRightPoint(int category, qreal barWidth, qreal value);
39};
40
41QT_END_NAMESPACE
42
43#endif // STACKEDBARCHARTITEM_H
44

source code of qtcharts/src/charts/barchart/vertical/stacked/stackedbarchartitem_p.h