declarativechart.h
37 lines
| 790 B
| text/x-c
|
CLexer
/ qmlplugin / declarativechart.h
|
r1 | #ifndef DECLARATIVECHART_H | ||
#define DECLARATIVECHART_H | ||||
#include <QtCore/QtGlobal> | ||||
|
r3 | #ifndef QTQUICK2 | ||
|
r1 | #include <QDeclarativeItem> | ||
#else | ||||
#include <QtQuick/QQuickPaintedItem> | ||||
#endif | ||||
#include <QColor> | ||||
#include "../src/chart.h" | ||||
|
r3 | #ifndef QTQUICK2 | ||
|
r1 | class DeclarativeChart : public QDeclarativeItem, public Chart | ||
#else | ||||
class DeclarativeChart : public QQuickPaintedItem, public Chart | ||||
#endif | ||||
{ | ||||
Q_OBJECT | ||||
Q_PROPERTY(QColor color READ color WRITE setColor) | ||||
public: | ||||
|
r3 | #ifndef QTQUICK2 | ||
|
r1 | DeclarativeChart(QDeclarativeItem *parent = 0); | ||
#else | ||||
DeclarativeChart(QQuickItem *parent = 0); | ||||
#endif | ||||
|
r3 | #ifndef QTQUICK2 | ||
|
r1 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); | ||
#else | ||||
void paint(QPainter *painter); | ||||
#endif | ||||
}; | ||||
#endif // DECLARATIVECHART_H | ||||