propertyinfo.h Example File
sensor_explorer/import/propertyinfo.h
#ifndef QPROPERTYINFO_H
#define QPROPERTYINFO_H
#include <QtQml/QtQml>
#include <QtCore/QString>
class QPropertyInfo : public QObject
{
Q_OBJECT
Q_PROPERTY(QString name READ name CONSTANT)
Q_PROPERTY(QString typeName READ typeName CONSTANT)
Q_PROPERTY(QString value READ value NOTIFY valueChanged)
Q_PROPERTY(bool isWriteable READ isWriteable CONSTANT)
public:
QPropertyInfo(QObject* parent = 0);
QPropertyInfo(const QString& name, int index, bool writeable, const QString& typeName, const QString& value, QObject* parent=0);
QString name();
QString typeName();
QString value();
void setValue(const QString& value);
int index();
bool isWriteable();
Q_SIGNALS:
void valueChanged();
private:
int _index;
bool _isWriteable;
QString _name;
QString _typeName;
QString _value;
};
QML_DECLARE_TYPE(QPropertyInfo)
#endif // QPROPERTYINFO_H