@@ -59,7 +59,7 contains(QT_CONFIG, opengl) { | |||
|
59 | 59 | message("OpenGL not available. Some examples are disabled.") |
|
60 | 60 | } |
|
61 | 61 | |
|
62 | !linux-arm*: { | |
|
62 | !contains(QT_COORD_TYPE, float): { | |
|
63 | 63 | SUBDIRS += \ |
|
64 | 64 | datetimeaxis |
|
65 | 65 | } |
@@ -81,7 +81,7 PRIVATE_HEADERS += \ | |||
|
81 | 81 | $$PWD/categoryaxis/polarchartcategoryaxisangular_p.h \ |
|
82 | 82 | $$PWD/categoryaxis/polarchartcategoryaxisradial_p.h |
|
83 | 83 | |
|
84 | !linux-arm*: { | |
|
84 | !contains(QT_COORD_TYPE, float): { | |
|
85 | 85 | INCLUDEPATH += \ |
|
86 | 86 | $$PWD/datetimeaxis |
|
87 | 87 |
@@ -49,7 +49,7 QT_CHARTS_BEGIN_NAMESPACE | |||
|
49 | 49 | There are also other limitiation related to QDateTime. Please refer to QDateTime documentation. |
|
50 | 50 | QDateTimeAxis can be setup to show axis line with tick marks, grid lines and shades. |
|
51 | 51 | |
|
52 |
Note: QDateTimeAxis is disabled on |
|
|
52 | Note: QDateTimeAxis is disabled on platforms that define qreal as float. | |
|
53 | 53 | |
|
54 | 54 | \image api_datatime_axis.png |
|
55 | 55 |
@@ -51,7 +51,7 | |||
|
51 | 51 | #include <private/logxlogypolardomain_p.h> |
|
52 | 52 | #include <private/glxyseriesdata_p.h> |
|
53 | 53 | |
|
54 |
#ifndef QT_ |
|
|
54 | #ifndef QT_QREAL_IS_FLOAT | |
|
55 | 55 | #include <QtCharts/QDateTimeAxis> |
|
56 | 56 | #endif |
|
57 | 57 | |
@@ -361,7 +361,7 void ChartDataSet::createAxes(QAbstractAxis::AxisTypes type, Qt::Orientation ori | |||
|
361 | 361 | case QAbstractAxis::AxisTypeCategory: |
|
362 | 362 | axis = new QCategoryAxis(this); |
|
363 | 363 | break; |
|
364 | #ifndef Q_WS_QWS | |
|
364 | #ifndef QT_QREAL_IS_FLOAT | |
|
365 | 365 | case QAbstractAxis::AxisTypeDateTime: |
|
366 | 366 | axis = new QDateTimeAxis(this); |
|
367 | 367 | break; |
@@ -5,6 +5,8 TARGET = QtCharts | |||
|
5 | 5 | message($$QT_CONFIG) |
|
6 | 6 | QT = core gui widgets |
|
7 | 7 | DEFINES += QT_CHARTS_LIBRARY |
|
8 | contains(QT_COORD_TYPE, float): DEFINES += QT_QREAL_IS_FLOAT | |
|
9 | ||
|
8 | 10 | # Fix exports in static builds for applications linking charts module |
|
9 | 11 | static: MODULE_DEFINES += QT_CHARTS_STATICLIB |
|
10 | 12 |
@@ -3,6 +3,7 TARGET = qtchartsqml2 | |||
|
3 | 3 | QT += qml quick |
|
4 | 4 | QT += charts charts-private |
|
5 | 5 | TARGETPATH = QtCharts |
|
6 | contains(QT_COORD_TYPE, float): DEFINES += QT_QREAL_IS_FLOAT | |
|
6 | 7 | |
|
7 | 8 | IMPORT_VERSION = $$MODULE_VERSION |
|
8 | 9 |
@@ -57,7 +57,7 | |||
|
57 | 57 | #include <QtCharts/QXYLegendMarker> |
|
58 | 58 | #include <QtCharts/QBoxPlotModelMapper> |
|
59 | 59 | #include <QtCharts/QVBoxPlotModelMapper> |
|
60 |
#ifndef QT_ |
|
|
60 | #ifndef QT_QREAL_IS_FLOAT | |
|
61 | 61 | #include <QtCharts/QDateTimeAxis> |
|
62 | 62 | #endif |
|
63 | 63 | #include <QtCore/QAbstractItemModel> |
@@ -87,7 +87,9 QML_DECLARE_TYPE(QAbstractAxis) | |||
|
87 | 87 | QML_DECLARE_TYPE(QValueAxis) |
|
88 | 88 | QML_DECLARE_TYPE(QBarCategoryAxis) |
|
89 | 89 | QML_DECLARE_TYPE(QCategoryAxis) |
|
90 | #ifndef QT_QREAL_IS_FLOAT | |
|
90 | 91 | QML_DECLARE_TYPE(QDateTimeAxis) |
|
92 | #endif | |
|
91 | 93 | QML_DECLARE_TYPE(QLogValueAxis) |
|
92 | 94 | |
|
93 | 95 | QML_DECLARE_TYPE(QLegend) |
@@ -207,7 +209,7 public: | |||
|
207 | 209 | qmlRegisterType<DeclarativePieSeries>(uri, 1, 1, "PieSeries"); |
|
208 | 210 | qmlRegisterType<DeclarativeBarSet>(uri, 1, 1, "BarSet"); |
|
209 | 211 | qmlRegisterType<QValueAxis>(uri, 1, 1, "ValueAxis"); |
|
210 |
#ifndef QT_ |
|
|
212 | #ifndef QT_QREAL_IS_FLOAT | |
|
211 | 213 | qmlRegisterType<QDateTimeAxis>(uri, 1, 1, "DateTimeAxis"); |
|
212 | 214 | #endif |
|
213 | 215 | qmlRegisterType<DeclarativeCategoryAxis>(uri, 1, 1, "CategoryAxis"); |
@@ -271,7 +273,7 public: | |||
|
271 | 273 | qmlRegisterType<QHBarModelMapper>(uri, 2, 0, "HBarModelMapper"); |
|
272 | 274 | qmlRegisterType<QVBarModelMapper>(uri, 2, 0, "VBarModelMapper"); |
|
273 | 275 | qmlRegisterType<QValueAxis>(uri, 2, 0, "ValueAxis"); |
|
274 |
#ifndef QT_ |
|
|
276 | #ifndef QT_QREAL_IS_FLOAT | |
|
275 | 277 | qmlRegisterType<QDateTimeAxis>(uri, 2, 0, "DateTimeAxis"); |
|
276 | 278 | #endif |
|
277 | 279 | qmlRegisterType<DeclarativeCategoryAxis>(uri, 2, 0, "CategoryAxis"); |
@@ -50,7 +50,7 | |||
|
50 | 50 | #include <private/chartpresenter_p.h> |
|
51 | 51 | #include <QtCharts/QPolarChart> |
|
52 | 52 | |
|
53 |
#ifndef QT_ |
|
|
53 | #ifndef QT_QREAL_IS_FLOAT | |
|
54 | 54 | #include <QtCharts/QDateTimeAxis> |
|
55 | 55 | #endif |
|
56 | 56 | |
@@ -1149,7 +1149,7 QAbstractAxis *DeclarativeChart::defaultAxis(Qt::Orientation orientation, QAbstr | |||
|
1149 | 1149 | return new QBarCategoryAxis(this); |
|
1150 | 1150 | case QAbstractAxis::AxisTypeCategory: |
|
1151 | 1151 | return new QCategoryAxis(this); |
|
1152 |
#ifndef QT_ |
|
|
1152 | #ifndef QT_QREAL_IS_FLOAT | |
|
1153 | 1153 | case QAbstractAxis::AxisTypeDateTime: |
|
1154 | 1154 | return new QDateTimeAxis(this); |
|
1155 | 1155 | #endif |
@@ -25,7 +25,7 SUBDIRS += \ | |||
|
25 | 25 | qlegend \ |
|
26 | 26 | cmake |
|
27 | 27 | |
|
28 | !linux-arm*: { | |
|
28 | !contains(QT_COORD_TYPE, float): { | |
|
29 | 29 | SUBDIRS += \ |
|
30 | 30 | qdatetimeaxis |
|
31 | 31 | } |
@@ -3,5 +3,6 | |||
|
3 | 3 | } |
|
4 | 4 | |
|
5 | 5 | QT += charts-private |
|
6 | contains(QT_COORD_TYPE, float): DEFINES += QT_QREAL_IS_FLOAT | |
|
6 | 7 | |
|
7 | 8 | SOURCES += tst_chartdataset.cpp |
@@ -32,7 +32,7 | |||
|
32 | 32 | #include <QtCharts/QValueAxis> |
|
33 | 33 | #include <QtCharts/QBarCategoryAxis> |
|
34 | 34 | #include <QtCharts/QCategoryAxis> |
|
35 |
#ifndef QT_ |
|
|
35 | #ifndef QT_QREAL_IS_FLOAT | |
|
36 | 36 | #include <QtCharts/QDateTimeAxis> |
|
37 | 37 | #endif |
|
38 | 38 | #include <QtCharts/QLineSeries> |
@@ -208,14 +208,14 void tst_ChartDataSet::addAxis_data() | |||
|
208 | 208 | QAbstractAxis* value = new QValueAxis(this); |
|
209 | 209 | QAbstractAxis* category = new QCategoryAxis(this); |
|
210 | 210 | QAbstractAxis* barcategory = new QBarCategoryAxis(this); |
|
211 | #ifndef Q_WS_QWS | |
|
211 | #ifndef QT_QREAL_IS_FLOAT | |
|
212 | 212 | QAbstractAxis* datetime = new QDateTimeAxis(this); |
|
213 | 213 | #endif |
|
214 | 214 | |
|
215 | 215 | QTest::newRow("value") << value; |
|
216 | 216 | QTest::newRow("category") << category; |
|
217 | 217 | QTest::newRow("barcategory") << barcategory; |
|
218 | #ifndef Q_WS_QWS | |
|
218 | #ifndef QT_QREAL_IS_FLOAT | |
|
219 | 219 | QTest::newRow("datetime") << datetime; |
|
220 | 220 | #endif |
|
221 | 221 | } |
@@ -3,3 +3,4 | |||
|
3 | 3 | } |
|
4 | 4 | SOURCES += tst_qml.cpp |
|
5 | 5 | QT += qml quick |
|
6 | contains(QT_COORD_TYPE, float): DEFINES += QT_QREAL_IS_FLOAT |
@@ -140,7 +140,7 void tst_qml::checkPlugin_data() | |||
|
140 | 140 | QTest::newRow("HBarModelMapper") << imports_1_1() + "HBarModelMapper{}"; |
|
141 | 141 | QTest::newRow("VBarModelMapper") << imports_1_1() + "VBarModelMapper{}"; |
|
142 | 142 | QTest::newRow("ValueAxis") << imports_1_1() + "ValueAxis{}"; |
|
143 |
#ifndef QT_ |
|
|
143 | #ifndef QT_QREAL_IS_FLOAT | |
|
144 | 144 | QTest::newRow("DateTimeAxis") << imports_1_1() + "DateTimeAxis{}"; |
|
145 | 145 | #endif |
|
146 | 146 | QTest::newRow("CategoryAxis") << imports_1_1() + "CategoryAxis{}"; |
@@ -176,7 +176,7 void tst_qml::checkPlugin_data() | |||
|
176 | 176 | QTest::newRow("HBarModelMapper_2_0") << imports_2_0() + "HBarModelMapper{}"; |
|
177 | 177 | QTest::newRow("VBarModelMapper_2_0") << imports_2_0() + "VBarModelMapper{}"; |
|
178 | 178 | QTest::newRow("ValueAxis_2_0") << imports_2_0() + "ValueAxis{}"; |
|
179 |
#ifndef QT_ |
|
|
179 | #ifndef QT_QREAL_IS_FLOAT | |
|
180 | 180 | QTest::newRow("DateTimeAxis_2_0") << imports_2_0() + "DateTimeAxis{}"; |
|
181 | 181 | #endif |
|
182 | 182 | QTest::newRow("CategoryAxis_2_0") << imports_2_0() + "CategoryAxis{}"; |
General Comments 0
You need to be logged in to leave comments.
Login now