core/gluonobject.h File Reference

#include "gluonobjectfactory.h"
#include "gluon_core_export.h"
#include <QtCore/QObject>
#include <QtCore/QSharedData>
#include <QtCore/QList>
#include <QtCore/QUrl>
#include <QtCore/QStringList>
#include <QtCore/QVariant>

Go to the source code of this file.

Classes

class  GluonCore::GluonObject
 Convenience-extended version of QObjects for use with Gluon. More...

Namespaces

namespace  GluonCore

Defines

#define GLUON_OBJECT(CLASSNAME)

Define Documentation

#define GLUON_OBJECT ( CLASSNAME   ) 
Value:
public:\
    virtual GluonCore::GluonObject* instantiate();\
    virtual GluonCore::GluonObject* fromVariant(const QVariant &wrappedObject);\
    virtual QVariant toVariant(GluonCore::GluonObject *wrapThis);\
    private:

Please insert this macro into the definition of your class when implementing a GluonObject subclass. The following is the code as found in GluonObject itself:

class GLUON_CORE_EXPORT GluonObject : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QString name READ name WRITE setName)
    GLUON_OBJECT(GluonCore::GluonObject);

    public:
        Q_INVOKABLE GluonObject(QObject * parent = 0);
Note:
Please make sure that you also add two Q_DECLARE_METATYPE declarations at the end of your header as seen below (also a sample from GluonObject):

Definition at line 55 of file gluonobject.h.

Generated on Mon Dec 27 13:13:40 2010 for Gluon by  doxygen 1.6.3