##// END OF EJS Templates
Adding metatype declarations in qml plugin for Qt5...
Jani Honkonen -
r2257:b97c592cff78
parent child
Show More
@@ -38,6 +38,10
38 38 #include "qhbarmodelmapper.h"
39 39 #include "qvbarmodelmapper.h"
40 40 #include "declarativemargins.h"
41 #include "qarealegendmarker.h"
42 #include "qbarlegendmarker.h"
43 #include "qpielegendmarker.h"
44 #include "qxylegendmarker.h"
41 45 #ifndef QT_ON_ARM
42 46 #include "qdatetimeaxis.h"
43 47 #endif
@@ -49,7 +53,62 QTCOMMERCIALCHART_USE_NAMESPACE
49 53
50 54 Q_DECLARE_METATYPE(QList<QPieSlice *>)
51 55 Q_DECLARE_METATYPE(QList<QBarSet *>)
56
57 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
58
59 // NOTE: Hackish fixes for Qt5 (beta2).
60 // These should not be needed or at least they are not needed in Qt4.
61
62 Q_DECLARE_METATYPE(DeclarativeChart::SeriesType)
63 Q_DECLARE_METATYPE(DeclarativeMargins *)
64 Q_DECLARE_METATYPE(DeclarativeAreaSeries *)
65 Q_DECLARE_METATYPE(DeclarativeBarSeries *)
66 Q_DECLARE_METATYPE(DeclarativeLineSeries *)
67 Q_DECLARE_METATYPE(DeclarativePieSeries *)
68 Q_DECLARE_METATYPE(DeclarativeScatterSeries *)
69 Q_DECLARE_METATYPE(DeclarativeSplineSeries *)
70
71 Q_DECLARE_METATYPE(QAbstractAxis *)
72 Q_DECLARE_METATYPE(QValueAxis *)
73 Q_DECLARE_METATYPE(QBarCategoryAxis *)
74 Q_DECLARE_METATYPE(QCategoryAxis *)
75 Q_DECLARE_METATYPE(QDateTimeAxis *)
76
77 Q_DECLARE_METATYPE(QLegend *)
78 Q_DECLARE_METATYPE(QLegendMarker *)
79 Q_DECLARE_METATYPE(QAreaLegendMarker *)
80 Q_DECLARE_METATYPE(QBarLegendMarker *)
81 Q_DECLARE_METATYPE(QPieLegendMarker *)
82
83 Q_DECLARE_METATYPE(QHPieModelMapper *)
84 Q_DECLARE_METATYPE(QHXYModelMapper *)
85 Q_DECLARE_METATYPE(QPieModelMapper *)
86 Q_DECLARE_METATYPE(QHBarModelMapper *)
87 Q_DECLARE_METATYPE(QBarModelMapper *)
88 Q_DECLARE_METATYPE(QVBarModelMapper *)
89 Q_DECLARE_METATYPE(QVPieModelMapper *)
90 Q_DECLARE_METATYPE(QVXYModelMapper *)
91 Q_DECLARE_METATYPE(QXYLegendMarker *)
92 Q_DECLARE_METATYPE(QXYModelMapper *)
93
52 94 Q_DECLARE_METATYPE(QAbstractSeries *)
95 Q_DECLARE_METATYPE(QXYSeries *)
96 Q_DECLARE_METATYPE(QAbstractBarSeries *)
97 Q_DECLARE_METATYPE(QBarSeries *)
98 Q_DECLARE_METATYPE(QBarSet *)
99 Q_DECLARE_METATYPE(QAreaSeries *)
100 Q_DECLARE_METATYPE(QHorizontalBarSeries *)
101 Q_DECLARE_METATYPE(QHorizontalPercentBarSeries *)
102 Q_DECLARE_METATYPE(QHorizontalStackedBarSeries *)
103 Q_DECLARE_METATYPE(QLineSeries *)
104 Q_DECLARE_METATYPE(QPercentBarSeries *)
105 Q_DECLARE_METATYPE(QPieSeries *)
106 Q_DECLARE_METATYPE(QPieSlice *)
107 Q_DECLARE_METATYPE(QScatterSeries *)
108 Q_DECLARE_METATYPE(QSplineSeries *)
109 Q_DECLARE_METATYPE(QStackedBarSeries *)
110
111 #endif
53 112
54 113 QTCOMMERCIALCHART_BEGIN_NAMESPACE
55 114
@@ -68,6 +127,7 public:
68 127
69 128 qRegisterMetaType<QList<QPieSlice *> >();
70 129 qRegisterMetaType<QList<QBarSet *> >();
130 qRegisterMetaType<DeclarativeChart::SeriesType>();
71 131
72 132 // QtCommercial.Chart 1.0
73 133 qmlRegisterType<DeclarativeChart>(uri, 1, 0, "ChartView");
General Comments 0
You need to be logged in to leave comments. Login now