1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
#ifndef GOVALUE_H
#define GOVALUE_H
// Unfortunatley we need access to private bits, because the
// whole dynamic meta-object concept is sadly being hidden
// away, and without it this package wouldn't exist.
#include <QtCore/private/qmetaobject_p.h>
#include <QQuickPaintedItem>
#include <QPainter>
#include "capi.h"
class GoValueMetaObject;
QMetaObject *metaObjectFor(GoTypeInfo *typeInfo);
class GoValue : public QObject
{
Q_OBJECT
public:
GoRef ref;
GoTypeInfo *typeInfo;
GoValue(GoRef ref, GoTypeInfo *typeInfo, QObject *parent);
virtual ~GoValue();
void activate(int propIndex);
private:
GoValueMetaObject *valueMeta;
};
class GoPaintedValue : public QQuickPaintedItem
{
Q_OBJECT
public:
GoRef ref;
GoTypeInfo *typeInfo;
GoPaintedValue(GoRef ref, GoTypeInfo *typeInfo, QObject *parent);
virtual ~GoPaintedValue();
void activate(int propIndex);
virtual void paint(QPainter *painter);
private:
GoValueMetaObject *valueMeta;
};
#endif // GOVALUE_H
// vim:ts=4:sw=4:et:ft=cpp
|