~vtuson/scopecreator/twitter-template

« back to all changes in this revision

Viewing changes to src/go/src/gopkg.in/qml.v0/cpp/govalue.h

  • Committer: Victor Palau
  • Date: 2015-03-11 14:24:42 UTC
  • Revision ID: vtuson@gmail.com-20150311142442-f2pxp111c8ynv232
public release

Show diffs side-by-side

added added

removed removed

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