paysages3d/src/interface/modeler/FloatPropertyBind.h

35 lines
768 B
C
Raw Normal View History

#pragma once
#include "modeler_global.h"
#include "DefinitionWatcher.h"
2016-07-23 20:58:32 +00:00
#include <QObject>
namespace paysages {
namespace modeler {
/**
* Bind a float Qml property to a FloatNode.
*
* The FloatNode must exist through this object lifetime.
*/
class FloatPropertyBind : public QObject, public DefinitionWatcher {
Q_OBJECT
public:
FloatPropertyBind(MainModelerWindow *window, const string &object_name, const string &property_name,
FloatNode *node);
2016-01-18 21:22:56 +00:00
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff,
const DefinitionNode *parent) override;
private slots:
void propertyChanged();
private:
FloatNode *node;
string property;
QObject *item;
};
}
}