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 BARCHARTITEM_H |
15 | #define BARCHARTITEM_H |
16 | |
17 | #include <private/abstractbarchartitem_p.h> |
18 | #include <QtCharts/QStackedBarSeries> |
19 | #include <QtWidgets/QGraphicsItem> |
20 | #include <QtCharts/private/qchartglobal_p.h> |
21 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | class Q_CHARTS_PRIVATE_EXPORT BarChartItem : public AbstractBarChartItem |
25 | { |
26 | Q_OBJECT |
27 | public: |
28 | BarChartItem(QAbstractBarSeries *series, QGraphicsItem* item = 0); |
29 | |
30 | private Q_SLOTS: |
31 | void handleLabelsPositionChanged(); |
32 | void positionLabels() override; |
33 | |
34 | private: |
35 | QList<QRectF> calculateLayout() override; |
36 | void initializeLayout(int set, int category, |
37 | int layoutIndex, bool resetAnimation) override; |
38 | QPointF topLeftPoint(int set, int setCount, int category, qreal barWidth, qreal value); |
39 | QPointF bottomRightPoint(int set, int setCount, int category, qreal barWidth, qreal value); |
40 | }; |
41 | |
42 | QT_END_NAMESPACE |
43 | |
44 | #endif // BARCHARTITEM_H |
45 | |