QmlLivePreview: removing and inserting animations and transitions

Change-Id: Ic776f63f5d7925ac7dfd99be53c10b9af4cb9545
Reviewed-on: http://codereview.qt.nokia.com/75
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Christiaan Janssen
2011-05-24 11:40:17 +02:00
committed by Kai Koehne
parent 779fafcbfe
commit 3cf5379380
11 changed files with 112 additions and 22 deletions

View File

@@ -391,14 +391,20 @@ void Delta::insert(UiObjectMember *member, UiObjectMember *parentMember, const Q
+ QLatin1Char(':') + QString::number(startLine-importList.count());
foreach(DebugId debugId, debugReferences) {
if (debugId != -1) {
createObject(qmlText, debugId, importList, filename);
int order = 0;
// skip children which are not objects
foreach (const UiObjectMember *child, children(parentMember)) {
if (child == member) break;
if (child->kind == AST::Node::Kind_UiObjectDefinition)
order++;
}
createObject(qmlText, debugId, importList, filename, order);
}
}
newObjects += member;
}
}
void Delta::update(UiObjectMember* oldObject, const QmlJS::Document::Ptr& oldDoc,
UiObjectMember* newObject, const QmlJS::Document::Ptr& newDoc,
const QList<DebugId>& debugReferences)
@@ -567,7 +573,7 @@ Document::Ptr Delta::previousDocument() const
return m_previousDoc;
}
void Delta::createObject(const QString &, DebugId, const QStringList &, const QString&)
void Delta::createObject(const QString &, DebugId, const QStringList &, const QString&, int)
{}
void Delta::removeObject(int)
{}

View File

@@ -74,7 +74,7 @@ protected:
virtual void removeObject(int debugId);
virtual void reparentObject(int debugId, int newParent);
virtual void createObject(const QString &qmlText, DebugId ref,
const QStringList &importList, const QString &filename);
const QStringList &importList, const QString &filename, int order = 0);
virtual void notifyUnsyncronizableElementChange(AST::UiObjectMember *parent);
private: