diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-02-16 21:28:33 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-02-16 21:28:33 +0800 |
commit | 702218008ee2b6d708d6b2821cdef80736bb3224 (patch) | |
tree | d55ff7ce88187082378e7d8e4c2f3aad14d23b4e /Godeps/_workspace/src/github.com/obscuren/qml/cpp/connector.h | |
parent | 202362d9258335c695eb75f55f4be74a50a1af33 (diff) | |
download | go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.tar go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.tar.gz go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.tar.bz2 go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.tar.lz go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.tar.xz go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.tar.zst go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.zip |
Add versioned dependencies from godep
Diffstat (limited to 'Godeps/_workspace/src/github.com/obscuren/qml/cpp/connector.h')
-rw-r--r-- | Godeps/_workspace/src/github.com/obscuren/qml/cpp/connector.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/obscuren/qml/cpp/connector.h b/Godeps/_workspace/src/github.com/obscuren/qml/cpp/connector.h new file mode 100644 index 000000000..82954927b --- /dev/null +++ b/Godeps/_workspace/src/github.com/obscuren/qml/cpp/connector.h @@ -0,0 +1,58 @@ +#ifndef CONNECTOR_H +#define CONNECTOR_H + +#include <QObject> + +#include <stdint.h> + +class Connector : public QObject +{ + Q_OBJECT + + public: + + Connector(QObject *sender, QMetaMethod method, QQmlEngine *engine, void *func, int argsLen) + : QObject(sender), engine(engine), method(method), func(func), argsLen(argsLen) {}; + + virtual ~Connector(); + + // MOC HACK: s/Connector::qt_metacall/Connector::standard_qt_metacall/ + int standard_qt_metacall(QMetaObject::Call c, int idx, void **a); + + public slots: + + void invoke(); + + private: + + QQmlEngine *engine; + QMetaMethod method; + void *func; + int argsLen; +}; + +class PlainObject : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QString plainType READ getPlainType) + Q_PROPERTY(void *plainAddr READ getPlainAddr) + + QString plainType; + void *plainAddr; + + public: + + PlainObject(QObject *parent = 0) + : QObject(parent) {}; + + PlainObject(const char *plainType, void *plainAddr, QObject *parent = 0) + : QObject(parent), plainType(plainType), plainAddr(plainAddr) {}; + + QString getPlainType() { return plainType; }; + void *getPlainAddr() { return plainAddr; }; +}; + +#endif // CONNECTOR_H + +// vim:ts=4:sw=4:et |