| 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 | #ifndef QCANDLESTICKSERIES_P_H | 
| 14 | #define QCANDLESTICKSERIES_P_H | 
| 15 |  | 
| 16 | #include <private/qabstractseries_p.h> | 
| 17 | #include <QtCharts/private/qchartglobal_p.h> | 
| 18 |  | 
| 19 | QT_BEGIN_NAMESPACE | 
| 20 |  | 
| 21 | class CandlestickAnimation; | 
| 22 | class QBarCategoryAxis; | 
| 23 | class QCandlestickSeries; | 
| 24 | class QCandlestickSet; | 
| 25 | class QDateTimeAxis; | 
| 26 |  | 
| 27 | class Q_CHARTS_EXPORT QCandlestickSeriesPrivate : public QAbstractSeriesPrivate | 
| 28 | { | 
| 29 |     Q_OBJECT | 
| 30 |  | 
| 31 | public: | 
| 32 |     QCandlestickSeriesPrivate(QCandlestickSeries *q); | 
| 33 |     ~QCandlestickSeriesPrivate(); | 
| 34 |  | 
| 35 |     void initializeDomain() override; | 
| 36 |     void initializeAxes() override; | 
| 37 |     void initializeTheme(int index, ChartTheme* theme, bool forced = false) override; | 
| 38 |     void initializeGraphics(QGraphicsItem* parent) override; | 
| 39 |     void initializeAnimations(QChart::AnimationOptions options, int duration, QEasingCurve &curve) override; | 
| 40 |  | 
| 41 |     QList<QLegendMarker *> createLegendMarkers(QLegend *legend) override; | 
| 42 |  | 
| 43 |     QAbstractAxis::AxisType defaultAxisType(Qt::Orientation orientation) const override; | 
| 44 |     QAbstractAxis *createDefaultAxis(Qt::Orientation orientation) const override; | 
| 45 |  | 
| 46 |     bool append(const QList<QCandlestickSet *> &sets); | 
| 47 |     bool remove(const QList<QCandlestickSet *> &sets); | 
| 48 |     bool insert(int index, QCandlestickSet *set); | 
| 49 |  | 
| 50 | Q_SIGNALS: | 
| 51 |     void clicked(int index, QCandlestickSet *set); | 
| 52 |     void pressed(int index, QCandlestickSet *set); | 
| 53 |     void released(int index, QCandlestickSet *set); | 
| 54 |     void doubleClicked(int index, QCandlestickSet *set); | 
| 55 |     void updated(); | 
| 56 |     void updatedLayout(); | 
| 57 |     void updatedCandlesticks(); | 
| 58 |  | 
| 59 | private Q_SLOTS: | 
| 60 |     void handleSeriesChange(QAbstractSeries *series); | 
| 61 |     void handleSeriesRemove(QAbstractSeries *series); | 
| 62 |  | 
| 63 | private: | 
| 64 |     void populateBarCategories(QBarCategoryAxis *axis); | 
| 65 |  | 
| 66 | protected: | 
| 67 |     QList<QCandlestickSet *> m_sets; | 
| 68 |     qreal m_maximumColumnWidth; | 
| 69 |     qreal m_minimumColumnWidth; | 
| 70 |     qreal m_bodyWidth; | 
| 71 |     bool m_bodyOutlineVisible; | 
| 72 |     qreal m_capsWidth; | 
| 73 |     bool m_capsVisible; | 
| 74 |     QColor m_increasingColor; | 
| 75 |     QColor m_decreasingColor; | 
| 76 |     bool m_customIncreasingColor; | 
| 77 |     bool m_customDecreasingColor; | 
| 78 |     QBrush m_brush; | 
| 79 |     QPen m_pen; | 
| 80 |     CandlestickAnimation *m_animation; | 
| 81 |  | 
| 82 | private: | 
| 83 |     Q_DECLARE_PUBLIC(QCandlestickSeries) | 
| 84 | }; | 
| 85 |  | 
| 86 | QT_END_NAMESPACE | 
| 87 |  | 
| 88 | #endif // QCANDLESTICKSERIES_P_H | 
| 89 |  |