forked from qt-creator/qt-creator
QmlDesigner: Add support for requesting types of frames
Change-Id: I3262887682520f521e84eacc26a6708d3d09b233 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -54,6 +54,8 @@ public:
|
|||||||
void setValue(const QVariant &value, qreal frame);
|
void setValue(const QVariant &value, qreal frame);
|
||||||
QVariant value(qreal frame) const;
|
QVariant value(qreal frame) const;
|
||||||
|
|
||||||
|
TypeName valueType() const;
|
||||||
|
|
||||||
qreal currentFrame() const;
|
qreal currentFrame() const;
|
||||||
|
|
||||||
bool hasKeyframe(qreal frame);
|
bool hasKeyframe(qreal frame);
|
||||||
|
@@ -118,6 +118,16 @@ QVariant QmlTimelineFrames::value(qreal frame) const
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TypeName QmlTimelineFrames::valueType() const
|
||||||
|
{
|
||||||
|
const ModelNode targetNode = target();
|
||||||
|
|
||||||
|
if (targetNode.isValid() && targetNode.hasMetaInfo())
|
||||||
|
return targetNode.metaInfo().propertyTypeName(propertyName());
|
||||||
|
|
||||||
|
return TypeName();
|
||||||
|
}
|
||||||
|
|
||||||
bool QmlTimelineFrames::hasKeyframe(qreal frame)
|
bool QmlTimelineFrames::hasKeyframe(qreal frame)
|
||||||
{
|
{
|
||||||
for (const ModelNode &childNode : modelNode().defaultNodeListProperty().toModelNodeList()) {
|
for (const ModelNode &childNode : modelNode().defaultNodeListProperty().toModelNodeList()) {
|
||||||
|
Reference in New Issue
Block a user