##// END OF EJS Templates
Fix Qt5 building of quick2 plugin...
Miikka Heikkinen -
r2551:11500bb02eb2
parent child
Show More
@@ -50,7 +50,7 void DeclarativeBoxSet::setValues(QVariantList values)
50 50
51 51 // =====================================================
52 52
53 DeclarativeBoxPlotSeries::DeclarativeBoxPlotSeries(QDeclarativeItem *parent) :
53 DeclarativeBoxPlotSeries::DeclarativeBoxPlotSeries(QDECLARATIVE_ITEM *parent) :
54 54 QBoxPlotSeries(parent),
55 55 m_axes(new DeclarativeAxes(this))
56 56 {
@@ -78,12 +78,12 void DeclarativeBoxPlotSeries::componentComplete()
78 78 }
79 79 }
80 80
81 QDeclarativeListProperty<QObject> DeclarativeBoxPlotSeries::seriesChildren()
81 QDECLARATIVE_LIST_PROPERTY<QObject> DeclarativeBoxPlotSeries::seriesChildren()
82 82 {
83 return QDeclarativeListProperty<QObject>(this, 0, &DeclarativeBoxPlotSeries::appendSeriesChildren);
83 return QDECLARATIVE_LIST_PROPERTY<QObject>(this, 0, &DeclarativeBoxPlotSeries::appendSeriesChildren LIST_PROPERTY_PARAM_DEFAULTS);
84 84 }
85 85
86 void DeclarativeBoxPlotSeries::appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element)
86 void DeclarativeBoxPlotSeries::appendSeriesChildren(QDECLARATIVE_LIST_PROPERTY<QObject> *list, QObject *element)
87 87 {
88 88 // Empty implementation; the children are parsed in componentComplete instead
89 89 Q_UNUSED(list);
@@ -24,8 +24,13
24 24 #include "qboxset.h"
25 25 #include "declarativeaxes.h"
26 26 #include "qboxplotseries.h"
27 #ifdef CHARTS_FOR_QUICK2
28 #include <QtQuick/QQuickItem>
29 #include <QtQml/QQmlParserStatus>
30 #else
27 31 #include <QtDeclarative/QDeclarativeItem>
28 32 #include <QtDeclarative/QDeclarativeParserStatus>
33 #endif
29 34
30 35 QTCOMMERCIALCHART_BEGIN_NAMESPACE
31 36
@@ -62,19 +67,27 Q_SIGNALS:
62 67 void changedValue(int index);
63 68 };
64 69
65 class DeclarativeBoxPlotSeries : public QBoxPlotSeries, public QDeclarativeParserStatus
70 class DeclarativeBoxPlotSeries : public QBoxPlotSeries, public QDECLARATIVE_PARSER_STATUS
66 71 {
67 72 Q_OBJECT
73 #ifdef CHARTS_FOR_QUICK2
74 Q_INTERFACES(QQmlParserStatus)
75 #else
68 76 Q_INTERFACES(QDeclarativeParserStatus)
77 #endif
69 78 Q_PROPERTY(QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged)
70 79 Q_PROPERTY(QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged)
71 80 Q_PROPERTY(QAbstractAxis *axisXTop READ axisXTop WRITE setAxisXTop NOTIFY axisXTopChanged)
72 81 Q_PROPERTY(QAbstractAxis *axisYRight READ axisYRight WRITE setAxisYRight NOTIFY axisYRightChanged)
82 #ifdef CHARTS_FOR_QUICK2
83 Q_PROPERTY(QQmlListProperty<QObject> seriesChildren READ seriesChildren)
84 #else
73 85 Q_PROPERTY(QDeclarativeListProperty<QObject> seriesChildren READ seriesChildren)
86 #endif
74 87 Q_CLASSINFO("DefaultProperty", "seriesChildren")
75 88
76 89 public:
77 explicit DeclarativeBoxPlotSeries(QDeclarativeItem *parent = 0);
90 explicit DeclarativeBoxPlotSeries(QDECLARATIVE_ITEM *parent = 0);
78 91 QAbstractAxis *axisX() { return m_axes->axisX(); }
79 92 void setAxisX(QAbstractAxis *axis) { m_axes->setAxisX(axis); }
80 93 QAbstractAxis *axisY() { return m_axes->axisY(); }
@@ -83,7 +96,7 public:
83 96 void setAxisXTop(QAbstractAxis *axis) { m_axes->setAxisXTop(axis); }
84 97 QAbstractAxis *axisYRight() { return m_axes->axisYRight(); }
85 98 void setAxisYRight(QAbstractAxis *axis) { m_axes->setAxisYRight(axis); }
86 QDeclarativeListProperty<QObject> seriesChildren();
99 QDECLARATIVE_LIST_PROPERTY<QObject> seriesChildren();
87 100
88 101 public:
89 102 Q_INVOKABLE DeclarativeBoxSet *at(int index);
@@ -106,7 +119,7 Q_SIGNALS:
106 119 void hovered(bool status, DeclarativeBoxSet *boxset);
107 120
108 121 public Q_SLOTS:
109 static void appendSeriesChildren(QDeclarativeListProperty<QObject> *list, QObject *element);
122 static void appendSeriesChildren(QDECLARATIVE_LIST_PROPERTY<QObject> *list, QObject *element);
110 123 void onHovered(bool status, QBoxSet *boxset);
111 124 void onClicked(QBoxSet *boxset);
112 125
General Comments 0
You need to be logged in to leave comments. Login now