@@ -1,7 +1,7 | |||
|
1 | 1 | #include "declarativechart.h" |
|
2 | 2 | #include <QPainter> |
|
3 | 3 | |
|
4 | #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) | |
|
4 | #ifndef QTQUICK2 | |
|
5 | 5 | DeclarativeChart::DeclarativeChart(QDeclarativeItem *parent) |
|
6 | 6 | : QDeclarativeItem(parent) |
|
7 | 7 | { |
@@ -16,7 +16,7 DeclarativeChart::DeclarativeChart(QQuickItem *parent) | |||
|
16 | 16 | } |
|
17 | 17 | #endif |
|
18 | 18 | |
|
19 | #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) | |
|
19 | #ifndef QTQUICK2 | |
|
20 | 20 | void DeclarativeChart::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) |
|
21 | 21 | #else |
|
22 | 22 | void DeclarativeChart::paint(QPainter *painter) |
@@ -2,7 +2,7 | |||
|
2 | 2 | #define DECLARATIVECHART_H |
|
3 | 3 | |
|
4 | 4 | #include <QtCore/QtGlobal> |
|
5 | #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) | |
|
5 | #ifndef QTQUICK2 | |
|
6 | 6 | #include <QDeclarativeItem> |
|
7 | 7 | #else |
|
8 | 8 | #include <QtQuick/QQuickPaintedItem> |
@@ -10,7 +10,7 | |||
|
10 | 10 | #include <QColor> |
|
11 | 11 | #include "../src/chart.h" |
|
12 | 12 | |
|
13 | #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) | |
|
13 | #ifndef QTQUICK2 | |
|
14 | 14 | class DeclarativeChart : public QDeclarativeItem, public Chart |
|
15 | 15 | #else |
|
16 | 16 | class DeclarativeChart : public QQuickPaintedItem, public Chart |
@@ -20,13 +20,13 class DeclarativeChart : public QQuickPaintedItem, public Chart | |||
|
20 | 20 | Q_PROPERTY(QColor color READ color WRITE setColor) |
|
21 | 21 | |
|
22 | 22 | public: |
|
23 | #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) | |
|
23 | #ifndef QTQUICK2 | |
|
24 | 24 | DeclarativeChart(QDeclarativeItem *parent = 0); |
|
25 | 25 | #else |
|
26 | 26 | DeclarativeChart(QQuickItem *parent = 0); |
|
27 | 27 | #endif |
|
28 | 28 | |
|
29 | #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) | |
|
29 | #ifndef QTQUICK2 | |
|
30 | 30 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); |
|
31 | 31 | #else |
|
32 | 32 | void paint(QPainter *painter); |
General Comments 0
You need to be logged in to leave comments.
Login now