summaryrefslogtreecommitdiff
path: root/src/tools/qmlpuppet
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@nokia.com>2011-06-22 18:17:06 +0200
committerThomas Hartmann <Thomas.Hartmann@nokia.com>2011-06-22 18:24:36 +0200
commit8fe33023297fca0d9181dd26c58c37ab1007650d (patch)
tree9fb409f209ca1507cd765a195a05a33f6af240b2 /src/tools/qmlpuppet
parent8ec524910a11b3b1c62d4df76e77c8859785be6a (diff)
downloadqt-creator-8fe33023297fca0d9181dd26c58c37ab1007650d.tar.gz
QmlDesigner.NodeInstances: Move qmlpuppet to share
Change-Id: Id50d8c6130e9d5169a74015bc24e84de64eabfa7 Reviewed-on: http://codereview.qt.nokia.com/634 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Diffstat (limited to 'src/tools/qmlpuppet')
-rw-r--r--src/tools/qmlpuppet/commands/changeauxiliarycommand.cpp65
-rw-r--r--src/tools/qmlpuppet/commands/changeauxiliarycommand.h64
-rw-r--r--src/tools/qmlpuppet/commands/changebindingscommand.cpp64
-rw-r--r--src/tools/qmlpuppet/commands/changebindingscommand.h64
-rw-r--r--src/tools/qmlpuppet/commands/changefileurlcommand.cpp65
-rw-r--r--src/tools/qmlpuppet/commands/changefileurlcommand.h62
-rw-r--r--src/tools/qmlpuppet/commands/changeidscommand.cpp66
-rw-r--r--src/tools/qmlpuppet/commands/changeidscommand.h65
-rw-r--r--src/tools/qmlpuppet/commands/changenodesourcecommand.cpp72
-rw-r--r--src/tools/qmlpuppet/commands/changenodesourcecommand.h61
-rw-r--r--src/tools/qmlpuppet/commands/changestatecommand.cpp66
-rw-r--r--src/tools/qmlpuppet/commands/changestatecommand.h64
-rw-r--r--src/tools/qmlpuppet/commands/changevaluescommand.cpp65
-rw-r--r--src/tools/qmlpuppet/commands/changevaluescommand.h64
-rw-r--r--src/tools/qmlpuppet/commands/childrenchangedcommand.cpp74
-rw-r--r--src/tools/qmlpuppet/commands/childrenchangedcommand.h64
-rw-r--r--src/tools/qmlpuppet/commands/clearscenecommand.cpp51
-rw-r--r--src/tools/qmlpuppet/commands/clearscenecommand.h53
-rw-r--r--src/tools/qmlpuppet/commands/commands.pri46
-rw-r--r--src/tools/qmlpuppet/commands/completecomponentcommand.cpp65
-rw-r--r--src/tools/qmlpuppet/commands/completecomponentcommand.h62
-rw-r--r--src/tools/qmlpuppet/commands/componentcompletedcommand.cpp66
-rw-r--r--src/tools/qmlpuppet/commands/componentcompletedcommand.h61
-rw-r--r--src/tools/qmlpuppet/commands/createinstancescommand.cpp67
-rw-r--r--src/tools/qmlpuppet/commands/createinstancescommand.h64
-rw-r--r--src/tools/qmlpuppet/commands/createscenecommand.cpp128
-rw-r--r--src/tools/qmlpuppet/commands/createscenecommand.h91
-rw-r--r--src/tools/qmlpuppet/commands/informationchangedcommand.cpp96
-rw-r--r--src/tools/qmlpuppet/commands/informationchangedcommand.h66
-rw-r--r--src/tools/qmlpuppet/commands/pixmapchangedcommand.cpp69
-rw-r--r--src/tools/qmlpuppet/commands/pixmapchangedcommand.h61
-rw-r--r--src/tools/qmlpuppet/commands/removeinstancescommand.cpp65
-rw-r--r--src/tools/qmlpuppet/commands/removeinstancescommand.h64
-rw-r--r--src/tools/qmlpuppet/commands/removepropertiescommand.cpp65
-rw-r--r--src/tools/qmlpuppet/commands/removepropertiescommand.h63
-rw-r--r--src/tools/qmlpuppet/commands/reparentinstancescommand.cpp66
-rw-r--r--src/tools/qmlpuppet/commands/reparentinstancescommand.h64
-rw-r--r--src/tools/qmlpuppet/commands/statepreviewimagechangedcommand.cpp64
-rw-r--r--src/tools/qmlpuppet/commands/statepreviewimagechangedcommand.h62
-rw-r--r--src/tools/qmlpuppet/commands/synchronizecommand.cpp68
-rw-r--r--src/tools/qmlpuppet/commands/synchronizecommand.h64
-rw-r--r--src/tools/qmlpuppet/commands/valueschangedcommand.cpp65
-rw-r--r--src/tools/qmlpuppet/commands/valueschangedcommand.h65
-rw-r--r--src/tools/qmlpuppet/container/addimportcontainer.cpp97
-rw-r--r--src/tools/qmlpuppet/container/addimportcontainer.h71
-rw-r--r--src/tools/qmlpuppet/container/container.pri21
-rw-r--r--src/tools/qmlpuppet/container/idcontainer.cpp73
-rw-r--r--src/tools/qmlpuppet/container/idcontainer.h66
-rw-r--r--src/tools/qmlpuppet/container/imagecontainer.cpp94
-rw-r--r--src/tools/qmlpuppet/container/imagecontainer.h63
-rw-r--r--src/tools/qmlpuppet/container/informationcontainer.cpp145
-rw-r--r--src/tools/qmlpuppet/container/informationcontainer.h80
-rw-r--r--src/tools/qmlpuppet/container/instancecontainer.cpp110
-rw-r--r--src/tools/qmlpuppet/container/instancecontainer.h81
-rw-r--r--src/tools/qmlpuppet/container/propertyabstractcontainer.cpp87
-rw-r--r--src/tools/qmlpuppet/container/propertyabstractcontainer.h72
-rw-r--r--src/tools/qmlpuppet/container/propertybindingcontainer.cpp96
-rw-r--r--src/tools/qmlpuppet/container/propertybindingcontainer.h70
-rw-r--r--src/tools/qmlpuppet/container/propertyvaluecontainer.cpp95
-rw-r--r--src/tools/qmlpuppet/container/propertyvaluecontainer.h72
-rw-r--r--src/tools/qmlpuppet/container/reparentcontainer.cpp104
-rw-r--r--src/tools/qmlpuppet/container/reparentcontainer.h70
-rw-r--r--src/tools/qmlpuppet/html/welcome.html16
-rw-r--r--src/tools/qmlpuppet/images/template_image.pngbin4652 -> 0 bytes
-rw-r--r--src/tools/qmlpuppet/images/webkit.pngbin37139 -> 0 bytes
-rw-r--r--src/tools/qmlpuppet/instances/behaviornodeinstance.cpp95
-rw-r--r--src/tools/qmlpuppet/instances/behaviornodeinstance.h65
-rw-r--r--src/tools/qmlpuppet/instances/childrenchangeeventfilter.cpp61
-rw-r--r--src/tools/qmlpuppet/instances/childrenchangeeventfilter.h59
-rw-r--r--src/tools/qmlpuppet/instances/componentnodeinstance.cpp98
-rw-r--r--src/tools/qmlpuppet/instances/componentnodeinstance.h65
-rw-r--r--src/tools/qmlpuppet/instances/dummycontextobject.cpp55
-rw-r--r--src/tools/qmlpuppet/instances/dummycontextobject.h65
-rw-r--r--src/tools/qmlpuppet/instances/dummynodeinstance.cpp112
-rw-r--r--src/tools/qmlpuppet/instances/dummynodeinstance.h75
-rw-r--r--src/tools/qmlpuppet/instances/instances.pri34
-rw-r--r--src/tools/qmlpuppet/instances/nodeinstanceclientproxy.cpp323
-rw-r--r--src/tools/qmlpuppet/instances/nodeinstanceclientproxy.h119
-rw-r--r--src/tools/qmlpuppet/instances/nodeinstancemetaobject.cpp142
-rw-r--r--src/tools/qmlpuppet/instances/nodeinstancemetaobject.h66
-rw-r--r--src/tools/qmlpuppet/instances/nodeinstanceserver.cpp1092
-rw-r--r--src/tools/qmlpuppet/instances/nodeinstanceserver.h227
-rw-r--r--src/tools/qmlpuppet/instances/nodeinstancesignalspy.cpp125
-rw-r--r--src/tools/qmlpuppet/instances/nodeinstancesignalspy.h70
-rw-r--r--src/tools/qmlpuppet/instances/objectnodeinstance.cpp1052
-rw-r--r--src/tools/qmlpuppet/instances/objectnodeinstance.h210
-rw-r--r--src/tools/qmlpuppet/instances/qmlpropertychangesnodeinstance.cpp647
-rw-r--r--src/tools/qmlpuppet/instances/qmlpropertychangesnodeinstance.h150
-rw-r--r--src/tools/qmlpuppet/instances/qmlstatenodeinstance.cpp141
-rw-r--r--src/tools/qmlpuppet/instances/qmlstatenodeinstance.h79
-rw-r--r--src/tools/qmlpuppet/instances/qmltransitionnodeinstance.cpp79
-rw-r--r--src/tools/qmlpuppet/instances/qmltransitionnodeinstance.h65
-rw-r--r--src/tools/qmlpuppet/instances/servernodeinstance.cpp617
-rw-r--r--src/tools/qmlpuppet/instances/servernodeinstance.h213
-rw-r--r--src/tools/qmlpuppet/interfaces/commondefines.h63
-rw-r--r--src/tools/qmlpuppet/interfaces/interfaces.pri7
-rw-r--r--src/tools/qmlpuppet/interfaces/nodeinstanceclientinterface.h65
-rw-r--r--src/tools/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp174
-rw-r--r--src/tools/qmlpuppet/interfaces/nodeinstanceserverinterface.h89
-rw-r--r--src/tools/qmlpuppet/qml2puppet/Info.plist.in29
-rw-r--r--src/tools/qmlpuppet/qml2puppet/instances/instances.pri15
-rw-r--r--src/tools/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp275
-rw-r--r--src/tools/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h94
-rw-r--r--src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp89
-rw-r--r--src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.h81
-rw-r--r--src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp197
-rw-r--r--src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.h114
-rw-r--r--src/tools/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.cpp132
-rw-r--r--src/tools/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.h93
-rw-r--r--src/tools/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.cpp186
-rw-r--r--src/tools/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.h91
-rw-r--r--src/tools/qmlpuppet/qml2puppet/instances/sgitemnodeinstance.cpp668
-rw-r--r--src/tools/qmlpuppet/qml2puppet/instances/sgitemnodeinstance.h170
-rw-r--r--src/tools/qmlpuppet/qml2puppet/main.cpp71
-rw-r--r--src/tools/qmlpuppet/qml2puppet/qml2puppet.pro41
-rw-r--r--src/tools/qmlpuppet/qmlpuppet.pro4
-rw-r--r--src/tools/qmlpuppet/qmlpuppet.qrc7
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/Info.plist.in29
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/graphicsobjectnodeinstance.cpp283
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/graphicsobjectnodeinstance.h99
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/instances.pri19
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/positionernodeinstance.cpp88
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/positionernodeinstance.h68
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/qmlgraphicsitemnodeinstance.cpp629
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/qmlgraphicsitemnodeinstance.h102
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/qt4informationnodeinstanceserver.cpp282
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/qt4informationnodeinstanceserver.h94
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceclientproxy.cpp90
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceclientproxy.h81
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceserver.cpp179
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceserver.h100
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/qt4previewnodeinstanceserver.cpp116
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/qt4previewnodeinstanceserver.h61
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/qt4rendernodeinstanceserver.cpp186
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/instances/qt4rendernodeinstanceserver.h59
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/main.cpp71
-rw-r--r--src/tools/qmlpuppet/qmlpuppet/qmlpuppet.pro34
137 files changed, 2 insertions, 16073 deletions
diff --git a/src/tools/qmlpuppet/commands/changeauxiliarycommand.cpp b/src/tools/qmlpuppet/commands/changeauxiliarycommand.cpp
deleted file mode 100644
index ce195f801a..0000000000
--- a/src/tools/qmlpuppet/commands/changeauxiliarycommand.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "changeauxiliarycommand.h"
-
-namespace QmlDesigner {
-
-ChangeAuxiliaryCommand::ChangeAuxiliaryCommand()
-{
-}
-
-ChangeAuxiliaryCommand::ChangeAuxiliaryCommand(const QVector<PropertyValueContainer> &auxiliaryChangeVector)
- : m_auxiliaryChangeVector (auxiliaryChangeVector)
-{
-}
-
-QVector<PropertyValueContainer> ChangeAuxiliaryCommand::auxiliaryChanges() const
-{
- return m_auxiliaryChangeVector;
-}
-
-QDataStream &operator<<(QDataStream &out, const ChangeAuxiliaryCommand &command)
-{
- out << command.auxiliaryChanges();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ChangeAuxiliaryCommand &command)
-{
- in >> command.m_auxiliaryChangeVector;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/changeauxiliarycommand.h b/src/tools/qmlpuppet/commands/changeauxiliarycommand.h
deleted file mode 100644
index a81ef92021..0000000000
--- a/src/tools/qmlpuppet/commands/changeauxiliarycommand.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef CHANGEAUXILIARYCOMMAND_H
-#define CHANGEAUXILIARYCOMMAND_H
-
-#include <QMetaType>
-#include <QVector>
-
-#include "propertyvaluecontainer.h"
-
-namespace QmlDesigner {
-
-class ChangeAuxiliaryCommand
-{
- friend QDataStream &operator>>(QDataStream &in, ChangeAuxiliaryCommand &command);
-
-public:
- ChangeAuxiliaryCommand();
- ChangeAuxiliaryCommand(const QVector<PropertyValueContainer> &auxiliaryChangeVector);
-
- QVector<PropertyValueContainer> auxiliaryChanges() const;
-
-private:
- QVector<PropertyValueContainer> m_auxiliaryChangeVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const ChangeAuxiliaryCommand &command);
-QDataStream &operator>>(QDataStream &in, ChangeAuxiliaryCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::ChangeAuxiliaryCommand)
-
-#endif // CHANGEAUXILIARYCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/changebindingscommand.cpp b/src/tools/qmlpuppet/commands/changebindingscommand.cpp
deleted file mode 100644
index c8ad839057..0000000000
--- a/src/tools/qmlpuppet/commands/changebindingscommand.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "changebindingscommand.h"
-
-namespace QmlDesigner {
-
-ChangeBindingsCommand::ChangeBindingsCommand()
-{
-}
-
-ChangeBindingsCommand::ChangeBindingsCommand(const QVector<PropertyBindingContainer> &bindingChangeVector)
- : m_bindingChangeVector (bindingChangeVector)
-{
-}
-
-QVector<PropertyBindingContainer> ChangeBindingsCommand::bindingChanges() const
-{
- return m_bindingChangeVector;
-}
-
-QDataStream &operator<<(QDataStream &out, const ChangeBindingsCommand &command)
-{
- out << command.bindingChanges();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ChangeBindingsCommand &command)
-{
- in >> command.m_bindingChangeVector;
-
- return in;
-}
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/changebindingscommand.h b/src/tools/qmlpuppet/commands/changebindingscommand.h
deleted file mode 100644
index 0174153dc5..0000000000
--- a/src/tools/qmlpuppet/commands/changebindingscommand.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef CHANGEBINDINGSCOMMAND_H
-#define CHANGEBINDINGSCOMMAND_H
-
-#include <QMetaType>
-#include <QVector>
-
-#include "propertybindingcontainer.h"
-
-namespace QmlDesigner {
-
-class ChangeBindingsCommand
-{
- friend QDataStream &operator>>(QDataStream &in, ChangeBindingsCommand &command);
-
-public:
- ChangeBindingsCommand();
- ChangeBindingsCommand(const QVector<PropertyBindingContainer> &bindingChangeVector);
-
- QVector<PropertyBindingContainer> bindingChanges() const;
-
-private:
- QVector<PropertyBindingContainer> m_bindingChangeVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const ChangeBindingsCommand &command);
-QDataStream &operator>>(QDataStream &in, ChangeBindingsCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::ChangeBindingsCommand)
-
-#endif // CHANGEBINDINGSCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/changefileurlcommand.cpp b/src/tools/qmlpuppet/commands/changefileurlcommand.cpp
deleted file mode 100644
index c5440ecd6c..0000000000
--- a/src/tools/qmlpuppet/commands/changefileurlcommand.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "changefileurlcommand.h"
-
-namespace QmlDesigner {
-
-ChangeFileUrlCommand::ChangeFileUrlCommand()
-{
-}
-
-ChangeFileUrlCommand::ChangeFileUrlCommand(const QUrl &fileUrl)
- : m_fileUrl(fileUrl)
-{
-}
-
-QUrl ChangeFileUrlCommand::fileUrl() const
-{
- return m_fileUrl;
-}
-
-QDataStream &operator<<(QDataStream &out, const ChangeFileUrlCommand &command)
-{
- out << command.fileUrl();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command)
-{
- in >> command.m_fileUrl;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/changefileurlcommand.h b/src/tools/qmlpuppet/commands/changefileurlcommand.h
deleted file mode 100644
index 221e7eff7d..0000000000
--- a/src/tools/qmlpuppet/commands/changefileurlcommand.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef CHANGEFILEURLCOMMAND_H
-#define CHANGEFILEURLCOMMAND_H
-
-#include <qmetatype.h>
-#include <QUrl>
-
-namespace QmlDesigner {
-
-class ChangeFileUrlCommand
-{
- friend QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command);
-public:
- ChangeFileUrlCommand();
- ChangeFileUrlCommand(const QUrl &fileUrl);
-
- QUrl fileUrl() const;
-
-private:
- QUrl m_fileUrl;
-};
-
-
-QDataStream &operator<<(QDataStream &out, const ChangeFileUrlCommand &command);
-QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::ChangeFileUrlCommand)
-
-#endif // CHANGEFILEURLCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/changeidscommand.cpp b/src/tools/qmlpuppet/commands/changeidscommand.cpp
deleted file mode 100644
index c6c4658e34..0000000000
--- a/src/tools/qmlpuppet/commands/changeidscommand.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** No Commercial Usage
-**
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
-
-#include "changeidscommand.h"
-
-namespace QmlDesigner {
-
-ChangeIdsCommand::ChangeIdsCommand()
-{
-}
-
-ChangeIdsCommand::ChangeIdsCommand(const QVector<IdContainer> &idVector)
- : m_idVector(idVector)
-{
-}
-
-QVector<IdContainer> ChangeIdsCommand::ids() const
-{
- return m_idVector;
-}
-
-QDataStream &operator<<(QDataStream &out, const ChangeIdsCommand &command)
-{
- out << command.ids();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command)
-{
- in >> command.m_idVector;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/changeidscommand.h b/src/tools/qmlpuppet/commands/changeidscommand.h
deleted file mode 100644
index 47e6f927f6..0000000000
--- a/src/tools/qmlpuppet/commands/changeidscommand.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** No Commercial Usage
-**
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
-
-#ifndef CHANGEIDSCOMMAND_H
-#define CHANGEIDSCOMMAND_H
-
-#include <QMetaType>
-#include <QVector>
-
-
-#include "idcontainer.h"
-
-namespace QmlDesigner {
-
-class ChangeIdsCommand
-{
- friend QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command);
-public:
- ChangeIdsCommand();
- ChangeIdsCommand(const QVector<IdContainer> &idVector);
-
- QVector<IdContainer> ids() const;
-
-private:
- QVector<IdContainer> m_idVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const ChangeIdsCommand &command);
-QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::ChangeIdsCommand)
-
-#endif // CHANGEIDSCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/changenodesourcecommand.cpp b/src/tools/qmlpuppet/commands/changenodesourcecommand.cpp
deleted file mode 100644
index 65b427c21e..0000000000
--- a/src/tools/qmlpuppet/commands/changenodesourcecommand.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
-
-#include "changenodesourcecommand.h"
-
-namespace QmlDesigner {
-
-ChangeNodeSourceCommand::ChangeNodeSourceCommand()
-{
-}
-
-ChangeNodeSourceCommand::ChangeNodeSourceCommand(qint32 newInstanceId, const QString &newNodeSource)
- : m_instanceId(newInstanceId), m_nodeSource(newNodeSource)
-{
-}
-
-qint32 ChangeNodeSourceCommand::instanceId() const
-{
- return m_instanceId;
-}
-
-QString ChangeNodeSourceCommand::nodeSource() const
-{
- return m_nodeSource;
-}
-
-QDataStream &operator<<(QDataStream &out, const ChangeNodeSourceCommand &command)
-{
- out << command.instanceId();
- out << command.nodeSource();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ChangeNodeSourceCommand &command)
-{
- in >> command.m_instanceId;
- in >> command.m_nodeSource;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/changenodesourcecommand.h b/src/tools/qmlpuppet/commands/changenodesourcecommand.h
deleted file mode 100644
index 9a04e4811f..0000000000
--- a/src/tools/qmlpuppet/commands/changenodesourcecommand.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
-
-#ifndef CHANGENODESOURCECOMMAND_H
-#define CHANGENODESOURCECOMMAND_H
-
-#include <QMetaType>
-
-namespace QmlDesigner {
-
-class ChangeNodeSourceCommand
-{
- friend QDataStream &operator>>(QDataStream &in, ChangeNodeSourceCommand &command);
-public:
- ChangeNodeSourceCommand();
- ChangeNodeSourceCommand(qint32 instanceId, const QString &nodeSource);
- qint32 instanceId() const;
- QString nodeSource() const;
-
-private:
- qint32 m_instanceId;
- QString m_nodeSource;
-};
-
-QDataStream &operator<<(QDataStream &out, const ChangeNodeSourceCommand &command);
-QDataStream &operator>>(QDataStream &in, ChangeNodeSourceCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::ChangeNodeSourceCommand)
-
-#endif // CHANGENODESOURCECOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/changestatecommand.cpp b/src/tools/qmlpuppet/commands/changestatecommand.cpp
deleted file mode 100644
index 18dbfb651a..0000000000
--- a/src/tools/qmlpuppet/commands/changestatecommand.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "changestatecommand.h"
-
-namespace QmlDesigner {
-
-ChangeStateCommand::ChangeStateCommand()
- : m_stateInstanceId(-1)
-{
-}
-
-ChangeStateCommand::ChangeStateCommand(qint32 stateInstanceId)
- : m_stateInstanceId(stateInstanceId)
-{
-}
-
-qint32 ChangeStateCommand::stateInstanceId() const
-{
- return m_stateInstanceId;
-}
-
-QDataStream &operator<<(QDataStream &out, const ChangeStateCommand &command)
-{
- out << command.stateInstanceId();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ChangeStateCommand &command)
-{
- in >> command.m_stateInstanceId;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/changestatecommand.h b/src/tools/qmlpuppet/commands/changestatecommand.h
deleted file mode 100644
index 1d3e1f61ea..0000000000
--- a/src/tools/qmlpuppet/commands/changestatecommand.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef CHANGESTATECOMMAND_H
-#define CHANGESTATECOMMAND_H
-
-#include <QMetaType>
-#include <QVector>
-
-#include "propertyvaluecontainer.h"
-
-namespace QmlDesigner {
-
-class ChangeStateCommand
-{
- friend QDataStream &operator>>(QDataStream &in, ChangeStateCommand &command);
-
-public:
- ChangeStateCommand();
- ChangeStateCommand(qint32 stateInstanceId);
-
- qint32 stateInstanceId() const;
-
-private:
- qint32 m_stateInstanceId;
-};
-
-QDataStream &operator<<(QDataStream &out, const ChangeStateCommand &command);
-QDataStream &operator>>(QDataStream &in, ChangeStateCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::ChangeStateCommand)
-
-#endif // CHANGESTATECOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/changevaluescommand.cpp b/src/tools/qmlpuppet/commands/changevaluescommand.cpp
deleted file mode 100644
index 614ced2186..0000000000
--- a/src/tools/qmlpuppet/commands/changevaluescommand.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "changevaluescommand.h"
-
-namespace QmlDesigner {
-
-ChangeValuesCommand::ChangeValuesCommand()
-{
-}
-
-ChangeValuesCommand::ChangeValuesCommand(const QVector<PropertyValueContainer> &valueChangeVector)
- : m_valueChangeVector (valueChangeVector)
-{
-}
-
-QVector<PropertyValueContainer> ChangeValuesCommand::valueChanges() const
-{
- return m_valueChangeVector;
-}
-
-QDataStream &operator<<(QDataStream &out, const ChangeValuesCommand &command)
-{
- out << command.valueChanges();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ChangeValuesCommand &command)
-{
- in >> command.m_valueChangeVector;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/changevaluescommand.h b/src/tools/qmlpuppet/commands/changevaluescommand.h
deleted file mode 100644
index 96ce13aa72..0000000000
--- a/src/tools/qmlpuppet/commands/changevaluescommand.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef CHANGEVALUESCOMMAND_H
-#define CHANGEVALUESCOMMAND_H
-
-#include <QMetaType>
-#include <QVector>
-
-#include "propertyvaluecontainer.h"
-
-namespace QmlDesigner {
-
-class ChangeValuesCommand
-{
- friend QDataStream &operator>>(QDataStream &in, ChangeValuesCommand &command);
-
-public:
- ChangeValuesCommand();
- ChangeValuesCommand(const QVector<PropertyValueContainer> &valueChangeVector);
-
- QVector<PropertyValueContainer> valueChanges() const;
-
-private:
- QVector<PropertyValueContainer> m_valueChangeVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const ChangeValuesCommand &command);
-QDataStream &operator>>(QDataStream &in, ChangeValuesCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::ChangeValuesCommand)
-
-#endif // CHANGEVALUESCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/childrenchangedcommand.cpp b/src/tools/qmlpuppet/commands/childrenchangedcommand.cpp
deleted file mode 100644
index 7559998c81..0000000000
--- a/src/tools/qmlpuppet/commands/childrenchangedcommand.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "childrenchangedcommand.h"
-
-namespace QmlDesigner {
-
-ChildrenChangedCommand::ChildrenChangedCommand()
- : m_parentInstanceId(-1)
-{
-}
-
-ChildrenChangedCommand::ChildrenChangedCommand(qint32 parentInstanceId, const QVector<qint32> &children)
- : m_parentInstanceId(parentInstanceId),
- m_childrenVector(children)
-{
-}
-
-QVector<qint32> ChildrenChangedCommand::childrenInstances() const
-{
- return m_childrenVector;
-}
-
-qint32 ChildrenChangedCommand::parentInstanceId() const
-{
- return m_parentInstanceId;
-}
-
-QDataStream &operator<<(QDataStream &out, const ChildrenChangedCommand &command)
-{
- out << command.parentInstanceId();
- out << command.childrenInstances();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ChildrenChangedCommand &command)
-{
- in >> command.m_parentInstanceId;
- in >> command.m_childrenVector;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/childrenchangedcommand.h b/src/tools/qmlpuppet/commands/childrenchangedcommand.h
deleted file mode 100644
index 8441c852a1..0000000000
--- a/src/tools/qmlpuppet/commands/childrenchangedcommand.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef CHILDRENCHANGEDCOMMAND_H
-#define CHILDRENCHANGEDCOMMAND_H
-
-#include <QMetaType>
-#include <QVector>
-
-
-namespace QmlDesigner {
-
-class ChildrenChangedCommand
-{
- friend QDataStream &operator>>(QDataStream &in, ChildrenChangedCommand &command);
-public:
- ChildrenChangedCommand();
- ChildrenChangedCommand(qint32 parentInstanceId, const QVector<qint32> &childrenInstances);
-
- QVector<qint32> childrenInstances() const;
- qint32 parentInstanceId() const;
-
-private:
- qint32 m_parentInstanceId;
- QVector<qint32> m_childrenVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const ChildrenChangedCommand &command);
-QDataStream &operator>>(QDataStream &in, ChildrenChangedCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::ChildrenChangedCommand)
-
-#endif // CHILDRENCHANGEDCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/clearscenecommand.cpp b/src/tools/qmlpuppet/commands/clearscenecommand.cpp
deleted file mode 100644
index 59685d5b9b..0000000000
--- a/src/tools/qmlpuppet/commands/clearscenecommand.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "clearscenecommand.h"
-
-namespace QmlDesigner {
-
-ClearSceneCommand::ClearSceneCommand()
-{
-}
-
-QDataStream &operator<<(QDataStream &out, const ClearSceneCommand &/*command*/)
-{
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ClearSceneCommand &/*command*/)
-{
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/clearscenecommand.h b/src/tools/qmlpuppet/commands/clearscenecommand.h
deleted file mode 100644
index 52dbe7e965..0000000000
--- a/src/tools/qmlpuppet/commands/clearscenecommand.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef CLEARSCENECOMMAND_H
-#define CLEARSCENECOMMAND_H
-
-#include <qmetatype.h>
-
-namespace QmlDesigner {
-
-class ClearSceneCommand
-{
-public:
- ClearSceneCommand();
-};
-
-QDataStream &operator<<(QDataStream &out, const ClearSceneCommand &command);
-QDataStream &operator>>(QDataStream &in, ClearSceneCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::ClearSceneCommand)
-
-#endif // CLEARSCENECOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/commands.pri b/src/tools/qmlpuppet/commands/commands.pri
deleted file mode 100644
index c6c9282d1b..0000000000
--- a/src/tools/qmlpuppet/commands/commands.pri
+++ /dev/null
@@ -1,46 +0,0 @@
-INCLUDEPATH += $$PWD/
-
-HEADERS += $$PWD/synchronizecommand.h
-HEADERS += $$PWD/componentcompletedcommand.h
-HEADERS += $$PWD/completecomponentcommand.h
-HEADERS += $$PWD/statepreviewimagechangedcommand.h
-HEADERS += $$PWD/childrenchangedcommand.h
-HEADERS += $$PWD/changebindingscommand.h
-HEADERS += $$PWD/changefileurlcommand.h
-HEADERS += $$PWD/changeidscommand.h
-HEADERS += $$PWD/changenodesourcecommand.h
-HEADERS += $$PWD/changestatecommand.h
-HEADERS += $$PWD/changevaluescommand.h
-HEADERS += $$PWD/createscenecommand.h
-HEADERS += $$PWD/clearscenecommand.h
-HEADERS += $$PWD/createinstancescommand.h
-HEADERS += $$PWD/informationchangedcommand.h
-HEADERS += $$PWD/pixmapchangedcommand.h
-HEADERS += $$PWD/removeinstancescommand.h
-HEADERS += $$PWD/removepropertiescommand.h
-HEADERS += $$PWD/reparentinstancescommand.h
-HEADERS += $$PWD/valueschangedcommand.h
-HEADERS += $$PWD/changeauxiliarycommand.h
-
-
-SOURCES += $$PWD/synchronizecommand.cpp
-SOURCES += $$PWD/componentcompletedcommand.cpp
-SOURCES += $$PWD/completecomponentcommand.cpp
-SOURCES += $$PWD/statepreviewimagechangedcommand.cpp
-SOURCES += $$PWD/childrenchangedcommand.cpp
-SOURCES += $$PWD/changebindingscommand.cpp
-SOURCES += $$PWD/changefileurlcommand.cpp
-SOURCES += $$PWD/changeidscommand.cpp
-SOURCES += $$PWD/changenodesourcecommand.cpp
-SOURCES += $$PWD/changestatecommand.cpp
-SOURCES += $$PWD/changevaluescommand.cpp
-SOURCES += $$PWD/informationchangedcommand.cpp
-SOURCES += $$PWD/removeinstancescommand.cpp
-SOURCES += $$PWD/removepropertiescommand.cpp
-SOURCES += $$PWD/reparentinstancescommand.cpp
-SOURCES += $$PWD/valueschangedcommand.cpp
-SOURCES += $$PWD/clearscenecommand.cpp
-SOURCES += $$PWD/createinstancescommand.cpp
-SOURCES += $$PWD/createscenecommand.cpp
-SOURCES += $$PWD/pixmapchangedcommand.cpp
-SOURCES += $$PWD/changeauxiliarycommand.cpp
diff --git a/src/tools/qmlpuppet/commands/completecomponentcommand.cpp b/src/tools/qmlpuppet/commands/completecomponentcommand.cpp
deleted file mode 100644
index 2f52f82d2b..0000000000
--- a/src/tools/qmlpuppet/commands/completecomponentcommand.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "completecomponentcommand.h"
-
-namespace QmlDesigner {
-
-CompleteComponentCommand::CompleteComponentCommand()
-{
-}
-
-CompleteComponentCommand::CompleteComponentCommand(const QVector<qint32> &container)
- : m_instanceVector(container)
-{
-}
-
-QVector<qint32> CompleteComponentCommand::instances() const
-{
- return m_instanceVector;
-}
-
-QDataStream &operator<<(QDataStream &out, const CompleteComponentCommand &command)
-{
- out << command.instances();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, CompleteComponentCommand &command)
-{
- in >> command.m_instanceVector;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/completecomponentcommand.h b/src/tools/qmlpuppet/commands/completecomponentcommand.h
deleted file mode 100644
index 04af8ae044..0000000000
--- a/src/tools/qmlpuppet/commands/completecomponentcommand.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef COMPLETECOMPONENT_H
-#define COMPLETECOMPONENT_H
-
-#include <QMetaType>
-#include <QVector>
-
-namespace QmlDesigner {
-
-class CompleteComponentCommand
-{
- friend QDataStream &operator>>(QDataStream &in, CompleteComponentCommand &command);
-
-public:
- CompleteComponentCommand();
- CompleteComponentCommand(const QVector<qint32> &container);
-
- QVector<qint32> instances() const;
-
-private:
- QVector<qint32> m_instanceVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const CompleteComponentCommand &command);
-QDataStream &operator>>(QDataStream &in, CompleteComponentCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::CompleteComponentCommand)
-
-#endif // COMPLETECOMPONENT_H
diff --git a/src/tools/qmlpuppet/commands/componentcompletedcommand.cpp b/src/tools/qmlpuppet/commands/componentcompletedcommand.cpp
deleted file mode 100644
index 0fb0be0f51..0000000000
--- a/src/tools/qmlpuppet/commands/componentcompletedcommand.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "componentcompletedcommand.h"
-
-namespace QmlDesigner {
-
-ComponentCompletedCommand::ComponentCompletedCommand()
-{
-}
-
-ComponentCompletedCommand::ComponentCompletedCommand(const QVector<qint32> &container)
- : m_instanceVector(container)
-{
-}
-
-QVector<qint32> ComponentCompletedCommand::instances() const
-{
- return m_instanceVector;
-}
-
-QDataStream &operator<<(QDataStream &out, const ComponentCompletedCommand &command)
-{
- out << command.instances();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ComponentCompletedCommand &command)
-{
- in >> command.m_instanceVector;
-
- return in;
-}
-
-} // namespace QmlDesigner
-
diff --git a/src/tools/qmlpuppet/commands/componentcompletedcommand.h b/src/tools/qmlpuppet/commands/componentcompletedcommand.h
deleted file mode 100644
index 95b67efc2f..0000000000
--- a/src/tools/qmlpuppet/commands/componentcompletedcommand.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef COMPONENTCOMPLETEDCOMMAND_H
-#define COMPONENTCOMPLETEDCOMMAND_H
-#include <QMetaType>
-#include <QVector>
-
-namespace QmlDesigner {
-
-class ComponentCompletedCommand
-{
- friend QDataStream &operator>>(QDataStream &in, ComponentCompletedCommand &command);
-
-public:
- ComponentCompletedCommand();
- ComponentCompletedCommand(const QVector<qint32> &container);
-
- QVector<qint32> instances() const;
-
-private:
- QVector<qint32> m_instanceVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const ComponentCompletedCommand &command);
-QDataStream &operator>>(QDataStream &in, ComponentCompletedCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::ComponentCompletedCommand)
-
-#endif // COMPONENTCOMPLETEDCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/createinstancescommand.cpp b/src/tools/qmlpuppet/commands/createinstancescommand.cpp
deleted file mode 100644
index dc2aed6260..0000000000
--- a/src/tools/qmlpuppet/commands/createinstancescommand.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "createinstancescommand.h"
-
-#include <QDataStream>
-
-namespace QmlDesigner {
-
-CreateInstancesCommand::CreateInstancesCommand()
-{
-}
-
-CreateInstancesCommand::CreateInstancesCommand(const QVector<InstanceContainer> &container)
- : m_instanceVector(container)
-{
-}
-
-QVector<InstanceContainer> CreateInstancesCommand::instances() const
-{
- return m_instanceVector;
-}
-
-QDataStream &operator<<(QDataStream &out, const CreateInstancesCommand &command)
-{
- out << command.instances();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, CreateInstancesCommand &command)
-{
- in >> command.m_instanceVector;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/createinstancescommand.h b/src/tools/qmlpuppet/commands/createinstancescommand.h
deleted file mode 100644
index 737c011157..0000000000
--- a/src/tools/qmlpuppet/commands/createinstancescommand.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef CREATEINSTANCESCOMMAND_H
-#define CREATEINSTANCESCOMMAND_H
-
-#include <QMetaType>
-#include <QVector>
-
-#include "instancecontainer.h"
-
-namespace QmlDesigner {
-
-class CreateInstancesCommand
-{
- friend QDataStream &operator>>(QDataStream &in, CreateInstancesCommand &command);
-
-public:
- CreateInstancesCommand();
- CreateInstancesCommand(const QVector<InstanceContainer> &container);
-
- QVector<InstanceContainer> instances() const;
-
-private:
- QVector<InstanceContainer> m_instanceVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const CreateInstancesCommand &command);
-QDataStream &operator>>(QDataStream &in, CreateInstancesCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::CreateInstancesCommand)
-
-#endif // CREATEINSTANCESCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/createscenecommand.cpp b/src/tools/qmlpuppet/commands/createscenecommand.cpp
deleted file mode 100644
index ed9a72f8b5..0000000000
--- a/src/tools/qmlpuppet/commands/createscenecommand.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "createscenecommand.h"
-
-namespace QmlDesigner {
-
-CreateSceneCommand::CreateSceneCommand()
-{
-}
-
-CreateSceneCommand::CreateSceneCommand(const QVector<InstanceContainer> &instanceContainer,
- const QVector<ReparentContainer> &reparentContainer,
- const QVector<IdContainer> &idVector,
- const QVector<PropertyValueContainer> &valueChangeVector,
- const QVector<PropertyBindingContainer> &bindingChangeVector,
- const QVector<PropertyValueContainer> &auxiliaryChangeVector,
- const QVector<AddImportContainer> &importVector,
- const QUrl &fileUrl)
- : m_instanceVector(instanceContainer),
- m_reparentInstanceVector(reparentContainer),
- m_idVector(idVector),
- m_valueChangeVector(valueChangeVector),
- m_bindingChangeVector(bindingChangeVector),
- m_auxiliaryChangeVector(auxiliaryChangeVector),
- m_importVector(importVector),
- m_fileUrl(fileUrl)
-{
-}
-
-QVector<InstanceContainer> CreateSceneCommand::instances() const
-{
- return m_instanceVector;
-}
-
-QVector<ReparentContainer> CreateSceneCommand::reparentInstances() const
-{
- return m_reparentInstanceVector;
-}
-
-QVector<IdContainer> CreateSceneCommand::ids() const
-{
- return m_idVector;
-}
-
-QVector<PropertyValueContainer> CreateSceneCommand::valueChanges() const
-{
- return m_valueChangeVector;
-}
-
-QVector<PropertyBindingContainer> CreateSceneCommand::bindingChanges() const
-{
- return m_bindingChangeVector;
-}
-
-QVector<PropertyValueContainer> CreateSceneCommand::auxiliaryChanges() const
-{
- return m_auxiliaryChangeVector;
-}
-
-QVector<AddImportContainer> CreateSceneCommand::imports() const
-{
- return m_importVector;
-}
-
-QUrl CreateSceneCommand::fileUrl() const
-{
- return m_fileUrl;
-}
-
-QDataStream &operator<<(QDataStream &out, const CreateSceneCommand &command)
-{
- out << command.instances();
- out << command.reparentInstances();
- out << command.ids();
- out << command.valueChanges();
- out << command.bindingChanges();
- out << command.auxiliaryChanges();
- out << command.imports();
- out << command.fileUrl();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, CreateSceneCommand &command)
-{
- in >> command.m_instanceVector;
- in >> command.m_reparentInstanceVector;
- in >> command.m_idVector;
- in >> command.m_valueChangeVector;
- in >> command.m_bindingChangeVector;
- in >> command.m_auxiliaryChangeVector;
- in >> command.m_importVector;
- in >> command.m_fileUrl;
-
- return in;
-}
-
-}
diff --git a/src/tools/qmlpuppet/commands/createscenecommand.h b/src/tools/qmlpuppet/commands/createscenecommand.h
deleted file mode 100644
index d37487c995..0000000000
--- a/src/tools/qmlpuppet/commands/createscenecommand.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef CREATESCENECOMMAND_H
-#define CREATESCENECOMMAND_H
-
-#include <qmetatype.h>
-#include <QUrl>
-#include <QVector>
-
-#include "instancecontainer.h"
-#include "reparentcontainer.h"
-#include "idcontainer.h"
-#include "propertyvaluecontainer.h"
-#include "propertybindingcontainer.h"
-#include "addimportcontainer.h"
-
-namespace QmlDesigner {
-
-class CreateSceneCommand
-{
- friend QDataStream &operator>>(QDataStream &in, CreateSceneCommand &command);
-
-public:
- CreateSceneCommand();
- CreateSceneCommand(const QVector<InstanceContainer> &instanceContainer,
- const QVector<ReparentContainer> &reparentContainer,
- const QVector<IdContainer> &idVector,
- const QVector<PropertyValueContainer> &valueChangeVector,
- const QVector<PropertyBindingContainer> &bindingChangeVector,
- const QVector<PropertyValueContainer> &auxiliaryChangeVector,
- const QVector<AddImportContainer> &importVector,
- const QUrl &fileUrl);
-
- QVector<InstanceContainer> instances() const;
- QVector<ReparentContainer> reparentInstances() const;
- QVector<IdContainer> ids() const;
- QVector<PropertyValueContainer> valueChanges() const;
- QVector<PropertyBindingContainer> bindingChanges() const;
- QVector<PropertyValueContainer> auxiliaryChanges() const;
- QVector<AddImportContainer> imports() const;
- QUrl fileUrl() const;
-
-private:
- QVector<InstanceContainer> m_instanceVector;
- QVector<ReparentContainer> m_reparentInstanceVector;
- QVector<IdContainer> m_idVector;
- QVector<PropertyValueContainer> m_valueChangeVector;
- QVector<PropertyBindingContainer> m_bindingChangeVector;
- QVector<PropertyValueContainer> m_auxiliaryChangeVector;
- QVector<AddImportContainer> m_importVector;
- QUrl m_fileUrl;
-};
-
-QDataStream &operator<<(QDataStream &out, const CreateSceneCommand &command);
-QDataStream &operator>>(QDataStream &in, CreateSceneCommand &command);
-
-}
-
-Q_DECLARE_METATYPE(QmlDesigner::CreateSceneCommand)
-
-#endif // CREATESCENECOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/informationchangedcommand.cpp b/src/tools/qmlpuppet/commands/informationchangedcommand.cpp
deleted file mode 100644
index 394a0731b6..0000000000
--- a/src/tools/qmlpuppet/commands/informationchangedcommand.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "informationchangedcommand.h"
-
-#include <QMetaType>
-
-#include "propertyvaluecontainer.h"
-
-namespace QmlDesigner {
-
-InformationChangedCommand::InformationChangedCommand()
-{
-}
-
-InformationChangedCommand::InformationChangedCommand(const QVector<InformationContainer> &informationVector)
- : m_informationVector(informationVector)
-{
-}
-
-QVector<InformationContainer> InformationChangedCommand::informations() const
-{
- return m_informationVector;
-}
-
-QDataStream &operator<<(QDataStream &out, const InformationChangedCommand &command)
-{
- out << command.informations();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, InformationChangedCommand &command)
-{
- in >> command.m_informationVector;
-
- return in;
-}
-
-QDebug operator<<(QDebug debug, const InformationChangedCommand &command)
-{
- debug << QLatin1String("InformationChangedCommand:\n");
- foreach (const InformationContainer &information, command.informations()) {
- if (information.nameAsString() == "Transform" ||
- information.nameAsString() == "IsMovable" ||
- information.nameAsString() == "BoundingRect") {
-
- debug << QLatin1String("instanceId: ");
- debug << information.instanceId();
- debug << QLatin1String("\n");
- debug << QLatin1String("name: ");
- debug << information.nameAsString();
- debug << QLatin1String("\n");
- debug << information.information();
- debug << QLatin1String("\n");
- debug << information.secondInformation();
- debug << QLatin1String("\n");
- debug << information.thirdInformation();
- debug << QLatin1String("\n");
- debug << QLatin1String("\n");
- }
- }
-
- return debug;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/informationchangedcommand.h b/src/tools/qmlpuppet/commands/informationchangedcommand.h
deleted file mode 100644
index fae3450963..0000000000
--- a/src/tools/qmlpuppet/commands/informationchangedcommand.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef INFORMATIONCHANGEDCOMMAND_H
-#define INFORMATIONCHANGEDCOMMAND_H
-
-#include <QMetaType>
-#include <QVector>
-#include <QDebug>
-
-#include "informationcontainer.h"
-
-namespace QmlDesigner {
-
-class InformationChangedCommand
-{
- friend QDataStream &operator>>(QDataStream &in, InformationChangedCommand &command);
-
-public:
- InformationChangedCommand();
- InformationChangedCommand(const QVector<InformationContainer> &informationVector);
-
- QVector<InformationContainer> informations() const;
-
-private:
- QVector<InformationContainer> m_informationVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const InformationChangedCommand &command);
-QDataStream &operator>>(QDataStream &in, InformationChangedCommand &command);
-QDebug operator<<(QDebug debug, const InformationChangedCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::InformationChangedCommand)
-
-#endif // INFORMATIONCHANGEDCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/pixmapchangedcommand.cpp b/src/tools/qmlpuppet/commands/pixmapchangedcommand.cpp
deleted file mode 100644
index e5d9b7ac4c..0000000000
--- a/src/tools/qmlpuppet/commands/pixmapchangedcommand.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "pixmapchangedcommand.h"
-
-#include <QtDebug>
-
-#include <QVarLengthArray>
-
-namespace QmlDesigner {
-
-PixmapChangedCommand::PixmapChangedCommand()
-{
-}
-
-PixmapChangedCommand::PixmapChangedCommand(const QVector<ImageContainer> &imageVector)
- : m_imageVector(imageVector)
-{
-}
-
-QVector<ImageContainer> PixmapChangedCommand::images() const
-{
- return m_imageVector;
-}
-
-QDataStream &operator<<(QDataStream &out, const PixmapChangedCommand &command)
-{
- out << command.images();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, PixmapChangedCommand &command)
-{
- in >> command.m_imageVector;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/pixmapchangedcommand.h b/src/tools/qmlpuppet/commands/pixmapchangedcommand.h
deleted file mode 100644
index 72ac843bee..0000000000
--- a/src/tools/qmlpuppet/commands/pixmapchangedcommand.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef PIXMAPCHANGEDCOMMAND_H
-#define PIXMAPCHANGEDCOMMAND_H
-
-#include <QMetaType>
-#include "imagecontainer.h"
-
-namespace QmlDesigner {
-
-class PixmapChangedCommand
-{
- friend QDataStream &operator>>(QDataStream &in, PixmapChangedCommand &command);
-public:
- PixmapChangedCommand();
- PixmapChangedCommand(const QVector<ImageContainer> &imageVector);
-
- QVector<ImageContainer> images() const;
-
-private:
- QVector<ImageContainer> m_imageVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const PixmapChangedCommand &command);
-QDataStream &operator>>(QDataStream &in, PixmapChangedCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::PixmapChangedCommand)
-
-#endif // PIXMAPCHANGEDCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/removeinstancescommand.cpp b/src/tools/qmlpuppet/commands/removeinstancescommand.cpp
deleted file mode 100644
index bc0b9a5508..0000000000
--- a/src/tools/qmlpuppet/commands/removeinstancescommand.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "removeinstancescommand.h"
-
-namespace QmlDesigner {
-
-RemoveInstancesCommand::RemoveInstancesCommand()
-{
-}
-
-RemoveInstancesCommand::RemoveInstancesCommand(const QVector<qint32> &idVector)
- : m_instanceIdVector(idVector)
-{
-}
-
-QVector<qint32> RemoveInstancesCommand::instanceIds() const
-{
- return m_instanceIdVector;
-}
-
-QDataStream &operator<<(QDataStream &out, const RemoveInstancesCommand &command)
-{
- out << command.instanceIds();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, RemoveInstancesCommand &command)
-{
- in >> command.m_instanceIdVector;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/removeinstancescommand.h b/src/tools/qmlpuppet/commands/removeinstancescommand.h
deleted file mode 100644
index 37477f8d32..0000000000
--- a/src/tools/qmlpuppet/commands/removeinstancescommand.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef REMOVEINSTANCESCOMMAND_H
-#define REMOVEINSTANCESCOMMAND_H
-
-#include <QMetaType>
-#include <QVector>
-
-#include "instancecontainer.h"
-
-namespace QmlDesigner {
-
-class RemoveInstancesCommand
-{
- friend QDataStream &operator>>(QDataStream &in, RemoveInstancesCommand &command);
-
-public:
- RemoveInstancesCommand();
- RemoveInstancesCommand(const QVector<qint32> &idVector);
-
- QVector<qint32> instanceIds() const;
-
-private:
- QVector<qint32> m_instanceIdVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const RemoveInstancesCommand &command);
-QDataStream &operator>>(QDataStream &in, RemoveInstancesCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::RemoveInstancesCommand)
-
-#endif // REMOVEINSTANCESCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/removepropertiescommand.cpp b/src/tools/qmlpuppet/commands/removepropertiescommand.cpp
deleted file mode 100644
index 1ea4650407..0000000000
--- a/src/tools/qmlpuppet/commands/removepropertiescommand.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "removepropertiescommand.h"
-
-namespace QmlDesigner {
-
-RemovePropertiesCommand::RemovePropertiesCommand()
-{
-}
-
-RemovePropertiesCommand::RemovePropertiesCommand(const QVector<PropertyAbstractContainer> &properties)
- : m_properties(properties)
-{
-}
-
-QVector<PropertyAbstractContainer> RemovePropertiesCommand::properties() const
-{
- return m_properties;
-}
-
-QDataStream &operator<<(QDataStream &out, const RemovePropertiesCommand &command)
-{
- out << command.properties();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, RemovePropertiesCommand &command)
-{
- in >> command.m_properties;
-
- return in;
-}
-
-}
diff --git a/src/tools/qmlpuppet/commands/removepropertiescommand.h b/src/tools/qmlpuppet/commands/removepropertiescommand.h
deleted file mode 100644
index f00ee1679d..0000000000
--- a/src/tools/qmlpuppet/commands/removepropertiescommand.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef REMOVEPROPERTIESCOMMAND_H
-#define REMOVEPROPERTIESCOMMAND_H
-
-#include <QMetaType>
-#include <QVector>
-
-#include "propertyabstractcontainer.h"
-
-namespace QmlDesigner {
-
-class RemovePropertiesCommand
-{
- friend QDataStream &operator>>(QDataStream &in, RemovePropertiesCommand &command);
-public:
- RemovePropertiesCommand();
- RemovePropertiesCommand(const QVector<PropertyAbstractContainer> &properties);
-
- QVector<PropertyAbstractContainer> properties() const;
-
-private:
- QVector<PropertyAbstractContainer> m_properties;
-};
-
-QDataStream &operator<<(QDataStream &out, const RemovePropertiesCommand &command);
-QDataStream &operator>>(QDataStream &in, RemovePropertiesCommand &command);
-
-}
-
-Q_DECLARE_METATYPE(QmlDesigner::RemovePropertiesCommand)
-
-#endif // REMOVEPROPERTIESCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/reparentinstancescommand.cpp b/src/tools/qmlpuppet/commands/reparentinstancescommand.cpp
deleted file mode 100644
index 4f5b6a381c..0000000000
--- a/src/tools/qmlpuppet/commands/reparentinstancescommand.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "reparentinstancescommand.h"
-
-namespace QmlDesigner {
-
-ReparentInstancesCommand::ReparentInstancesCommand()
-{
-}
-
-ReparentInstancesCommand::ReparentInstancesCommand(const QVector<ReparentContainer> &container)
- : m_reparentInstanceVector(container)
-{
-}
-
-QVector<ReparentContainer> ReparentInstancesCommand::reparentInstances() const
-{
- return m_reparentInstanceVector;
-}
-
-
-QDataStream &operator<<(QDataStream &out, const ReparentInstancesCommand &command)
-{
- out << command.reparentInstances();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ReparentInstancesCommand &command)
-{
- in >> command.m_reparentInstanceVector;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/reparentinstancescommand.h b/src/tools/qmlpuppet/commands/reparentinstancescommand.h
deleted file mode 100644
index 252db8334f..0000000000
--- a/src/tools/qmlpuppet/commands/reparentinstancescommand.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef REPARENTINSTANCESCOMMAND_H
-#define REPARENTINSTANCESCOMMAND_H
-
-#include <QMetaType>
-#include <QVector>
-
-#include "reparentcontainer.h"
-
-namespace QmlDesigner {
-
-class ReparentInstancesCommand
-{
- friend QDataStream &operator>>(QDataStream &in, ReparentInstancesCommand &command);
-
-public:
- ReparentInstancesCommand();
- ReparentInstancesCommand(const QVector<ReparentContainer> &container);
-
- QVector<ReparentContainer> reparentInstances() const;
-
-private:
- QVector<ReparentContainer> m_reparentInstanceVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const ReparentInstancesCommand &command);
-QDataStream &operator>>(QDataStream &in, ReparentInstancesCommand &command);
-
-} //
-
-Q_DECLARE_METATYPE(QmlDesigner::ReparentInstancesCommand)
-
-#endif // REPARENTINSTANCESCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/statepreviewimagechangedcommand.cpp b/src/tools/qmlpuppet/commands/statepreviewimagechangedcommand.cpp
deleted file mode 100644
index 4d6e37cf1d..0000000000
--- a/src/tools/qmlpuppet/commands/statepreviewimagechangedcommand.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "statepreviewimagechangedcommand.h"
-
-namespace QmlDesigner {
-
-StatePreviewImageChangedCommand::StatePreviewImageChangedCommand()
-{
-}
-
-StatePreviewImageChangedCommand::StatePreviewImageChangedCommand(const QVector<ImageContainer> &imageVector)
- : m_previewVector(imageVector)
-{
-}
-
-QVector<ImageContainer> StatePreviewImageChangedCommand::previews()const
-{
- return m_previewVector;
-}
-
-QDataStream &operator<<(QDataStream &out, const StatePreviewImageChangedCommand &command)
-{
- out << command.previews();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, StatePreviewImageChangedCommand &command)
-{
- in >> command.m_previewVector;
-
- return in;
-}
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/statepreviewimagechangedcommand.h b/src/tools/qmlpuppet/commands/statepreviewimagechangedcommand.h
deleted file mode 100644
index 63ec0c7e07..0000000000
--- a/src/tools/qmlpuppet/commands/statepreviewimagechangedcommand.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef STATEPREVIEWIMAGECHANGEDCOMMAND_H
-#define STATEPREVIEWIMAGECHANGEDCOMMAND_H
-
-#include <QMetaType>
-
-#include "imagecontainer.h"
-
-namespace QmlDesigner {
-
-class StatePreviewImageChangedCommand
-{
- friend QDataStream &operator>>(QDataStream &in, StatePreviewImageChangedCommand &command);
-public:
- StatePreviewImageChangedCommand();
- StatePreviewImageChangedCommand(const QVector<ImageContainer> &imageVector);
-
- QVector<ImageContainer> previews() const;
-
-private:
- QVector<ImageContainer> m_previewVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const StatePreviewImageChangedCommand &command);
-QDataStream &operator>>(QDataStream &in, StatePreviewImageChangedCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::StatePreviewImageChangedCommand)
-
-#endif // STATEPREVIEWIMAGECHANGEDCOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/synchronizecommand.cpp b/src/tools/qmlpuppet/commands/synchronizecommand.cpp
deleted file mode 100644
index d684c7e09d..0000000000
--- a/src/tools/qmlpuppet/commands/synchronizecommand.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "synchronizecommand.h"
-
-namespace QmlDesigner {
-
-SynchronizeCommand::SynchronizeCommand()
- : m_synchronizeId(-1)
-{
-}
-
-SynchronizeCommand::SynchronizeCommand(int synchronizeId)
- : m_synchronizeId (synchronizeId)
-{
-}
-
-int SynchronizeCommand::synchronizeId() const
-{
- return m_synchronizeId;
-}
-
-
-QDataStream &operator<<(QDataStream &out, const SynchronizeCommand &command)
-{
- out << command.synchronizeId();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, SynchronizeCommand &command)
-{
- in >> command.m_synchronizeId;
-
- return in;
-}
-
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/synchronizecommand.h b/src/tools/qmlpuppet/commands/synchronizecommand.h
deleted file mode 100644
index 5380677066..0000000000
--- a/src/tools/qmlpuppet/commands/synchronizecommand.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef SYNCHRONIZECOMMAND_H
-#define SYNCHRONIZECOMMAND_H
-
-#include <QMetaType>
-#include <QVector>
-
-#include "propertyvaluecontainer.h"
-
-namespace QmlDesigner {
-
-class SynchronizeCommand
-{
- friend QDataStream &operator>>(QDataStream &in, SynchronizeCommand &command);
-
-public:
- SynchronizeCommand();
- SynchronizeCommand(int synchronizeId);
-
- int synchronizeId() const;
-
-private:
- int m_synchronizeId;
-};
-
-QDataStream &operator<<(QDataStream &out, const SynchronizeCommand &command);
-QDataStream &operator>>(QDataStream &in, SynchronizeCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::SynchronizeCommand)
-
-#endif // SYNCHRONIZECOMMAND_H
diff --git a/src/tools/qmlpuppet/commands/valueschangedcommand.cpp b/src/tools/qmlpuppet/commands/valueschangedcommand.cpp
deleted file mode 100644
index 0e29b55f7c..0000000000
--- a/src/tools/qmlpuppet/commands/valueschangedcommand.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "valueschangedcommand.h"
-
-namespace QmlDesigner {
-
-ValuesChangedCommand::ValuesChangedCommand()
-{
-}
-
-ValuesChangedCommand::ValuesChangedCommand(const QVector<PropertyValueContainer> &valueChangeVector)
- : m_valueChangeVector (valueChangeVector)
-{
-}
-
-QVector<PropertyValueContainer> ValuesChangedCommand::valueChanges() const
-{
- return m_valueChangeVector;
-}
-
-QDataStream &operator<<(QDataStream &out, const ValuesChangedCommand &command)
-{
- out << command.valueChanges();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ValuesChangedCommand &command)
-{
- in >> command.m_valueChangeVector;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/commands/valueschangedcommand.h b/src/tools/qmlpuppet/commands/valueschangedcommand.h
deleted file mode 100644
index aba5bbd233..0000000000
--- a/src/tools/qmlpuppet/commands/valueschangedcommand.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef VALUESCHANGEDCOMMAND_H
-#define VALUESCHANGEDCOMMAND_H
-
-#include <QMetaType>
-#include <QVector>
-
-#include "propertyvaluecontainer.h"
-
-namespace QmlDesigner {
-
-class ValuesChangedCommand
-{
- friend QDataStream &operator>>(QDataStream &in, ValuesChangedCommand &command);
-
-public:
- ValuesChangedCommand();
- ValuesChangedCommand(const QVector<PropertyValueContainer> &valueChangeVector);
-
- QVector<PropertyValueContainer> valueChanges() const;
-
-private:
- QVector<PropertyValueContainer> m_valueChangeVector;
-};
-
-QDataStream &operator<<(QDataStream &out, const ValuesChangedCommand &command);
-QDataStream &operator>>(QDataStream &in, ValuesChangedCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::ValuesChangedCommand)
-
-
-#endif // VALUESCHANGEDCOMMAND_H
diff --git a/src/tools/qmlpuppet/container/addimportcontainer.cpp b/src/tools/qmlpuppet/container/addimportcontainer.cpp
deleted file mode 100644
index 178191b7d9..0000000000
--- a/src/tools/qmlpuppet/container/addimportcontainer.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "addimportcontainer.h"
-
-namespace QmlDesigner {
-
-AddImportContainer::AddImportContainer()
-{
-}
-
-AddImportContainer::AddImportContainer(const QUrl &url, const QString &fileName, const QString &version, const QString &alias, const QStringList &importPathList)
- : m_url(url),
- m_fileName(fileName),
- m_version(version),
- m_alias(alias),
- m_importPathList(importPathList)
-{
-}
-
-QUrl AddImportContainer::url() const
-{
- return m_url;
-}
-
-QString AddImportContainer::fileName() const
-{
- return m_fileName;
-}
-
-QString AddImportContainer::version() const
-{
- return m_version;
-}
-
-QString AddImportContainer::alias() const
-{
- return m_alias;
-}
-
-QStringList AddImportContainer::importPaths() const
-{
- return m_importPathList;
-}
-
-QDataStream &operator<<(QDataStream &out, const AddImportContainer &command)
-{
- out << command.url();
- out << command.fileName();
- out << command.version();
- out << command.alias();
- out << command.importPaths();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, AddImportContainer &command)
-{
- in >> command.m_url;
- in >> command.m_fileName;
- in >> command.m_version;
- in >> command.m_alias;
- in >> command.m_importPathList;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/container/addimportcontainer.h b/src/tools/qmlpuppet/container/addimportcontainer.h
deleted file mode 100644
index e039235347..0000000000
--- a/src/tools/qmlpuppet/container/addimportcontainer.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef ADDIMPORTCONTAINER_H
-#define ADDIMPORTCONTAINER_H
-
-#include <QMetaType>
-#include <QUrl>
-#include <QString>
-#include <QStringList>
-
-namespace QmlDesigner {
-
-class AddImportContainer
-{
- friend QDataStream &operator>>(QDataStream &in, AddImportContainer &command);
-public:
- AddImportContainer();
- AddImportContainer(const QUrl &url, const QString &fileName, const QString &version, const QString &alias, const QStringList &mportPathList);
-
- QUrl url() const;
- QString fileName() const;
- QString version() const;
- QString alias() const;
- QStringList importPaths() const;
-
-private:
- QUrl m_url;
- QString m_fileName;
- QString m_version;
- QString m_alias;
- QStringList m_importPathList;
-};
-
-QDataStream &operator<<(QDataStream &out, const AddImportContainer &command);
-QDataStream &operator>>(QDataStream &in, AddImportContainer &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::AddImportContainer)
-
-#endif // ADDIMPORTCONTAINER_H
diff --git a/src/tools/qmlpuppet/container/container.pri b/src/tools/qmlpuppet/container/container.pri
deleted file mode 100644
index 8889196708..0000000000
--- a/src/tools/qmlpuppet/container/container.pri
+++ /dev/null
@@ -1,21 +0,0 @@
-INCLUDEPATH += $$PWD/
-
-HEADERS += $$PWD/addimportcontainer.h
-HEADERS += $$PWD/imagecontainer.h
-HEADERS += $$PWD/idcontainer.h
-HEADERS += $$PWD/informationcontainer.h
-HEADERS += $$PWD/instancecontainer.h
-HEADERS += $$PWD/reparentcontainer.h
-HEADERS += $$PWD/propertyabstractcontainer.h
-HEADERS += $$PWD/propertybindingcontainer.h
-HEADERS += $$PWD/propertyvaluecontainer.h
-
-SOURCES += $$PWD/addimportcontainer.cpp
-SOURCES += $$PWD/imagecontainer.cpp
-SOURCES += $$PWD/idcontainer.cpp
-SOURCES += $$PWD/informationcontainer.cpp
-SOURCES += $$PWD/instancecontainer.cpp
-SOURCES += $$PWD/reparentcontainer.cpp
-SOURCES += $$PWD/propertyabstractcontainer.cpp
-SOURCES += $$PWD/propertybindingcontainer.cpp
-SOURCES += $$PWD/propertyvaluecontainer.cpp
diff --git a/src/tools/qmlpuppet/container/idcontainer.cpp b/src/tools/qmlpuppet/container/idcontainer.cpp
deleted file mode 100644
index 6c71251541..0000000000
--- a/src/tools/qmlpuppet/container/idcontainer.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "idcontainer.h"
-
-namespace QmlDesigner {
-
-IdContainer::IdContainer()
- : m_instanceId(-1)
-{
-}
-
-IdContainer::IdContainer(qint32 instanceId, const QString &id)
- : m_instanceId(instanceId),
- m_id(id)
-{
-}
-
-qint32 IdContainer::instanceId() const
-{
- return m_instanceId;
-}
-
-QString IdContainer::id() const
-{
- return m_id;
-}
-
-QDataStream &operator<<(QDataStream &out, const IdContainer &container)
-{
- out << container.instanceId();
- out << container.id();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, IdContainer &container)
-{
- in >> container.m_instanceId;
- in >> container.m_id;
-
- return in;
-}
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/container/idcontainer.h b/src/tools/qmlpuppet/container/idcontainer.h
deleted file mode 100644
index b37530f70a..0000000000
--- a/src/tools/qmlpuppet/container/idcontainer.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef IDCONTAINER_H
-#define IDCONTAINER_H
-
-#include <QDataStream>
-#include <qmetatype.h>
-#include <QString>
-
-
-namespace QmlDesigner {
-
-class IdContainer
-{
- friend QDataStream &operator>>(QDataStream &in, IdContainer &container);
-
-public:
- IdContainer();
- IdContainer(qint32 instanceId, const QString &id);
-
- qint32 instanceId() const;
- QString id() const;
-
-private:
- qint32 m_instanceId;
- QString m_id;
-};
-
-QDataStream &operator<<(QDataStream &out, const IdContainer &container);
-QDataStream &operator>>(QDataStream &in, IdContainer &container);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::IdContainer)
-
-#endif // IDCONTAINER_H
diff --git a/src/tools/qmlpuppet/container/imagecontainer.cpp b/src/tools/qmlpuppet/container/imagecontainer.cpp
deleted file mode 100644
index 10be2301c5..0000000000
--- a/src/tools/qmlpuppet/container/imagecontainer.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "imagecontainer.h"
-
-namespace QmlDesigner {
-
-ImageContainer::ImageContainer()
- : m_instanceId(-1)
-{
-}
-
-ImageContainer::ImageContainer(qint32 instanceId, const QImage &image)
- : m_image(image), m_instanceId(instanceId)
-{
-}
-
-qint32 ImageContainer::instanceId() const
-{
- return m_instanceId;
-}
-
-QImage ImageContainer::image() const
-{
- return m_image;
-}
-
-QDataStream &operator<<(QDataStream &out, const ImageContainer &container)
-{
- out << container.instanceId();
-
- const QImage image = container.image();
- const QByteArray data(reinterpret_cast<const char*>(image.constBits()), image.byteCount());
-
- out << qint32(image.bytesPerLine());
- out << image.size();
- out << qint32(image.format());
- out << qint32(image.byteCount());
- out.writeRawData(reinterpret_cast<const char*>(image.constBits()), image.byteCount());
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ImageContainer &container)
-{
-
- qint32 byteSize;
- qint32 bytesPerLine;
- QSize imageSize;
- qint32 format;
-
- in >> container.m_instanceId;
-
- in >> bytesPerLine;
- in >> imageSize;
- in >> format;
- in >> byteSize;
-
- container.m_image = QImage(imageSize, QImage::Format(format));
- in.readRawData(reinterpret_cast<char*>(container.m_image.bits()), byteSize);
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/container/imagecontainer.h b/src/tools/qmlpuppet/container/imagecontainer.h
deleted file mode 100644
index a9767032c6..0000000000
--- a/src/tools/qmlpuppet/container/imagecontainer.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef IMAGECONTAINER_H
-#define IMAGECONTAINER_H
-
-#include <QMetaType>
-#include <QImage>
-
-namespace QmlDesigner {
-
-class ImageContainer
-{
- friend QDataStream &operator>>(QDataStream &in, ImageContainer &container);
-public:
- ImageContainer();
- ImageContainer(qint32 instanceId, const QImage &image);
-
- qint32 instanceId() const;
- QImage image() const;
-
-private:
- QImage m_image;
- qint32 m_instanceId;
-};
-
-QDataStream &operator<<(QDataStream &out, const ImageContainer &container);
-QDataStream &operator>>(QDataStream &in, ImageContainer &container);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::ImageContainer)
-
-#endif // IMAGECONTAINER_H
diff --git a/src/tools/qmlpuppet/container/informationcontainer.cpp b/src/tools/qmlpuppet/container/informationcontainer.cpp
deleted file mode 100644
index 7339a207ba..0000000000
--- a/src/tools/qmlpuppet/container/informationcontainer.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "informationcontainer.h"
-
-namespace QmlDesigner {
-
-InformationContainer::InformationContainer()
- : m_instanceId(-1),
- m_name(NoName)
-{
-}
-
-InformationContainer::InformationContainer(qint32 instanceId,
- InformationName name,
- const QVariant &information,
- const QVariant &secondInformation,
- const QVariant &thirdInformation)
- : m_instanceId(instanceId),
- m_name(name),
- m_information(information),
- m_secondInformation(secondInformation),
- m_thirdInformation(thirdInformation)
-{
-}
-
-qint32 InformationContainer::instanceId() const
-{
- return m_instanceId;
-}
-
-InformationName InformationContainer::name() const
-{
- return InformationName(m_name);
-}
-
-QString InformationContainer::nameAsString() const
-{
- switch (name()) {
- case NoName:
- return QLatin1String("NoName");
- case Size:
- return QLatin1String("Size");
- case BoundingRect:
- return QLatin1String("BoundingRect");
- case Transform:
- return QLatin1String("Transform");
- case HasAnchor:
- return QLatin1String("HasAnchor");
- case Anchor:
- return QLatin1String("Anchor");
- case InstanceTypeForProperty:
- return QLatin1String("InstanceTypeForProperty");
- case PenWidth:
- return QLatin1String("PenWidth");
- case Position:
- return QLatin1String("Position");
- case IsInPositioner:
- return QLatin1String("IsInPositioner");
- case SceneTransform:
- return QLatin1String("SceneTransform");
- case IsResizable:
- return QLatin1String("IsResizable");
- case IsMovable:
- return QLatin1String("IsMovable");
- case IsAnchoredByChildren:
- return QLatin1String("IsAnchoredByChildren");
- case IsAnchoredBySibling:
- return QLatin1String("IsAnchoredBySibling");
- case HasContent:
- return QLatin1String("HasContent");
- case HasBindingForProperty:
- return QLatin1String("HasBindingForProperty");
- }
- return QLatin1String("Unknown");
-}
-
-QVariant InformationContainer::information() const
-{
- return m_information;
-}
-
-QVariant InformationContainer::secondInformation() const
-{
- return m_secondInformation;
-}
-
-QVariant InformationContainer::thirdInformation() const
-{
- return m_thirdInformation;
-}
-
-QDataStream &operator<<(QDataStream &out, const InformationContainer &container)
-{
- out << container.instanceId();//
- out << container.m_name;
- out << container.information();
- out << container.secondInformation();
- out << container.thirdInformation();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, InformationContainer &container)
-{
-
- in >> container.m_instanceId;
- in >> container.m_name;
- in >> container.m_information;
- in >> container.m_secondInformation;
- in >> container.m_thirdInformation;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/container/informationcontainer.h b/src/tools/qmlpuppet/container/informationcontainer.h
deleted file mode 100644
index 54bc98e823..0000000000
--- a/src/tools/qmlpuppet/container/informationcontainer.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef INFORMATIONCONTAINER_H
-#define INFORMATIONCONTAINER_H
-
-#include <QDataStream>
-#include <QMetaType>
-#include <QVariant>
-#include <QString>
-
-#include "commondefines.h"
-
-namespace QmlDesigner {
-
-class InformationContainer
-{
- friend QDataStream &operator>>(QDataStream &in, InformationContainer &container);
- friend QDataStream &operator<<(QDataStream &out, const InformationContainer &container);
-
-public:
- InformationContainer();
- InformationContainer(qint32 instanceId,
- InformationName name,
- const QVariant &information,
- const QVariant &secondInformation = QVariant(),
- const QVariant &thirdInformation = QVariant());
-
- qint32 instanceId() const;
- InformationName name() const;
- QString nameAsString() const;
- QVariant information() const;
- QVariant secondInformation() const;
- QVariant thirdInformation() const;
-
-private:
- qint32 m_instanceId;
- qint32 m_name;
- QVariant m_information;
- QVariant m_secondInformation;
- QVariant m_thirdInformation;
-};
-
-QDataStream &operator<<(QDataStream &out, const InformationContainer &container);
-QDataStream &operator>>(QDataStream &in, InformationContainer &container);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::InformationContainer)
-
-#endif // INFORMATIONCONTAINER_H
diff --git a/src/tools/qmlpuppet/container/instancecontainer.cpp b/src/tools/qmlpuppet/container/instancecontainer.cpp
deleted file mode 100644
index 57a1838576..0000000000
--- a/src/tools/qmlpuppet/container/instancecontainer.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "instancecontainer.h"
-
-namespace QmlDesigner {
-
-InstanceContainer::InstanceContainer()
- : m_instanceId(-1), m_majorNumber(-1), m_minorNumber(-1)
-{
-}
-
-InstanceContainer::InstanceContainer(qint32 instanceId, const QString &type, int majorNumber, int minorNumber, const QString &componentPath, const QString &nodeSource, NodeSourceType nodeSourceType)
- : m_instanceId(instanceId), m_type(type), m_majorNumber(majorNumber), m_minorNumber(minorNumber), m_componentPath(componentPath),
- m_nodeSource(nodeSource), m_nodeSourceType(nodeSourceType)
-{
- m_type.replace(QLatin1Char('.'), QLatin1Char('/'));
-}
-
-qint32 InstanceContainer::instanceId() const
-{
- return m_instanceId;
-}
-
-QString InstanceContainer::type() const
-{
- return m_type;
-}
-
-int InstanceContainer::majorNumber() const
-{
- return m_majorNumber;
-}
-
-int InstanceContainer::minorNumber() const
-{
- return m_minorNumber;
-}
-
-QString InstanceContainer::componentPath() const
-{
- return m_componentPath;
-}
-
-QString InstanceContainer::nodeSource() const
-{
- return m_nodeSource;
-}
-
-InstanceContainer::NodeSourceType InstanceContainer::nodeSourceType() const
-{
- return static_cast<NodeSourceType>(m_nodeSourceType);
-}
-
-QDataStream &operator<<(QDataStream &out, const InstanceContainer &container)
-{
- out << container.instanceId();
- out << container.type();
- out << container.majorNumber();
- out << container.minorNumber();
- out << container.componentPath();
- out << container.nodeSource();
- out << container.nodeSourceType();
-
- return out;
-}
-
-
-QDataStream &operator>>(QDataStream &in, InstanceContainer &container)
-{
- in >> container.m_instanceId;
- in >> container.m_type;
- in >> container.m_majorNumber;
- in >> container.m_minorNumber;
- in >> container.m_componentPath;
- in >> container.m_nodeSource;
- in >> container.m_nodeSourceType;
-
- return in;
-}
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/container/instancecontainer.h b/src/tools/qmlpuppet/container/instancecontainer.h
deleted file mode 100644
index b80bec5d39..0000000000
--- a/src/tools/qmlpuppet/container/instancecontainer.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef INSTANCECONTAINER_H
-#define INSTANCECONTAINER_H
-
-#include <qmetatype.h>
-#include <QString>
-
-namespace QmlDesigner {
-
-class InstanceContainer;
-
-QDataStream &operator<<(QDataStream &out, const InstanceContainer &container);
-QDataStream &operator>>(QDataStream &in, InstanceContainer &container);
-
-class InstanceContainer
-{
- friend QDataStream &operator>>(QDataStream &in, InstanceContainer &container);
-
-public:
- enum NodeSourceType {
- NoSource = 0,
- CustomParserSource = 1,
- ComponentSource = 2
- };
-
- InstanceContainer();
- InstanceContainer(qint32 instanceId, const QString &type, int majorNumber, int minorNumber, const QString &componentPath, const QString &nodeSource, NodeSourceType nodeSourceType);
-
- qint32 instanceId() const;
- QString type() const;
- int majorNumber() const;
- int minorNumber() const;
- QString componentPath() const;
- QString nodeSource() const;
- NodeSourceType nodeSourceType() const;
-
-private:
- qint32 m_instanceId;
- QString m_type;
- qint32 m_majorNumber;
- qint32 m_minorNumber;
- QString m_componentPath;
- QString m_nodeSource;
- qint32 m_nodeSourceType;
-};
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::InstanceContainer)
-#endif // INSTANCECONTAINER_H
diff --git a/src/tools/qmlpuppet/container/propertyabstractcontainer.cpp b/src/tools/qmlpuppet/container/propertyabstractcontainer.cpp
deleted file mode 100644
index 9ebf023089..0000000000
--- a/src/tools/qmlpuppet/container/propertyabstractcontainer.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "propertyabstractcontainer.h"
-
-namespace QmlDesigner {
-
-PropertyAbstractContainer::PropertyAbstractContainer()
- : m_instanceId(-1)
-{
-}
-
-PropertyAbstractContainer::PropertyAbstractContainer(qint32 instanceId, const QString &name, const QString &dynamicTypeName)
- : m_instanceId(instanceId),
- m_name(name),
- m_dynamicTypeName(dynamicTypeName)
-{
-}
-
-qint32 PropertyAbstractContainer::instanceId() const
-{
- return m_instanceId;
-}
-
-QString PropertyAbstractContainer::name() const
-{
- return m_name;
-}
-
-bool PropertyAbstractContainer::isDynamic() const
-{
- return !m_dynamicTypeName.isEmpty();
-}
-
-QString PropertyAbstractContainer::dynamicTypeName() const
-{
- return m_dynamicTypeName;
-}
-
-QDataStream &operator<<(QDataStream &out, const PropertyAbstractContainer &container)
-{
- out << container.instanceId();
- out << container.name();
- out << container.dynamicTypeName();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, PropertyAbstractContainer &container)
-{
- in >> container.m_instanceId;
- in >> container.m_name;
- in >> container.m_dynamicTypeName;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/container/propertyabstractcontainer.h b/src/tools/qmlpuppet/container/propertyabstractcontainer.h
deleted file mode 100644
index ab2cef8ce7..0000000000
--- a/src/tools/qmlpuppet/container/propertyabstractcontainer.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef PROPERTYABSTRACTCONTAINER_H
-#define PROPERTYABSTRACTCONTAINER_H
-
-#include <QDataStream>
-#include <qmetatype.h>
-#include <QString>
-
-
-namespace QmlDesigner {
-
-class PropertyAbstractContainer;
-
-QDataStream &operator<<(QDataStream &out, const PropertyAbstractContainer &container);
-QDataStream &operator>>(QDataStream &in, PropertyAbstractContainer &container);
-
-class PropertyAbstractContainer
-{
-
- friend QDataStream &operator<<(QDataStream &out, const PropertyAbstractContainer &container);
- friend QDataStream &operator>>(QDataStream &in, PropertyAbstractContainer &container);
-public:
- PropertyAbstractContainer();
- PropertyAbstractContainer(qint32 instanceId, const QString &name, const QString &dynamicTypeName);
-
- qint32 instanceId() const;
- QString name() const;
- bool isDynamic() const;
- QString dynamicTypeName() const;
-
-private:
- qint32 m_instanceId;
- QString m_name;
- QString m_dynamicTypeName;
-};
-
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::PropertyAbstractContainer)
-#endif // PROPERTYABSTRACTCONTAINER_H
diff --git a/src/tools/qmlpuppet/container/propertybindingcontainer.cpp b/src/tools/qmlpuppet/container/propertybindingcontainer.cpp
deleted file mode 100644
index 032a6e7351..0000000000
--- a/src/tools/qmlpuppet/container/propertybindingcontainer.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "propertybindingcontainer.h"
-
-
-namespace QmlDesigner {
-
-PropertyBindingContainer::PropertyBindingContainer()
- : m_instanceId(-1)
-{
-}
-
-PropertyBindingContainer::PropertyBindingContainer(qint32 instanceId, const QString &name, const QString &expression, const QString &dynamicTypeName)
- : m_instanceId(instanceId),
- m_name(name),
- m_expression(expression),
- m_dynamicTypeName(dynamicTypeName)
-{
-}
-
-qint32 PropertyBindingContainer::instanceId() const
-{
- return m_instanceId;
-}
-
-QString PropertyBindingContainer::name() const
-{
- return m_name;
-}
-
-QString PropertyBindingContainer::expression() const
-{
- return m_expression;
-}
-
-bool PropertyBindingContainer::isDynamic() const
-{
- return !m_dynamicTypeName.isEmpty();
-}
-
-QString PropertyBindingContainer::dynamicTypeName() const
-{
- return m_dynamicTypeName;
-}
-
-QDataStream &operator<<(QDataStream &out, const PropertyBindingContainer &container)
-{
- out << container.instanceId();
- out << container.name();
- out << container.expression();
- out << container.dynamicTypeName();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, PropertyBindingContainer &container)
-{
- in >> container.m_instanceId;
- in >> container.m_name;
- in >> container.m_expression;
- in >> container.m_dynamicTypeName;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/container/propertybindingcontainer.h b/src/tools/qmlpuppet/container/propertybindingcontainer.h
deleted file mode 100644
index aefe1ab54a..0000000000
--- a/src/tools/qmlpuppet/container/propertybindingcontainer.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef PROPERTYBINDINGCONTAINER_H
-#define PROPERTYBINDINGCONTAINER_H
-
-#include <QDataStream>
-#include <qmetatype.h>
-#include <QString>
-
-
-namespace QmlDesigner {
-
-class PropertyBindingContainer
-{
- friend QDataStream &operator>>(QDataStream &in, PropertyBindingContainer &container);
-
-public:
- PropertyBindingContainer();
- PropertyBindingContainer(qint32 instanceId, const QString &name, const QString &expression, const QString &dynamicTypeName);
-
- qint32 instanceId() const;
- QString name() const;
- QString expression() const;
- bool isDynamic() const;
- QString dynamicTypeName() const;
-
-private:
- qint32 m_instanceId;
- QString m_name;
- QString m_expression;
- QString m_dynamicTypeName;
-};
-
-QDataStream &operator<<(QDataStream &out, const PropertyBindingContainer &container);
-QDataStream &operator>>(QDataStream &in, PropertyBindingContainer &container);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::PropertyBindingContainer)
-#endif // PROPERTYBINDINGCONTAINER_H
diff --git a/src/tools/qmlpuppet/container/propertyvaluecontainer.cpp b/src/tools/qmlpuppet/container/propertyvaluecontainer.cpp
deleted file mode 100644
index 0840381ffe..0000000000
--- a/src/tools/qmlpuppet/container/propertyvaluecontainer.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "propertyvaluecontainer.h"
-
-namespace QmlDesigner {
-
-PropertyValueContainer::PropertyValueContainer()
- : m_instanceId(-1)
-{
-}
-
-PropertyValueContainer::PropertyValueContainer(qint32 instanceId, const QString &name, const QVariant &value, const QString &dynamicTypeName)
- : m_instanceId(instanceId),
- m_name(name),
- m_value(value),
- m_dynamicTypeName(dynamicTypeName)
-{
-}
-
-qint32 PropertyValueContainer::instanceId() const
-{
- return m_instanceId;
-}
-
-QString PropertyValueContainer::name() const
-{
- return m_name;
-}
-
-QVariant PropertyValueContainer::value() const
-{
- return m_value;
-}
-
-bool PropertyValueContainer::isDynamic() const
-{
- return !m_dynamicTypeName.isEmpty();
-}
-
-QString PropertyValueContainer::dynamicTypeName() const
-{
- return m_dynamicTypeName;
-}
-
-QDataStream &operator<<(QDataStream &out, const PropertyValueContainer &container)
-{
- out << container.instanceId();
- out << container.name();
- out << container.value();
- out << container.dynamicTypeName();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, PropertyValueContainer &container)
-{
- in >> container.m_instanceId;
- in >> container.m_name;
- in >> container.m_value;
- in >> container.m_dynamicTypeName;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/container/propertyvaluecontainer.h b/src/tools/qmlpuppet/container/propertyvaluecontainer.h
deleted file mode 100644
index 1a1ec3d395..0000000000
--- a/src/tools/qmlpuppet/container/propertyvaluecontainer.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef PROPERTYVALUECONTAINER_H
-#define PROPERTYVALUECONTAINER_H
-
-#include <QDataStream>
-#include <QMetaType>
-#include <QVariant>
-#include <QString>
-
-namespace QmlDesigner {
-
-
-class PropertyValueContainer
-{
- friend QDataStream &operator>>(QDataStream &in, PropertyValueContainer &container);
-
-public:
- PropertyValueContainer();
- PropertyValueContainer(qint32 instanceId, const QString &name, const QVariant &value, const QString &dynamicTypeName);
-
- qint32 instanceId() const;
- QString name() const;
- QVariant value() const;
- bool isDynamic() const;
- QString dynamicTypeName() const;
-
-private:
- qint32 m_instanceId;
- QString m_name;
- QVariant m_value;
- QString m_dynamicTypeName;
-};
-
-QDataStream &operator<<(QDataStream &out, const PropertyValueContainer &container);
-QDataStream &operator>>(QDataStream &in, PropertyValueContainer &container);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::PropertyValueContainer)
-
-#endif // PROPERTYVALUECONTAINER_H
diff --git a/src/tools/qmlpuppet/container/reparentcontainer.cpp b/src/tools/qmlpuppet/container/reparentcontainer.cpp
deleted file mode 100644
index cc5ec5e1a6..0000000000
--- a/src/tools/qmlpuppet/container/reparentcontainer.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "reparentcontainer.h"
-
-namespace QmlDesigner {
-
-ReparentContainer::ReparentContainer()
- : m_instanceId(-1),
- m_oldParentInstanceId(-1),
- m_newParentInstanceId(-1)
-{
-}
-
-ReparentContainer::ReparentContainer(qint32 instanceId,
- qint32 oldParentInstanceId,
- const QString &oldParentProperty,
- qint32 newParentInstanceId,
- const QString &newParentProperty)
- : m_instanceId(instanceId),
- m_oldParentInstanceId(oldParentInstanceId),
- m_oldParentProperty(oldParentProperty),
- m_newParentInstanceId(newParentInstanceId),
- m_newParentProperty(newParentProperty)
-{
-}
-
-qint32 ReparentContainer::instanceId() const
-{
- return m_instanceId;
-}
-
-qint32 ReparentContainer::oldParentInstanceId() const
-{
- return m_oldParentInstanceId;
-}
-
-QString ReparentContainer::oldParentProperty() const
-{
- return m_oldParentProperty;
-}
-
-qint32 ReparentContainer::newParentInstanceId() const
-{
- return m_newParentInstanceId;
-}
-
-QString ReparentContainer::newParentProperty() const
-{
- return m_newParentProperty;
-}
-
-QDataStream &operator<<(QDataStream &out, const ReparentContainer &container)
-{
- out << container.instanceId();
- out << container.oldParentInstanceId();
- out << container.oldParentProperty();
- out << container.newParentInstanceId();
- out << container.newParentProperty();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, ReparentContainer &container)
-{
- in >> container.m_instanceId;
- in >> container.m_oldParentInstanceId;
- in >> container.m_oldParentProperty;
- in >> container.m_newParentInstanceId;
- in >> container.m_newParentProperty;
-
- return in;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/container/reparentcontainer.h b/src/tools/qmlpuppet/container/reparentcontainer.h
deleted file mode 100644
index b6e130e9c9..0000000000
--- a/src/tools/qmlpuppet/container/reparentcontainer.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef REPARENTCONTAINER_H
-#define REPARENTCONTAINER_H
-
-#include <qmetatype.h>
-
-namespace QmlDesigner {
-
-class ReparentContainer
-{
- friend QDataStream &operator>>(QDataStream &in, ReparentContainer &container);
-public:
- ReparentContainer();
- ReparentContainer(qint32 instanceId,
- qint32 oldParentInstanceId,
- const QString &oldParentProperty,
- qint32 newParentInstanceId,
- const QString &newParentProperty);
-
- qint32 instanceId() const;
- qint32 oldParentInstanceId() const;
- QString oldParentProperty() const;
- qint32 newParentInstanceId() const;
- QString newParentProperty() const;
-
-private:
- qint32 m_instanceId;
- qint32 m_oldParentInstanceId;
- QString m_oldParentProperty;
- qint32 m_newParentInstanceId;
- QString m_newParentProperty;
-};
-
-QDataStream &operator<<(QDataStream &out, const ReparentContainer &container);
-QDataStream &operator>>(QDataStream &in, ReparentContainer &container);
-
-} // namespace QmlDesigner
-
-#endif // REPARENTCONTAINER_H
diff --git a/src/tools/qmlpuppet/html/welcome.html b/src/tools/qmlpuppet/html/welcome.html
deleted file mode 100644
index bde0a094e2..0000000000
--- a/src/tools/qmlpuppet/html/welcome.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Replace this HTML file</title>
- </head>
- <body>
- <br/>
- <div align="center">
- <a href="http://webkit.org/" style="text-decoration:none;"><img src="qrc:/qtquickplugin/images/webkit.png" alt="WebKit" border=0 /></a>
- <br/>
- Replace this HTML file with your own
- </div>
-
-</body>
-</html>
diff --git a/src/tools/qmlpuppet/images/template_image.png b/src/tools/qmlpuppet/images/template_image.png
deleted file mode 100644
index a62b3057bc..0000000000
--- a/src/tools/qmlpuppet/images/template_image.png
+++ /dev/null
Binary files differ
diff --git a/src/tools/qmlpuppet/images/webkit.png b/src/tools/qmlpuppet/images/webkit.png
deleted file mode 100644
index cf6d7f1c19..0000000000
--- a/src/tools/qmlpuppet/images/webkit.png
+++ /dev/null
Binary files differ
diff --git a/src/tools/qmlpuppet/instances/behaviornodeinstance.cpp b/src/tools/qmlpuppet/instances/behaviornodeinstance.cpp
deleted file mode 100644
index a89da2510b..0000000000
--- a/src/tools/qmlpuppet/instances/behaviornodeinstance.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "behaviornodeinstance.h"
-
-#include <private/qdeclarativebehavior_p.h>
-
-namespace QmlDesigner {
-namespace Internal {
-
-BehaviorNodeInstance::BehaviorNodeInstance(QObject *object)
- : ObjectNodeInstance(object),
- m_isEnabled(true)
-{
-}
-
-BehaviorNodeInstance::Pointer BehaviorNodeInstance::create(QObject *object)
-{
- QDeclarativeBehavior* behavior = qobject_cast<QDeclarativeBehavior*>(object);
-
- Q_ASSERT(behavior);
-
- Pointer instance(new BehaviorNodeInstance(behavior));
-
- instance->populateResetValueHash();
-
- behavior->setEnabled(false);
-
- return instance;
-}
-
-void BehaviorNodeInstance::setPropertyVariant(const QString &name, const QVariant &value)
-{
- if (name == "enabled")
- return;
-
- ObjectNodeInstance::setPropertyVariant(name, value);
-}
-
-void BehaviorNodeInstance::setPropertyBinding(const QString &name, const QString &expression)
-{
- if (name == "enabled")
- return;
-
- ObjectNodeInstance::setPropertyBinding(name, expression);
-}
-
-QVariant BehaviorNodeInstance::property(const QString &name) const
-{
- if (name == "enabled")
- return QVariant::fromValue(m_isEnabled);
-
- return ObjectNodeInstance::property(name);
-}
-
-void BehaviorNodeInstance::resetProperty(const QString &name)
-{
- if (name == "enabled")
- m_isEnabled = true;
-
- ObjectNodeInstance::resetProperty(name);
-}
-
-
-} // namespace Internal
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/instances/behaviornodeinstance.h b/src/tools/qmlpuppet/instances/behaviornodeinstance.h
deleted file mode 100644
index 3405c5d3a5..0000000000
--- a/src/tools/qmlpuppet/instances/behaviornodeinstance.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef BEHAVIORNODEINSTANCE_H
-#define BEHAVIORNODEINSTANCE_H
-
-#include "objectnodeinstance.h"
-
-namespace QmlDesigner {
-namespace Internal {
-
-class BehaviorNodeInstance : public ObjectNodeInstance
-{
-public:
- typedef QSharedPointer<BehaviorNodeInstance> Pointer;
- typedef QWeakPointer<BehaviorNodeInstance> WeakPointer;
-
- BehaviorNodeInstance(QObject *object);
-
- static Pointer create(QObject *objectToBeWrapped);
-
- void setPropertyVariant(const QString &name, const QVariant &value);
- void setPropertyBinding(const QString &name, const QString &expression);
-
-
- QVariant property(const QString &name) const;
- void resetProperty(const QString &name);
-
-private:
- bool m_isEnabled;
-};
-
-} // namespace Internal
-} // namespace QmlDesigner
-
-#endif // BEHAVIORNODEINSTANCE_H
diff --git a/src/tools/qmlpuppet/instances/childrenchangeeventfilter.cpp b/src/tools/qmlpuppet/instances/childrenchangeeventfilter.cpp
deleted file mode 100644
index 443228b636..0000000000
--- a/src/tools/qmlpuppet/instances/childrenchangeeventfilter.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "childrenchangeeventfilter.h"
-
-#include <QEvent>
-
-namespace QmlDesigner {
-namespace Internal {
-
-ChildrenChangeEventFilter::ChildrenChangeEventFilter(QObject *parent)
- : QObject(parent)
-{
-}
-
-
-bool ChildrenChangeEventFilter::eventFilter(QObject * /*object*/, QEvent *event)
-{
- switch (event->type()) {
- case QEvent::ChildAdded:
- case QEvent::ChildRemoved:
- {
- QChildEvent *childEvent = static_cast<QChildEvent*>(event);
- emit childrenChanged(childEvent->child()); break;
- }
- default: break;
- }
-
- return false;
-}
-} // namespace Internal
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/instances/childrenchangeeventfilter.h b/src/tools/qmlpuppet/instances/childrenchangeeventfilter.h
deleted file mode 100644
index 457e1d74d6..0000000000
--- a/src/tools/qmlpuppet/instances/childrenchangeeventfilter.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef CHILDRENCHANGEEVENTFILTER_H
-#define CHILDRENCHANGEEVENTFILTER_H
-
-#include <QObject>
-
-namespace QmlDesigner {
-namespace Internal {
-
-class ChildrenChangeEventFilter : public QObject
-{
- Q_OBJECT
-public:
- ChildrenChangeEventFilter(QObject *parent);
-
-
-signals:
- void childrenChanged(QObject *object);
-
-protected:
- bool eventFilter(QObject *object, QEvent *event);
-
-};
-
-} // namespace Internal
-} // namespace QmlDesigner
-
-#endif // CHILDRENCHANGEEVENTFILTER_H
diff --git a/src/tools/qmlpuppet/instances/componentnodeinstance.cpp b/src/tools/qmlpuppet/instances/componentnodeinstance.cpp
deleted file mode 100644
index 6fae496a17..0000000000
--- a/src/tools/qmlpuppet/instances/componentnodeinstance.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "componentnodeinstance.h"
-
-#include <QDeclarativeComponent>
-#include <QDeclarativeContext>
-
-#include <QtDebug>
-
-namespace QmlDesigner {
-namespace Internal {
-
-
-ComponentNodeInstance::ComponentNodeInstance(QDeclarativeComponent *component)
- : ObjectNodeInstance(component)
-{
-}
-
-QDeclarativeComponent *ComponentNodeInstance::component() const
-{
- Q_ASSERT(qobject_cast<QDeclarativeComponent*>(object()));
- return static_cast<QDeclarativeComponent*>(object());
-}
-
-ComponentNodeInstance::Pointer ComponentNodeInstance::create(QObject *object)
-{
- QDeclarativeComponent *component = qobject_cast<QDeclarativeComponent *>(object);
-
- Q_ASSERT(component);
-
- Pointer instance(new ComponentNodeInstance(component));
-
- instance->populateResetValueHash();
-
- return instance;
-}
-
-bool ComponentNodeInstance::hasContent() const
-{
- return true;
-}
-
-void ComponentNodeInstance::setNodeSource(const QString &source)
-{
- QByteArray importArray;
- foreach (const QString &import, nodeInstanceServer()->imports()) {
- importArray.append(import.toUtf8());
- }
-
- QByteArray data(source.toUtf8());
-
- data.prepend(importArray);
- data.append("\n");
-
- component()->setData(data, QUrl(nodeInstanceServer()->fileUrl().toString() +
- QLatin1Char('_')+ id()));
- setId(id());
-
- if (component()->isError()) {
- qDebug() << source;
- foreach(const QDeclarativeError &error, component()->errors())
- qDebug() << error;
- }
-
-}
-
-} // Internal
-} // QmlDesigner
diff --git a/src/tools/qmlpuppet/instances/componentnodeinstance.h b/src/tools/qmlpuppet/instances/componentnodeinstance.h
deleted file mode 100644
index 32c4b34414..0000000000
--- a/src/tools/qmlpuppet/instances/componentnodeinstance.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef COMPONENTNODEINSTANCE_H
-#define COMPONENTNODEINSTANCE_H
-
-#include "objectnodeinstance.h"
-
-QT_BEGIN_NAMESPACE
-class QDeclarativeComponent;
-QT_END_NAMESPACE
-
-namespace QmlDesigner {
-namespace Internal {
-
-class ComponentNodeInstance : public ObjectNodeInstance
-{
-public:
- typedef QSharedPointer<ComponentNodeInstance> Pointer;
- typedef QWeakPointer<ComponentNodeInstance> WeakPointer;
- ComponentNodeInstance(QDeclarativeComponent *component);
- static Pointer create(QObject *objectToBeWrapped);
-
- bool hasContent() const;
-
- void setNodeSource(const QString &source);
-
-private: //function
- QDeclarativeComponent *component() const;
-
-};
-
-} // Internal
-} // QmlDesigner
-
-#endif // COMPONENTNODEINSTANCE_H
diff --git a/src/tools/qmlpuppet/instances/dummycontextobject.cpp b/src/tools/qmlpuppet/instances/dummycontextobject.cpp
deleted file mode 100644
index feeb4bcfe2..0000000000
--- a/src/tools/qmlpuppet/instances/dummycontextobject.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "dummycontextobject.h"
-
-namespace QmlDesigner {
-
-DummyContextObject::DummyContextObject(QObject *parent) :
- QObject(parent)
-{
-}
-
-QObject *DummyContextObject::parentDummy() const
-{
- return m_dummyParent.data();
-}
-
-void DummyContextObject::setParentDummy(QObject *parentDummy)
-{
- if (m_dummyParent.data() != parentDummy) {
- m_dummyParent = parentDummy;
- emit parentDummyChanged();
- }
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/instances/dummycontextobject.h b/src/tools/qmlpuppet/instances/dummycontextobject.h
deleted file mode 100644
index 63843fd1ab..0000000000
--- a/src/tools/qmlpuppet/instances/dummycontextobject.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef DUMMYCONTEXTOBJECT_H
-#define DUMMYCONTEXTOBJECT_H
-
-#include <QObject>
-#include <QWeakPointer>
-#include <qdeclarative.h>
-
-namespace QmlDesigner {
-
-class DummyContextObject : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QObject * parent READ parentDummy WRITE setParentDummy NOTIFY parentDummyChanged DESIGNABLE false FINAL)
-
-public:
- explicit DummyContextObject(QObject *parent = 0);
-
- QObject *parentDummy() const;
- void setParentDummy(QObject *parentDummy);
-
-signals:
- void parentDummyChanged();
-
-private:
- Q_DISABLE_COPY(DummyContextObject)
- QWeakPointer<QObject> m_dummyParent;
-
-};
-
-} // namespace QmlDesigner
-
-QML_DECLARE_TYPE(QmlDesigner::DummyContextObject)
-#endif // DUMMYCONTEXTOBJECT_H
diff --git a/src/tools/qmlpuppet/instances/dummynodeinstance.cpp b/src/tools/qmlpuppet/instances/dummynodeinstance.cpp
deleted file mode 100644
index cf17278c25..0000000000
--- a/src/tools/qmlpuppet/instances/dummynodeinstance.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "dummynodeinstance.h"
-
-namespace QmlDesigner {
-namespace Internal {
-
-DummyNodeInstance::DummyNodeInstance()
- : ObjectNodeInstance(new QObject)
-{
-}
-
-DummyNodeInstance::Pointer DummyNodeInstance::create()
-{
- return Pointer(new DummyNodeInstance);
-}
-
-void DummyNodeInstance::paint(QPainter * /*painter*/)
-{
-}
-
-QRectF DummyNodeInstance::boundingRect() const
-{
- return QRectF();
-}
-
-QPointF DummyNodeInstance::position() const
-{
- return QPointF();
-}
-
-QSizeF DummyNodeInstance::size() const
-{
- return QSizeF();
-}
-
-QTransform DummyNodeInstance::transform() const
-{
- return QTransform();
-}
-
-double DummyNodeInstance::opacity() const
-{
- return 0.0;
-}
-
-void DummyNodeInstance::setPropertyVariant(const QString &/*name*/, const QVariant &/*value*/)
-{
-}
-
-void DummyNodeInstance::setPropertyBinding(const QString &/*name*/, const QString &/*expression*/)
-{
-
-}
-
-void DummyNodeInstance::setId(const QString &/*id*/)
-{
-
-}
-
-QVariant DummyNodeInstance::property(const QString &/*name*/) const
-{
- return QVariant();
-}
-
-QStringList DummyNodeInstance::properties()
-{
- return QStringList();
-}
-
-QStringList DummyNodeInstance::localProperties()
-{
- return QStringList();
-}
-
-void DummyNodeInstance::initializePropertyWatcher(const ObjectNodeInstance::Pointer &/*objectNodeInstance*/)
-{
-
-}
-
-} // namespace Internal
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/instances/dummynodeinstance.h b/src/tools/qmlpuppet/instances/dummynodeinstance.h
deleted file mode 100644
index 424aecd3d4..0000000000
--- a/src/tools/qmlpuppet/instances/dummynodeinstance.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef DUMMYNODEINSTANCE_H
-#define DUMMYNODEINSTANCE_H
-
-#include <QWeakPointer>
-
-#include "objectnodeinstance.h"
-
-namespace QmlDesigner {
-namespace Internal {
-
-class DummyNodeInstance : public ObjectNodeInstance
-{
-public:
- typedef QSharedPointer<DummyNodeInstance> Pointer;
- typedef QWeakPointer<DummyNodeInstance> WeakPointer;
-
- static Pointer create();
-
- void paint(QPainter *painter);
-
- QRectF boundingRect() const;
- QPointF position() const;
- QSizeF size() const;
- QTransform transform() const;
- double opacity() const;
-
- void setPropertyVariant(const QString &name, const QVariant &value);
- void setPropertyBinding(const QString &name, const QString &expression);
- void setId(const QString &id);
- QVariant property(const QString &name) const;
- QStringList properties();
- QStringList localProperties();
-
- void initializePropertyWatcher(const ObjectNodeInstance::Pointer &objectNodeInstance);
-
-protected:
- DummyNodeInstance();
-
-};
-
-}
-}
-#endif // DUMMYNODEINSTANCE_H
diff --git a/src/tools/qmlpuppet/instances/instances.pri b/src/tools/qmlpuppet/instances/instances.pri
deleted file mode 100644
index af88d6bd73..0000000000
--- a/src/tools/qmlpuppet/instances/instances.pri
+++ /dev/null
@@ -1,34 +0,0 @@
-INCLUDEPATH += $$PWD/
-
-HEADERS += $$PWD/behaviornodeinstance.h
-
-HEADERS += $$PWD/dummycontextobject.h
-
-HEADERS += $$PWD/childrenchangeeventfilter.h
-HEADERS += $$PWD/componentnodeinstance.h
-HEADERS += $$PWD/dummynodeinstance.h
-HEADERS += $$PWD/nodeinstanceclientproxy.h
-HEADERS += $$PWD/nodeinstancemetaobject.h
-HEADERS += $$PWD/nodeinstanceserver.h
-HEADERS += $$PWD/nodeinstancesignalspy.h
-HEADERS += $$PWD/objectnodeinstance.h
-HEADERS += $$PWD/qmlpropertychangesnodeinstance.h
-HEADERS += $$PWD/qmlstatenodeinstance.h
-HEADERS += $$PWD/qmltransitionnodeinstance.h
-HEADERS += $$PWD/servernodeinstance.h
-
-
-SOURCES += $$PWD/behaviornodeinstance.cpp
-SOURCES += $$PWD/dummycontextobject.cpp
-SOURCES += $$PWD/childrenchangeeventfilter.cpp
-SOURCES += $$PWD/componentnodeinstance.cpp
-SOURCES += $$PWD/dummynodeinstance.cpp
-SOURCES += $$PWD/nodeinstanceclientproxy.cpp
-SOURCES += $$PWD/nodeinstancemetaobject.cpp
-SOURCES += $$PWD/nodeinstanceserver.cpp
-SOURCES += $$PWD/nodeinstancesignalspy.cpp
-SOURCES += $$PWD/objectnodeinstance.cpp
-SOURCES += $$PWD/qmlpropertychangesnodeinstance.cpp
-SOURCES += $$PWD/qmlstatenodeinstance.cpp
-SOURCES += $$PWD/qmltransitionnodeinstance.cpp
-SOURCES += $$PWD/servernodeinstance.cpp
diff --git a/src/tools/qmlpuppet/instances/nodeinstanceclientproxy.cpp b/src/tools/qmlpuppet/instances/nodeinstanceclientproxy.cpp
deleted file mode 100644
index ad10cdc57c..0000000000
--- a/src/tools/qmlpuppet/instances/nodeinstanceclientproxy.cpp
+++ /dev/null
@@ -1,323 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "nodeinstanceclientproxy.h"
-
-#include <QLocalSocket>
-#include <QVariant>
-#include <QCoreApplication>
-#include <QStringList>
-
-#include "nodeinstanceserverinterface.h"
-
-#include "propertyabstractcontainer.h"
-#include "propertyvaluecontainer.h"
-#include "propertybindingcontainer.h"
-#include "instancecontainer.h"
-#include "createinstancescommand.h"
-#include "createscenecommand.h"
-#include "changevaluescommand.h"
-#include "changebindingscommand.h"
-#include "changeauxiliarycommand.h"
-#include "changefileurlcommand.h"
-#include "removeinstancescommand.h"
-#include "clearscenecommand.h"
-#include "removepropertiescommand.h"
-#include "reparentinstancescommand.h"
-#include "changeidscommand.h"
-#include "changestatecommand.h"
-#include "completecomponentcommand.h"
-#include "synchronizecommand.h"
-
-#include "informationchangedcommand.h"
-#include "pixmapchangedcommand.h"
-#include "valueschangedcommand.h"
-#include "childrenchangedcommand.h"
-#include "imagecontainer.h"
-#include "statepreviewimagechangedcommand.h"
-#include "componentcompletedcommand.h"
-#include "changenodesourcecommand.h"
-
-namespace QmlDesigner {
-
-NodeInstanceClientProxy::NodeInstanceClientProxy(QObject *parent)
- : QObject(parent),
- m_nodeInstanceServer(0),
- m_blockSize(0),
- m_writeCommandCounter(0),
- m_lastReadCommandCounter(0),
- m_synchronizeId(-1)
-{
-}
-
-void NodeInstanceClientProxy::initializeSocket()
-{
- m_socket = new QLocalSocket(this);
- connect(m_socket, SIGNAL(readyRead()), this, SLOT(readDataStream()));
- connect(m_socket, SIGNAL(error(QLocalSocket::LocalSocketError)), QCoreApplication::instance(), SLOT(quit()));
- connect(m_socket, SIGNAL(disconnected()), QCoreApplication::instance(), SLOT(quit()));
- m_socket->connectToServer(QCoreApplication::arguments().at(1), QIODevice::ReadWrite | QIODevice::Unbuffered);
- m_socket->waitForConnected(-1);
-}
-
-void NodeInstanceClientProxy::writeCommand(const QVariant &command)
-{
- QByteArray block;
- QDataStream out(&block, QIODevice::WriteOnly);
- out << quint32(0);
- out << quint32(m_writeCommandCounter);
- m_writeCommandCounter++;
- out << command;
- out.device()->seek(0);
- out << quint32(block.size() - sizeof(quint32));
-
- m_socket->write(block);
-}
-
-void NodeInstanceClientProxy::informationChanged(const InformationChangedCommand &command)
-{
- writeCommand(QVariant::fromValue(command));
-}
-
-void NodeInstanceClientProxy::valuesChanged(const ValuesChangedCommand &command)
-{
- writeCommand(QVariant::fromValue(command));
-}
-
-void NodeInstanceClientProxy::pixmapChanged(const PixmapChangedCommand &command)
-{
- writeCommand(QVariant::fromValue(command));
-}
-
-void NodeInstanceClientProxy::childrenChanged(const ChildrenChangedCommand &command)
-{
- writeCommand(QVariant::fromValue(command));
-}
-
-void NodeInstanceClientProxy::statePreviewImagesChanged(const StatePreviewImageChangedCommand &command)
-{
- writeCommand(QVariant::fromValue(command));
-}
-
-void NodeInstanceClientProxy::componentCompleted(const ComponentCompletedCommand &command)
-{
- writeCommand(QVariant::fromValue(command));
-}
-
-void NodeInstanceClientProxy::flush()
-{
-}
-
-void NodeInstanceClientProxy::synchronizeWithClientProcess()
-{
- if (m_synchronizeId >= 0) {
- SynchronizeCommand synchronizeCommand(m_synchronizeId);
- writeCommand(QVariant::fromValue(synchronizeCommand));
- }
-}
-
-qint64 NodeInstanceClientProxy::bytesToWrite() const
-{
- return m_socket->bytesToWrite();
-}
-
-void NodeInstanceClientProxy::readDataStream()
-{
- QList<QVariant> commandList;
-
- while (!m_socket->atEnd()) {
- if (m_socket->bytesAvailable() < int(sizeof(quint32)))
- break;
-
- QDataStream in(m_socket);
-
- if (m_blockSize == 0) {
- in >> m_blockSize;
- }
-
- if (m_socket->bytesAvailable() < m_blockSize)
- break;
-
- quint32 commandCounter;
- in >> commandCounter;
- bool commandLost = !((m_lastReadCommandCounter == 0 && commandCounter == 0) || (m_lastReadCommandCounter + 1 == commandCounter));
- if (commandLost)
- qDebug() << "client command lost: " << m_lastReadCommandCounter << commandCounter;
- m_lastReadCommandCounter = commandCounter;
-
- QVariant command;
- in >> command;
- m_blockSize = 0;
-
- Q_ASSERT(in.status() == QDataStream::Ok);
-
- commandList.append(command);
- }
-
- foreach (const QVariant &command, commandList) {
- dispatchCommand(command);
- }
-}
-
-NodeInstanceServerInterface *NodeInstanceClientProxy::nodeInstanceServer() const
-{
- return m_nodeInstanceServer;
-}
-
-void NodeInstanceClientProxy::setNodeInstanceServer(NodeInstanceServerInterface *nodeInstanceServer)
-{
- m_nodeInstanceServer = nodeInstanceServer;
-}
-
-void NodeInstanceClientProxy::createInstances(const CreateInstancesCommand &command)
-{
- nodeInstanceServer()->createInstances(command);
-}
-
-void NodeInstanceClientProxy::changeFileUrl(const ChangeFileUrlCommand &command)
-{
- nodeInstanceServer()->changeFileUrl(command);
-}
-
-void NodeInstanceClientProxy::createScene(const CreateSceneCommand &command)
-{
- nodeInstanceServer()->createScene(command);
-}
-
-void NodeInstanceClientProxy::clearScene(const ClearSceneCommand &command)
-{
- nodeInstanceServer()->clearScene(command);
-}
-
-void NodeInstanceClientProxy::removeInstances(const RemoveInstancesCommand &command)
-{
- nodeInstanceServer()->removeInstances(command);
-}
-
-void NodeInstanceClientProxy::removeProperties(const RemovePropertiesCommand &command)
-{
- nodeInstanceServer()->removeProperties(command);
-}
-
-void NodeInstanceClientProxy::changePropertyBindings(const ChangeBindingsCommand &command)
-{
- nodeInstanceServer()->changePropertyBindings(command);
-}
-
-void NodeInstanceClientProxy::changePropertyValues(const ChangeValuesCommand &command)
-{
- nodeInstanceServer()->changePropertyValues(command);
-}
-
-void NodeInstanceClientProxy::changeAuxiliaryValues(const ChangeAuxiliaryCommand &command)
-{
- nodeInstanceServer()->changeAuxiliaryValues(command);
-}
-
-void NodeInstanceClientProxy::reparentInstances(const ReparentInstancesCommand &command)
-{
- nodeInstanceServer()->reparentInstances(command);
-}
-
-void NodeInstanceClientProxy::changeIds(const ChangeIdsCommand &command)
-{
- nodeInstanceServer()->changeIds(command);
-}
-
-void NodeInstanceClientProxy::changeState(const ChangeStateCommand &command)
-{
- nodeInstanceServer()->changeState(command);
-}
-
-void NodeInstanceClientProxy::completeComponent(const CompleteComponentCommand &command)
-{
- nodeInstanceServer()->completeComponent(command);
-}
-
-void NodeInstanceClientProxy::changeNodeSource(const ChangeNodeSourceCommand &command)
-{
- nodeInstanceServer()->changeNodeSource(command);
-}
-
-void NodeInstanceClientProxy::dispatchCommand(const QVariant &command)
-{
- static const int createInstancesCommandType = QMetaType::type("CreateInstancesCommand");
- static const int changeFileUrlCommandType = QMetaType::type("ChangeFileUrlCommand");
- static const int createSceneCommandType = QMetaType::type("CreateSceneCommand");
- static const int clearSceneCommandType = QMetaType::type("ClearSceneCommand");
- static const int removeInstancesCommandType = QMetaType::type("RemoveInstancesCommand");
- static const int removePropertiesCommandType = QMetaType::type("RemovePropertiesCommand");
- static const int changeBindingsCommandType = QMetaType::type("ChangeBindingsCommand");
- static const int changeValuesCommandType = QMetaType::type("ChangeValuesCommand");
- static const int changeAuxiliaryCommandType = QMetaType::type("ChangeAuxiliaryCommand");
- static const int reparentInstancesCommandType = QMetaType::type("ReparentInstancesCommand");
- static const int changeIdsCommandType = QMetaType::type("ChangeIdsCommand");
- static const int changeStateCommandType = QMetaType::type("ChangeStateCommand");
- static const int completeComponentCommandType = QMetaType::type("CompleteComponentCommand");
- static const int synchronizeCommandType = QMetaType::type("SynchronizeCommand");
- static const int changeNodeSourceCommandType = QMetaType::type("ChangeNodeSourceCommand");
-
- if (command.userType() == createInstancesCommandType) {
- createInstances(command.value<CreateInstancesCommand>());
- } else if (command.userType() == changeFileUrlCommandType)
- changeFileUrl(command.value<ChangeFileUrlCommand>());
- else if (command.userType() == createSceneCommandType)
- createScene(command.value<CreateSceneCommand>());
- else if (command.userType() == clearSceneCommandType)
- clearScene(command.value<ClearSceneCommand>());
- else if (command.userType() == removeInstancesCommandType)
- removeInstances(command.value<RemoveInstancesCommand>());
- else if (command.userType() == removePropertiesCommandType)
- removeProperties(command.value<RemovePropertiesCommand>());
- else if (command.userType() == changeBindingsCommandType)
- changePropertyBindings(command.value<ChangeBindingsCommand>());
- else if (command.userType() == changeValuesCommandType)
- changePropertyValues(command.value<ChangeValuesCommand>());
- else if (command.userType() == changeAuxiliaryCommandType)
- changeAuxiliaryValues(command.value<ChangeAuxiliaryCommand>());
- else if (command.userType() == reparentInstancesCommandType)
- reparentInstances(command.value<ReparentInstancesCommand>());
- else if (command.userType() == changeIdsCommandType)
- changeIds(command.value<ChangeIdsCommand>());
- else if (command.userType() == changeStateCommandType)
- changeState(command.value<ChangeStateCommand>());
- else if (command.userType() == completeComponentCommandType)
- completeComponent(command.value<CompleteComponentCommand>());
- else if (command.userType() == changeNodeSourceCommandType)
- changeNodeSource(command.value<ChangeNodeSourceCommand>());
- else if (command.userType() == synchronizeCommandType) {
- SynchronizeCommand synchronizeCommand = command.value<SynchronizeCommand>();
- m_synchronizeId = synchronizeCommand.synchronizeId();
- } else
- Q_ASSERT(false);
-}
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/instances/nodeinstanceclientproxy.h b/src/tools/qmlpuppet/instances/nodeinstanceclientproxy.h
deleted file mode 100644
index 0ee07bf354..0000000000
--- a/src/tools/qmlpuppet/instances/nodeinstanceclientproxy.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef NODEINSTANCECLIENTPROXY_H
-#define NODEINSTANCECLIENTPROXY_H
-
-#include "nodeinstanceclientinterface.h"
-
-#include <QObject>
-#include <QHash>
-#include <QWeakPointer>
-
-QT_BEGIN_NAMESPACE
-class QLocalSocket;
-QT_END_NAMESPACE
-
-namespace QmlDesigner {
-
-class NodeInstanceServerInterface;
-class CreateSceneCommand;
-class CreateInstancesCommand;
-class ClearSceneCommand;
-class ReparentInstancesCommand;
-class ChangeFileUrlCommand;
-class ChangeValuesCommand;
-class ChangeAuxiliaryCommand;
-class ChangeBindingsCommand;
-class ChangeIdsCommand;
-class RemoveInstancesCommand;
-class RemovePropertiesCommand;
-class CompleteComponentCommand;
-class ChangeStateCommand;
-class ChangeNodeSourceCommand;
-
-
-class NodeInstanceClientProxy : public QObject, public NodeInstanceClientInterface
-{
- Q_OBJECT
-
-public:
- NodeInstanceClientProxy(QObject *parent = 0);
-
- void informationChanged(const InformationChangedCommand &command);
- void valuesChanged(const ValuesChangedCommand &command);
- void pixmapChanged(const PixmapChangedCommand &command);
- void childrenChanged(const ChildrenChangedCommand &command);
- void statePreviewImagesChanged(const StatePreviewImageChangedCommand &command);
- void componentCompleted(const ComponentCompletedCommand &command);
-
- void flush();
- void synchronizeWithClientProcess();
- qint64 bytesToWrite() const;
-
-protected:
- void initializeSocket();
- void writeCommand(const QVariant &command);
- void dispatchCommand(const QVariant &command);
- NodeInstanceServerInterface *nodeInstanceServer() const;
- void setNodeInstanceServer(NodeInstanceServerInterface *nodeInstanceServer);
-
- void createInstances(const CreateInstancesCommand &command);
- void changeFileUrl(const ChangeFileUrlCommand &command);
- void createScene(const CreateSceneCommand &command);
- void clearScene(const ClearSceneCommand &command);
- void removeInstances(const RemoveInstancesCommand &command);
- void removeProperties(const RemovePropertiesCommand &command);
- void changePropertyBindings(const ChangeBindingsCommand &command);
- void changePropertyValues(const ChangeValuesCommand &command);
- void changeAuxiliaryValues(const ChangeAuxiliaryCommand &command);
- void reparentInstances(const ReparentInstancesCommand &command);
- void changeIds(const ChangeIdsCommand &command);
- void changeState(const ChangeStateCommand &command);
- void completeComponent(const CompleteComponentCommand &command);
- void changeNodeSource(const ChangeNodeSourceCommand &command);
-
-private slots:
- void readDataStream();
-
-private:
- QLocalSocket *m_socket;
- NodeInstanceServerInterface *m_nodeInstanceServer;
- quint32 m_blockSize;
- quint32 m_writeCommandCounter;
- quint32 m_lastReadCommandCounter;
- int m_synchronizeId;
-};
-
-} // namespace QmlDesigner
-
-#endif // NODEINSTANCECLIENTPROXY_H
diff --git a/src/tools/qmlpuppet/instances/nodeinstancemetaobject.cpp b/src/tools/qmlpuppet/instances/nodeinstancemetaobject.cpp
deleted file mode 100644
index 646452d339..0000000000
--- a/src/tools/qmlpuppet/instances/nodeinstancemetaobject.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "nodeinstancemetaobject.h"
-
-#include "objectnodeinstance.h"
-#include <QSharedPointer>
-#include <QMetaProperty>
-#include <qnumeric.h>
-#include <QtDebug>
-
-namespace QmlDesigner {
-namespace Internal {
-
-NodeInstanceMetaObject::NodeInstanceMetaObject(const ObjectNodeInstance::Pointer &nodeInstance, QDeclarativeEngine *engine)
- : QDeclarativeOpenMetaObject(nodeInstance->object(), new QDeclarativeOpenMetaObjectType(nodeInstance->object()->metaObject(), engine), true),
- m_nodeInstance(nodeInstance),
- m_context(nodeInstance->isRootNodeInstance() ? nodeInstance->context() : 0)
-{
- setCached(true);
-}
-
-NodeInstanceMetaObject::NodeInstanceMetaObject(const ObjectNodeInstancePointer &nodeInstance, QObject *object, const QString &prefix, QDeclarativeEngine *engine)
- : QDeclarativeOpenMetaObject(object, new QDeclarativeOpenMetaObjectType(object->metaObject(), engine), true),
- m_nodeInstance(nodeInstance),
- m_prefix(prefix)
-{
- setCached(true);
-}
-
-void NodeInstanceMetaObject::createNewProperty(const QString &name)
-{
- int id = createProperty(name.toLatin1(), 0);
- setValue(id, QVariant());
- Q_ASSERT(id >= 0);
- Q_UNUSED(id)
-}
-
-int NodeInstanceMetaObject::metaCall(QMetaObject::Call call, int id, void **a)
-{
- int metaCallReturnValue = -1;
-
- if (call == QMetaObject::WriteProperty
- && property(id).userType() == QMetaType::QVariant
- && reinterpret_cast<QVariant *>(a[0])->type() == QVariant::Double
- && qIsNaN(reinterpret_cast<QVariant *>(a[0])->toDouble())) {
- return -1;
- }
-
- if (call == QMetaObject::WriteProperty
- && property(id).userType() == QMetaType::Double
- && qIsNaN(*reinterpret_cast<double*>(a[0]))) {
- return -1;
- }
-
- if (call == QMetaObject::WriteProperty
- && property(id).userType() == QMetaType::Float
- && qIsNaN(*reinterpret_cast<float*>(a[0]))) {
- return -1;
- }
-
- QVariant oldValue;
-
- if (call == QMetaObject::WriteProperty && !property(id).hasNotifySignal())
- {
- oldValue = property(id).read(object());
- }
-
- ObjectNodeInstance::Pointer objectNodeInstance = m_nodeInstance.toStrongRef();
-
- if (parent() && id < parent()->propertyOffset()) {
- metaCallReturnValue = parent()->metaCall(call, id, a);
- } else {
- metaCallReturnValue = QDeclarativeOpenMetaObject::metaCall(call, id, a);
- }
-
- if ((call == QMetaObject::WriteProperty || call == QMetaObject::ReadProperty) && metaCallReturnValue < 0) {
- if (objectNodeInstance
- && objectNodeInstance->nodeInstanceServer()
- && objectNodeInstance->nodeInstanceServer()->dummyContextObject()
- && !(objectNodeInstance && !objectNodeInstance->isRootNodeInstance() && property(id).name() == QLatin1String("parent"))) {
-
- QObject *contextDummyObject = objectNodeInstance->nodeInstanceServer()->dummyContextObject();
- int properyIndex = contextDummyObject->metaObject()->indexOfProperty(property(id).name());
- if (properyIndex >= 0)
- metaCallReturnValue = contextDummyObject->qt_metacall(call, properyIndex, a);
- }
- }
-
- if (metaCallReturnValue >= 0
- && call == QMetaObject::WriteProperty
- && !property(id).hasNotifySignal()
- && oldValue != property(id).read(object()))
- notifyPropertyChange(id);
-
- return metaCallReturnValue;
-}
-
-void NodeInstanceMetaObject::notifyPropertyChange(int id)
-{
- ObjectNodeInstance::Pointer objectNodeInstance = m_nodeInstance.toStrongRef();
-
- if (objectNodeInstance && objectNodeInstance->nodeInstanceServer()) {
- if (id < type()->propertyOffset()) {
- objectNodeInstance->nodeInstanceServer()->notifyPropertyChange(objectNodeInstance->instanceId(), m_prefix + property(id).name());
- } else {
- objectNodeInstance->nodeInstanceServer()->notifyPropertyChange(objectNodeInstance->instanceId(), m_prefix + name(id - type()->propertyOffset()));
- }
- }
-}
-
-} // namespace Internal
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/instances/nodeinstancemetaobject.h b/src/tools/qmlpuppet/instances/nodeinstancemetaobject.h
deleted file mode 100644
index e19490a875..0000000000
--- a/src/tools/qmlpuppet/instances/nodeinstancemetaobject.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef NODEINSTANCEMETAOBJECT_H
-#define NODEINSTANCEMETAOBJECT_H
-
-#include <QDeclarativeContext>
-#include <private/qdeclarativeopenmetaobject_p.h>
-
-namespace QmlDesigner {
-namespace Internal {
-
-class ObjectNodeInstance;
-typedef QSharedPointer<ObjectNodeInstance> ObjectNodeInstancePointer;
-typedef QWeakPointer<ObjectNodeInstance> ObjectNodeInstanceWeakPointer;
-
-class NodeInstanceMetaObject : public QDeclarativeOpenMetaObject
-{
-public:
- NodeInstanceMetaObject(const ObjectNodeInstancePointer &nodeInstance, QDeclarativeEngine *engine);
- NodeInstanceMetaObject(const ObjectNodeInstancePointer &nodeInstance, QObject *object, const QString &prefix, QDeclarativeEngine *engine);
- void createNewProperty(const QString &name);
-
-protected:
- int metaCall(QMetaObject::Call _c, int _id, void **_a);
- void notifyPropertyChange(int id);
-
-private:
- ObjectNodeInstanceWeakPointer m_nodeInstance;
- QString m_prefix;
- QWeakPointer<QDeclarativeContext> m_context;
-};
-
-} // namespace Internal
-} // namespace QmlDesigner
-
-#endif // NODEINSTANCEMETAOBJECT_H
diff --git a/src/tools/qmlpuppet/instances/nodeinstanceserver.cpp b/src/tools/qmlpuppet/instances/nodeinstanceserver.cpp
deleted file mode 100644
index 7c5e49fd71..0000000000
--- a/src/tools/qmlpuppet/instances/nodeinstanceserver.cpp
+++ /dev/null
@@ -1,1092 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "nodeinstanceserver.h"
-
-#include <QDeclarativeEngine>
-#include <QFileSystemWatcher>
-#include <QUrl>
-#include <QSet>
-#include <QDir>
-#include <QVariant>
-#include <QMetaType>
-#include <QDeclarativeComponent>
-#include <QDeclarativeContext>
-#include <private/qlistmodelinterface_p.h>
-#include <QAbstractAnimation>
-#include <private/qabstractanimation_p.h>
-#include <QMutableVectorIterator>
-
-#include "servernodeinstance.h"
-#include "childrenchangeeventfilter.h"
-#include "propertyabstractcontainer.h"
-#include "propertybindingcontainer.h"
-#include "propertyvaluecontainer.h"
-#include "instancecontainer.h"
-#include "createinstancescommand.h"
-#include "changefileurlcommand.h"
-#include "clearscenecommand.h"
-#include "reparentinstancescommand.h"
-#include "changevaluescommand.h"
-#include "changeauxiliarycommand.h"
-#include "changebindingscommand.h"
-#include "changeidscommand.h"
-#include "removeinstancescommand.h"
-#include "nodeinstanceclientinterface.h"
-#include "removepropertiescommand.h"
-#include "valueschangedcommand.h"
-#include "informationchangedcommand.h"
-#include "pixmapchangedcommand.h"
-#include "commondefines.h"
-#include "childrenchangeeventfilter.h"
-#include "changestatecommand.h"
-#include "childrenchangedcommand.h"
-#include "completecomponentcommand.h"
-#include "componentcompletedcommand.h"
-#include "createscenecommand.h"
-#include "changenodesourcecommand.h"
-
-#include "dummycontextobject.h"
-
-
-namespace QmlDesigner {
-
-NodeInstanceServer::NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :
- NodeInstanceServerInterface(),
- m_childrenChangeEventFilter(new Internal::ChildrenChangeEventFilter(this)),
- m_nodeInstanceClient(nodeInstanceClient),
- m_timer(0),
- m_renderTimerInterval(16),
- m_slowRenderTimer(false),
- m_slowRenderTimerInterval(200)
-{
- qmlRegisterType<DummyContextObject>("QmlDesigner", 1, 0, "DummyContextObject");
-
- connect(m_childrenChangeEventFilter.data(), SIGNAL(childrenChanged(QObject*)), this, SLOT(emitParentChanged(QObject*)));
-}
-
-NodeInstanceServer::~NodeInstanceServer()
-{
-}
-
-QList<ServerNodeInstance> NodeInstanceServer::createInstances(const QVector<InstanceContainer> &containerVector)
-{
- Q_ASSERT(declarativeView() || sgView());
- QList<ServerNodeInstance> instanceList;
- foreach (const InstanceContainer &instanceContainer, containerVector) {
- ServerNodeInstance instance;
- if (instanceContainer.nodeSourceType() == InstanceContainer::ComponentSource) {
- instance = ServerNodeInstance::create(this, instanceContainer, ServerNodeInstance::WrapAsComponent);
- } else {
- instance = ServerNodeInstance::create(this, instanceContainer, ServerNodeInstance::DoNotWrapAsComponent);
- }
- insertInstanceRelationship(instance);
- instanceList.append(instance);
- instance.internalObject()->installEventFilter(childrenChangeEventFilter());
- if (instanceContainer.instanceId() == 0) {
- m_rootNodeInstance = instance;
- resizeCanvasSizeToRootItemSize();
- }
-
- foreach (QDeclarativeContext* context, allSubContextsForObject(instance.internalObject()))
- setupDummysForContext(context);
- }
-
- return instanceList;
-}
-
-void NodeInstanceServer::createInstances(const CreateInstancesCommand &command)
-{
- createInstances(command.instances());
- refreshBindings();
- startRenderTimer();
-}
-
-ServerNodeInstance NodeInstanceServer::instanceForId(qint32 id) const
-{
- if (id < 0)
- return ServerNodeInstance();
-
- Q_ASSERT(m_idInstanceHash.contains(id));
- return m_idInstanceHash.value(id);
-}
-
-bool NodeInstanceServer::hasInstanceForId(qint32 id) const
-{
- if (id < 0)
- return false;
-
- return m_idInstanceHash.contains(id);
-}
-
-ServerNodeInstance NodeInstanceServer::instanceForObject(QObject *object) const
-{
- Q_ASSERT(m_objectInstanceHash.contains(object));
- return m_objectInstanceHash.value(object);
-}
-
-bool NodeInstanceServer::hasInstanceForObject(QObject *object) const
-{
- if (object == 0)
- return false;
-
- return m_objectInstanceHash.contains(object);
-}
-
-void NodeInstanceServer::setRenderTimerInterval(int timerInterval)
-{
- m_renderTimerInterval = timerInterval;
-}
-
-void NodeInstanceServer::setSlowRenderTimerInterval(int timerInterval)
-{
- m_slowRenderTimerInterval = timerInterval;
-}
-
-void NodeInstanceServer::setTimerId(int timerId)
-{
- m_timer = timerId;
-}
-
-int NodeInstanceServer::timerId() const
-{
- return m_timer;
-}
-
-int NodeInstanceServer::renderTimerInterval() const
-{
- return m_renderTimerInterval;
-}
-
-void NodeInstanceServer::startRenderTimer()
-{
- if (m_slowRenderTimer)
- stopRenderTimer();
-
- if (m_timer == 0)
- m_timer = startTimer(m_renderTimerInterval);
-
- m_slowRenderTimer = false;
-}
-
-void NodeInstanceServer::slowDownRenderTimer()
-{
- if (!m_slowRenderTimer)
- stopRenderTimer();
-
- if (m_timer != 0) {
- killTimer(m_timer);
- m_timer = 0;
- }
-
- if (m_timer == 0)
- m_timer = startTimer(m_slowRenderTimerInterval);
-
- m_slowRenderTimer = true;
-}
-
-void NodeInstanceServer::stopRenderTimer()
-{
- if (m_timer) {
- killTimer(m_timer);
- m_timer = 0;
- }
-}
-
-void NodeInstanceServer::createScene(const CreateSceneCommand &command)
-{
- initializeView(command.imports());
- QUnifiedTimer::instance()->setSlowdownFactor(0.00001);
- QUnifiedTimer::instance()->setSlowModeEnabled(true);
-
- QList<ServerNodeInstance> instanceList = setupScene(command);
-
- refreshBindings();
-
- startRenderTimer();
-}
-
-void NodeInstanceServer::clearScene(const ClearSceneCommand &/*command*/)
-{
- stopRenderTimer();
-
- removeAllInstanceRelationships();
- m_fileSystemWatcherHash.clear();
- m_rootNodeInstance.makeInvalid();
- m_changedPropertyList.clear();
- m_fileUrl.clear();
-}
-
-void NodeInstanceServer::removeInstances(const RemoveInstancesCommand &command)
-{
- ServerNodeInstance oldState = activeStateInstance();
- if (activeStateInstance().isValid())
- activeStateInstance().deactivateState();
-
- foreach (qint32 instanceId, command.instanceIds()) {
- removeInstanceRelationsip(instanceId);
- }
-
- if (oldState.isValid())
- oldState.activateState();
-
- refreshBindings();
- startRenderTimer();
-}
-
-void NodeInstanceServer::removeProperties(const RemovePropertiesCommand &command)
-{
- bool hasDynamicProperties = false;
- foreach (const PropertyAbstractContainer &container, command.properties()) {
- hasDynamicProperties |= container.isDynamic();
- resetInstanceProperty(container);
- }
-
- if (hasDynamicProperties)
- refreshBindings();
-
- startRenderTimer();
-}
-
-void NodeInstanceServer::reparentInstances(const QVector<ReparentContainer> &containerVector)
-{
- foreach (const ReparentContainer &container, containerVector) {
- ServerNodeInstance instance = instanceForId(container.instanceId());
- if (instance.isValid()) {
- instance.reparent(instanceForId(container.oldParentInstanceId()), container.oldParentProperty(), instanceForId(container.newParentInstanceId()), container.newParentProperty());
- }
- }
-
-}
-
-void NodeInstanceServer::reparentInstances(const ReparentInstancesCommand &command)
-{
- reparentInstances(command.reparentInstances());
- refreshBindings();
- startRenderTimer();
-}
-
-void NodeInstanceServer::changeState(const ChangeStateCommand &command)
-{
- if (hasInstanceForId(command.stateInstanceId())) {
- if (activeStateInstance().isValid())
- activeStateInstance().deactivateState();
- ServerNodeInstance instance = instanceForId(command.stateInstanceId());
- instance.activateState();
- } else {
- if (activeStateInstance().isValid())
- activeStateInstance().deactivateState();
- }
-
- startRenderTimer();
-}
-
-void NodeInstanceServer::completeComponent(const CompleteComponentCommand &command)
-{
- QList<ServerNodeInstance> instanceList;
-
- foreach (qint32 instanceId, command.instances()) {
- if (hasInstanceForId(instanceId)) {
- ServerNodeInstance instance = instanceForId(instanceId);
- instance.doComponentComplete();
- instanceList.append(instance);
- }
- }
-
- refreshBindings();
-
- startRenderTimer();
-}
-
-void NodeInstanceServer::changeNodeSource(const ChangeNodeSourceCommand &command)
-{
- if (hasInstanceForId(command.instanceId())) {
- ServerNodeInstance instance = instanceForId(command.instanceId());
- if (instance.isValid())
- instance.setNodeSource(command.nodeSource());
- }
-
- startRenderTimer();
-}
-
-void NodeInstanceServer::setupImports(const QVector<AddImportContainer> &containerVector)
-{
- foreach (const AddImportContainer &container, containerVector) {
- QString importStatement = QString("import ");
-
- if (!container.fileName().isEmpty())
- importStatement += '"' + container.fileName() + '"';
- else if (!container.url().isEmpty())
- importStatement += container.url().toString();
-
- if (!container.version().isEmpty())
- importStatement += ' ' + container.version();
-
- if (!container.alias().isEmpty())
- importStatement += " as " + container.alias();
-
- importStatement.append('\n');
-
- if (!m_importList.contains(importStatement))
- m_importList.append(importStatement);
- }
-
- delete m_importComponent.data();
- delete m_importComponentObject.data();
-
- m_importComponent = new QDeclarativeComponent(engine(), 0);
- QString componentString;
- foreach (const QString &importStatement, m_importList)
- componentString += QString("%1").arg(importStatement);
-
- componentString += QString("Item {}\n");
-
- m_importComponent->setData(componentString.toUtf8(), fileUrl());
- m_importComponentObject = m_importComponent->create();
-
- if (!m_importComponent->errorString().isEmpty())
- qDebug() << "QmlDesigner.NodeInstances: import wrong: " << m_importComponent->errorString();
-}
-
-void NodeInstanceServer::setupFileUrl(const QUrl &fileUrl)
-{
- if (!fileUrl.isEmpty()) {
- engine()->setBaseUrl(fileUrl);
- m_fileUrl = fileUrl;
- }
-}
-
-void NodeInstanceServer::setupDummyData(const QUrl &fileUrl)
-{
- if (!fileUrl.isEmpty()) {
- QStringList dummyDataDirectoryList = dummyDataDirectories(QFileInfo(fileUrl.toLocalFile()).path());
- foreach (const QString &dummyDataDirectory, dummyDataDirectoryList)
- loadDummyDataFiles(dummyDataDirectory);
- }
-}
-
-QList<ServerNodeInstance> NodeInstanceServer::setupInstances(const CreateSceneCommand &command)
-{
- QList<ServerNodeInstance> instanceList = createInstances(command.instances());
- reparentInstances(command.reparentInstances());
-
- foreach (const IdContainer &container, command.ids()) {
- if (hasInstanceForId(container.instanceId()))
- instanceForId(container.instanceId()).setId(container.id());
- }
-
- foreach (const PropertyValueContainer &container, command.valueChanges()) {
- if (container.isDynamic())
- setInstancePropertyVariant(container);
- }
-
- foreach (const PropertyValueContainer &container, command.valueChanges()) {
- if (!container.isDynamic())
- setInstancePropertyVariant(container);
- }
-
- foreach (const PropertyBindingContainer &container, command.bindingChanges()) {
- if (container.isDynamic())
- setInstancePropertyBinding(container);
- }
-
- foreach (const PropertyBindingContainer &container, command.bindingChanges()) {
- if (!container.isDynamic())
- setInstancePropertyBinding(container);
- }
-
- foreach (const PropertyValueContainer &container, command.auxiliaryChanges()) {
- setInstanceAuxiliaryData(container);
- }
-
- foreach (ServerNodeInstance instance, instanceList)
- instance.doComponentComplete();
-
- return instanceList;
-}
-
-void NodeInstanceServer::changeFileUrl(const ChangeFileUrlCommand &command)
-{
- m_fileUrl = command.fileUrl();
-
- if (engine())
- engine()->setBaseUrl(m_fileUrl);
-
- refreshBindings();
- startRenderTimer();
-}
-
-void NodeInstanceServer::changePropertyValues(const ChangeValuesCommand &command)
-{
- bool hasDynamicProperties = false;
- foreach (const PropertyValueContainer &container, command.valueChanges()) {
- hasDynamicProperties |= container.isDynamic();
- setInstancePropertyVariant(container);
- }
-
- if (hasDynamicProperties)
- refreshBindings();
-
- startRenderTimer();
-}
-
-void NodeInstanceServer::changeAuxiliaryValues(const ChangeAuxiliaryCommand &command)
-{
- foreach (const PropertyValueContainer &container, command.auxiliaryChanges()) {
- setInstanceAuxiliaryData(container);
- }
-
- startRenderTimer();
-}
-
-void NodeInstanceServer::changePropertyBindings(const ChangeBindingsCommand &command)
-{
- bool hasDynamicProperties = false;
- foreach (const PropertyBindingContainer &container, command.bindingChanges()) {
- hasDynamicProperties |= container.isDynamic();
- setInstancePropertyBinding(container);
- }
-
- if (hasDynamicProperties)
- refreshBindings();
-
- startRenderTimer();
-}
-
-void NodeInstanceServer::changeIds(const ChangeIdsCommand &command)
-{
- foreach (const IdContainer &container, command.ids()) {
- if (hasInstanceForId(container.instanceId()))
- instanceForId(container.instanceId()).setId(container.id());
- }
-
- refreshBindings();
- startRenderTimer();
-}
-
-QDeclarativeContext *NodeInstanceServer::context() const
-{
- if (m_importComponentObject) {
- QDeclarativeContext *importComponentContext = QDeclarativeEngine::contextForObject(m_importComponentObject.data());
- if (importComponentContext) // this should be the default
- return importComponentContext;
- }
-
- if (engine())
- return rootContext();
-
- return 0;
-}
-
-QDeclarativeContext *NodeInstanceServer::rootContext() const
-{
- return engine()->rootContext();
-}
-
-const QVector<NodeInstanceServer::InstancePropertyPair> NodeInstanceServer::changedPropertyList() const
-{
- return m_changedPropertyList;
-}
-
-void NodeInstanceServer::clearChangedPropertyList()
-{
- m_changedPropertyList.clear();
-}
-
-void NodeInstanceServer::setupDummysForContext(QDeclarativeContext *context)
-{
- foreach (const DummyPair& dummyPair, m_dummyObjectList) {
- if (dummyPair.second) {
- context->setContextProperty(dummyPair.first, dummyPair.second.data());
- }
- }
-}
-
-
-QList<QDeclarativeContext*> NodeInstanceServer::allSubContextsForObject(QObject *object)
-{
- QList<QDeclarativeContext*> contextList;
-
- if (object) {
- foreach (QObject *subObject, allSubObjectsForObject(object)) {
- QDeclarativeContext *contextOfObject = QDeclarativeEngine::contextForObject(subObject);
- if (contextOfObject) {
- if (contextOfObject != context() && !contextList.contains(contextOfObject))
- contextList.append(contextOfObject);
- }
- }
- }
-
- return contextList;
-}
-
-QList<QObject*> NodeInstanceServer::allSubObjectsForObject(QObject *object)
-{
- QList<QObject*> subChildren;
- if (object) {
- subChildren = object->findChildren<QObject*>();
- }
-
- return subChildren;
-}
-
-void NodeInstanceServer::removeAllInstanceRelationships()
-{
- // prevent destroyed() signals calling back
-
- foreach (ServerNodeInstance instance, m_objectInstanceHash) {
- if (instance.isValid())
- instance.setId(QString());
- }
-
- //first the root object
- if (rootNodeInstance().internalObject())
- rootNodeInstance().internalObject()->disconnect();
-
- rootNodeInstance().makeInvalid();
-
-
- foreach (ServerNodeInstance instance, m_objectInstanceHash) {
- if (instance.internalObject())
- instance.internalObject()->disconnect();
- instance.makeInvalid();
- }
-
- m_idInstanceHash.clear();
- m_objectInstanceHash.clear();
-}
-
-QFileSystemWatcher *NodeInstanceServer::dummydataFileSystemWatcher()
-{
- if (m_dummdataFileSystemWatcher.isNull()) {
- m_dummdataFileSystemWatcher = new QFileSystemWatcher(this);
- connect(m_dummdataFileSystemWatcher.data(), SIGNAL(fileChanged(QString)), this, SLOT(refreshDummyData(QString)));
- }
-
- return m_dummdataFileSystemWatcher.data();
-}
-
-QFileSystemWatcher *NodeInstanceServer::fileSystemWatcher()
-{
- if (m_fileSystemWatcher.isNull()) {
- m_fileSystemWatcher = new QFileSystemWatcher(this);
- connect(m_fileSystemWatcher.data(), SIGNAL(fileChanged(QString)), this, SLOT(refreshLocalFileProperty(QString)));
- }
-
- return m_fileSystemWatcher.data();
-}
-
-Internal::ChildrenChangeEventFilter *NodeInstanceServer::childrenChangeEventFilter() const
-{
- return m_childrenChangeEventFilter.data();
-}
-
-void NodeInstanceServer::addFilePropertyToFileSystemWatcher(QObject *object, const QString &propertyName, const QString &path)
-{
- if (!m_fileSystemWatcherHash.contains(path)) {
- m_fileSystemWatcherHash.insert(path, ObjectPropertyPair(object, propertyName));
- fileSystemWatcher()->addPath(path);
- }
-}
-
-void NodeInstanceServer::removeFilePropertyFromFileSystemWatcher(QObject *object, const QString &propertyName, const QString &path)
-{
- if (m_fileSystemWatcherHash.contains(path)) {
- fileSystemWatcher()->removePath(path);
- m_fileSystemWatcherHash.remove(path, ObjectPropertyPair(object, propertyName));
- }
-}
-
-void NodeInstanceServer::refreshLocalFileProperty(const QString &path)
-{
- if (m_fileSystemWatcherHash.contains(path)) {
- foreach (const ObjectPropertyPair &objectPropertyPair, m_fileSystemWatcherHash) {
- QObject *object = objectPropertyPair.first.data();
- QString propertyName = objectPropertyPair.second;
-
- if (hasInstanceForObject(object)) {
- instanceForObject(object).refreshProperty(propertyName);
- }
- }
- }
-}
-
-void NodeInstanceServer::refreshDummyData(const QString &path)
-{
- engine()->clearComponentCache();
- QFileInfo filePath(path);
- if (filePath.completeBaseName().contains("_dummycontext")) {
- loadDummyContextObjectFile(filePath);
- } else {
- loadDummyDataFile(filePath);
- }
-
- refreshBindings();
- startRenderTimer();
-}
-
-void NodeInstanceServer::addChangedProperty(const InstancePropertyPair &property)
-{
- if (!m_changedPropertyList.contains(property))
- m_changedPropertyList.append(property);
-}
-
-void NodeInstanceServer::emitParentChanged(QObject *child)
-{
- if (hasInstanceForObject(child)) {
- addChangedProperty(InstancePropertyPair(instanceForObject(child), "parent"));
- }
-}
-
-Internal::ChildrenChangeEventFilter *NodeInstanceServer::childrenChangeEventFilter()
-{
- if (m_childrenChangeEventFilter.isNull()) {
- m_childrenChangeEventFilter = new Internal::ChildrenChangeEventFilter(this);
- connect(m_childrenChangeEventFilter.data(), SIGNAL(childrenChanged(QObject*)), this, SLOT(emitParentChanged(QObject*)));
- }
-
- return m_childrenChangeEventFilter.data();
-}
-
-void NodeInstanceServer::resetInstanceProperty(const PropertyAbstractContainer &propertyContainer)
-{
- if (hasInstanceForId(propertyContainer.instanceId())) { // TODO ugly workaround
- ServerNodeInstance instance = instanceForId(propertyContainer.instanceId());
- Q_ASSERT(instance.isValid());
-
- const QString name = propertyContainer.name();
-
- if (activeStateInstance().isValid() && !instance.isSubclassOf("QtQuick/PropertyChanges")) {
- bool statePropertyWasReseted = activeStateInstance().resetStateProperty(instance, name, instance.resetVariant(name));
- if (!statePropertyWasReseted)
- instance.resetProperty(name);
- } else {
- instance.resetProperty(name);
- }
-
- if (propertyContainer.isDynamic() && propertyContainer.instanceId() == 0 && engine())
- rootContext()->setContextProperty(name, QVariant());
- }
-}
-
-
-void NodeInstanceServer::setInstancePropertyBinding(const PropertyBindingContainer &bindingContainer)
-{
- if (hasInstanceForId(bindingContainer.instanceId())) {
- ServerNodeInstance instance = instanceForId(bindingContainer.instanceId());
-
- const QString name = bindingContainer.name();
- const QString expression = bindingContainer.expression();
-
-
- if (activeStateInstance().isValid() && !instance.isSubclassOf("QtQuick/PropertyChanges")) {
- bool stateBindingWasUpdated = activeStateInstance().updateStateBinding(instance, name, expression);
- if (!stateBindingWasUpdated) {
- if (bindingContainer.isDynamic())
- instance.setPropertyDynamicBinding(name, bindingContainer.dynamicTypeName(), expression);
- else
- instance.setPropertyBinding(name, expression);
- }
- } else {
- if (bindingContainer.isDynamic())
- instance.setPropertyDynamicBinding(name, bindingContainer.dynamicTypeName(), expression);
- else
- instance.setPropertyBinding(name, expression);
- }
- }
-}
-
-
-void NodeInstanceServer::removeProperties(const QList<PropertyAbstractContainer> &propertyList)
-{
- foreach (const PropertyAbstractContainer &property, propertyList)
- resetInstanceProperty(property);
-}
-
-void NodeInstanceServer::setInstancePropertyVariant(const PropertyValueContainer &valueContainer)
-{
- if (hasInstanceForId(valueContainer.instanceId())) {
- ServerNodeInstance instance = instanceForId(valueContainer.instanceId());
-
-
- const QString name = valueContainer.name();
- const QVariant value = valueContainer.value();
-
-
- if (activeStateInstance().isValid() && !instance.isSubclassOf("QtQuick/PropertyChanges")) {
- bool stateValueWasUpdated = activeStateInstance().updateStateVariant(instance, name, value);
- if (!stateValueWasUpdated) {
- if (valueContainer.isDynamic())
- instance.setPropertyDynamicVariant(name, valueContainer.dynamicTypeName(), value);
- else
- instance.setPropertyVariant(name, value);
- }
- } else { //base state
- if (valueContainer.isDynamic())
- instance.setPropertyDynamicVariant(name, valueContainer.dynamicTypeName(), value);
- else
- instance.setPropertyVariant(name, value);
- }
-
- if (valueContainer.isDynamic() && valueContainer.instanceId() == 0 && engine())
- rootContext()->setContextProperty(name, value);
- }
-}
-
-void NodeInstanceServer::setInstanceAuxiliaryData(const PropertyValueContainer &auxiliaryContainer)
-{
- //instanceId() == 0: the item is root
- if (auxiliaryContainer.instanceId() == 0 && (auxiliaryContainer.name() == QLatin1String("width") ||
- auxiliaryContainer.name() == QLatin1String("height"))) {
-
- setInstancePropertyVariant(auxiliaryContainer);
- }
-}
-
-
-QUrl NodeInstanceServer::fileUrl() const
-{
- return m_fileUrl;
-}
-
-ServerNodeInstance NodeInstanceServer::activeStateInstance() const
-{
- return m_activeStateInstance;
-}
-
-ServerNodeInstance NodeInstanceServer::rootNodeInstance() const
-{
- return m_rootNodeInstance;
-}
-
-void NodeInstanceServer::setStateInstance(const ServerNodeInstance &stateInstance)
-{
- m_activeStateInstance = stateInstance;
-}
-
-void NodeInstanceServer::clearStateInstance()
-{
- m_activeStateInstance = ServerNodeInstance();
-}
-
-void NodeInstanceServer::timerEvent(QTimerEvent *event)
-{
- if (event->timerId() == m_timer) {
- collectItemChangesAndSendChangeCommands();
- }
-
- NodeInstanceServerInterface::timerEvent(event);
-}
-
-NodeInstanceClientInterface *NodeInstanceServer::nodeInstanceClient() const
-{
- return m_nodeInstanceClient;
-}
-
-ChildrenChangedCommand NodeInstanceServer::createChildrenChangedCommand(const ServerNodeInstance &parentInstance, const QList<ServerNodeInstance> &instanceList) const
-{
- QVector<qint32> instanceVector;
-
- foreach (const ServerNodeInstance &instance, instanceList)
- instanceVector.append(instance.instanceId());
-
- return ChildrenChangedCommand(parentInstance.instanceId(), instanceVector);
-}
-
-InformationChangedCommand NodeInstanceServer::createAllInformationChangedCommand(const QList<ServerNodeInstance> &instanceList, bool initial) const
-{
- QVector<InformationContainer> informationVector;
-
- foreach (const ServerNodeInstance &instance, instanceList) {
- informationVector.append(InformationContainer(instance.instanceId(), Position, instance.position()));
- informationVector.append(InformationContainer(instance.instanceId(), Transform, instance.transform()));
- informationVector.append(InformationContainer(instance.instanceId(), SceneTransform, instance.sceneTransform()));
- informationVector.append(InformationContainer(instance.instanceId(), Size, instance.size()));
- informationVector.append(InformationContainer(instance.instanceId(), BoundingRect, instance.boundingRect()));
- informationVector.append(InformationContainer(instance.instanceId(), Transform, instance.transform()));
- informationVector.append(InformationContainer(instance.instanceId(), HasContent, instance.hasContent()));
- informationVector.append(InformationContainer(instance.instanceId(), IsMovable, instance.isMovable()));
- informationVector.append(InformationContainer(instance.instanceId(), IsResizable, instance.isResizable()));
- informationVector.append(InformationContainer(instance.instanceId(), IsInPositioner, instance.isInPositioner()));
- informationVector.append(InformationContainer(instance.instanceId(), PenWidth, instance.penWidth()));
- informationVector.append(InformationContainer(instance.instanceId(), IsAnchoredByChildren, instance.isAnchoredByChildren()));
- informationVector.append(InformationContainer(instance.instanceId(), IsAnchoredBySibling, instance.isAnchoredBySibling()));
-
- informationVector.append(InformationContainer(instance.instanceId(), HasAnchor, QString("anchors.fill"), instance.hasAnchor("anchors.fill")));
- informationVector.append(InformationContainer(instance.instanceId(), HasAnchor, QString("anchors.centerIn"), instance.hasAnchor("anchors.centerIn")));
- informationVector.append(InformationContainer(instance.instanceId(), HasAnchor, QString("anchors.right"), instance.hasAnchor("anchors.right")));
- informationVector.append(InformationContainer(instance.instanceId(), HasAnchor, QString("anchors.top"), instance.hasAnchor("anchors.top")));
- informationVector.append(InformationContainer(instance.instanceId(), HasAnchor, QString("anchors.left"), instance.hasAnchor("anchors.left")));
- informationVector.append(InformationContainer(instance.instanceId(), HasAnchor, QString("anchors.bottom"), instance.hasAnchor("anchors.bottom")));
- informationVector.append(InformationContainer(instance.instanceId(), HasAnchor, QString("anchors.horizontalCenter"), instance.hasAnchor("anchors.horizontalCenter")));
- informationVector.append(InformationContainer(instance.instanceId(), HasAnchor, QString("anchors.verticalCenter"), instance.hasAnchor("anchors.verticalCenter")));
- informationVector.append(InformationContainer(instance.instanceId(), HasAnchor, QString("anchors.baseline"), instance.hasAnchor("anchors.baseline")));
-
- QPair<QString, ServerNodeInstance> anchorPair = instance.anchor("anchors.fill");
- informationVector.append(InformationContainer(instance.instanceId(), Anchor, QString("anchors.fill"), anchorPair.first, anchorPair.second.instanceId()));
-
- anchorPair = instance.anchor("anchors.centerIn");
- informationVector.append(InformationContainer(instance.instanceId(), Anchor, QString("anchors.centerIn"), anchorPair.first, anchorPair.second.instanceId()));
-
- anchorPair = instance.anchor("anchors.right");
- informationVector.append(InformationContainer(instance.instanceId(), Anchor, QString("anchors.right"), anchorPair.first, anchorPair.second.instanceId()));
-
- anchorPair = instance.anchor("anchors.top");
- informationVector.append(InformationContainer(instance.instanceId(), Anchor, QString("anchors.top"), anchorPair.first, anchorPair.second.instanceId()));
-
- anchorPair = instance.anchor("anchors.left");
- informationVector.append(InformationContainer(instance.instanceId(), Anchor, QString("anchors.left"), anchorPair.first, anchorPair.second.instanceId()));
-
- anchorPair = instance.anchor("anchors.bottom");
- informationVector.append(InformationContainer(instance.instanceId(), Anchor, QString("anchors.bottom"), anchorPair.first, anchorPair.second.instanceId()));
-
- anchorPair = instance.anchor("anchors.horizontalCenter");
- informationVector.append(InformationContainer(instance.instanceId(), Anchor, QString("anchors.horizontalCenter"), anchorPair.first, anchorPair.second.instanceId()));
-
- anchorPair = instance.anchor("anchors.verticalCenter");
- informationVector.append(InformationContainer(instance.instanceId(), Anchor, QString("anchors.verticalCenter"), anchorPair.first, anchorPair.second.instanceId()));
-
- anchorPair = instance.anchor("anchors.baseline");
- informationVector.append(InformationContainer(instance.instanceId(), Anchor, QString("anchors.baseline"), anchorPair.first, anchorPair.second.instanceId()));
-
- QStringList propertyNames = instance.propertyNames();
-
- if (initial) {
- foreach (const QString &propertyName,propertyNames)
- informationVector.append(InformationContainer(instance.instanceId(), InstanceTypeForProperty, propertyName, instance.instanceType(propertyName)));
- }
-
- foreach (const QString &propertyName,instance.propertyNames()) {
- bool hasChanged = false;
- bool hasBinding = instance.hasBindingForProperty(propertyName, &hasChanged);
- if (hasChanged)
- informationVector.append(InformationContainer(instance.instanceId(), HasBindingForProperty, propertyName, hasBinding));
- }
-
- }
-
- return InformationChangedCommand(informationVector);
-}
-
-static bool supportedVariantType(QVariant::Type type)
-{
- return type < QVariant::UserType && type != QVariant::Icon;
-}
-
-ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QList<ServerNodeInstance> &instanceList) const
-{
- QVector<PropertyValueContainer> valueVector;
-
- foreach (const ServerNodeInstance &instance, instanceList) {
- foreach (const QString &propertyName, instance.propertyNames()) {
- QVariant propertyValue = instance.property(propertyName);
- if (supportedVariantType(propertyValue.type()))
- valueVector.append(PropertyValueContainer(instance.instanceId(), propertyName, propertyValue, QString()));
- }
- }
-
- return ValuesChangedCommand(valueVector);
-}
-
-ComponentCompletedCommand NodeInstanceServer::createComponentCompletedCommand(const QList<ServerNodeInstance> &instanceList)
-{
- QVector<qint32> idVector;
- foreach (const ServerNodeInstance &instance, instanceList) {
- if (instance.instanceId() >= 0)
- idVector.append(instance.instanceId());
- }
-
- return ComponentCompletedCommand(idVector);
-}
-
-ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QVector<InstancePropertyPair> &propertyList) const
-{
- QVector<PropertyValueContainer> valueVector;
-
- foreach (const InstancePropertyPair &property, propertyList) {
- const QString propertyName = property.second;
- const ServerNodeInstance instance = property.first;
-
- if ( instance.isValid()) {
- QVariant propertyValue = instance.property(propertyName);
- if (supportedVariantType(propertyValue.type()))
- valueVector.append(PropertyValueContainer(instance.instanceId(), propertyName, propertyValue, QString()));
- }
- }
-
- return ValuesChangedCommand(valueVector);
-}
-
-QStringList NodeInstanceServer::imports() const
-{
- return m_importList;
-}
-
-void NodeInstanceServer::addImportString(const QString &import)
-{
- m_importList.append(import);
-}
-
-QObject *NodeInstanceServer::dummyContextObject() const
-{
- return m_dummyContextObject.data();
-}
-
-void NodeInstanceServer::notifyPropertyChange(qint32 instanceid, const QString &propertyName)
-{
- if (hasInstanceForId(instanceid))
- addChangedProperty(InstancePropertyPair(instanceForId(instanceid), propertyName));
-}
-
-void NodeInstanceServer::insertInstanceRelationship(const ServerNodeInstance &instance)
-{
- Q_ASSERT(instance.isValid());
- Q_ASSERT(!m_idInstanceHash.contains(instance.instanceId()));
- Q_ASSERT(!m_objectInstanceHash.contains(instance.internalObject()));
- m_objectInstanceHash.insert(instance.internalObject(), instance);
- m_idInstanceHash.insert(instance.instanceId(), instance);
-}
-
-void NodeInstanceServer::removeInstanceRelationsip(qint32 instanceId)
-{
- if (hasInstanceForId(instanceId)) {
- ServerNodeInstance instance = instanceForId(instanceId);
- if (instance.isValid())
- instance.setId(QString());
- m_idInstanceHash.remove(instanceId);
- m_objectInstanceHash.remove(instance.internalObject());
- instance.makeInvalid();
- }
-}
-
-PixmapChangedCommand NodeInstanceServer::createPixmapChangedCommand(const QList<ServerNodeInstance> &instanceList) const
-{
- QVector<ImageContainer> imageVector;
-
- foreach (const ServerNodeInstance &instance, instanceList) {
- if (instance.isValid())
- imageVector.append(ImageContainer(instance.instanceId(), instance.renderImage()));
- }
-
- return PixmapChangedCommand(imageVector);
-}
-
-void NodeInstanceServer::loadDummyDataFile(const QFileInfo& qmlFileInfo)
-{
- QDeclarativeComponent component(engine(), qmlFileInfo.filePath());
- QObject *dummyData = component.create();
- if (component.isError()) {
- QList<QDeclarativeError> errors = component.errors();
- foreach (const QDeclarativeError &error, errors) {
- qWarning() << error;
- }
- }
-
- QVariant oldDummyDataObject = rootContext()->contextProperty(qmlFileInfo.completeBaseName());
-
- if (dummyData) {
- qWarning() << "Loaded dummy data:" << qmlFileInfo.filePath();
- rootContext()->setContextProperty(qmlFileInfo.completeBaseName(), dummyData);
- dummyData->setParent(this);
- m_dummyObjectList.append(DummyPair(qmlFileInfo.completeBaseName(), dummyData));
- }
-
- if (!oldDummyDataObject.isNull())
- delete oldDummyDataObject.value<QObject*>();
-
- if (!dummydataFileSystemWatcher()->files().contains(qmlFileInfo.filePath()))
- dummydataFileSystemWatcher()->addPath(qmlFileInfo.filePath());
-
- if (rootNodeInstance().isValid() && rootNodeInstance().internalObject()) {
- foreach (QDeclarativeContext *context, allSubContextsForObject(rootNodeInstance().internalObject()))
- setupDummysForContext(context);
- }
-}
-
-void NodeInstanceServer::loadDummyContextObjectFile(const QFileInfo& qmlFileInfo)
-{
- delete m_dummyContextObject.data();
-
- QDeclarativeComponent component(engine(), qmlFileInfo.filePath());
- m_dummyContextObject = component.create();
-
- if (component.isError()) {
- QList<QDeclarativeError> errors = component.errors();
- foreach (const QDeclarativeError &error, errors) {
- qWarning() << error;
- }
- }
-
- if (m_dummyContextObject) {
- qWarning() << "Loaded dummy context object:" << qmlFileInfo.filePath();
- m_dummyContextObject->setParent(this);
- }
-
- if (!dummydataFileSystemWatcher()->files().contains(qmlFileInfo.filePath()))
- dummydataFileSystemWatcher()->addPath(qmlFileInfo.filePath());
-
- refreshBindings();
-}
-
-void NodeInstanceServer::loadDummyDataFiles(const QString& directory)
-{
- QDir dir(directory, "*.qml");
- QList<QFileInfo> filePathList = dir.entryInfoList();
- QString baseName = QFileInfo(fileUrl().toLocalFile()).completeBaseName();
- foreach (const QFileInfo &qmlFileInfo, filePathList) {
- if (!qmlFileInfo.completeBaseName().contains("_dummycontext")) {
- loadDummyDataFile(qmlFileInfo);
- } else if (qmlFileInfo.completeBaseName() == baseName+"_dummycontext") {
- loadDummyContextObjectFile(qmlFileInfo);
- }
- }
-}
-
-QStringList NodeInstanceServer::dummyDataDirectories(const QString& directoryPath)
-{
- QStringList dummyDataDirectoryList;
- QDir directory(directoryPath);
- while(true) {
- if (directory.isRoot() || !directory.exists())
- return dummyDataDirectoryList;
-
- if (directory.exists("dummydata"))
- dummyDataDirectoryList.prepend(directory.absoluteFilePath("dummydata"));
-
- directory.cdUp();
- }
-}
-
-}
-
-
-
diff --git a/src/tools/qmlpuppet/instances/nodeinstanceserver.h b/src/tools/qmlpuppet/instances/nodeinstanceserver.h
deleted file mode 100644
index bd45ec4849..0000000000
--- a/src/tools/qmlpuppet/instances/nodeinstanceserver.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef NODEINSTANCESERVER_H
-#define NODEINSTANCESERVER_H
-
-#include <QUrl>
-#include <QVector>
-#include <QSet>
-#include <QStringList>
-
-#include <nodeinstanceserverinterface.h>
-#include "servernodeinstance.h"
-
-QT_BEGIN_NAMESPACE
-class QFileSystemWatcher;
-class QDeclarativeView;
-class QSGView;
-class QDeclarativeEngine;
-class QGraphicsObject;
-class QFileInfo;
-class QDeclarativeComponent;
-QT_END_NAMESPACE
-
-namespace QmlDesigner {
-
-class NodeInstanceClientInterface;
-class ValuesChangedCommand;
-class PixmapChangedCommand;
-class InformationChangedCommand;
-class ChildrenChangedCommand;
-class ReparentContainer;
-class ComponentCompletedCommand;
-class AddImportContainer;
-
-namespace Internal {
- class ChildrenChangeEventFilter;
-}
-
-class NodeInstanceServer : public NodeInstanceServerInterface
-{
- Q_OBJECT
-public:
- typedef QPair<QWeakPointer<QObject>, QString> ObjectPropertyPair;
- typedef QPair<qint32, QString> IdPropertyPair;
- typedef QPair<ServerNodeInstance, QString> InstancePropertyPair;
- typedef QPair<QString, QWeakPointer<QObject> > DummyPair;
-
- explicit NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);
- ~NodeInstanceServer();
-
- void createInstances(const CreateInstancesCommand &command);
- void changeFileUrl(const ChangeFileUrlCommand &command);
- void changePropertyValues(const ChangeValuesCommand &command);
- void changePropertyBindings(const ChangeBindingsCommand &command);
- void changeAuxiliaryValues(const ChangeAuxiliaryCommand &command);
- void changeIds(const ChangeIdsCommand &command);
- void createScene(const CreateSceneCommand &command);
- void clearScene(const ClearSceneCommand &command);
- void removeInstances(const RemoveInstancesCommand &command);
- void removeProperties(const RemovePropertiesCommand &command);
- void reparentInstances(const ReparentInstancesCommand &command);
- void changeState(const ChangeStateCommand &command);
- void completeComponent(const CompleteComponentCommand &command);
- void changeNodeSource(const ChangeNodeSourceCommand &command);
-
- ServerNodeInstance instanceForId(qint32 id) const;
- bool hasInstanceForId(qint32 id) const;
-
- ServerNodeInstance instanceForObject(QObject *object) const;
- bool hasInstanceForObject(QObject *object) const;
-
- virtual QDeclarativeEngine *engine() const = 0;
- QDeclarativeContext *context() const;
-
- void removeAllInstanceRelationships();
-
- QFileSystemWatcher *fileSystemWatcher();
- QFileSystemWatcher *dummydataFileSystemWatcher();
- Internal::ChildrenChangeEventFilter *childrenChangeEventFilter() const;
- void addFilePropertyToFileSystemWatcher(QObject *object, const QString &propertyName, const QString &path);
- void removeFilePropertyFromFileSystemWatcher(QObject *object, const QString &propertyName, const QString &path);
-
- QUrl fileUrl() const;
-
- ServerNodeInstance activeStateInstance() const;
- void setStateInstance(const ServerNodeInstance &stateInstance);
- void clearStateInstance();
-
- ServerNodeInstance rootNodeInstance() const;
-
- void notifyPropertyChange(qint32 instanceid, const QString &propertyName);
-
- QStringList imports() const;
- QObject *dummyContextObject() const;
-
- virtual QDeclarativeView *declarativeView() const = 0;
- virtual QSGView *sgView() const = 0;
-
-public slots:
- void refreshLocalFileProperty(const QString &path);
- void refreshDummyData(const QString &path);
- void emitParentChanged(QObject *child);
-
-protected:
- QList<ServerNodeInstance> createInstances(const QVector<InstanceContainer> &container);
- void reparentInstances(const QVector<ReparentContainer> &containerVector);
- void addImportString(const QString &import);
-
- Internal::ChildrenChangeEventFilter *childrenChangeEventFilter();
- void resetInstanceProperty(const PropertyAbstractContainer &propertyContainer);
- void setInstancePropertyBinding(const PropertyBindingContainer &bindingContainer);
- void setInstancePropertyVariant(const PropertyValueContainer &valueContainer);
- void setInstanceAuxiliaryData(const PropertyValueContainer &auxiliaryContainer);
- void removeProperties(const QList<PropertyAbstractContainer> &propertyList);
-
- void insertInstanceRelationship(const ServerNodeInstance &instance);
- void removeInstanceRelationsip(qint32 instanceId);
-
- NodeInstanceClientInterface *nodeInstanceClient() const;
-
- void timerEvent(QTimerEvent *);
-
- virtual void collectItemChangesAndSendChangeCommands() = 0;
-
-
- ValuesChangedCommand createValuesChangedCommand(const QList<ServerNodeInstance> &instanceList) const;
- ValuesChangedCommand createValuesChangedCommand(const QVector<InstancePropertyPair> &propertyList) const;
- PixmapChangedCommand createPixmapChangedCommand(const QList<ServerNodeInstance> &instanceList) const;
- InformationChangedCommand createAllInformationChangedCommand(const QList<ServerNodeInstance> &instanceList, bool initial = false) const;
- ChildrenChangedCommand createChildrenChangedCommand(const ServerNodeInstance &parentInstance, const QList<ServerNodeInstance> &instanceList) const;
- ComponentCompletedCommand createComponentCompletedCommand(const QList<ServerNodeInstance> &instanceList);
-
- void addChangedProperty(const InstancePropertyPair &property);
-
- virtual void startRenderTimer();
- void slowDownRenderTimer();
- void stopRenderTimer();
- void setRenderTimerInterval(int timerInterval);
- int renderTimerInterval() const;
- void setSlowRenderTimerInterval(int timerInterval);
-
- virtual void initializeView(const QVector<AddImportContainer> &importVector) = 0;
- virtual QList<ServerNodeInstance> setupScene(const CreateSceneCommand &command) = 0;
- void loadDummyDataFiles(const QString& directory);
- void loadDummyDataFile(const QFileInfo& fileInfo);
- void loadDummyContextObjectFile(const QFileInfo& fileInfo);
- static QStringList dummyDataDirectories(const QString& directoryPath);
-
- void setTimerId(int timerId);
- int timerId() const;
-
- QDeclarativeContext *rootContext() const;
-
-
- const QVector<InstancePropertyPair> changedPropertyList() const;
- void clearChangedPropertyList();
-
- virtual void refreshBindings() = 0;
-
- void setupDummysForContext(QDeclarativeContext *context);
-
- void setupFileUrl(const QUrl &fileUrl);
- void setupImports(const QVector<AddImportContainer> &container);
- void setupDummyData(const QUrl &fileUrl);
- QList<ServerNodeInstance> setupInstances(const CreateSceneCommand &command);
-
- QList<QDeclarativeContext*> allSubContextsForObject(QObject *object);
- static QList<QObject*> allSubObjectsForObject(QObject *object);
-
- virtual void resizeCanvasSizeToRootItemSize() = 0;
-
-private:
- ServerNodeInstance m_rootNodeInstance;
- ServerNodeInstance m_activeStateInstance;
- QHash<qint32, ServerNodeInstance> m_idInstanceHash;
- QHash<QObject*, ServerNodeInstance> m_objectInstanceHash;
- QMultiHash<QString, ObjectPropertyPair> m_fileSystemWatcherHash;
- QList<QPair<QString, QWeakPointer<QObject> > > m_dummyObjectList;
- QWeakPointer<QFileSystemWatcher> m_fileSystemWatcher;
- QWeakPointer<QFileSystemWatcher> m_dummdataFileSystemWatcher;
- QWeakPointer<Internal::ChildrenChangeEventFilter> m_childrenChangeEventFilter;
- QUrl m_fileUrl;
- NodeInstanceClientInterface *m_nodeInstanceClient;
- int m_timer;
- int m_renderTimerInterval;
- bool m_slowRenderTimer;
- int m_slowRenderTimerInterval;
- QVector<InstancePropertyPair> m_changedPropertyList;
- QStringList m_importList;
- QWeakPointer<QObject> m_dummyContextObject;
- QWeakPointer<QDeclarativeComponent> m_importComponent;
- QWeakPointer<QObject> m_importComponentObject;
-};
-
-}
-
-#endif // NODEINSTANCESERVER_H
diff --git a/src/tools/qmlpuppet/instances/nodeinstancesignalspy.cpp b/src/tools/qmlpuppet/instances/nodeinstancesignalspy.cpp
deleted file mode 100644
index cc7164adcd..0000000000
--- a/src/tools/qmlpuppet/instances/nodeinstancesignalspy.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "nodeinstancesignalspy.h"
-#include "objectnodeinstance.h"
-
-#include <QMetaProperty>
-#include <QMetaObject>
-#include <QtDebug>
-#include <QSharedPointer>
-#include <private/qdeclarativemetatype_p.h>
-
-namespace QmlDesigner {
-namespace Internal {
-
-NodeInstanceSignalSpy::NodeInstanceSignalSpy() :
- QObject()
-{
- blockSignals(true);
-}
-
-void NodeInstanceSignalSpy::setObjectNodeInstance(const ObjectNodeInstance::Pointer &nodeInstance)
-{
- methodeOffset = QObject::staticMetaObject.methodCount() + 1;
- registerObject(nodeInstance->object());
- m_objectNodeInstance = nodeInstance;
-
-}
-
-void NodeInstanceSignalSpy::registerObject(QObject *spiedObject, const QString &prefix)
-{
- if (m_registeredObjectList.contains(spiedObject)) // prevent cycles
- return;
-
- m_registeredObjectList.append(spiedObject);
- for (int index = QObject::staticMetaObject.propertyOffset();
- index < spiedObject->metaObject()->propertyCount();
- index++) {
- QMetaProperty metaProperty = spiedObject->metaObject()->property(index);
-
- // handle dot properties and connect the signals to the object
- if (metaProperty.isReadable()
- && !metaProperty.isWritable()
- && QDeclarativeMetaType::isQObject(metaProperty.userType())) {
- QObject *propertyObject = QDeclarativeMetaType::toQObject(metaProperty.read(spiedObject));
- if (propertyObject)
- registerObject(propertyObject, prefix + metaProperty.name() + QLatin1Char('.'));
- } else if (metaProperty.hasNotifySignal()) {
- QMetaMethod metaMethod = metaProperty.notifySignal();
- bool isConnecting = QMetaObject::connect(spiedObject, metaMethod.methodIndex(), this, methodeOffset, Qt::DirectConnection);
- Q_ASSERT(isConnecting);
- Q_UNUSED(isConnecting);
- m_indexPropertyHash.insert(methodeOffset, prefix + metaProperty.name());
- methodeOffset++;
- }
-
- // search recursive in objects
- if (metaProperty.isReadable()
- && metaProperty.isWritable()
- && QDeclarativeMetaType::isQObject(metaProperty.userType())) {
- QObject *propertyObject = QDeclarativeMetaType::toQObject(metaProperty.read(spiedObject));
- if (propertyObject)
- registerObject(propertyObject, prefix + metaProperty.name() + QLatin1Char('/'));
- }
-
- // search recursive in objects list
- if (metaProperty.isReadable()
- && QDeclarativeMetaType::isList(metaProperty.userType())) {
- QDeclarativeListReference list(spiedObject, metaProperty.name());
- if (list.canCount() && list.canAt()) {
- for (int i = 0; i < list.count(); i++) {
- QObject *propertyObject = list.at(i);
- if (propertyObject)
- registerObject(propertyObject, prefix + metaProperty.name() + QLatin1Char('/'));
- }
- }
- }
- }
-}
-
-int NodeInstanceSignalSpy::qt_metacall(QMetaObject::Call call, int methodId, void **a)
-{
- if (call == QMetaObject::InvokeMetaMethod && methodId > QObject::staticMetaObject.methodCount()) {
- ObjectNodeInstance::Pointer nodeInstance = m_objectNodeInstance.toStrongRef();
-
- if (nodeInstance && nodeInstance->nodeInstanceServer() && nodeInstance->isValid()) {
- nodeInstance->nodeInstanceServer()->notifyPropertyChange(nodeInstance->instanceId(), m_indexPropertyHash.value(methodId));
- }
-
- }
-
- return QObject::qt_metacall(call, methodId, a);
-}
-
-} // namespace Internal
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/instances/nodeinstancesignalspy.h b/src/tools/qmlpuppet/instances/nodeinstancesignalspy.h
deleted file mode 100644
index 0f5a06788c..0000000000
--- a/src/tools/qmlpuppet/instances/nodeinstancesignalspy.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef NODEINSTANCESIGNALSPY_H
-#define NODEINSTANCESIGNALSPY_H
-
-#include <QObject>
-#include <QHash>
-#include <QSharedPointer>
-
-namespace QmlDesigner {
-namespace Internal {
-
-class ObjectNodeInstance;
-typedef QSharedPointer<ObjectNodeInstance> ObjectNodeInstancePointer;
-typedef QWeakPointer<ObjectNodeInstance> ObjectNodeInstanceWeakPointer;
-
-class NodeInstanceSignalSpy : public QObject
-{
-public:
- explicit NodeInstanceSignalSpy();
-
- void setObjectNodeInstance(const ObjectNodeInstancePointer &nodeInstance);
-
- virtual int qt_metacall(QMetaObject::Call, int, void **);
-
-protected:
- void registerObject(QObject *spiedObject, const QString &prefix = QString());
-
-private:
- int methodeOffset;
- QHash<int, QString> m_indexPropertyHash;
- QObjectList m_registeredObjectList;
- ObjectNodeInstanceWeakPointer m_objectNodeInstance;
- QMetaObject m_metaObject;
-};
-
-} // namespace Internal
-} // namespace QmlDesigner
-
-#endif // NODEINSTANCESIGNALSPY_H
diff --git a/src/tools/qmlpuppet/instances/objectnodeinstance.cpp b/src/tools/qmlpuppet/instances/objectnodeinstance.cpp
deleted file mode 100644
index d4d6204c7b..0000000000
--- a/src/tools/qmlpuppet/instances/objectnodeinstance.cpp
+++ /dev/null
@@ -1,1052 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "objectnodeinstance.h"
-
-
-
-#include <QEvent>
-#include <QGraphicsScene>
-#include <QDeclarativeContext>
-#include <QDeclarativeError>
-#include <QDeclarativeEngine>
-#include <QDeclarativeProperty>
-#include <QSharedPointer>
-#include <QFileInfo>
-#include <QFileSystemWatcher>
-#include <QPixmapCache>
-#ifndef QT_NO_WEBKIT
-#include <QGraphicsWebView>
-#endif
-#include <QGraphicsObject>
-
-#include <QTextDocument>
-
-#include <private/qdeclarativebinding_p.h>
-#include <private/qdeclarativemetatype_p.h>
-#include <private/qdeclarativevaluetype_p.h>
-#include <private/qdeclarativetext_p.h>
-#include <private/qdeclarativetext_p_p.h>
-#include <private/qdeclarativetransition_p.h>
-#include <private/qdeclarativeanimation_p.h>
-#include <private/qdeclarativetimer_p.h>
-
-namespace QmlDesigner {
-namespace Internal {
-
-ObjectNodeInstance::ObjectNodeInstance(QObject *object)
- : m_instanceId(-1),
- m_deleteHeldInstance(true),
- m_object(object),
- m_metaObject(0),
- m_isInPositioner(false)
-{
-
-}
-
-ObjectNodeInstance::~ObjectNodeInstance()
-{
- destroy();
-}
-
-void ObjectNodeInstance::destroy()
-{
- if (deleteHeldInstance()) {
- // Remove from old property
- if (object()) {
- setId(QString());
- if (m_instanceId >= 0) {
- reparent(parentInstance(), m_parentProperty, ObjectNodeInstance::Pointer(), QString());
- }
- }
-
- if (object()) {
- QObject *obj = object();
- m_object.clear();
- delete obj;
- }
- }
-
- m_metaObject = 0;
- m_instanceId = -1;
-}
-
-void ObjectNodeInstance::setInstanceId(qint32 id)
-{
- m_instanceId = id;
-}
-
-qint32 ObjectNodeInstance::instanceId() const
-{
- return m_instanceId;
-}
-
-NodeInstanceServer *ObjectNodeInstance::nodeInstanceServer() const
-{
- return m_nodeInstanceServer.data();
-}
-
-void ObjectNodeInstance::setNodeInstanceServer(NodeInstanceServer *server)
-{
- Q_ASSERT(!m_nodeInstanceServer.data());
-
- m_nodeInstanceServer = server;
-}
-
-static bool hasPropertiesWitoutNotifications(const QMetaObject *metaObject)
-{
- for(int propertyIndex = QObject::staticMetaObject.propertyCount(); propertyIndex < metaObject->propertyCount(); propertyIndex++) {
- if (!metaObject->property(propertyIndex).hasNotifySignal())
- return true;
- }
-
- return false;
-}
-
-void ObjectNodeInstance::initializePropertyWatcher(const ObjectNodeInstance::Pointer &objectNodeInstance)
-{
- const QMetaObject *metaObject = objectNodeInstance->object()->metaObject();
- m_metaObject = new NodeInstanceMetaObject(objectNodeInstance, nodeInstanceServer()->engine());
- for(int propertyIndex = QObject::staticMetaObject.propertyCount(); propertyIndex < metaObject->propertyCount(); propertyIndex++) {
- if (QDeclarativeMetaType::isQObject(metaObject->property(propertyIndex).userType())) {
- QObject *propertyObject = QDeclarativeMetaType::toQObject(metaObject->property(propertyIndex).read(objectNodeInstance->object()));
- if (propertyObject && hasPropertiesWitoutNotifications(propertyObject->metaObject())) {
- new NodeInstanceMetaObject(objectNodeInstance, propertyObject, metaObject->property(propertyIndex).name(), nodeInstanceServer()->engine());
- }
- }
- }
-
- m_signalSpy.setObjectNodeInstance(objectNodeInstance);
-}
-
-void ObjectNodeInstance::initialize(const ObjectNodeInstance::Pointer &objectNodeInstance)
-{
- initializePropertyWatcher(objectNodeInstance);
-}
-
-void ObjectNodeInstance::setId(const QString &id)
-{
- if (!m_id.isEmpty() && context()) {
- context()->engine()->rootContext()->setContextProperty(m_id, 0);
- }
-
- if (!id.isEmpty() && context()) {
- context()->engine()->rootContext()->setContextProperty(id, object()); // will also force refresh of all bindings
- }
-
- m_id = id;
-}
-
-QString ObjectNodeInstance::id() const
-{
- return m_id;
-}
-
-bool ObjectNodeInstance::isQmlGraphicsItem() const
-{
- return false;
-}
-
-
-bool ObjectNodeInstance::isGraphicsObject() const
-{
- return false;
-}
-
-bool ObjectNodeInstance::isTransition() const
-{
- return false;
-}
-
-bool ObjectNodeInstance::isPositioner() const
-{
- return false;
-}
-
-bool ObjectNodeInstance::isSGItem() const
-{
- return false;
-}
-
-bool ObjectNodeInstance::equalGraphicsItem(QGraphicsItem * /*item*/) const
-{
- return false;
-}
-
-QTransform ObjectNodeInstance::transform() const
-{
- return QTransform();
-}
-
-QTransform ObjectNodeInstance::customTransform() const
-{
- return QTransform();
-}
-
-QTransform ObjectNodeInstance::sceneTransform() const
-{
- return QTransform();
-}
-
-double ObjectNodeInstance::rotation() const
-{
- return 0.0;
-}
-
-double ObjectNodeInstance::scale() const
-{
- return 1.0;
-}
-
-QList<QGraphicsTransform *> ObjectNodeInstance::transformations() const
-{
- QList<QGraphicsTransform *> transformationsList;
-
- return transformationsList;
-}
-
-QPointF ObjectNodeInstance::transformOriginPoint() const
-{
- return QPoint();
-}
-
-double ObjectNodeInstance::zValue() const
-{
- return 0.0;
-}
-
-double ObjectNodeInstance::opacity() const
-{
- return 1.0;
-}
-
-bool ObjectNodeInstance::hasAnchor(const QString &/*name*/) const
-{
- return false;
-}
-
-bool ObjectNodeInstance::isAnchoredBySibling() const
-{
- return false;
-}
-
-bool ObjectNodeInstance::isAnchoredByChildren() const
-{
- return false;
-}
-
-QPair<QString, ServerNodeInstance> ObjectNodeInstance::anchor(const QString &/*name*/) const
-{
- return qMakePair(QString(), ServerNodeInstance());
-}
-
-
-static bool isList(const QDeclarativeProperty &property)
-{
- return property.propertyTypeCategory() == QDeclarativeProperty::List;
-}
-
-static bool isObject(const QDeclarativeProperty &property)
-{
- return (property.propertyTypeCategory() == QDeclarativeProperty::Object) ||
- //QVariant can also store QObjects. Lets trust our model.
- (QLatin1String(property.propertyTypeName()) == QLatin1String("QVariant"));
-}
-
-static QVariant objectToVariant(QObject *object)
-{
- return QVariant::fromValue(object);
-}
-
-static bool hasFullImplementedListInterface(const QDeclarativeListReference &list)
-{
- return list.isValid() && list.canCount() && list.canAt() && list.canAppend() && list.canClear();
-}
-
-static void removeObjectFromList(const QDeclarativeProperty &property, QObject *objectToBeRemoved, QDeclarativeEngine * engine)
-{
- QDeclarativeListReference listReference(property.object(), property.name().toLatin1(), engine);
-
- if (!hasFullImplementedListInterface(listReference)) {
- qWarning() << "Property list interface not fully implemented for Class " << property.property().typeName() << " in property " << property.name() << "!";
- return;
- }
-
- int count = listReference.count();
-
- QObjectList objectList;
-
- for(int i = 0; i < count; i ++) {
- QObject *listItem = listReference.at(i);
- if (listItem && listItem != objectToBeRemoved)
- objectList.append(listItem);
- }
-
- listReference.clear();
-
- foreach(QObject *object, objectList)
- listReference.append(object);
-}
-
-void ObjectNodeInstance::removeFromOldProperty(QObject *object, QObject *oldParent, const QString &oldParentProperty)
-{
- QDeclarativeProperty property(oldParent, oldParentProperty, context());
-
- if (!property.isValid())
- return;
-
- if (isList(property)) {
- removeObjectFromList(property, object, nodeInstanceServer()->engine());
- } else if (isObject(property)) {
- if (nodeInstanceServer()->hasInstanceForObject(oldParent)) {
- nodeInstanceServer()->instanceForObject(oldParent).resetProperty(oldParentProperty);
- }
- }
-
- if (object && object->parent())
- object->setParent(0);
-}
-
-void ObjectNodeInstance::addToNewProperty(QObject *object, QObject *newParent, const QString &newParentProperty)
-{
- QDeclarativeProperty property(newParent, newParentProperty, context());
-
- if (isList(property)) {
- QDeclarativeListReference list = qvariant_cast<QDeclarativeListReference>(property.read());
-
- if (!hasFullImplementedListInterface(list)) {
- qWarning() << "Property list interface not fully implemented for Class " << property.property().typeName() << " in property " << property.name() << "!";
- return;
- }
-
- list.append(object);
- } else if (isObject(property)) {
- property.write(objectToVariant(object));
- }
-
- QGraphicsObject *graphicsObject = qobject_cast<QGraphicsObject*>(object);
-
- if (object && !(graphicsObject && graphicsObject->parentItem()))
- object->setParent(newParent);
-
- Q_ASSERT(objectToVariant(object).isValid());
-}
-
-void ObjectNodeInstance::reparent(const ObjectNodeInstance::Pointer &oldParentInstance, const QString &oldParentProperty, const ObjectNodeInstance::Pointer &newParentInstance, const QString &newParentProperty)
-{
- if (oldParentInstance) {
- removeFromOldProperty(object(), oldParentInstance->object(), oldParentProperty);
- m_parentProperty.clear();
- }
-
- if (newParentInstance) {
- m_parentProperty = newParentProperty;
- addToNewProperty(object(), newParentInstance->object(), newParentProperty);
- }
-}
-
-void ObjectNodeInstance::setPropertyVariant(const QString &name, const QVariant &value)
-{
- QDeclarativeProperty property(object(), name, context());
-
- if (!property.isValid())
- return;
-
- QVariant oldValue = property.read();
- if (oldValue.type() == QVariant::Url) {
- QUrl url = oldValue.toUrl();
- QString path = url.toLocalFile();
- if (QFileInfo(path).exists() && nodeInstanceServer() && !path.isEmpty())
- nodeInstanceServer()->removeFilePropertyFromFileSystemWatcher(object(), name, path);
- }
-
-
- bool isWritten = property.write(value);
-
- if (!isWritten)
- qDebug() << "ObjectNodeInstance.setPropertyVariant: Cannot be written: " << object() << name << value;
-
- QVariant newValue = property.read();
- if (newValue.type() == QVariant::Url) {
- QUrl url = newValue.toUrl();
- QString path = url.toLocalFile();
- if (QFileInfo(path).exists() && nodeInstanceServer() && !path.isEmpty())
- nodeInstanceServer()->addFilePropertyToFileSystemWatcher(object(), name, path);
- }
-}
-
-void ObjectNodeInstance::setPropertyBinding(const QString &name, const QString &expression)
-{
- QDeclarativeProperty property(object(), name, context());
-
- if (!property.isValid())
- return;
-
- if (property.isProperty()) {
- QDeclarativeBinding *binding = new QDeclarativeBinding(expression, object(), context(), object());
- binding->setTarget(property);
- binding->setNotifyOnValueChanged(true);
- QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding);
- if (oldBinding)
- oldBinding->destroy();
- binding->update();
- if (binding->hasError())
- qDebug() <<" ObjectNodeInstance.setPropertyBinding has Error: " << object() << name << expression << binding->error().toString();
- } else {
- qWarning() << "ObjectNodeInstance.setPropertyBinding: Cannot set binding for property" << name << ": property is unknown for type";
- }
-}
-
-void ObjectNodeInstance::deleteObjectsInList(const QDeclarativeProperty &property)
-{
- QObjectList objectList;
- QDeclarativeListReference list = qvariant_cast<QDeclarativeListReference>(property.read());
-
- if (!hasFullImplementedListInterface(list)) {
- qWarning() << "Property list interface not fully implemented for Class " << property.property().typeName() << " in property " << property.name() << "!";
- return;
- }
-
- for(int i = 0; i < list.count(); i++) {
- objectList += list.at(i);
- }
-
- list.clear();
-}
-
-void ObjectNodeInstance::resetProperty(const QString &name)
-{
- doResetProperty(name);
-
- if (name == "font.pixelSize")
- doResetProperty("font.pointSize");
-
- if (name == "font.pointSize")
- doResetProperty("font.pixelSize");
-}
-
-void ObjectNodeInstance::refreshProperty(const QString &name)
-{
- QDeclarativeProperty property(object(), name, context());
-
- if (!property.isValid())
- return;
-
- QVariant oldValue(property.read());
-
- if (property.isResettable())
- property.reset();
- else
- property.write(resetValue(name));
-
- if (oldValue.type() == QVariant::Url) {
- QByteArray key = oldValue.toUrl().toEncoded(QUrl::FormattingOption(0x100));
- QString pixmapKey = QString::fromLatin1(key.constData(), key.count());
- QPixmapCache::remove(pixmapKey);
- }
-
- property.write(oldValue);
-}
-
-bool ObjectNodeInstance::hasBindingForProperty(const QString &name, bool *hasChanged) const
-{
- QDeclarativeProperty property(object(), name, context());
-
- bool hasBinding = QDeclarativePropertyPrivate::binding(property);
-
- if (hasChanged) {
- *hasChanged = hasBinding != m_hasBindingHash.value(name, false);
- if (*hasChanged)
- m_hasBindingHash.insert(name, hasBinding);
- }
-
- return QDeclarativePropertyPrivate::binding(property);
-}
-
-void ObjectNodeInstance::doResetProperty(const QString &propertyName)
-{
- m_modelAbstractPropertyHash.remove(propertyName);
-
- QDeclarativeProperty property(object(), propertyName, context());
-
- if (!property.isValid())
- return;
-
- QVariant oldValue = property.read();
- if (oldValue.type() == QVariant::Url) {
- QUrl url = oldValue.toUrl();
- QString path = url.toLocalFile();
- if (QFileInfo(path).exists() && nodeInstanceServer())
- nodeInstanceServer()->removeFilePropertyFromFileSystemWatcher(object(), propertyName, path);
- }
-
-
- QDeclarativeAbstractBinding *binding = QDeclarativePropertyPrivate::binding(property);
- if (binding) {
- binding->setEnabled(false, 0);
- binding->destroy();
- }
-
- if (property.isResettable()) {
- property.reset();
- } else if (property.propertyTypeCategory() == QDeclarativeProperty::List) {
- QDeclarativeListReference list = qvariant_cast<QDeclarativeListReference>(property.read());
-
- if (!hasFullImplementedListInterface(list)) {
- qWarning() << "Property list interface not fully implemented for Class " << property.property().typeName() << " in property " << property.name() << "!";
- return;
- }
-
- list.clear();
- } else if (property.isWritable()) {
- if (property.read() == resetValue(propertyName))
- return;
-
- property.write(resetValue(propertyName));
- }
-}
-
-QVariant ObjectNodeInstance::property(const QString &name) const
-{
- if (m_modelAbstractPropertyHash.contains(name))
- return QVariant::fromValue(m_modelAbstractPropertyHash.value(name));
-
- // TODO: handle model nodes
-
- QDeclarativeProperty property(object(), name, context());
- if (property.property().isEnumType()) {
- QVariant value = object()->property(name.toLatin1());
- return property.property().enumerator().valueToKey(value.toInt());
- }
-
- if (property.propertyType() == QVariant::Url) {
- QUrl url = property.read().toUrl();
- if (url.isEmpty())
- return QVariant();
-
- if (url.scheme() == "file") {
- int basePathLength = nodeInstanceServer()->fileUrl().toLocalFile().lastIndexOf('/');
- return QUrl(url.toLocalFile().mid(basePathLength + 1));
- }
- }
-
- return property.read();
-}
-
-QStringList allPropertyNames(QObject *object, const QString &baseName = QString(), QObjectList *inspectedObjects = new QObjectList)
-{
- QStringList propertyNameList;
-
-
- if (inspectedObjects== 0 || inspectedObjects->contains(object))
- return propertyNameList;
-
- inspectedObjects->append(object);
-
-
- const QMetaObject *metaObject = object->metaObject();
- for (int index = 0; index < metaObject->propertyCount(); ++index) {
- QMetaProperty metaProperty = metaObject->property(index);
- QDeclarativeProperty declarativeProperty(object, QLatin1String(metaProperty.name()));
- if (declarativeProperty.isValid() && declarativeProperty.propertyTypeCategory() == QDeclarativeProperty::Object) {
- if (declarativeProperty.name() != "parent") {
- QObject *childObject = QDeclarativeMetaType::toQObject(declarativeProperty.read());
- if (childObject)
- propertyNameList.append(allPropertyNames(childObject, baseName + QString::fromUtf8(metaProperty.name()) + '.', inspectedObjects));
- }
- } else if (QDeclarativeValueTypeFactory::valueType(metaProperty.userType())) {
- QDeclarativeValueType *valueType = QDeclarativeValueTypeFactory::valueType(metaProperty.userType());
- valueType->setValue(metaProperty.read(object));
- propertyNameList.append(allPropertyNames(valueType, baseName + QString::fromUtf8(metaProperty.name()) + '.', inspectedObjects));
- } else {
- propertyNameList.append(baseName + QString::fromUtf8(metaProperty.name()));
- }
- }
-
- return propertyNameList;
-}
-
-QStringList ObjectNodeInstance::propertyNames() const
-{
- if (isValid())
- return allPropertyNames(object());
- return QStringList();
-}
-
-QString ObjectNodeInstance::instanceType(const QString &name) const
-{
- QDeclarativeProperty property(object(), name, context());
- if (!property.isValid())
- return QLatin1String("undefined");
- return property.propertyTypeName();
-}
-
-QList<ServerNodeInstance> ObjectNodeInstance::childItems() const
-{
- return QList<ServerNodeInstance>();
-}
-
-QList<ServerNodeInstance> ObjectNodeInstance::stateInstances() const
-{
- return QList<ServerNodeInstance>();
-}
-
-void ObjectNodeInstance::setNodeSource(const QString & /*source*/)
-{
-}
-
-void ObjectNodeInstance::setDeleteHeldInstance(bool deleteInstance)
-{
- m_deleteHeldInstance = deleteInstance;
-}
-
-bool ObjectNodeInstance::deleteHeldInstance() const
-{
- return m_deleteHeldInstance;
-}
-
-ObjectNodeInstance::Pointer ObjectNodeInstance::create(QObject *object)
-{
- Pointer instance(new ObjectNodeInstance(object));
-
- instance->populateResetValueHash();
-
- return instance;
-}
-
-static void stopAnimation(QObject *object)
-{
- if (object == 0)
- return;
-
- QDeclarativeTransition *transition = qobject_cast<QDeclarativeTransition*>(object);
- QDeclarativeAbstractAnimation *animation = qobject_cast<QDeclarativeAbstractAnimation*>(object);
- QDeclarativeScriptAction *scriptAimation = qobject_cast<QDeclarativeScriptAction*>(object);
- QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(object);
- if(transition) {
- transition->setFromState("");
- transition->setToState("");
- } else if (animation) {
- if (scriptAimation) {
- scriptAimation->setScript(QDeclarativeScriptString());
- animation->setLoops(1);
- animation->complete();
- animation->setDisableUserControl();
- }
- } else if (timer) {
- timer->blockSignals(true);
- }
-}
-
-void allSubObject(QObject *object, QObjectList &objectList)
-{
- // don't add null pointer and stop if the object is already in the list
- if (!object || objectList.contains(object))
- return;
-
- objectList.append(object);
-
- for (int index = QObject::staticMetaObject.propertyOffset();
- index < object->metaObject()->propertyCount();
- index++) {
- QMetaProperty metaProperty = object->metaObject()->property(index);
-
- // search recursive in property objects
- if (metaProperty.isReadable()
- && metaProperty.isWritable()
- && QDeclarativeMetaType::isQObject(metaProperty.userType())) {
- if (metaProperty.name() != QLatin1String("parent")) {
- QObject *propertyObject = QDeclarativeMetaType::toQObject(metaProperty.read(object));
- allSubObject(propertyObject, objectList);
- }
-
- }
-
- // search recursive in property object lists
- if (metaProperty.isReadable()
- && QDeclarativeMetaType::isList(metaProperty.userType())) {
- QDeclarativeListReference list(object, metaProperty.name());
- if (list.canCount() && list.canAt()) {
- for (int i = 0; i < list.count(); i++) {
- QObject *propertyObject = list.at(i);
- allSubObject(propertyObject, objectList);
-
- }
- }
- }
- }
-
- // search recursive in object children list
- foreach(QObject *childObject, object->children()) {
- allSubObject(childObject, objectList);
- }
-
- // search recursive in graphics item childItems list
- QGraphicsObject *graphicsObject = qobject_cast<QGraphicsObject*>(object);
- if (graphicsObject) {
- foreach(QGraphicsItem *item, graphicsObject->childItems()) {
- QGraphicsObject *childObject = item->toGraphicsObject();
- allSubObject(childObject, objectList);
- }
- }
-}
-
-static void disableTiledBackingStore(QObject *object)
-{
-#ifndef QT_NO_WEBKIT
- QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(object);
- if (webView)
- webView->settings()->setAttribute(QWebSettings::TiledBackingStoreEnabled, false);
-#else
- Q_UNUSED(object);
-#endif
-}
-
-void tweakObjects(QObject *object)
-{
- QObjectList objectList;
- allSubObject(object, objectList);
- foreach(QObject* childObject, objectList) {
- disableTiledBackingStore(childObject);
- stopAnimation(childObject);
- }
-}
-
-QObject *ObjectNodeInstance::createComponentWrap(const QString &nodeSource, const QStringList &imports, QDeclarativeContext *context)
-{
- QDeclarativeComponent *component = new QDeclarativeComponent(context->engine());
-
- QByteArray importArray;
-
- foreach (const QString &import, imports) {
- importArray.append(import.toUtf8());
- }
-
- QByteArray data(nodeSource.toUtf8());
-
- data.prepend(importArray);
-
- component->setData(data, context->baseUrl().resolved(QUrl("createComponent.qml")));
-
- QObject *object = component;
- tweakObjects(object);
-
- if (object && context)
- QDeclarativeEngine::setContextForObject(object, context);
-
- QDeclarativeEngine::setObjectOwnership(object, QDeclarativeEngine::CppOwnership);
-
- return object;
-}
-
-QObject *ObjectNodeInstance::createComponent(const QString &componentPath, QDeclarativeContext *context)
-{
- QDeclarativeComponent component(context->engine(), QUrl::fromLocalFile(componentPath));
- QObject *object = component.beginCreate(context);
- tweakObjects(object);
- component.completeCreate();
-
- if (component.isError()) {
- qDebug() << componentPath;
- foreach(const QDeclarativeError &error, component.errors())
- qDebug() << error;
- }
-
- QDeclarativeEngine::setObjectOwnership(object, QDeclarativeEngine::CppOwnership);
-
- return object;
-}
-
-QObject *ObjectNodeInstance::createCustomParserObject(const QString &nodeSource, const QStringList &imports, QDeclarativeContext *context)
-{
- QDeclarativeComponent component(context->engine());
-
- QByteArray importArray;
- foreach(const QString &import, imports) {
- importArray.append(import.toUtf8());
- }
-
- QByteArray data(nodeSource.toUtf8());
-
- data.prepend(importArray);
-
- component.setData(data, context->baseUrl().resolved(QUrl("createCustomParserObject.qml")));
-
- QObject *object = component.beginCreate(context);
- tweakObjects(object);
- component.completeCreate();
-
- QDeclarativeEngine::setObjectOwnership(object, QDeclarativeEngine::CppOwnership);
-
- return object;
-}
-
-QObject *ObjectNodeInstance::createPrimitive(const QString &typeName, int majorNumber, int minorNumber, QDeclarativeContext *context)
-{
- QObject *object = 0;
- QDeclarativeType *type = QDeclarativeMetaType::qmlType(typeName.toUtf8(), majorNumber, minorNumber);
- if (type) {
- if (type->typeName() == "QDeclarativeComponent") {
- object = new QDeclarativeComponent(context->engine(), 0);
- } else {
- object = type->create();
- }
- } else {
- qWarning() << "QuickDesigner: Cannot create an object of type"
- << QString("%1 %2,%3").arg(typeName).arg(majorNumber).arg(minorNumber)
- << "- type isn't known to declarative meta type system";
- }
-
- tweakObjects(object);
-
- if (object && context)
- QDeclarativeEngine::setContextForObject(object, context);
-
- QDeclarativeEngine::setObjectOwnership(object, QDeclarativeEngine::CppOwnership);
-
- return object;
-}
-
-QObject *ObjectNodeInstance::object() const
-{
- if (!m_object.isNull() && !QObjectPrivate::get(m_object.data())->wasDeleted)
- return m_object.data();
- return 0;
-}
-
-bool ObjectNodeInstance::hasContent() const
-{
- return false;
-}
-
-bool ObjectNodeInstance::isResizable() const
-{
- return false;
-}
-
-bool ObjectNodeInstance::isMovable() const
-{
- return false;
-}
-
-bool ObjectNodeInstance::isInPositioner() const
-{
- return m_isInPositioner;
-}
-
-void ObjectNodeInstance::setInPositioner(bool isInPositioner)
-{
- m_isInPositioner = isInPositioner;
-}
-
-void ObjectNodeInstance::updateAnchors()
-{
-}
-
-QDeclarativeContext *ObjectNodeInstance::context() const
-{
- if (nodeInstanceServer())
- return nodeInstanceServer()->context();
-
- qWarning() << "Error: No NodeInstanceServer";
- return 0;
-}
-
-QDeclarativeEngine *ObjectNodeInstance::engine() const
-{
- return nodeInstanceServer()->engine();
-}
-
-void ObjectNodeInstance::paintUpdate()
-{
-}
-
-void ObjectNodeInstance::activateState()
-{
-}
-
-void ObjectNodeInstance::deactivateState()
-{
-}
-
-QStringList propertyNameForWritableProperties(QObject *object, const QString &baseName = QString(), QObjectList *inspectedObjects = new QObjectList())
-{
- QStringList propertyNameList;
-
- if (inspectedObjects == 0 || inspectedObjects->contains(object))
- return propertyNameList;
-
- inspectedObjects->append(object);
-
- const QMetaObject *metaObject = object->metaObject();
- for (int index = 0; index < metaObject->propertyCount(); ++index) {
- QMetaProperty metaProperty = metaObject->property(index);
- QDeclarativeProperty declarativeProperty(object, QLatin1String(metaProperty.name()));
- if (declarativeProperty.isValid() && !declarativeProperty.isWritable() && declarativeProperty.propertyTypeCategory() == QDeclarativeProperty::Object) {
- if (declarativeProperty.name() != "parent") {
- QObject *childObject = QDeclarativeMetaType::toQObject(declarativeProperty.read());
- if (childObject)
- propertyNameList.append(propertyNameForWritableProperties(childObject, baseName + QString::fromUtf8(metaProperty.name()) + '.', inspectedObjects));
- }
- } else if (QDeclarativeValueTypeFactory::valueType(metaProperty.userType())) {
- QDeclarativeValueType *valueType = QDeclarativeValueTypeFactory::valueType(metaProperty.userType());
- valueType->setValue(metaProperty.read(object));
- propertyNameList.append(propertyNameForWritableProperties(valueType, baseName + QString::fromUtf8(metaProperty.name()) + '.', inspectedObjects));
- } else if (metaProperty.isReadable() && metaProperty.isWritable()) {
- propertyNameList.append(baseName + QString::fromUtf8(metaProperty.name()));
- }
- }
-
- return propertyNameList;
-}
-
-void ObjectNodeInstance::populateResetValueHash()
-{
- QStringList propertyNameList = propertyNameForWritableProperties(object());
-
- foreach(const QString &propertyName, propertyNameList) {
- QDeclarativeProperty property(object(), propertyName, QDeclarativeEngine::contextForObject(object()));
- if (property.isWritable())
- m_resetValueHash.insert(propertyName, property.read());
- }
-}
-
-QVariant ObjectNodeInstance::resetValue(const QString &propertyName) const
-{
- return m_resetValueHash.value(propertyName);
-}
-
-void ObjectNodeInstance::paint(QPainter * /*painter*/)
-{
-}
-
-QImage ObjectNodeInstance::renderImage() const
-{
- return QImage();
-}
-
-QObject *ObjectNodeInstance::parent() const
-{
- if (!object())
- return 0;
-
- return object()->parent();
-}
-
-QObject *parentObject(QObject *object)
-{
- QGraphicsObject *graphicsObject = qobject_cast<QGraphicsObject*>(object);
- if (graphicsObject)
- return graphicsObject->parentObject();
-
- return object->parent();
-}
-
-ObjectNodeInstance::Pointer ObjectNodeInstance::parentInstance() const
-{
- QObject *parentHolder = parent();
- if (!nodeInstanceServer())
- return Pointer();
-
- while (parentHolder) {
- if (nodeInstanceServer()->hasInstanceForObject(parentHolder))
- return nodeInstanceServer()->instanceForObject(parentHolder).internalInstance();
-
- parentHolder = parentObject(parentHolder);
- }
-
- return Pointer();
-}
-
-QRectF ObjectNodeInstance::boundingRect() const
-{
- return QRect();
-}
-
-QPointF ObjectNodeInstance::position() const
-{
- return QPointF();
-}
-
-QSizeF ObjectNodeInstance::size() const
-{
- return QSizeF();
-}
-
-int ObjectNodeInstance::penWidth() const
-{
- return 0;
-}
-
-void ObjectNodeInstance::createDynamicProperty(const QString &name, const QString &/*typeName*/)
-{
- if (m_metaObject == 0) {
- qWarning() << "ObjectNodeInstance.createDynamicProperty: No Metaobject.";
- return;
- }
-
- m_metaObject->createNewProperty(name);
-}
-
-bool ObjectNodeInstance::updateStateVariant(const ObjectNodeInstance::Pointer &/*target*/, const QString &/*propertyName*/, const QVariant &/*value*/)
-{
- return false;
-}
-
-bool ObjectNodeInstance::updateStateBinding(const ObjectNodeInstance::Pointer &/*target*/, const QString &/*propertyName*/, const QString &/*expression*/)
-{
- return false;
-}
-
-bool ObjectNodeInstance::resetStateProperty(const ObjectNodeInstance::Pointer &/*target*/, const QString &/*propertyName*/, const QVariant &/*resetValue*/)
-{
- return false;
-}
-
-void ObjectNodeInstance::doComponentComplete()
-{
-
-}
-
-bool ObjectNodeInstance::isRootNodeInstance() const
-{
- return nodeInstanceServer()->rootNodeInstance().isWrappingThisObject(object());
-}
-
-bool ObjectNodeInstance::isValid() const
-{
- return instanceId() >= 0 && object();
-}
-
-}
-}
-
diff --git a/src/tools/qmlpuppet/instances/objectnodeinstance.h b/src/tools/qmlpuppet/instances/objectnodeinstance.h
deleted file mode 100644
index 4cc3fd155f..0000000000
--- a/src/tools/qmlpuppet/instances/objectnodeinstance.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef ABSTRACTNODEINSTANCE_H
-#define ABSTRACTNODEINSTANCE_H
-
-#include <QPainter>
-#include <QStyleOptionGraphicsItem>
-#include <QSharedPointer>
-#include <QScopedPointer>
-#include <QWeakPointer>
-#include "nodeinstanceserver.h"
-#include "nodeinstancemetaobject.h"
-#include "nodeinstancesignalspy.h"
-
-QT_BEGIN_NAMESPACE
-class QGraphicsItem;
-class QDeclarativeContext;
-class QDeclarativeEngine;
-class QDeclarativeProperty;
-class QDeclarativeContext;
-class QDeclarativeBinding;
-QT_END_NAMESPACE
-
-namespace QmlDesigner {
-
-class NodeInstanceServer;
-
-
-namespace Internal {
-
-class QmlGraphicsItemNodeInstance;
-class GraphicsWidgetNodeInstance;
-class GraphicsViewNodeInstance;
-class GraphicsSceneNodeInstance;
-class ProxyWidgetNodeInstance;
-class WidgetNodeInstance;
-
-class ObjectNodeInstance
-{
-public:
- typedef QSharedPointer<ObjectNodeInstance> Pointer;
- typedef QWeakPointer<ObjectNodeInstance> WeakPointer;
- ObjectNodeInstance(QObject *object);
-
- virtual ~ObjectNodeInstance();
- void destroy();
- //void setModelNode(const ModelNode &node);
-
- static Pointer create(QObject *objectToBeWrapped);
- static QObject *createPrimitive(const QString &typeName, int majorNumber, int minorNumber, QDeclarativeContext *context);
- static QObject *createCustomParserObject(const QString &nodeSource, const QStringList &imports, QDeclarativeContext *context);
- static QObject *createComponent(const QString &componentPath, QDeclarativeContext *context);
- static QObject *createComponentWrap(const QString &nodeSource, const QStringList &imports, QDeclarativeContext *context);
-
- void setInstanceId(qint32 id);
- qint32 instanceId() const;
-
- NodeInstanceServer *nodeInstanceServer() const;
- void setNodeInstanceServer(NodeInstanceServer *server);
- virtual void initializePropertyWatcher(const Pointer &objectNodeInstance);
- virtual void initialize(const Pointer &objectNodeInstance);
- virtual void paint(QPainter *painter);
- virtual QImage renderImage() const;
-
- virtual QObject *parent() const;
-
- Pointer parentInstance() const;
-
- virtual void reparent(const ObjectNodeInstance::Pointer &oldParentInstance, const QString &oldParentProperty, const ObjectNodeInstance::Pointer &newParentInstance, const QString &newParentProperty);
-
- virtual void setId(const QString &id);
- virtual QString id() const;
-
- virtual bool isQmlGraphicsItem() const;
- virtual bool isGraphicsObject() const;
- virtual bool isTransition() const;
- virtual bool isPositioner() const;
- virtual bool isSGItem() const;
-
- virtual bool equalGraphicsItem(QGraphicsItem *item) const;
-
- virtual QRectF boundingRect() const;
-
- virtual QPointF position() const;
- virtual QSizeF size() const;
- virtual QTransform transform() const;
- virtual QTransform customTransform() const;
- virtual QTransform sceneTransform() const;
- virtual double opacity() const;
-
- virtual int penWidth() const;
-
- virtual bool hasAnchor(const QString &name) const;
- virtual QPair<QString, ServerNodeInstance> anchor(const QString &name) const;
- virtual bool isAnchoredBySibling() const;
- virtual bool isAnchoredByChildren() const;
-
- virtual double rotation() const;
- virtual double scale() const;
- virtual QList<QGraphicsTransform *> transformations() const;
- virtual QPointF transformOriginPoint() const;
- virtual double zValue() const;
-
- virtual void setPropertyVariant(const QString &name, const QVariant &value);
- virtual void setPropertyBinding(const QString &name, const QString &expression);
- virtual QVariant property(const QString &name) const;
- virtual void resetProperty(const QString &name);
- virtual void refreshProperty(const QString &name);
- virtual QString instanceType(const QString &name) const;
- QStringList propertyNames() const;
-
- virtual QList<ServerNodeInstance> childItems() const;
-
- void createDynamicProperty(const QString &name, const QString &typeName);
- void setDeleteHeldInstance(bool deleteInstance);
- bool deleteHeldInstance() const;
-
- virtual void updateAnchors();
- virtual void paintUpdate();
-
- virtual void activateState();
- virtual void deactivateState();
-
- void populateResetValueHash();
- QVariant resetValue(const QString &propertyName) const;
-
- QObject *object() const;
-
- virtual bool hasContent() const;
- virtual bool isResizable() const;
- virtual bool isMovable() const;
- bool isInPositioner() const;
- void setInPositioner(bool isInPositioner);
-
- bool hasBindingForProperty(const QString &name, bool *hasChanged = 0) const;
-
- QDeclarativeContext *context() const;
- QDeclarativeEngine *engine() const;
-
- virtual bool updateStateVariant(const ObjectNodeInstance::Pointer &target, const QString &propertyName, const QVariant &value);
- virtual bool updateStateBinding(const ObjectNodeInstance::Pointer &target, const QString &propertyName, const QString &expression);
- virtual bool resetStateProperty(const ObjectNodeInstance::Pointer &target, const QString &propertyName, const QVariant &resetValue);
-
-
- bool isValid() const;
- bool isRootNodeInstance() const;
-
- virtual void doComponentComplete();
-
- virtual QList<ServerNodeInstance> stateInstances() const;
-
- virtual void setNodeSource(const QString &source);
-
-protected:
- void doResetProperty(const QString &propertyName);
- void removeFromOldProperty(QObject *object, QObject *oldParent, const QString &oldParentProperty);
- void addToNewProperty(QObject *object, QObject *newParent, const QString &newParentProperty);
- void deleteObjectsInList(const QDeclarativeProperty &metaProperty);
-
-private:
- QHash<QString, QVariant> m_resetValueHash;
- QHash<QString, ServerNodeInstance> m_modelAbstractPropertyHash;
- mutable QHash<QString, bool> m_hasBindingHash;
- qint32 m_instanceId;
- QString m_id;
-
- QWeakPointer<NodeInstanceServer> m_nodeInstanceServer;
- QString m_parentProperty;
- bool m_deleteHeldInstance;
- QWeakPointer<QObject> m_object;
- NodeInstanceMetaObject *m_metaObject;
- NodeInstanceSignalSpy m_signalSpy;
- bool m_isInPositioner;
-};
-
-
-} // namespace Internal
-} // namespace QmlDesigner
-
-#endif // ABSTRACTNODEINSTANCE_H
diff --git a/src/tools/qmlpuppet/instances/qmlpropertychangesnodeinstance.cpp b/src/tools/qmlpuppet/instances/qmlpropertychangesnodeinstance.cpp
deleted file mode 100644
index 4f706e4c7c..0000000000
--- a/src/tools/qmlpuppet/instances/qmlpropertychangesnodeinstance.cpp
+++ /dev/null
@@ -1,647 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "qmlpropertychangesnodeinstance.h"
-#include "qmlstatenodeinstance.h"
-#include <QDeclarativeEngine>
-#include <QDeclarativeContext>
-#include <QDeclarativeExpression>
-#include <private/qdeclarativebinding_p.h>
-#include <QMutableListIterator>
-
-
-#include <private/qdeclarativestate_p_p.h>
-#include <private/qdeclarativepropertychanges_p.h>
-#include <private/qdeclarativeproperty_p.h>
-
-namespace QmlDesigner {
-namespace Internal {
-
-//QmlPropertyChangesObject::QmlPropertyChangesObject() :
-// QDeclarativeStateOperation(),
-// m_restoreEntryValues(true),
-// m_isExplicit(false)
-//{
-//}
-
-//QDeclarativeStateOperation::ActionList QmlPropertyChangesObject::actions()
-//{
-// QMutableListIterator<QDeclarativeAction> actionIterator(m_qmlActionList);
-
-// while (actionIterator.hasNext()) {
-// QDeclarativeAction &action = actionIterator.next();
-// action.fromBinding = QDeclarativePropertyPrivate::binding(action.property);
-// action.fromValue = action.property.read();
-// if (m_expressionHash.contains(action.specifiedProperty)) {
-// if(m_expressionHash[action.specifiedProperty].second.isNull()) {
-// if (targetObject()) {
-// QDeclarativeBinding *binding = new QDeclarativeBinding(m_expressionHash[action.specifiedProperty].first, targetObject(), QDeclarativeEngine::contextForObject(targetObject()), this);
-// binding->setTarget(action.property);
-// binding->setNotifyOnValueChanged(true);
-// action.toBinding = binding;
-// action.toValue = binding->evaluate();
-// m_expressionHash.insert(action.specifiedProperty, ExpressionPair(m_expressionHash[action.specifiedProperty].first, binding));
-// } else {
-// action.toBinding = 0;
-// }
-// } else {
-// action.toBinding = m_expressionHash[action.specifiedProperty].second.data();
-// action.toValue = m_expressionHash[action.specifiedProperty].second->evaluate();
-// }
-// } else {
-// action.toBinding = 0;
-// }
-// }
-
-// return m_qmlActionList;
-//}
-
-//QObject *QmlPropertyChangesObject::targetObject() const
-//{
-// return m_targetObject.data();
-//}
-
-//void QmlPropertyChangesObject::setTargetObject(QObject *object)
-//{
-// if (m_targetObject.data() == object)
-// return;
-
-// QMutableListIterator<QDeclarativeAction> actionIterator(m_qmlActionList);
-// while (actionIterator.hasNext()) {
-// QDeclarativeAction &qmlAction = actionIterator.next();
-// if (m_expressionHash.contains(qmlAction.specifiedProperty) && m_expressionHash[qmlAction.specifiedProperty].second) {
-// if (isActive()) {
-// QDeclarativePropertyPrivate::setBinding(qmlAction.property, 0, QDeclarativePropertyPrivate::DontRemoveBinding| QDeclarativePropertyPrivate::BypassInterceptor);
-// qmlAction.property.write(qmlAction.fromValue);
-// m_expressionHash[qmlAction.specifiedProperty].second.data()->destroy();
-// }
-
-
-// qmlAction.toBinding = 0;
-// }
-
-// if (isActive() && targetObject()) {
-// updateRevertValueAndBinding(qmlAction.specifiedProperty);
-// }
-// }
-
-// m_targetObject = object;
-
-// actionIterator.toFront();
-// while (actionIterator.hasNext()) {
-// QDeclarativeAction &qmlAction = actionIterator.next();
-// qmlAction.specifiedObject = object;
-// qmlAction.property = createMetaProperty(qmlAction.specifiedProperty);
-// qmlAction.fromValue = qmlAction.property.read();
-// qmlAction.fromBinding = QDeclarativePropertyPrivate::binding(qmlAction.property);
-
-// if (m_expressionHash.contains(qmlAction.specifiedProperty) && targetObject()) {
-// QDeclarativeBinding *binding = new QDeclarativeBinding(m_expressionHash[qmlAction.specifiedProperty].first ,targetObject(), QDeclarativeEngine::contextForObject(targetObject()));
-// binding->setTarget(qmlAction.property);
-// binding->setNotifyOnValueChanged(true);
-// qmlAction.toBinding = binding;
-// m_expressionHash.insert(qmlAction.specifiedProperty, ExpressionPair(m_expressionHash[qmlAction.specifiedProperty].first, binding));
-// if (isActive()) {
-// QDeclarativePropertyPrivate::setBinding(qmlAction.property, qmlAction.toBinding, QDeclarativePropertyPrivate::DontRemoveBinding| QDeclarativePropertyPrivate::BypassInterceptor);
-// }
-// }
-
-// if (isActive() && targetObject()) {
-// updateRevertValueAndBinding(qmlAction.specifiedProperty);
-// }
-// }
-//}
-
-//bool QmlPropertyChangesObject::restoreEntryValues() const
-//{
-// return m_restoreEntryValues;
-//}
-
-//void QmlPropertyChangesObject::setRestoreEntryValues(bool restore)
-//{
-// m_restoreEntryValues = restore;
-//}
-
-//bool QmlPropertyChangesObject::isExplicit() const
-//{
-// return m_isExplicit;
-//}
-
-//void QmlPropertyChangesObject::setIsExplicit(bool isExplicit)
-//{
-// m_isExplicit = isExplicit;
-//}
-
-//QDeclarativeProperty QmlPropertyChangesObject::createMetaProperty(const QString &property)
-//{
-// QDeclarativeProperty prop(m_targetObject.data(), property, QDeclarativeEngine::contextForObject(m_targetObject.data()));
-// if (!prop.isValid()) {
-// qWarning() << "Cannot assign to non-existent property" << property;
-// return QDeclarativeProperty();
-// } else if (!prop.isWritable()) {
-// qWarning() << "Cannot assign to read-only property" << property;
-// return QDeclarativeProperty();
-// }
-// return prop;
-//}
-
-QmlPropertyChangesNodeInstance::QmlPropertyChangesNodeInstance(QDeclarativePropertyChanges *propertyChangesObject) :
- ObjectNodeInstance(propertyChangesObject)
-{
-}
-
-QmlPropertyChangesNodeInstance::Pointer QmlPropertyChangesNodeInstance::create(QObject *object)
-{
- QDeclarativePropertyChanges *propertyChange = qobject_cast<QDeclarativePropertyChanges*>(object);
-
- Q_ASSERT(propertyChange);
-
- Pointer instance(new QmlPropertyChangesNodeInstance(propertyChange));
-
- instance->populateResetValueHash();
-
- return instance;
-}
-
-void QmlPropertyChangesNodeInstance::setPropertyVariant(const QString &name, const QVariant &value)
-{
- QMetaObject metaObject = QDeclarativePropertyChanges::staticMetaObject;
-
- if (metaObject.indexOfProperty(name.toLatin1()) > 0) { // 'restoreEntryValues', 'explicit'
- ObjectNodeInstance::setPropertyVariant(name, value);
- } else {
- changesObject()->changeValue(name.toLatin1(), value);
- QObject *targetObject = changesObject()->object();
- if (targetObject && nodeInstanceServer()->activeStateInstance().isWrappingThisObject(changesObject()->state())) {
- ServerNodeInstance targetInstance = nodeInstanceServer()->instanceForObject(targetObject);
- targetInstance.setPropertyVariant(name, value);
- }
- }
-}
-
-void QmlPropertyChangesNodeInstance::setPropertyBinding(const QString &name, const QString &expression)
-{
- QMetaObject metaObject = QDeclarativePropertyChanges::staticMetaObject;
-
- if (metaObject.indexOfProperty(name.toLatin1()) > 0) { // 'restoreEntryValues', 'explicit'
- ObjectNodeInstance::setPropertyBinding(name, expression);
- } else {
- changesObject()->changeExpression(name.toLatin1(), expression);
- }
-}
-
-QVariant QmlPropertyChangesNodeInstance::property(const QString &name) const
-{
- return changesObject()->property(name.toLatin1());
-}
-
-void QmlPropertyChangesNodeInstance::resetProperty(const QString &name)
-{
- changesObject()->removeProperty(name.toLatin1());
-}
-
-
-void QmlPropertyChangesNodeInstance::reparent(const ServerNodeInstance &oldParentInstance, const QString &oldParentProperty, const ServerNodeInstance &newParentInstance, const QString &newParentProperty)
-{
- changesObject()->detachFromState();
-
- ObjectNodeInstance::reparent(oldParentInstance.internalInstance(), oldParentProperty, newParentInstance.internalInstance(), newParentProperty);
-
- changesObject()->attachToState();
-}
-
-//QDeclarativeState *QmlPropertyChangesObject::state() const
-//{
-// if (!parent())
-// return 0;
-
-// Q_ASSERT(qobject_cast<QDeclarativeState*>(parent()));
-// return static_cast<QDeclarativeState*>(parent());
-//}
-
-//QDeclarativeStateGroup *QmlPropertyChangesObject::stateGroup() const
-//{
-// if (!state())
-// return 0;
-
-// return state()->stateGroup();
-//}
-
-//QDeclarativeStatePrivate *QmlPropertyChangesObject::statePrivate() const
-//{
-// if (!parent() || QObjectPrivate::get(parent())->wasDeleted)
-// return 0;
-
-// Q_ASSERT(qobject_cast<QDeclarativeState*>(parent()));
-// return static_cast<QDeclarativeStatePrivate*>(QObjectPrivate::get(parent()));
-//}
-
-QDeclarativePropertyChanges *QmlPropertyChangesNodeInstance::changesObject() const
-{
- Q_ASSERT(qobject_cast<QDeclarativePropertyChanges*>(object()));
- return static_cast<QDeclarativePropertyChanges*>(object());
-}
-
-
-//QDeclarativeAction QmlPropertyChangesObject::createQDeclarativeAction(const QString &propertyName)
-//{
-// QDeclarativeProperty qmlMetaProperty = createMetaProperty(propertyName);
-
-// QDeclarativeAction qmlAction;
-// qmlAction.restore = true;
-// qmlAction.property = qmlMetaProperty;
-// qmlAction.fromValue = qmlMetaProperty.read();
-// qmlAction.fromBinding = QDeclarativePropertyPrivate::binding(qmlMetaProperty);
-// qmlAction.specifiedObject = m_targetObject.data();
-// qmlAction.specifiedProperty = propertyName;
-// qmlAction.event = 0;
-
-// return qmlAction;
-//}
-
-//bool QmlPropertyChangesObject::hasActionForProperty(const QString &propertyName) const
-//{
-// for(ActionList::iterator actionIterator = m_qmlActionList.begin();
-// actionIterator != m_qmlActionList.end();
-// ++actionIterator) {
-// QDeclarativeAction &qmlAction = *actionIterator;
-// if (qmlAction.specifiedProperty == propertyName) {
-// return true;
-// }
-// }
-
-// return false;
-//}
-
-//QDeclarativeAction &QmlPropertyChangesObject::qmlActionForProperty(const QString &propertyName) const
-//{
-// for(ActionList::iterator actionIterator = m_qmlActionList.begin();
-// actionIterator != m_qmlActionList.end();
-// ++actionIterator) {
-// QDeclarativeAction &qmlAction = *actionIterator;
-// if (qmlAction.specifiedProperty == propertyName)
-// return qmlAction;
-// }
-
-// Q_ASSERT(false);
-
-// return m_qmlActionList[0];
-//}
-
-//void QmlPropertyChangesObject::removeActionForProperty(const QString &propertyName)
-//{
-// QMutableListIterator<QDeclarativeAction> actionIterator(m_qmlActionList);
-// while (actionIterator.hasNext()) {
-// QDeclarativeAction &qmlAction = actionIterator.next();
-// if (qmlAction.specifiedProperty == propertyName)
-// actionIterator.remove();
-// }
-
-// if (statePrivate()) {
-// QMutableListIterator<QDeclarativeSimpleAction> simpleActionIterator(statePrivate()->revertList);
-// while (simpleActionIterator.hasNext()) {
-// QDeclarativeSimpleAction &qmlSimpleAction = simpleActionIterator.next();
-// if (qmlSimpleAction.specifiedProperty == propertyName && qmlSimpleAction.specifiedObject == targetObject()) {
-// simpleActionIterator.remove();
-// }
-// }
-// }
-//}
-
-//bool QmlPropertyChangesObject::isActive() const
-//{
-// if (state() && stateGroup())
-// return state()->name() == stateGroup()->state();
-
-// return false;
-//}
-//QmlPropertyChangesObject::~QmlPropertyChangesObject()
-//{
-// removeFromStateRevertList();
-//}
-
-//void QmlPropertyChangesObject::removeFromStateRevertList()
-//{
-// if (statePrivate()) {
-// QMutableListIterator<QDeclarativeSimpleAction> simpleActionIterator(statePrivate()->revertList);
-// while(simpleActionIterator.hasNext()) {
-// QDeclarativeSimpleAction &simpleAction = simpleActionIterator.next();
-// if (simpleAction.specifiedObject == targetObject()) {
-// if (simpleAction.property.isValid()) {
-// if (simpleAction.binding) {
-// QDeclarativePropertyPrivate::setBinding(simpleAction.property, simpleAction.binding);
-// } else if (simpleAction.value.isValid()) {
-// QDeclarativePropertyPrivate::setBinding(simpleAction.property, 0);
-// simpleAction.property.write(simpleAction.value);
-// }
-// }
-// simpleActionIterator.remove();
-// }
-// }
-// }
-//}
-
-//void QmlPropertyChangesObject::addToStateRevertList()
-//{
-// if (isActive() && statePrivate()) {
-// QListIterator<QDeclarativeAction> actionIterator(m_qmlActionList);
-// while (actionIterator.hasNext()) {
-// const QDeclarativeAction &qmlAction = actionIterator.next();
-// QDeclarativeSimpleAction simpleAction(qmlAction);
-// simpleAction.binding = qmlAction.fromBinding;
-// simpleAction.value = qmlAction.fromValue;
-// statePrivate()->revertList.append(simpleAction);
-// if (qmlAction.toBinding)
-// QDeclarativePropertyPrivate::setBinding(qmlAction.property, qmlAction.toBinding);
-// else
-// qmlAction.property.write(qmlAction.toValue);
-// }
-// }
-//}
-
-//void QmlPropertyChangesObject::updateRevertValueAndBinding(const QString &name)
-//{
-// if (isActive() && statePrivate()) {
-// typedef QList<QDeclarativeSimpleAction> SimpleActionList;
-// if (!statePrivate()->revertList.isEmpty()) {
-// for(SimpleActionList::iterator actionIterator = statePrivate()->revertList.begin();
-// actionIterator != statePrivate()->revertList.end();
-// ++actionIterator) {
-// //simple action defines values and bindings to revert current state
-// QDeclarativeSimpleAction &simpleAction = *actionIterator;
-// if (simpleAction.specifiedObject == targetObject()
-// && simpleAction.specifiedProperty == name) {
-// const QDeclarativeAction &qmlAction = qmlActionForProperty(name);
-// simpleAction.value = qmlAction.fromValue;
-// simpleAction.binding = qmlAction.fromBinding;
-// simpleAction.specifiedObject = qmlAction.specifiedObject;
-// simpleAction.specifiedProperty = qmlAction.specifiedProperty;
-// simpleAction.property = qmlAction.property;
-// return; //return since we just had to update exisisting simple action
-// }
-// }
-// }
-
-// //simple action does not exist, yet
-
-// const QDeclarativeAction &qmlAction = qmlActionForProperty(name);
-// QDeclarativeSimpleAction simpleAction(qmlAction);
-// simpleAction.binding = qmlAction.fromBinding;
-// simpleAction.value = qmlAction.fromValue;
-// statePrivate()->revertList.append(simpleAction);
-// }
-//}
-
-//void QmlPropertyChangesObject::setVariantValue(const QString &name, const QVariant & value)
-//{
-// if (!hasActionForProperty(name)) {
-// m_qmlActionList.append(createQDeclarativeAction(name));
-// }
-
-// QDeclarativeAction &qmlAction = qmlActionForProperty(name);
-// if (qmlAction.fromBinding)
-// qmlAction.fromBinding->setEnabled(false, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
-
-// qmlAction.toValue = value;
-//}
-
-//void QmlPropertyChangesObject::setExpression(const QString &name, const QString &expression)
-//{
-// if (!hasActionForProperty(name)) {
-// m_qmlActionList.append(createQDeclarativeAction(name));
-// }
-
-// QDeclarativeContext *context = QDeclarativeEngine::contextForObject(targetObject());
-// QDeclarativeBinding *binding = 0;
-// QDeclarativeProperty metaProperty(targetObject(), name, context);
-
-// QDeclarativeAction &qmlAction = qmlActionForProperty(name);
-// if (m_expressionHash.contains(name) && m_expressionHash[name].second) {
-// if (QDeclarativePropertyPrivate::binding(metaProperty) == m_expressionHash[name].second.data())
-// QDeclarativePropertyPrivate::setBinding(metaProperty, 0, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
-// m_expressionHash.take(name).second->destroy();
-// qmlAction.toBinding = 0;
-// }
-
-
-// if (metaProperty.isValid() && metaProperty.isProperty()) {
-// binding = new QDeclarativeBinding(expression, targetObject(), context, this);
-// binding->setTarget(metaProperty);
-// binding->setNotifyOnValueChanged(true);
-// qmlAction.toBinding = binding;
-// m_expressionHash.insert(name, ExpressionPair(expression, binding));
-// } else {
-// m_expressionHash.insert(name, ExpressionPair(expression, static_cast<QDeclarativeBinding*>(0)));
-// }
-
-// updateRevertValueAndBinding(name);
-// if (isActive() && binding)
-// QDeclarativePropertyPrivate::setBinding(metaProperty, binding, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
-//}
-
-//void QmlPropertyChangesObject::removeVariantValue(const QString &name)
-//{
-// if (hasActionForProperty(name)) {
-// QDeclarativeAction &qmlAction = qmlActionForProperty(name);
-// if (hasExpression(name)) {
-// qmlAction.toValue = QVariant();
-// updateRevertValueAndBinding(name);
-// } else {
-// if (qmlAction.fromBinding)
-// QDeclarativePropertyPrivate::setBinding(qmlAction.property, qmlAction.fromBinding);
-// else
-// qmlAction.property.write(qmlAction.fromValue);
-// removeActionForProperty(name);
-// }
-// }
-//}
-
-//void QmlPropertyChangesObject::removeExpression(const QString &name)
-//{
-// if (hasActionForProperty(name)) {
-// QDeclarativeAction &qmlAction = qmlActionForProperty(name);
-// if (hasVariantValue(name)) {
-// ExpressionPair expr = m_expressionHash.take(name);
-// if (expr.second)
-// expr.second.data()->destroy();
-// qmlAction.toBinding = 0;
-// updateRevertValueAndBinding(name);
-// qmlAction.property.write(qmlAction.toValue);
-// } else {
-// if (qmlAction.fromBinding)
-// QDeclarativePropertyPrivate::setBinding(qmlAction.property, qmlAction.fromBinding);
-// else
-// qmlAction.property.write(qmlAction.fromValue);
-// removeActionForProperty(name);
-// }
-// }
-//}
-
-//void QmlPropertyChangesObject::resetProperty(const QString &name)
-//{
-// if (statePrivate()) {
-// QMutableListIterator<QDeclarativeSimpleAction> simpleActionIterator(statePrivate()->revertList);
-// while (simpleActionIterator.hasNext()) {
-// QDeclarativeSimpleAction &qmlSimpleAction = simpleActionIterator.next();
-// if (qmlSimpleAction.specifiedProperty == name && qmlSimpleAction.specifiedObject == targetObject()) {
-// if (qmlSimpleAction.binding) {
-// qDebug() << qmlSimpleAction.binding->expression();
-// QDeclarativePropertyPrivate::setBinding(qmlSimpleAction.property, qmlSimpleAction.binding);
-// } else {
-// QDeclarativePropertyPrivate::setBinding(qmlSimpleAction.property, 0);
-// qmlSimpleAction.property.write(qmlSimpleAction.value);
-// }
-// }
-// }
-// }
-
-// if (m_expressionHash.contains(name)) {
-// if (m_expressionHash[name].second) {
-// QDeclarativeProperty metaProperty(targetObject(), name, QDeclarativeEngine::contextForObject(targetObject()));
-// if (metaProperty.isValid() && QDeclarativePropertyPrivate::binding(metaProperty) == m_expressionHash[name].second.data())
-// QDeclarativePropertyPrivate::setBinding(metaProperty, 0, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
-// m_expressionHash[name].second.data()->destroy();
-// }
-// m_expressionHash.remove(name);
-// }
-
-// if (hasActionForProperty(name)) {
-// removeActionForProperty(name);
-// }
-
-
-//}
-
-//QVariant QmlPropertyChangesObject::variantValue(const QString &name) const
-//{
-// if (hasActionForProperty(name)) {
-// QDeclarativeAction &qmlAction = qmlActionForProperty(name);
-// return qmlAction.toValue;
-// }
-
-// return QVariant();
-//}
-
-//QString QmlPropertyChangesObject::expression(const QString &name) const
-//{
-// if (hasActionForProperty(name)) {
-// QDeclarativeAction &qmlAction = qmlActionForProperty(name);
-// if (qmlAction.toBinding)
-// return qmlAction.toBinding->expression();
-// }
-
-// return QString();
-//}
-
-//bool QmlPropertyChangesObject::hasVariantValue(const QString &name) const
-//{
-// if (hasActionForProperty(name))
-// return qmlActionForProperty(name).toValue.isValid();
-
-// return false;
-//}
-
-//bool QmlPropertyChangesObject::hasExpression(const QString &name) const
-//{
-// return m_expressionHash.contains(name);
-//}
-
-//bool QmlPropertyChangesObject::updateStateVariant(const QString &name, const QVariant &value)
-//{
-// if (hasActionForProperty(name)) {
-// QDeclarativeAction &qmlAction = qmlActionForProperty(name);
-// if (qmlAction.fromValue.isValid()) {
-// qmlAction.fromValue = value;
-// updateRevertValueAndBinding(name);
-
-// return true;
-// }
-// }
-
-// return false;
-//}
-
-//bool QmlPropertyChangesObject::updateStateBinding(const QString &name, const QString &expression)
-//{
-// if (hasActionForProperty(name)) {
-// QDeclarativeContext *context = QDeclarativeEngine::contextForObject(targetObject());
-// QDeclarativeProperty metaProperty(targetObject(), name, context);
-// QDeclarativeAction &qmlAction = qmlActionForProperty(name);
-
-// if (qmlAction.fromBinding) {
-// if (QDeclarativePropertyPrivate::binding(qmlAction.property) == qmlAction.fromBinding)
-// QDeclarativePropertyPrivate::setBinding(qmlAction.property, 0);
-// qmlAction.fromBinding->destroy();
-
-// }
-
-// QDeclarativeBinding *binding = new QDeclarativeBinding(expression, targetObject(), context, this);
-// binding->setTarget(metaProperty);
-// binding->setNotifyOnValueChanged(true);
-// qmlAction.fromBinding = binding;
-
-// if (m_expressionHash.contains(name))
-// QDeclarativePropertyPrivate::setBinding(qmlAction.property, binding);
-
-// updateRevertValueAndBinding(name);
-
-// return true;
-// }
-
-// return false;
-//}
-
-//bool QmlPropertyChangesObject::resetStateProperty(const QString &name, const QVariant &resetValue)
-//{
-// if (hasActionForProperty(name)) {
-// QDeclarativeContext *context = QDeclarativeEngine::contextForObject(targetObject());
-// QDeclarativeProperty metaProperty(targetObject(), name, context);
-// QDeclarativeAction &qmlAction = qmlActionForProperty(name);
-// if (m_expressionHash.contains(name) && m_expressionHash[name].second) {
-// m_expressionHash[name].second.data()->destroy();
-// qmlAction.toBinding = 0;
-// }
-
-// qmlAction.fromValue = resetValue;
-
-// updateRevertValueAndBinding(name);
-
-// removeActionForProperty(name);
-
-// return true;
-// }
-
-// return false;
-//}
-
-} // namespace Internal
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/instances/qmlpropertychangesnodeinstance.h b/src/tools/qmlpuppet/instances/qmlpropertychangesnodeinstance.h
deleted file mode 100644
index 74480420c3..0000000000
--- a/src/tools/qmlpuppet/instances/qmlpropertychangesnodeinstance.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef QMLPROPERTYCHANGESNODEINSTANCE_H
-#define QMLPROPERTYCHANGESNODEINSTANCE_H
-
-#include "objectnodeinstance.h"
-#include <private/qdeclarativestateoperations_p.h>
-#include <private/qdeclarativepropertychanges_p.h>
-
-#include <QPair>
-#include <QWeakPointer>
-
-QT_BEGIN_NAMESPACE
-class QDeclarativeProperty;
-QT_END_NAMESPACE
-
-namespace QmlDesigner {
-
-namespace Internal {
-
-class QmlPropertyChangesNodeInstance;
-
-// Original QmlPropertyChanges class requires a custom parser
-// work around this by writing a replacement class
-//class QmlPropertyChangesObject : public QDeclarativeStateOperation
-//{
-// Q_OBJECT
-// Q_PROPERTY(QObject *target READ targetObject WRITE setTargetObject)
-// Q_PROPERTY(bool restoreEntryValues READ restoreEntryValues WRITE setRestoreEntryValues)
-// Q_PROPERTY(bool explicit READ isExplicit WRITE setIsExplicit)
-
-// typedef QPair<QString, QWeakPointer<QDeclarativeBinding> > ExpressionPair;
-//public:
-// ~QmlPropertyChangesObject();
-// QObject *targetObject() const;
-// void setTargetObject(QObject *object);
-
-// bool restoreEntryValues() const;
-// void setRestoreEntryValues(bool restore);
-
-// bool isExplicit() const;
-// void setIsExplicit(bool isExplicit);
-
-// virtual ActionList actions();
-
-// void setVariantValue(const QString &name, const QVariant & value);
-// void setExpression(const QString &name, const QString &expression);
-// void removeVariantValue(const QString &name);
-// void removeExpression(const QString &name);
-
-// void resetProperty(const QString &name);
-
-// QVariant variantValue(const QString &name) const;
-// QString expression(const QString &name) const;
-
-// bool hasVariantValue(const QString &name) const;
-// bool hasExpression(const QString &name) const;
-
-// QmlPropertyChangesObject();
-
-// bool updateStateVariant(const QString &propertyName, const QVariant &value);
-// bool updateStateBinding(const QString &propertyName, const QString &expression);
-// bool resetStateProperty(const QString &propertyName, const QVariant &resetValue);
-
-// QDeclarativeState *state() const;
-// void updateRevertValueAndBinding(const QString &name);
-
-// void removeFromStateRevertList();
-// void addToStateRevertList();
-
-//private: // functions
-// bool isActive() const;
-
-// QDeclarativeStatePrivate *statePrivate() const;
-
-// QDeclarativeStateGroup *stateGroup() const;
-// QDeclarativeProperty createMetaProperty(const QString &property);
-
-// QDeclarativeAction &qmlActionForProperty(const QString &propertyName) const;
-// bool hasActionForProperty(const QString &propertyName) const;
-// void removeActionForProperty(const QString &propertyName);
-
-// QDeclarativeAction createQDeclarativeAction(const QString &propertyName);
-
-//private: // variables
-// QWeakPointer<QObject> m_targetObject;
-// bool m_restoreEntryValues;
-// bool m_isExplicit;
-
-// mutable ActionList m_qmlActionList;
-// QHash<QString, ExpressionPair> m_expressionHash;
-//};
-
-class QmlPropertyChangesNodeInstance : public ObjectNodeInstance
-{
-public:
- typedef QSharedPointer<QmlPropertyChangesNodeInstance> Pointer;
- typedef QWeakPointer<QmlPropertyChangesNodeInstance> WeakPointer;
-
- static Pointer create(QObject *objectToBeWrapped);
-
- virtual void setPropertyVariant(const QString &name, const QVariant &value);
- virtual void setPropertyBinding(const QString &name, const QString &expression);
- virtual QVariant property(const QString &name) const;
- virtual void resetProperty(const QString &name);
-
- using ObjectNodeInstance::reparent; // keep the virtual reparent(...) method around
- void reparent(const ServerNodeInstance &oldParentInstance, const QString &oldParentProperty, const ServerNodeInstance &newParentInstance, const QString &newParentProperty);
-
-protected:
- QmlPropertyChangesNodeInstance(QDeclarativePropertyChanges *object);
- QDeclarativePropertyChanges *changesObject() const;
-};
-
-} // namespace Internal
-} // namespace QmlDesigner
-
-//QML_DECLARE_TYPE(QmlDesigner::Internal::QmlPropertyChangesObject)
-
-#endif // QMLPROPERTYCHANGESNODEINSTANCE_H
diff --git a/src/tools/qmlpuppet/instances/qmlstatenodeinstance.cpp b/src/tools/qmlpuppet/instances/qmlstatenodeinstance.cpp
deleted file mode 100644
index 7ee19733c6..0000000000
--- a/src/tools/qmlpuppet/instances/qmlstatenodeinstance.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "qmlstatenodeinstance.h"
-
-#include <private/qdeclarativestategroup_p.h>
-
-#include "qmlpropertychangesnodeinstance.h"
-#include <private/qdeclarativestateoperations_p.h>
-
-namespace QmlDesigner {
-namespace Internal {
-
-/**
- \class QmlStateNodeInstance
-
- QmlStateNodeInstance manages a QDeclarativeState object.
- */
-
-QmlStateNodeInstance::QmlStateNodeInstance(QDeclarativeState *object) :
- ObjectNodeInstance(object)
-{
-}
-
-QmlStateNodeInstance::Pointer
- QmlStateNodeInstance::create(QObject *object)
-{
- QDeclarativeState *stateObject = qobject_cast<QDeclarativeState*>(object);
-
- Q_ASSERT(stateObject);
-
- Pointer instance(new QmlStateNodeInstance(stateObject));
-
- instance->populateResetValueHash();
-
- return instance;
-}
-
-void QmlStateNodeInstance::activateState()
-{
- if (stateGroup()) {
- if (!isStateActive()) {
- nodeInstanceServer()->setStateInstance(nodeInstanceServer()->instanceForObject(object()));
- stateGroup()->setState(property("name").toString());
- }
- }
-}
-
-void QmlStateNodeInstance::deactivateState()
-{
- if (stateGroup()) {
- if (isStateActive()) {
- nodeInstanceServer()->clearStateInstance();
- stateGroup()->setState(QString());
- }
- }
-}
-
-QDeclarativeState *QmlStateNodeInstance::stateObject() const
-{
- Q_ASSERT(object());
- Q_ASSERT(qobject_cast<QDeclarativeState*>(object()));
- return static_cast<QDeclarativeState*>(object());
-}
-
-QDeclarativeStateGroup *QmlStateNodeInstance::stateGroup() const
-{
- return stateObject()->stateGroup();
-}
-
-bool QmlStateNodeInstance::isStateActive() const
-{
- return stateObject() && stateGroup() && stateGroup()->state() == property("name");
-}
-
-void QmlStateNodeInstance::setPropertyVariant(const QString &name, const QVariant &value)
-{
- bool hasParent = parent();
- bool isStateOfTheRootModelNode = parentInstance() && parentInstance()->isRootNodeInstance();
- if (name == "when" && (!hasParent || isStateOfTheRootModelNode))
- return;
-
- ObjectNodeInstance::setPropertyVariant(name, value);
-}
-
-void QmlStateNodeInstance::setPropertyBinding(const QString &name, const QString &expression)
-{
- bool hasParent = parent();
- bool isStateOfTheRootModelNode = parentInstance() && parentInstance()->isRootNodeInstance();
- if (name == "when" && (!hasParent || isStateOfTheRootModelNode))
- return;
-
- ObjectNodeInstance::setPropertyBinding(name, expression);
-}
-
-bool QmlStateNodeInstance::updateStateVariant(const ObjectNodeInstance::Pointer &target, const QString &propertyName, const QVariant &value)
-{
- return stateObject()->changeValueInRevertList(target->object(), propertyName.toLatin1(), value);
-}
-
-bool QmlStateNodeInstance::updateStateBinding(const ObjectNodeInstance::Pointer &target, const QString &propertyName, const QString &expression)
-{
- return stateObject()->changeValueInRevertList(target->object(), propertyName.toLatin1(), expression);
-}
-
-bool QmlStateNodeInstance::resetStateProperty(const ObjectNodeInstance::Pointer &target, const QString &propertyName, const QVariant & /* resetValue */)
-{
- return stateObject()->removeEntryFromRevertList(target->object(), propertyName.toLatin1());
-}
-
-} // namespace Internal
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/instances/qmlstatenodeinstance.h b/src/tools/qmlpuppet/instances/qmlstatenodeinstance.h
deleted file mode 100644
index 4bd8c857b9..0000000000
--- a/src/tools/qmlpuppet/instances/qmlstatenodeinstance.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef QMLSTATENODEINSTANCE_H
-#define QMLSTATENODEINSTANCE_H
-
-#include "objectnodeinstance.h"
-
-QT_BEGIN_NAMESPACE
-class QDeclarativeState;
-class QDeclarativeStateGroup;
-QT_END_NAMESPACE
-
-namespace QmlDesigner {
-
-namespace Internal {
-
-class QmlStateNodeInstance : public ObjectNodeInstance
-{
-public:
- typedef QSharedPointer<QmlStateNodeInstance> Pointer;
- typedef QWeakPointer<QmlStateNodeInstance> WeakPointer;
-
- static Pointer create(QObject *objectToBeWrapped);
-
- void setPropertyVariant(const QString &name, const QVariant &value);
- void setPropertyBinding(const QString &name, const QString &expression);
-
- void activateState();
- void deactivateState();
-
- bool updateStateVariant(const ObjectNodeInstance::Pointer &target, const QString &propertyName, const QVariant &value);
- bool updateStateBinding(const ObjectNodeInstance::Pointer &target, const QString &propertyName, const QString &expression);
- bool resetStateProperty(const ObjectNodeInstance::Pointer &target, const QString &propertyName, const QVariant &resetValue);
-
-
-protected:
-
- QmlStateNodeInstance(QDeclarativeState *object);
-
- bool isStateActive() const;
-
- QDeclarativeState *stateObject() const;
- QDeclarativeStateGroup *stateGroup() const;
-};
-
-} // namespace Internal
-} // namespace QmlDesigner
-
-#endif // QMLSTATENODEINSTANCE_H
diff --git a/src/tools/qmlpuppet/instances/qmltransitionnodeinstance.cpp b/src/tools/qmlpuppet/instances/qmltransitionnodeinstance.cpp
deleted file mode 100644
index 0694d0d399..0000000000
--- a/src/tools/qmlpuppet/instances/qmltransitionnodeinstance.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "qmltransitionnodeinstance.h"
-#include <private/qdeclarativetransition_p.h>
-
-namespace QmlDesigner {
-namespace Internal {
-
-QmlTransitionNodeInstance::QmlTransitionNodeInstance(QDeclarativeTransition *transition)
- : ObjectNodeInstance(transition)
-{
-}
-
-QmlTransitionNodeInstance::Pointer QmlTransitionNodeInstance::create(QObject *object)
-{
- QDeclarativeTransition *transition = qobject_cast<QDeclarativeTransition*>(object);
-
- Q_ASSERT(transition);
-
- Pointer instance(new QmlTransitionNodeInstance(transition));
-
- instance->populateResetValueHash();
-
- transition->setToState("invalidState");
- transition->setFromState("invalidState");
-
- return instance;
-}
-
-bool QmlTransitionNodeInstance::isTransition() const
-{
- return true;
-}
-
-void QmlTransitionNodeInstance::setPropertyVariant(const QString &name, const QVariant &value)
-{
- if (name == "from" || name == "to")
- return;
-
- ObjectNodeInstance::setPropertyVariant(name, value);
-}
-
-QDeclarativeTransition *QmlTransitionNodeInstance::qmlTransition() const
-{
- Q_ASSERT(qobject_cast<QDeclarativeTransition*>(object()));
- return static_cast<QDeclarativeTransition*>(object());
-}
-}
-}
diff --git a/src/tools/qmlpuppet/instances/qmltransitionnodeinstance.h b/src/tools/qmlpuppet/instances/qmltransitionnodeinstance.h
deleted file mode 100644
index 7b823d0580..0000000000
--- a/src/tools/qmlpuppet/instances/qmltransitionnodeinstance.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef QMLTRANSITIONNODEINSTANCE_H
-#define QMLTRANSITIONNODEINSTANCE_H
-
-#include "objectnodeinstance.h"
-
-QT_BEGIN_NAMESPACE
-class QDeclarativeTransition;
-QT_END_NAMESPACE
-
-namespace QmlDesigner {
-namespace Internal {
-
-class QmlTransitionNodeInstance : public ObjectNodeInstance
-{
-public:
- typedef QSharedPointer<QmlTransitionNodeInstance> Pointer;
- typedef QWeakPointer<QmlTransitionNodeInstance> WeakPointer;
-
- static Pointer create(QObject *objectToBeWrapped);
-
- void setPropertyVariant(const QString &name, const QVariant &value);
-
- bool isTransition() const;
-
-protected:
- QDeclarativeTransition *qmlTransition() const;
-
-private:
- QmlTransitionNodeInstance(QDeclarativeTransition *transition);
-};
-}
-}
-#endif // QMLTRANSITIONNODEINSTANCE_H
diff --git a/src/tools/qmlpuppet/instances/servernodeinstance.cpp b/src/tools/qmlpuppet/instances/servernodeinstance.cpp
deleted file mode 100644
index 63434ad2ff..0000000000
--- a/src/tools/qmlpuppet/instances/servernodeinstance.cpp
+++ /dev/null
@@ -1,617 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-#include "servernodeinstance.h"
-
-#include "objectnodeinstance.h"
-#include "dummynodeinstance.h"
-#include "componentnodeinstance.h"
-#include "qmltransitionnodeinstance.h"
-#include "qmlpropertychangesnodeinstance.h"
-#include "behaviornodeinstance.h"
-#include "qmlstatenodeinstance.h"
-
-#if QT_VERSION >= 0x050000
-#include "sgitemnodeinstance.h"
-#else
-#include "qmlgraphicsitemnodeinstance.h"
-#include "positionernodeinstance.h"
-#endif
-
-#include "nodeinstanceserver.h"
-#include "instancecontainer.h"
-
-#include <QHash>
-#include <QSet>
-
-#include <QtDeclarative/QDeclarativeEngine>
-
-/*!
- \class QmlDesigner::NodeInstance
- \ingroup CoreInstance
- \brief NodeInstance is a common handle for the actual object representation of a ModelNode.
-
- NodeInstance abstracts away the differences e.g. in terms of position and size
- for QWidget, QGraphicsView, QLayout etc objects. Multiple NodeInstance objects can share
- the pointer to the same instance object. The actual instance will be deleted when
- the last NodeInstance object referencing to it is deleted. This can be disabled by
- setDeleteHeldInstance().
-
- \see QmlDesigner::NodeInstanceView
-*/
-
-namespace QmlDesigner {
-
-/*!
-\brief Constructor - creates a invalid NodeInstance
-
-
-\see NodeInstanceView
-*/
-ServerNodeInstance::ServerNodeInstance()
-{
-}
-
-/*!
-\brief Destructor
-
-*/
-ServerNodeInstance::~ServerNodeInstance()
-{
-}
-
-/*!
-\brief Constructor - creates a valid NodeInstance
-
-*/
-ServerNodeInstance::ServerNodeInstance(const Internal::ObjectNodeInstance::Pointer &abstractInstance)
- : m_nodeInstance(abstractInstance)
-{
-
-}
-
-
-ServerNodeInstance::ServerNodeInstance(const ServerNodeInstance &other)
- : m_nodeInstance(other.m_nodeInstance)
-{
-}
-
-ServerNodeInstance &ServerNodeInstance::operator=(const ServerNodeInstance &other)
-{
- m_nodeInstance = other.m_nodeInstance;
- return *this;
-}
-
-/*!
-\brief Paints the NodeInstance with this painter.
-\param painter used QPainter
-*/
-void ServerNodeInstance::paint(QPainter *painter)
-{
- m_nodeInstance->paint(painter);
-}
-
-QImage ServerNodeInstance::renderImage() const
-{
- return m_nodeInstance->renderImage();
-}
-
-bool ServerNodeInstance::isRootNodeInstance() const
-{
- return isValid() && m_nodeInstance->isRootNodeInstance();
-}
-
-bool ServerNodeInstance::isSubclassOf(QObject *object, const QByteArray &superTypeName)
-{
- if (object == 0)
- return false;
-
- const QMetaObject *metaObject = object->metaObject();
-
- while (metaObject) {
- QDeclarativeType *qmlType = QDeclarativeMetaType::qmlType(metaObject);
- if (qmlType && qmlType->qmlTypeName() == superTypeName) // ignore version numbers
- return true;
-
- if (metaObject->className() == superTypeName)
- return true;
-
- metaObject = metaObject->superClass();
- }
-
- return false;
-}
-
-void ServerNodeInstance::setNodeSource(const QString &source)
-{
- m_nodeInstance->setNodeSource(source);
-}
-
-bool ServerNodeInstance::isSubclassOf(const QString &superTypeName) const
-{
- return isSubclassOf(internalObject(), superTypeName.toUtf8());
-}
-
-/*!
-\brief Creates a new NodeInstace for this NodeMetaInfo
-
-\param metaInfo MetaInfo for which a Instance should be created
-\param context QDeclarativeContext which should be used
-\returns Internal Pointer of a NodeInstance
-\see NodeMetaInfo
-*/
-Internal::ObjectNodeInstance::Pointer ServerNodeInstance::createInstance(QObject *objectToBeWrapped)
-{
- Internal::ObjectNodeInstance::Pointer instance;
-
- if (objectToBeWrapped == 0)
- instance = Internal::DummyNodeInstance::create();
-#if QT_VERSION >= 0x050000
- else if (isSubclassOf(objectToBeWrapped, "QSGItem"))
- instance = Internal::SGItemNodeInstance::create(objectToBeWrapped);
-#else
- else if (isSubclassOf(objectToBeWrapped, "QDeclarativeBasePositioner"))
- instance = Internal::PositionerNodeInstance::create(objectToBeWrapped);
- else if (isSubclassOf(objectToBeWrapped, "QDeclarativeItem"))
- instance = Internal::QmlGraphicsItemNodeInstance::create(objectToBeWrapped);
-#endif
- else if (isSubclassOf(objectToBeWrapped, "QDeclarativeComponent"))
- instance = Internal::ComponentNodeInstance::create(objectToBeWrapped);
- else if (isSubclassOf(objectToBeWrapped, "QDeclarativePropertyChanges"))
- instance = Internal::QmlPropertyChangesNodeInstance::create(objectToBeWrapped);
- else if (isSubclassOf(objectToBeWrapped, "QDeclarativeState"))
- instance = Internal::QmlStateNodeInstance::create(objectToBeWrapped);
- else if (isSubclassOf(objectToBeWrapped, "QDeclarativeTransition"))
- instance = Internal::QmlTransitionNodeInstance::create(objectToBeWrapped);
- else if (isSubclassOf(objectToBeWrapped, "QDeclarativeBehavior"))
- instance = Internal::BehaviorNodeInstance::create(objectToBeWrapped);
- else if (isSubclassOf(objectToBeWrapped, "QObject"))
- instance = Internal::ObjectNodeInstance::create(objectToBeWrapped);
- else
- instance = Internal::DummyNodeInstance::create();
-
-
- return instance;
-}
-
-ServerNodeInstance ServerNodeInstance::create(NodeInstanceServer *nodeInstanceServer, const InstanceContainer &instanceContainer, ComponentWrap componentWrap)
-{
- Q_ASSERT(instanceContainer.instanceId() != -1);
- Q_ASSERT(nodeInstanceServer);
-
- QObject *object = 0;
- if (componentWrap == WrapAsComponent) {
- object = Internal::ObjectNodeInstance::createComponentWrap(instanceContainer.nodeSource(), nodeInstanceServer->imports(), nodeInstanceServer->context());
- } else if (!instanceContainer.nodeSource().isEmpty()) {
- object = Internal::ObjectNodeInstance::createCustomParserObject(instanceContainer.nodeSource(), nodeInstanceServer->imports(), nodeInstanceServer->context());
- } else if (!instanceContainer.componentPath().isEmpty()) {
- object = Internal::ObjectNodeInstance::createComponent(instanceContainer.componentPath(), nodeInstanceServer->context());
- } else {
- object = Internal::ObjectNodeInstance::createPrimitive(instanceContainer.type(), instanceContainer.majorNumber(), instanceContainer.minorNumber(), nodeInstanceServer->context());
- }
-
- ServerNodeInstance instance(createInstance(object));
-
- instance.internalInstance()->setNodeInstanceServer(nodeInstanceServer);
-
- instance.internalInstance()->setInstanceId(instanceContainer.instanceId());
-
- instance.internalInstance()->initialize(instance.m_nodeInstance);
-
- //QObject::connect(instance.internalObject(), SIGNAL(destroyed(QObject*)), nodeInstanceView, SLOT(removeIdFromContext(QObject*)));
-
- return instance;
-}
-
-void ServerNodeInstance::reparent(const ServerNodeInstance &oldParentInstance, const QString &oldParentProperty, const ServerNodeInstance &newParentInstance, const QString &newParentProperty)
-{
- m_nodeInstance->reparent(oldParentInstance.m_nodeInstance, oldParentProperty, newParentInstance.m_nodeInstance, newParentProperty);
-}
-
-/*!
-\brief Returns the parent NodeInstance of this NodeInstance.
-
- If there is not parent than the parent is invalid.
-
-\returns Parent NodeInstance.
-*/
-ServerNodeInstance ServerNodeInstance::parent() const
-{
- return m_nodeInstance->parentInstance();
-}
-
-bool ServerNodeInstance::hasParent() const
-{
- return m_nodeInstance->parent();
-}
-
-bool ServerNodeInstance::isValid() const
-{
- return m_nodeInstance && m_nodeInstance->isValid();
-}
-
-
-/*!
-\brief Returns if the NodeInstance is a QGraphicsItem.
-\returns true if this NodeInstance is a QGraphicsItem
-*/
-bool ServerNodeInstance::equalGraphicsItem(QGraphicsItem *item) const
-{
- return m_nodeInstance->equalGraphicsItem(item);
-}
-
-/*!
-\brief Returns the bounding rect of the NodeInstance.
-\returns QRectF of the NodeInstance
-*/
-QRectF ServerNodeInstance::boundingRect() const
-{
- QRectF boundingRect(m_nodeInstance->boundingRect());
-
-//
-// if (modelNode().isValid()) { // TODO implement recursiv stuff
-// if (qFuzzyIsNull(boundingRect.width()))
-// boundingRect.setWidth(nodeState().property("width").value().toDouble());
-//
-// if (qFuzzyIsNull(boundingRect.height()))
-// boundingRect.setHeight(nodeState().property("height").value().toDouble());
-// }
-
- return boundingRect;
-}
-
-void ServerNodeInstance::setPropertyVariant(const QString &name, const QVariant &value)
-{
- m_nodeInstance->setPropertyVariant(name, value);
-
-}
-
-void ServerNodeInstance::setPropertyDynamicVariant(const QString &name, const QString &typeName, const QVariant &value)
-{
- m_nodeInstance->createDynamicProperty(name, typeName);
- m_nodeInstance->setPropertyVariant(name, value);
-}
-
-void ServerNodeInstance::setPropertyBinding(const QString &name, const QString &expression)
-{
- m_nodeInstance->setPropertyBinding(name, expression);
-}
-
-void ServerNodeInstance::setPropertyDynamicBinding(const QString &name, const QString &typeName, const QString &expression)
-{
- m_nodeInstance->createDynamicProperty(name, typeName);
- m_nodeInstance->setPropertyBinding(name, expression);
-}
-
-void ServerNodeInstance::resetProperty(const QString &name)
-{
- m_nodeInstance->resetProperty(name);
-}
-
-void ServerNodeInstance::refreshProperty(const QString &name)
-{
- m_nodeInstance->refreshProperty(name);
-}
-
-void ServerNodeInstance::setId(const QString &id)
-{
- m_nodeInstance->setId(id);
-}
-
-/*!
-\brief Returns the property value of the property of this NodeInstance.
-\returns QVariant value
-*/
-QVariant ServerNodeInstance::property(const QString &name) const
-{
- return m_nodeInstance->property(name);
-}
-
-QStringList ServerNodeInstance::propertyNames() const
-{
- return m_nodeInstance->propertyNames();
-}
-
-bool ServerNodeInstance::hasBindingForProperty(const QString &name, bool *hasChanged) const
-{
- return m_nodeInstance->hasBindingForProperty(name, hasChanged);
-}
-
-/*!
-\brief Returns the property default value of the property of this NodeInstance.
-\returns QVariant default value which is the reset value to
-*/
-QVariant ServerNodeInstance::defaultValue(const QString &name) const
-{
- return m_nodeInstance->resetValue(name);
-}
-
-/*!
-\brief Returns the type of the property of this NodeInstance.
-*/
-QString ServerNodeInstance::instanceType(const QString &name) const
-{
- return m_nodeInstance->instanceType(name);
-}
-
-void ServerNodeInstance::makeInvalid()
-{
- if (m_nodeInstance)
- m_nodeInstance->destroy();
- m_nodeInstance.clear();
-}
-
-bool ServerNodeInstance::hasContent() const
-{
- return m_nodeInstance->hasContent();
-}
-
-bool ServerNodeInstance::isResizable() const
-{
- return m_nodeInstance->isResizable();
-}
-
-bool ServerNodeInstance::isMovable() const
-{
- return m_nodeInstance->isMovable();
-}
-
-bool ServerNodeInstance::isInPositioner() const
-{
- return m_nodeInstance->isInPositioner();
-}
-
-bool ServerNodeInstance::hasAnchor(const QString &name) const
-{
- return m_nodeInstance->hasAnchor(name);
-}
-
-int ServerNodeInstance::penWidth() const
-{
- return m_nodeInstance->penWidth();
-}
-
-bool ServerNodeInstance::isAnchoredBySibling() const
-{
- return m_nodeInstance->isAnchoredBySibling();
-}
-
-bool ServerNodeInstance::isAnchoredByChildren() const
-{
- return m_nodeInstance->isAnchoredByChildren();
-}
-
-QPair<QString, ServerNodeInstance> ServerNodeInstance::anchor(const QString &name) const
-{
- return m_nodeInstance->anchor(name);
-}
-
-QDebug operator<<(QDebug debug, const ServerNodeInstance &instance)
-{
- if (instance.isValid()) {
- debug.nospace() << "ServerNodeInstance("
- << instance.instanceId() << ", "
- << instance.internalObject() << ", "
- << instance.id() << ", "
- << instance.parent() << ')';
- } else {
- debug.nospace() << "ServerNodeInstance(invalid)";
- }
-
- return debug.space();
-}
-
-uint qHash(const ServerNodeInstance &instance)
-{
- return ::qHash(instance.instanceId());
-}
-
-bool operator==(const ServerNodeInstance &first, const ServerNodeInstance &second)
-{
- return first.instanceId() == second.instanceId();
-}
-
-bool ServerNodeInstance::isWrappingThisObject(QObject *object) const
-{
- return internalObject() && internalObject() == object;
-}
-
-/*!
-\brief Returns the position in parent coordiantes.
-\returns QPointF of the position of the instance.
-*/
-QPointF ServerNodeInstance::position() const
-{
- return m_nodeInstance->position();
-}
-
-/*!
-\brief Returns the size in local coordiantes.
-\returns QSizeF of the size of the instance.
-*/
-QSizeF ServerNodeInstance::size() const
-{
- QSizeF instanceSize = m_nodeInstance->size();
-
- return instanceSize;
-}
-
-QTransform ServerNodeInstance::transform() const
-{
- return m_nodeInstance->transform();
-}
-
-/*!
-\brief Returns the transform matrix of the instance.
-\returns QTransform of the instance.
-*/
-QTransform ServerNodeInstance::customTransform() const
-{
- return m_nodeInstance->customTransform();
-}
-
-QTransform ServerNodeInstance::sceneTransform() const
-{
- return m_nodeInstance->sceneTransform();
-}
-
-double ServerNodeInstance::rotation() const
-{
- return m_nodeInstance->rotation();
-}
-
-double ServerNodeInstance::scale() const
-{
- return m_nodeInstance->scale();
-}
-
-QList<QGraphicsTransform *> ServerNodeInstance::transformations() const
-{
- return m_nodeInstance->transformations();
-}
-
-QPointF ServerNodeInstance::transformOriginPoint() const
-{
- return m_nodeInstance->transformOriginPoint();
-}
-
-double ServerNodeInstance::zValue() const
-{
- return m_nodeInstance->zValue();
-}
-
-/*!
-\brief Returns the opacity of the instance.
-\returns 0.0 mean transparent and 1.0 opaque.
-*/
-double ServerNodeInstance::opacity() const
-{
- return m_nodeInstance->opacity();
-}
-
-
-void ServerNodeInstance::setDeleteHeldInstance(bool deleteInstance)
-{
- m_nodeInstance->setDeleteHeldInstance(deleteInstance);
-}
-
-
-void ServerNodeInstance::paintUpdate()
-{
- m_nodeInstance->paintUpdate();
-}
-
-QObject *ServerNodeInstance::internalObject() const
-{
- if (m_nodeInstance.isNull())
- return 0;
-
- return m_nodeInstance->object();
-}
-
-void ServerNodeInstance::activateState()
-{
- m_nodeInstance->activateState();
-}
-
-void ServerNodeInstance::deactivateState()
-{
- m_nodeInstance->deactivateState();
-}
-
-bool ServerNodeInstance::updateStateVariant(const ServerNodeInstance &target, const QString &propertyName, const QVariant &value)
-{
- return m_nodeInstance->updateStateVariant(target.internalInstance(), propertyName, value);
-}
-
-bool ServerNodeInstance::updateStateBinding(const ServerNodeInstance &target, const QString &propertyName, const QString &expression)
-{
- return m_nodeInstance->updateStateBinding(target.internalInstance(), propertyName, expression);
-}
-
-QVariant ServerNodeInstance::resetVariant(const QString &propertyName) const
-{
- return m_nodeInstance->resetValue(propertyName);
-}
-
-bool ServerNodeInstance::resetStateProperty(const ServerNodeInstance &target, const QString &propertyName, const QVariant &resetValue)
-{
- return m_nodeInstance->resetStateProperty(target.internalInstance(), propertyName, resetValue);
-}
-
-/*!
- Makes types used in node instances known to the Qml engine. To be called once at initialization time.
-*/
-void ServerNodeInstance::registerDeclarativeTypes()
-{
-// qmlRegisterType<QmlDesigner::Internal::QmlPropertyChangesObject>();
-}
-
-void ServerNodeInstance::doComponentComplete()
-{
- m_nodeInstance->doComponentComplete();
-}
-
-QList<ServerNodeInstance> ServerNodeInstance::childItems() const
-{
- return m_nodeInstance->childItems();
-}
-
-QString ServerNodeInstance::id() const
-{
- return m_nodeInstance->id();
-}
-
-qint32 ServerNodeInstance::instanceId() const
-{
- if (isValid()) {
- return m_nodeInstance->instanceId();
- } else {
- return -1;
- }
-}
-
-QObject* ServerNodeInstance::testHandle() const
-{
- return internalObject();
-}
-
-QList<ServerNodeInstance> ServerNodeInstance::stateInstances() const
-{
- return m_nodeInstance->stateInstances();
-}
-
-Internal::ObjectNodeInstance::Pointer ServerNodeInstance::internalInstance() const
-{
- return m_nodeInstance;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/instances/servernodeinstance.h b/src/tools/qmlpuppet/instances/servernodeinstance.h
deleted file mode 100644
index 4e722ee7fe..0000000000
--- a/src/tools/qmlpuppet/instances/servernodeinstance.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef SERVERNODEINSTANCE_H
-#define SERVERNODEINSTANCE_H
-
-#include <QSharedPointer>
-#include <QHash>
-#include <QRectF>
-
-#include <nodeinstanceserverinterface.h>
-#include <propertyvaluecontainer.h>
-
-QT_BEGIN_NAMESPACE
-class QPainter;
-class QStyleOptionGraphicsItem;
-class QDeclarativeContext;
-class QGraphicsItem;
-class QGraphicsTransform;
-QT_END_NAMESPACE
-
-namespace QmlDesigner {
-
-class NodeInstanceServer;
-class Qt4NodeInstanceServer;
-class Qt4PreviewNodeInstanceServer;
-class Qt5NodeInstanceServer;
-class Qt5PreviewNodeInstanceServer;
-class InstanceContainer;
-
-namespace Internal {
- class ObjectNodeInstance;
- class QmlGraphicsItemNodeInstance;
- class QmlPropertyChangesNodeInstance;
- class GraphicsObjectNodeInstance;
- class QmlStateNodeInstance;
- class SGItemNodeInstance;
-}
-
-class ServerNodeInstance
-{
- friend class NodeInstanceServer;
- friend class Qt4NodeInstanceServer;
- friend class Qt4PreviewNodeInstanceServer;
- friend class Qt5NodeInstanceServer;
- friend class Qt5PreviewNodeInstanceServer;
- friend class QHash<qint32, ServerNodeInstance>;
- friend uint qHash(const ServerNodeInstance &instance);
- friend bool operator==(const ServerNodeInstance &first, const ServerNodeInstance &second);
- friend QDebug operator<<(QDebug debug, const ServerNodeInstance &instance);
- friend class NodeMetaInfo;
- friend class QmlDesigner::Internal::QmlGraphicsItemNodeInstance;
- friend class QmlDesigner::Internal::SGItemNodeInstance;
- friend class QmlDesigner::Internal::GraphicsObjectNodeInstance;
- friend class QmlDesigner::Internal::ObjectNodeInstance;
- friend class QmlDesigner::Internal::QmlPropertyChangesNodeInstance;
- friend class QmlDesigner::Internal::QmlStateNodeInstance;
-
-public:
- enum ComponentWrap {
- WrapAsComponent,
- DoNotWrapAsComponent
- };
-
- ServerNodeInstance();
- ~ServerNodeInstance();
- ServerNodeInstance(const ServerNodeInstance &other);
- ServerNodeInstance& operator=(const ServerNodeInstance &other);
-
- void paint(QPainter *painter);
- QImage renderImage() const;
-
- ServerNodeInstance parent() const;
- bool hasParent() const;
-
- bool equalGraphicsItem(QGraphicsItem *item) const;
-
- QRectF boundingRect() const;
- QPointF position() const;
- QSizeF size() const;
- QTransform transform() const;
- QTransform customTransform() const;
- QTransform sceneTransform() const;
- double rotation() const;
- double scale() const;
- QList<QGraphicsTransform *> transformations() const;
- QPointF transformOriginPoint() const;
- double zValue() const;
-
- double opacity() const;
- QVariant property(const QString &name) const;
- QVariant defaultValue(const QString &name) const;
- QString instanceType(const QString &name) const;
- QStringList propertyNames() const;
-
-
- bool hasBindingForProperty(const QString &name, bool *hasChanged = 0) const;
-
- bool isValid() const;
- void makeInvalid();
- bool hasContent() const;
- bool isResizable() const;
- bool isMovable() const;
- bool isInPositioner() const;
-
- bool isSubclassOf(const QString &superTypeName) const;
- bool isRootNodeInstance() const;
-
- bool isWrappingThisObject(QObject *object) const;
-
- QVariant resetVariant(const QString &name) const;
-
- bool hasAnchor(const QString &name) const;
- bool isAnchoredBySibling() const;
- bool isAnchoredByChildren() const;
- QPair<QString, ServerNodeInstance> anchor(const QString &name) const;
-
- int penWidth() const;
-
- static void registerDeclarativeTypes();
-
- void doComponentComplete();
-
- QList<ServerNodeInstance> childItems() const;
-
- QString id() const;
- qint32 instanceId() const;
-
- QObject* testHandle() const;
- QSharedPointer<Internal::ObjectNodeInstance> internalInstance() const;
-
- QList<ServerNodeInstance> stateInstances() const;
-
-private: // functions
- ServerNodeInstance(const QSharedPointer<Internal::ObjectNodeInstance> &abstractInstance);
-
- void setPropertyVariant(const QString &name, const QVariant &value);
- void setPropertyDynamicVariant(const QString &name, const QString &typeName, const QVariant &value);
-
- void setPropertyBinding(const QString &name, const QString &expression);
- void setPropertyDynamicBinding(const QString &name, const QString &typeName, const QString &expression);
-
- void resetProperty(const QString &name);
- void refreshProperty(const QString &name);
-
- void activateState();
- void deactivateState();
- void refreshState();
-
- bool updateStateVariant(const ServerNodeInstance &target, const QString &propertyName, const QVariant &value);
- bool updateStateBinding(const ServerNodeInstance &target, const QString &propertyName, const QString &expression);
- bool resetStateProperty(const ServerNodeInstance &target, const QString &propertyName, const QVariant &resetValue);
-
- static ServerNodeInstance create(NodeInstanceServer *nodeInstanceServer, const InstanceContainer &instanceContainer, ComponentWrap componentWrap);
-
- void setDeleteHeldInstance(bool deleteInstance);
- void reparent(const ServerNodeInstance &oldParentInstance, const QString &oldParentProperty, const ServerNodeInstance &newParentInstance, const QString &newParentProperty);
-
-
- void setId(const QString &id);
-
- static QSharedPointer<Internal::ObjectNodeInstance> createInstance(QObject *objectToBeWrapped);
-
- void paintUpdate();
-
- static bool isSubclassOf(QObject *object, const QByteArray &superTypeName);
-
- void setNodeSource(const QString &source);
-
-
- QObject *internalObject() const; // should be not used outside of the nodeinstances!!!!
-
-private: // variables
- QSharedPointer<Internal::ObjectNodeInstance> m_nodeInstance;
-};
-
-uint qHash(const ServerNodeInstance &instance);
-bool operator==(const ServerNodeInstance &first, const ServerNodeInstance &second);
-QDebug operator<<(QDebug debug, const ServerNodeInstance &instance);
-}
-
-Q_DECLARE_METATYPE(QmlDesigner::ServerNodeInstance)
-
-#endif // SERVERNODEINSTANCE_H
diff --git a/src/tools/qmlpuppet/interfaces/commondefines.h b/src/tools/qmlpuppet/interfaces/commondefines.h
deleted file mode 100644
index 1983c4eebc..0000000000
--- a/src/tools/qmlpuppet/interfaces/commondefines.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef COMMONDEFINES_H
-#define COMMONDEFINES_H
-
-#include <QMetaType>
-
-namespace QmlDesigner {
-
-enum InformationName
-{
- NoName,
- Size,
- BoundingRect,
- Transform,
- HasAnchor,
- Anchor,
- InstanceTypeForProperty,
- PenWidth,
- Position,
- IsInPositioner,
- SceneTransform,
- IsResizable,
- IsMovable,
- IsAnchoredByChildren,
- IsAnchoredBySibling,
- HasContent,
- HasBindingForProperty
-};
-
-}
-
-#endif // COMMONDEFINES_H
diff --git a/src/tools/qmlpuppet/interfaces/interfaces.pri b/src/tools/qmlpuppet/interfaces/interfaces.pri
deleted file mode 100644
index 4e64200029..0000000000
--- a/src/tools/qmlpuppet/interfaces/interfaces.pri
+++ /dev/null
@@ -1,7 +0,0 @@
-INCLUDEPATH += $$PWD/
-
-HEADERS += $$PWD/nodeinstanceclientinterface.h
-HEADERS += $$PWD/nodeinstanceserverinterface.h
-HEADERS += $$PWD/commondefines.h
-
-SOURCES += $$PWD/nodeinstanceserverinterface.cpp
diff --git a/src/tools/qmlpuppet/interfaces/nodeinstanceclientinterface.h b/src/tools/qmlpuppet/interfaces/nodeinstanceclientinterface.h
deleted file mode 100644
index 77bf3355ef..0000000000
--- a/src/tools/qmlpuppet/interfaces/nodeinstanceclientinterface.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef NODEINSTANCECLIENTINTERFACE_H
-#define NODEINSTANCECLIENTINTERFACE_H
-
-#include <QtGlobal>
-
-namespace QmlDesigner {
-
-class ValuesChangedCommand;
-class PixmapChangedCommand;
-class InformationChangedCommand;
-class ChildrenChangedCommand;
-class StatePreviewImageChangedCommand;
-class ComponentCompletedCommand;
-
-class NodeInstanceClientInterface
-{
-public:
- virtual void informationChanged(const InformationChangedCommand &command) = 0;
- virtual void valuesChanged(const ValuesChangedCommand &command) = 0;
- virtual void pixmapChanged(const PixmapChangedCommand &command) = 0;
- virtual void childrenChanged(const ChildrenChangedCommand &command) = 0;
- virtual void statePreviewImagesChanged(const StatePreviewImageChangedCommand &command) = 0;
- virtual void componentCompleted(const ComponentCompletedCommand &command) = 0;
-
- virtual void flush() {};
- virtual void synchronizeWithClientProcess() {}
- virtual qint64 bytesToWrite() const {return 0;}
-
-};
-
-}
-
-#endif // NODEINSTANCECLIENTINTERFACE_H
diff --git a/src/tools/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp b/src/tools/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp
deleted file mode 100644
index ce2bb01042..0000000000
--- a/src/tools/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "nodeinstanceserverinterface.h"
-#include <qmetatype.h>
-
-#include "propertyabstractcontainer.h"
-#include "propertyvaluecontainer.h"
-#include "propertybindingcontainer.h"
-#include "instancecontainer.h"
-#include "createinstancescommand.h"
-#include "createscenecommand.h"
-#include "changevaluescommand.h"
-#include "changebindingscommand.h"
-#include "changeauxiliarycommand.h"
-#include "changefileurlcommand.h"
-#include "removeinstancescommand.h"
-#include "clearscenecommand.h"
-#include "removepropertiescommand.h"
-#include "reparentinstancescommand.h"
-#include "changeidscommand.h"
-#include "changestatecommand.h"
-#include "completecomponentcommand.h"
-#include "addimportcontainer.h"
-#include "changenodesourcecommand.h"
-
-#include "informationchangedcommand.h"
-#include "pixmapchangedcommand.h"
-#include "valueschangedcommand.h"
-#include "childrenchangedcommand.h"
-#include "imagecontainer.h"
-#include "statepreviewimagechangedcommand.h"
-#include "componentcompletedcommand.h"
-#include "synchronizecommand.h"
-
-
-namespace QmlDesigner {
-
-static bool isRegistered=false;
-
-NodeInstanceServerInterface::NodeInstanceServerInterface(QObject *parent) :
- QObject(parent)
-{
- registerCommands();
-}
-
-void NodeInstanceServerInterface::registerCommands()
-{
- if (isRegistered)
- return;
-
- isRegistered = true;
-
- qRegisterMetaType<CreateInstancesCommand>("CreateInstancesCommand");
- qRegisterMetaTypeStreamOperators<CreateInstancesCommand>("CreateInstancesCommand");
-
- qRegisterMetaType<ClearSceneCommand>("ClearSceneCommand");
- qRegisterMetaTypeStreamOperators<ClearSceneCommand>("ClearSceneCommand");
-
- qRegisterMetaType<CreateSceneCommand>("CreateSceneCommand");
- qRegisterMetaTypeStreamOperators<CreateSceneCommand>("CreateSceneCommand");
-
- qRegisterMetaType<ChangeBindingsCommand>("ChangeBindingsCommand");
- qRegisterMetaTypeStreamOperators<ChangeBindingsCommand>("ChangeBindingsCommand");
-
- qRegisterMetaType<ChangeValuesCommand>("ChangeValuesCommand");
- qRegisterMetaTypeStreamOperators<ChangeValuesCommand>("ChangeValuesCommand");
-
- qRegisterMetaType<ChangeFileUrlCommand>("ChangeFileUrlCommand");
- qRegisterMetaTypeStreamOperators<ChangeFileUrlCommand>("ChangeFileUrlCommand");
-
- qRegisterMetaType<ChangeStateCommand>("ChangeStateCommand");
- qRegisterMetaTypeStreamOperators<PropertyAbstractContainer>("ChangeStateCommand");
-
- qRegisterMetaType<RemoveInstancesCommand>("RemoveInstancesCommand");
- qRegisterMetaTypeStreamOperators<RemoveInstancesCommand>("RemoveInstancesCommand");
-
- qRegisterMetaType<RemovePropertiesCommand>("RemovePropertiesCommand");
- qRegisterMetaTypeStreamOperators<RemovePropertiesCommand>("RemovePropertiesCommand");
-
- qRegisterMetaType<ReparentInstancesCommand>("ReparentInstancesCommand");
- qRegisterMetaTypeStreamOperators<ReparentInstancesCommand>("ReparentInstancesCommand");
-
- qRegisterMetaType<ChangeIdsCommand>("ChangeIdsCommand");
- qRegisterMetaTypeStreamOperators<ChangeIdsCommand>("ChangeIdsCommand");
-
- qRegisterMetaType<ChangeStateCommand>("ChangeStateCommand");
- qRegisterMetaTypeStreamOperators<ChangeStateCommand>("ChangeStateCommand");
-
- qRegisterMetaType<InformationChangedCommand>("InformationChangedCommand");
- qRegisterMetaTypeStreamOperators<InformationChangedCommand>("InformationChangedCommand");
-
- qRegisterMetaType<ValuesChangedCommand>("ValuesChangedCommand");
- qRegisterMetaTypeStreamOperators<ValuesChangedCommand>("ValuesChangedCommand");
-
- qRegisterMetaType<PixmapChangedCommand>("PixmapChangedCommand");
- qRegisterMetaTypeStreamOperators<PixmapChangedCommand>("PixmapChangedCommand");
-
- qRegisterMetaType<InformationContainer>("InformationContainer");
- qRegisterMetaTypeStreamOperators<InformationContainer>("InformationContainer");
-
- qRegisterMetaType<PropertyValueContainer>("PropertyValueContainer");
- qRegisterMetaTypeStreamOperators<PropertyValueContainer>("PropertyValueContainer");
-
- qRegisterMetaType<PropertyBindingContainer>("PropertyBindingContainer");
- qRegisterMetaTypeStreamOperators<PropertyBindingContainer>("PropertyBindingContainer");
-
- qRegisterMetaType<PropertyAbstractContainer>("PropertyAbstractContainer");
- qRegisterMetaTypeStreamOperators<PropertyAbstractContainer>("PropertyAbstractContainer");
-
- qRegisterMetaType<InstanceContainer>("InstanceContainer");
- qRegisterMetaTypeStreamOperators<InstanceContainer>("InstanceContainer");
-
- qRegisterMetaType<IdContainer>("IdContainer");
- qRegisterMetaTypeStreamOperators<IdContainer>("IdContainer");
-
- qRegisterMetaType<ChildrenChangedCommand>("ChildrenChangedCommand");
- qRegisterMetaTypeStreamOperators<ChildrenChangedCommand>("ChildrenChangedCommand");
-
- qRegisterMetaType<ImageContainer>("ImageContainer");
- qRegisterMetaTypeStreamOperators<ImageContainer>("ImageContainer");
-
- qRegisterMetaType<StatePreviewImageChangedCommand>("StatePreviewImageChangedCommand");
- qRegisterMetaTypeStreamOperators<StatePreviewImageChangedCommand>("StatePreviewImageChangedCommand");
-
- qRegisterMetaType<CompleteComponentCommand>("CompleteComponentCommand");
- qRegisterMetaTypeStreamOperators<CompleteComponentCommand>("CompleteComponentCommand");
-
- qRegisterMetaType<ComponentCompletedCommand>("ComponentCompletedCommand");
- qRegisterMetaTypeStreamOperators<ComponentCompletedCommand>("ComponentCompletedCommand");
-
- qRegisterMetaType<AddImportContainer>("AddImportContainer");
- qRegisterMetaTypeStreamOperators<AddImportContainer>("AddImportContainer");
-
- qRegisterMetaType<SynchronizeCommand>("SynchronizeCommand");
- qRegisterMetaTypeStreamOperators<SynchronizeCommand>("SynchronizeCommand");
-
- qRegisterMetaType<ChangeNodeSourceCommand>("ChangeNodeSourceCommand");
- qRegisterMetaTypeStreamOperators<ChangeNodeSourceCommand>("ChangeNodeSourceCommand");
-
- qRegisterMetaType<ChangeAuxiliaryCommand>("ChangeAuxiliaryCommand");
- qRegisterMetaTypeStreamOperators<ChangeAuxiliaryCommand>("ChangeAuxiliaryCommand");
-}
-
-}
diff --git a/src/tools/qmlpuppet/interfaces/nodeinstanceserverinterface.h b/src/tools/qmlpuppet/interfaces/nodeinstanceserverinterface.h
deleted file mode 100644
index 98d1fe3865..0000000000
--- a/src/tools/qmlpuppet/interfaces/nodeinstanceserverinterface.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef NODEINSTANCESERVERINTERFACE_H
-#define NODEINSTANCESERVERINTERFACE_H
-
-#include <QObject>
-
-namespace QmlDesigner {
-
-class PropertyAbstractContainer;
-class PropertyBindingContainer;
-class PropertyValueContainer;
-
-class ChangeFileUrlCommand;
-class ChangeValuesCommand;
-class ChangeBindingsCommand;
-class ChangeAuxiliaryCommand;
-class CreateSceneCommand;
-class CreateInstancesCommand;
-class ClearSceneCommand;
-class ReparentInstancesCommand;
-class ChangeIdsCommand;
-class RemoveInstancesCommand;
-class RemovePropertiesCommand;
-class ChangeStateCommand;
-class CompleteComponentCommand;
-class ChangeNodeSourceCommand;
-
-class NodeInstanceServerInterface : public QObject
-{
- Q_OBJECT
-public:
- enum RunModus {
- NormalModus,
- TestModus // No preview images and synchronized
- };
-
- explicit NodeInstanceServerInterface(QObject *parent = 0);
-
- virtual void createInstances(const CreateInstancesCommand &command) = 0;
- virtual void changeFileUrl(const ChangeFileUrlCommand &command) = 0;
- virtual void createScene(const CreateSceneCommand &command) = 0;
- virtual void clearScene(const ClearSceneCommand &command) = 0;
- virtual void removeInstances(const RemoveInstancesCommand &command) = 0;
- virtual void removeProperties(const RemovePropertiesCommand &command) = 0;
- virtual void changePropertyBindings(const ChangeBindingsCommand &command) = 0;
- virtual void changePropertyValues(const ChangeValuesCommand &command) = 0;
- virtual void changeAuxiliaryValues(const ChangeAuxiliaryCommand &command) = 0;
- virtual void reparentInstances(const ReparentInstancesCommand &command) = 0;
- virtual void changeIds(const ChangeIdsCommand &command) = 0;
- virtual void changeState(const ChangeStateCommand &command) = 0;
- virtual void completeComponent(const CompleteComponentCommand &command) = 0;
- virtual void changeNodeSource(const ChangeNodeSourceCommand &command) = 0;
-
- static void registerCommands();
-};
-
-}
-#endif // NODEINSTANCESERVERINTERFACE_H
diff --git a/src/tools/qmlpuppet/qml2puppet/Info.plist.in b/src/tools/qmlpuppet/qml2puppet/Info.plist.in
deleted file mode 100644
index b0406b7879..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/Info.plist.in
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
- <key>NSHumanReadableCopyright</key>
- <string>(C) 2008-2011 Nokia Corporation
-Commercial Usage
-
-Licensees holding valid Qt Commercial licenses may use this file in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
-
-GNU Lesser General Public License Usage
-
-Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation and appearing in the file LICENSE.LGPL included in the packaging of this file. Please review the following information to ensure the GNU Lesser General Public License version 2.1 requirements will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
- <key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
- <key>CFBundleIdentifier</key>
- <string>com.nokia.qtcreator.qml2puppet</string>
- <key>CFBundleVersion</key>
- <string>$$QTCREATOR_VERSION</string>
- <key>CFBundleShortVersionString</key>
- <string>$$QTCREATOR_VERSION</string>
- <key>LSUIElement</key>
- <string>1</string>
-</dict>
-</plist>
diff --git a/src/tools/qmlpuppet/qml2puppet/instances/instances.pri b/src/tools/qmlpuppet/qml2puppet/instances/instances.pri
deleted file mode 100644
index 1eeb3d40b5..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/instances/instances.pri
+++ /dev/null
@@ -1,15 +0,0 @@
-INCLUDEPATH += $$PWD/
-
-HEADERS += $$PWD/qt5nodeinstanceserver.h \
- instances/qt5informationnodeinstanceserver.h \
- instances/qt5rendernodeinstanceserver.h \
- instances/qt5previewnodeinstanceserver.h
-HEADERS += $$PWD/qt5nodeinstanceclientproxy.h
-HEADERS += $$PWD/sgitemnodeinstance.h
-
-SOURCES += $$PWD/qt5nodeinstanceserver.cpp \
- instances/qt5informationnodeinstanceserver.cpp \
- instances/qt5rendernodeinstanceserver.cpp \
- instances/qt5previewnodeinstanceserver.cpp
-SOURCES += $$PWD/qt5nodeinstanceclientproxy.cpp
-SOURCES += $$PWD/sgitemnodeinstance.cpp
diff --git a/src/tools/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/src/tools/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp
deleted file mode 100644
index 1e8cd6bdf3..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp
+++ /dev/null
@@ -1,275 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#include "qt5informationnodeinstanceserver.h"
-
-#include <QSGItem>
-
-#include "servernodeinstance.h"
-#include "childrenchangeeventfilter.h"
-#include "propertyabstractcontainer.h"
-#include "propertybindingcontainer.h"
-#include "propertyvaluecontainer.h"
-#include "instancecontainer.h"
-#include "createinstancescommand.h"
-#include "changefileurlcommand.h"
-#include "clearscenecommand.h"
-#include "reparentinstancescommand.h"
-#include "changevaluescommand.h"
-#include "changebindingscommand.h"
-#include "changeidscommand.h"
-#include "removeinstancescommand.h"
-#include "nodeinstanceclientinterface.h"
-#include "removepropertiescommand.h"
-#include "valueschangedcommand.h"
-#include "informationchangedcommand.h"
-#include "pixmapchangedcommand.h"
-#include "commondefines.h"
-#include "childrenchangeeventfilter.h"
-#include "changestatecommand.h"
-#include "childrenchangedcommand.h"
-#include "completecomponentcommand.h"
-#include "componentcompletedcommand.h"
-#include "createscenecommand.h"
-
-#include "dummycontextobject.h"
-
-#include "designersupportfunctions.h"
-
-namespace QmlDesigner {
-
-Qt5InformationNodeInstanceServer::Qt5InformationNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :
- Qt5NodeInstanceServer(nodeInstanceClient)
-{
-}
-
-void Qt5InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands()
-{
- static bool inFunction = false;
- if (!inFunction) {
- inFunction = true;
-
- QSet<ServerNodeInstance> informationChangedInstanceSet;
- QVector<InstancePropertyPair> propertyChangedList;
- bool adjustSceneRect = false;
-
- if (sgView()) {
- foreach (QSGItem *item, allItems()) {
- if (item && hasInstanceForObject(item)) {
- ServerNodeInstance instance = instanceForObject(item);
-
- DesignerSupport::DirtyType informationsDirty = DesignerSupport::DirtyType(DesignerSupport::TransformUpdateMask
- | DesignerSupport::Visible
- | DesignerSupport::ZValue
- | DesignerSupport::OpacityValue);
- if (DesignerSupport::dirty(item, informationsDirty))
- informationChangedInstanceSet.insert(instance);
-
-
- if (DesignerSupport::dirty(item, DesignerSupport::ParentChanged)) {
- m_parentChangedSet.insert(instance);
- informationChangedInstanceSet.insert(instance);
- }
-// if (d->geometryChanged) {
-// if (instance.isRootNodeInstance())
-// declarativeView()->scene()->setSceneRect(item->boundingRect());
-// }
-
- }
- }
-
- foreach (const InstancePropertyPair& property, changedPropertyList()) {
- const ServerNodeInstance instance = property.first;
- const QString propertyName = property.second;
-
- if (instance.isValid()) {
- if (instance.isRootNodeInstance() && (propertyName == "width" || propertyName == "height"))
- adjustSceneRect = true;
-
- if (propertyName.contains("anchors"))
- informationChangedInstanceSet.insert(instance);
-
- propertyChangedList.append(property);
- }
- }
-
- resetAllItems();
- clearChangedPropertyList();
-
- if (!informationChangedInstanceSet.isEmpty())
- nodeInstanceClient()->informationChanged(createAllInformationChangedCommand(informationChangedInstanceSet.toList()));
-
- if (!propertyChangedList.isEmpty())
- nodeInstanceClient()->valuesChanged(createValuesChangedCommand(propertyChangedList));
-
- if (!m_parentChangedSet.isEmpty()) {
- sendChildrenChangedCommand(m_parentChangedSet.toList());
- m_parentChangedSet.clear();
- }
-
-// if (adjustSceneRect) {
-// QRectF boundingRect = rootNodeInstance().boundingRect();
-// if (boundingRect.isValid()) {
-// declarativeView()->setSceneRect(boundingRect);
-// }
-// }
-
- if (!m_completedComponentList.isEmpty()) {
- nodeInstanceClient()->componentCompleted(createComponentCompletedCommand(m_completedComponentList));
- m_completedComponentList.clear();
- }
-
- slowDownRenderTimer();
- nodeInstanceClient()->flush();
- nodeInstanceClient()->synchronizeWithClientProcess();
- }
-
- inFunction = false;
- }
-}
-
-void Qt5InformationNodeInstanceServer::reparentInstances(const ReparentInstancesCommand &command)
-{
- foreach (const ReparentContainer &container, command.reparentInstances()) {
- ServerNodeInstance instance = instanceForId(container.instanceId());
- if (instance.isValid()) {
- m_parentChangedSet.insert(instance);
- }
- }
-
- Qt5NodeInstanceServer::reparentInstances(command);
-}
-
-void Qt5InformationNodeInstanceServer::clearScene(const ClearSceneCommand &command)
-{
- Qt5NodeInstanceServer::clearScene(command);
-
- m_parentChangedSet.clear();
- m_completedComponentList.clear();
-}
-
-void Qt5InformationNodeInstanceServer::createScene(const CreateSceneCommand &command)
-{
- Qt5NodeInstanceServer::createScene(command);
-
- QList<ServerNodeInstance> instanceList;
- foreach (const InstanceContainer &container, command.instances()) {
- ServerNodeInstance instance = instanceForId(container.instanceId());
- if (instance.isValid()) {
- instanceList.append(instance);
- }
- }
-
- nodeInstanceClient()->informationChanged(createAllInformationChangedCommand(instanceList, true));
- nodeInstanceClient()->valuesChanged(createValuesChangedCommand(instanceList));
- sendChildrenChangedCommand(instanceList);
- nodeInstanceClient()->componentCompleted(createComponentCompletedCommand(instanceList));
-
-}
-
-void Qt5InformationNodeInstanceServer::sendChildrenChangedCommand(const QList<ServerNodeInstance> childList)
-{
- QSet<ServerNodeInstance> parentSet;
- QList<ServerNodeInstance> noParentList;
-
- foreach (const ServerNodeInstance &child, childList) {
- if (!child.hasParent()) {
- noParentList.append(child);
- } else {
- ServerNodeInstance parent = child.parent();
- if (parent.isValid()) {
- parentSet.insert(parent);
- } else {
- noParentList.append(child);
- }
- }
- }
-
- foreach (const ServerNodeInstance &parent, parentSet)
- nodeInstanceClient()->childrenChanged(createChildrenChangedCommand(parent, parent.childItems()));
-
- if (!noParentList.isEmpty())
- nodeInstanceClient()->childrenChanged(createChildrenChangedCommand(ServerNodeInstance(), noParentList));
-
-}
-
-void Qt5InformationNodeInstanceServer::completeComponent(const CompleteComponentCommand &command)
-{
- Qt5NodeInstanceServer::completeComponent(command);
-
- QList<ServerNodeInstance> instanceList;
- foreach (qint32 instanceId, command.instances()) {
- ServerNodeInstance instance = instanceForId(instanceId);
- if (instance.isValid()) {
- instanceList.append(instance);
- }
- }
-
- m_completedComponentList.append(instanceList);
-
- nodeInstanceClient()->valuesChanged(createValuesChangedCommand(instanceList));
- nodeInstanceClient()->informationChanged(createAllInformationChangedCommand(instanceList, true));
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h b/src/tools/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h
deleted file mode 100644
index c0c078fc47..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#ifndef QMLDESIGNER_QT5INFORMATIONNODEINSTANCESERVER_H
-#define QMLDESIGNER_QT5INFORMATIONNODEINSTANCESERVER_H
-
-#include "qt5nodeinstanceserver.h"
-
-namespace QmlDesigner {
-
-class Qt5InformationNodeInstanceServer : public Qt5NodeInstanceServer
-{
- Q_OBJECT
-public:
- explicit Qt5InformationNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);
-
- void reparentInstances(const ReparentInstancesCommand &command);
- void clearScene(const ClearSceneCommand &command);
- void createScene(const CreateSceneCommand &command);
- void completeComponent(const CompleteComponentCommand &command);
-
-protected:
- void collectItemChangesAndSendChangeCommands();
- void sendChildrenChangedCommand(const QList<ServerNodeInstance> childList);
-
-private:
- QSet<ServerNodeInstance> m_parentChangedSet;
- QList<ServerNodeInstance> m_completedComponentList;
-};
-
-} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_QT5INFORMATIONNODEINSTANCESERVER_H
diff --git a/src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp b/src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp
deleted file mode 100644
index b66784a9a5..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#include "qt5nodeinstanceclientproxy.h"
-
-#include <QCoreApplication>
-
-#include "qt5informationnodeinstanceserver.h"
-#include "qt5previewnodeinstanceserver.h"
-#include "qt5rendernodeinstanceserver.h"
-
-namespace QmlDesigner {
-
-Qt5NodeInstanceClientProxy::Qt5NodeInstanceClientProxy(QObject *parent) :
- NodeInstanceClientProxy(parent)
-{
- if (QCoreApplication::arguments().at(2) == QLatin1String("previewmode")) {
- setNodeInstanceServer(new Qt5PreviewNodeInstanceServer(this));
- } else if (QCoreApplication::arguments().at(2) == QLatin1String("editormode")) {
- setNodeInstanceServer(new Qt5InformationNodeInstanceServer(this));
- } else if (QCoreApplication::arguments().at(2) == QLatin1String("rendermode")) {
- setNodeInstanceServer(new Qt5RenderNodeInstanceServer(this));
- }
-
- initializeSocket();
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.h b/src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.h
deleted file mode 100644
index 2739bddbc9..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#ifndef QMLDESIGNER_QT5NODEINSTANCECLIENTPROXY_H
-#define QMLDESIGNER_QT5NODEINSTANCECLIENTPROXY_H
-
-#include "nodeinstanceclientproxy.h"
-
-namespace QmlDesigner {
-
-class Qt5NodeInstanceClientProxy : public NodeInstanceClientProxy
-{
- Q_OBJECT
-public:
- explicit Qt5NodeInstanceClientProxy(QObject *parent = 0);
-};
-
-} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_QT5NODEINSTANCECLIENTPROXY_H
diff --git a/src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp b/src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp
deleted file mode 100644
index a97b2202ec..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#include "qt5nodeinstanceserver.h"
-
-#if QT_VERSION >= 0x050000
-
-#include <QSGItem>
-#include <QSGView>
-
-#include <designersupportfunctions.h>
-#include <addimportcontainer.h>
-#include <createscenecommand.h>
-
-namespace QmlDesigner {
-
-Qt5NodeInstanceServer::Qt5NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient)
- : NodeInstanceServer(nodeInstanceClient),
- m_designerSupport(new DesignerSupport)
-{
- addImportString("import QtQuick 2.0\n");
-}
-
-Qt5NodeInstanceServer::~Qt5NodeInstanceServer()
-{
- delete sgView();
- delete m_designerSupport;
- m_designerSupport = 0;
-}
-
-QSGView *Qt5NodeInstanceServer::sgView() const
-{
- return m_sgView.data();
-}
-
-void Qt5NodeInstanceServer::initializeView(const QVector<AddImportContainer> &/*importVector*/)
-{
- Q_ASSERT(!sgView());
-
- m_sgView = new QSGView;
-#ifndef Q_WS_MAC
- sgView()->setAttribute(Qt::WA_DontShowOnScreen, true);
-#endif
- sgView()->show();
-#ifdef Q_WS_MAC
- sgView()->setAttribute(Qt::WA_DontShowOnScreen, true);
-#endif
- sgView()->setUpdatesEnabled(false);
-}
-
-QDeclarativeView *Qt5NodeInstanceServer::declarativeView() const
-{
- return 0;
-}
-
-QDeclarativeEngine *Qt5NodeInstanceServer::engine() const
-{
- if (sgView())
- return sgView()->engine();
-
- return 0;
-}
-
-void Qt5NodeInstanceServer::resizeCanvasSizeToRootItemSize()
-{
- if (sgView())
- sgView()->resize(rootNodeInstance().size().toSize());
-}
-
-void Qt5NodeInstanceServer::resetAllItems()
-{
- foreach (QSGItem *item, allItems())
- DesignerSupport::resetDirty(item);
-}
-
-QList<ServerNodeInstance> Qt5NodeInstanceServer::setupScene(const CreateSceneCommand &command)
-{
- setupFileUrl(command.fileUrl());
- setupImports(command.imports());
-
- QList<ServerNodeInstance> instanceList = setupInstances(command);
-
- sgView()->resize(rootNodeInstance().boundingRect().size().toSize());
-
- return instanceList;
-}
-
-QList<QSGItem*> subItems(QSGItem *parentItem)
-{
- QList<QSGItem*> itemList;
- itemList.append(parentItem->childItems());
-
- foreach (QSGItem *childItem, parentItem->childItems())
- itemList.append(subItems(childItem));
-
- return itemList;
-}
-
-QList<QSGItem*> Qt5NodeInstanceServer::allItems() const
-{
- QList<QSGItem*> itemList;
-
- if (sgView()) {
- itemList.append(sgView()->rootItem());
- itemList.append(subItems(sgView()->rootItem()));
- }
-
- return itemList;
-}
-
-void Qt5NodeInstanceServer::refreshBindings()
-{
- DesignerSupport::refreshExpressions(context());
-}
-
-DesignerSupport *Qt5NodeInstanceServer::designerSupport() const
-{
- return m_designerSupport;
-}
-
-void Qt5NodeInstanceServer::createScene(const CreateSceneCommand &command)
-{
- m_designerSupport = new DesignerSupport;
- NodeInstanceServer::createScene(command);
-}
-
-void Qt5NodeInstanceServer::clearScene(const ClearSceneCommand &command)
-{
- NodeInstanceServer::clearScene(command);
- delete m_designerSupport;
- m_designerSupport = 0;
-}
-
-} // QmlDesigner
-
-#endif // QT_VERSION
diff --git a/src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.h b/src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.h
deleted file mode 100644
index 4faa447eee..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#ifndef QT5NODEINSTANCESERVER_H
-#define QT5NODEINSTANCESERVER_H
-
-#include <QtGlobal>
-
-#include "nodeinstanceserver.h"
-
-#if QT_VERSION >= 0x050000
-
-QT_BEGIN_NAMESPACE
-class QSGItem;
-class DesignerSupport;
-QT_END_NAMESPACE
-
-namespace QmlDesigner {
-
-class Qt5NodeInstanceServer : public NodeInstanceServer
-{
- Q_OBJECT
-public:
- Qt5NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);
- ~Qt5NodeInstanceServer();
-
- QSGView *sgView() const;
- QDeclarativeView *declarativeView() const;
- QDeclarativeEngine *engine() const;
- void refreshBindings();
-
- DesignerSupport *designerSupport() const;
-
- void createScene(const CreateSceneCommand &command);
- void clearScene(const ClearSceneCommand &command);
-
-protected:
- void initializeView(const QVector<AddImportContainer> &importVector);
- void resizeCanvasSizeToRootItemSize();
- void resetAllItems();
- QList<ServerNodeInstance> setupScene(const CreateSceneCommand &command);
- QList<QSGItem*> allItems() const;
-
-private:
- QWeakPointer<QSGView> m_sgView;
- DesignerSupport *m_designerSupport;
-};
-
-} // QmlDesigner
-
-#endif // QT_VERSION
-
-#endif // QT5NODEINSTANCESERVER_H
diff --git a/src/tools/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.cpp b/src/tools/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.cpp
deleted file mode 100644
index e432ba32fa..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#include "qt5previewnodeinstanceserver.h"
-
-#include "nodeinstanceclientinterface.h"
-#include "statepreviewimagechangedcommand.h"
-#include "createscenecommand.h"
-
-namespace QmlDesigner {
-
-Qt5PreviewNodeInstanceServer::Qt5PreviewNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :
- Qt5NodeInstanceServer(nodeInstanceClient)
-{
-}
-
-void Qt5PreviewNodeInstanceServer::createScene(const CreateSceneCommand &command)
-{
- initializeView(command.imports());
- setupScene(command);
-
- startRenderTimer();
-}
-void Qt5PreviewNodeInstanceServer::startRenderTimer()
-{
- if (timerId() != 0)
- killTimer(timerId());
-
- int timerId = startTimer(renderTimerInterval());
-
- setTimerId(timerId);
-}
-
-void Qt5PreviewNodeInstanceServer::collectItemChangesAndSendChangeCommands()
-{
- static bool inFunction = false;
-
- if (!inFunction && nodeInstanceClient()->bytesToWrite() < 10000) {
- inFunction = true;
- QVector<ImageContainer> imageContainerVector;
- imageContainerVector.append(ImageContainer(0, renderPreviewImage()));
-
- foreach (ServerNodeInstance instance, rootNodeInstance().stateInstances()) {
- instance.activateState();
- imageContainerVector.append(ImageContainer(instance.instanceId(), renderPreviewImage()));
- instance.deactivateState();
- }
-
- nodeInstanceClient()->statePreviewImagesChanged(StatePreviewImageChangedCommand(imageContainerVector));
-
- slowDownRenderTimer();
- inFunction = false;
- }
-}
-
-void Qt5PreviewNodeInstanceServer::changeState(const ChangeStateCommand &/*command*/)
-{
-
-}
-
-QImage Qt5PreviewNodeInstanceServer::renderPreviewImage()
-{
- QSize size = rootNodeInstance().boundingRect().size().toSize();
- size.scale(100, 100, Qt::KeepAspectRatio);
-
- QImage image(size, QImage::Format_ARGB32);
-
- return image;
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.h b/src/tools/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.h
deleted file mode 100644
index bf60721274..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#ifndef QMLDESIGNER_QT5PREVIEWNODEINSTANCESERVER_H
-#define QMLDESIGNER_QT5PREVIEWNODEINSTANCESERVER_H
-
-#include "qt5nodeinstanceserver.h"
-
-namespace QmlDesigner {
-
-class Qt5PreviewNodeInstanceServer : public Qt5NodeInstanceServer
-{
- Q_OBJECT
-public:
- explicit Qt5PreviewNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);
-
- void createScene(const CreateSceneCommand &command);
- void changeState(const ChangeStateCommand &command);
-
- QImage renderPreviewImage();
-
-protected:
- void collectItemChangesAndSendChangeCommands();
- void startRenderTimer();
-
-private:
- ServerNodeInstance m_actualState;
-};
-
-} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_QT5PREVIEWNODEINSTANCESERVER_H
diff --git a/src/tools/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.cpp b/src/tools/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.cpp
deleted file mode 100644
index e25c0ce3b1..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#include "qt5rendernodeinstanceserver.h"
-
-#include <QSGItem>
-
-#include "servernodeinstance.h"
-#include "childrenchangeeventfilter.h"
-#include "propertyabstractcontainer.h"
-#include "propertybindingcontainer.h"
-#include "propertyvaluecontainer.h"
-#include "instancecontainer.h"
-#include "createinstancescommand.h"
-#include "changefileurlcommand.h"
-#include "clearscenecommand.h"
-#include "reparentinstancescommand.h"
-#include "changevaluescommand.h"
-#include "changebindingscommand.h"
-#include "changeidscommand.h"
-#include "removeinstancescommand.h"
-#include "nodeinstanceclientinterface.h"
-#include "removepropertiescommand.h"
-#include "valueschangedcommand.h"
-#include "informationchangedcommand.h"
-#include "pixmapchangedcommand.h"
-#include "commondefines.h"
-#include "childrenchangeeventfilter.h"
-#include "changestatecommand.h"
-#include "childrenchangedcommand.h"
-#include "completecomponentcommand.h"
-#include "componentcompletedcommand.h"
-#include "createscenecommand.h"
-
-#include "dummycontextobject.h"
-
-#include "designersupportfunctions.h"
-
-namespace QmlDesigner {
-
-Qt5RenderNodeInstanceServer::Qt5RenderNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :
- Qt5NodeInstanceServer(nodeInstanceClient)
-{
-}
-
-void Qt5RenderNodeInstanceServer::collectItemChangesAndSendChangeCommands()
-{
- static bool inFunction = false;
- if (!inFunction) {
- inFunction = true;
-
- bool adjustSceneRect = false;
-
- if (sgView()) {
- foreach (QSGItem *item, allItems()) {
- if (item && hasInstanceForObject(item)) {
- ServerNodeInstance instance = instanceForObject(item);
- if (DesignerSupport::dirty(item, DesignerSupport::ContentUpdateMask))
- m_dirtyInstanceSet.insert(instance);
- }
- }
-
- clearChangedPropertyList();
- resetAllItems();
-
- if (!m_dirtyInstanceSet.isEmpty() && nodeInstanceClient()->bytesToWrite() < 10000) {
- nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(m_dirtyInstanceSet.toList()));
- m_dirtyInstanceSet.clear();
- }
-
-// if (adjustSceneRect) {
-// QRectF boundingRect = rootNodeInstance().boundingRect();
-// if (boundingRect.isValid()) {
-// declarativeView()->setSceneRect(boundingRect);
-// }
-// }
-
- slowDownRenderTimer();
- nodeInstanceClient()->flush();
- nodeInstanceClient()->synchronizeWithClientProcess();
- }
-
- inFunction = false;
- }
-}
-
-
-void Qt5RenderNodeInstanceServer::createScene(const CreateSceneCommand &command)
-{
- NodeInstanceServer::createScene(command);
-
- QList<ServerNodeInstance> instanceList;
- foreach (const InstanceContainer &container, command.instances()) {
- ServerNodeInstance instance = instanceForId(container.instanceId());
- if (instance.isValid()) {
- instanceList.append(instance);
- }
- }
-
- nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(instanceList));
-}
-
-void Qt5RenderNodeInstanceServer::clearScene(const ClearSceneCommand &command)
-{
- NodeInstanceServer::clearScene(command);
-
- m_dirtyInstanceSet.clear();
-}
-
-void Qt5RenderNodeInstanceServer::completeComponent(const CompleteComponentCommand &command)
-{
- NodeInstanceServer::completeComponent(command);
-
- QList<ServerNodeInstance> instanceList;
- foreach (qint32 instanceId, command.instances()) {
- ServerNodeInstance instance = instanceForId(instanceId);
- if (instance.isValid()) {
- instanceList.append(instance);
- }
- }
-
- nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(instanceList));
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.h b/src/tools/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.h
deleted file mode 100644
index 78aae47692..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#ifndef QMLDESIGNER_QT5RENDERNODEINSTANCESERVER_H
-#define QMLDESIGNER_QT5RENDERNODEINSTANCESERVER_H
-
-#include "qt5nodeinstanceserver.h"
-
-namespace QmlDesigner {
-
-class Qt5RenderNodeInstanceServer : public Qt5NodeInstanceServer
-{
- Q_OBJECT
-public:
- explicit Qt5RenderNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);
-
- void createScene(const CreateSceneCommand &command);
- void clearScene(const ClearSceneCommand &command);
- void completeComponent(const CompleteComponentCommand &command);
-
-protected:
- void collectItemChangesAndSendChangeCommands();
-
-private:
- QSet<ServerNodeInstance> m_dirtyInstanceSet;
-};
-
-} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_QT5RENDERNODEINSTANCESERVER_H
diff --git a/src/tools/qmlpuppet/qml2puppet/instances/sgitemnodeinstance.cpp b/src/tools/qmlpuppet/qml2puppet/instances/sgitemnodeinstance.cpp
deleted file mode 100644
index 8735ddf7d5..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/instances/sgitemnodeinstance.cpp
+++ /dev/null
@@ -1,668 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#include "sgitemnodeinstance.h"
-
-#if QT_VERSION >= 0x050000
-
-#include "qt5nodeinstanceserver.h"
-
-#include <QDeclarativeExpression>
-#include <QSGView>
-#include <cmath>
-
-#include <QHash>
-
-#include <QtDebug>
-
-namespace QmlDesigner {
-namespace Internal {
-
-SGItemNodeInstance::SGItemNodeInstance(QSGItem *item)
- : ObjectNodeInstance(item),
- m_hasHeight(false),
- m_hasWidth(false),
- m_isResizable(true),
- m_hasContent(true),
- m_isMovable(true),
- m_x(0.0),
- m_y(0.0),
- m_width(0.0),
- m_height(0.0)
-{
-}
-
-SGItemNodeInstance::~SGItemNodeInstance()
-{
- if (sgItem())
- designerSupport()->derefFromEffectItem(sgItem());
-}
-
-bool SGItemNodeInstance::hasContent() const
-{
- return m_hasContent;
-}
-
-QList<ServerNodeInstance> SGItemNodeInstance::childItems() const
-{
- QList<ServerNodeInstance> instanceList;
-
- foreach (QSGItem *childItem, sgItem()->childItems())
- {
- if (childItem && nodeInstanceServer()->hasInstanceForObject(childItem)) {
- instanceList.append(nodeInstanceServer()->instanceForObject(childItem));
- } else { //there might be an item in between the parent instance
- //and the child instance.
- //Popular example is flickable which has a viewport item between
- //the flickable item and the flickable children
- instanceList.append(childItemsForChild(childItem)); //In such a case we go deeper inside the item and
- //search for child items with instances.
- }
- }
-
- return instanceList;
-}
-
-QList<ServerNodeInstance> SGItemNodeInstance::childItemsForChild(QSGItem *childItem) const
-{
- QList<ServerNodeInstance> instanceList;
-
- if (childItem) {
- foreach (QSGItem *childItem, childItem->childItems())
- {
- if (childItem && nodeInstanceServer()->hasInstanceForObject(childItem)) {
- instanceList.append(nodeInstanceServer()->instanceForObject(childItem));
- } else {
- instanceList.append(childItemsForChild(childItem));
- }
- }
- }
- return instanceList;
-}
-
-void SGItemNodeInstance::setHasContent(bool hasContent)
-{
- m_hasContent = hasContent;
-}
-
-
-bool anyItemHasContent(QSGItem *graphicsItem)
-{
- if (graphicsItem->flags().testFlag(QSGItem::ItemHasContents))
- return true;
-
- foreach (QSGItem *childItem, graphicsItem->childItems()) {
- if (anyItemHasContent(childItem))
- return true;
- }
-
- return false;
-}
-
-QPointF SGItemNodeInstance::position() const
-{
- return sgItem()->pos();
-}
-
-QTransform SGItemNodeInstance::transform() const
-{
- return DesignerSupport::parentTransform(sgItem());
-}
-
-QTransform SGItemNodeInstance::customTransform() const
-{
- return QTransform();
-}
-
-QTransform SGItemNodeInstance::sceneTransform() const
-{
- return DesignerSupport::canvasTransform(sgItem());
-}
-
-double SGItemNodeInstance::rotation() const
-{
- return sgItem()->rotation();
-}
-
-double SGItemNodeInstance::scale() const
-{
- return sgItem()->scale();
-}
-
-QPointF SGItemNodeInstance::transformOriginPoint() const
-{
- return sgItem()->transformOriginPoint();
-}
-
-double SGItemNodeInstance::zValue() const
-{
- return sgItem()->z();
-}
-
-double SGItemNodeInstance::opacity() const
-{
- return sgItem()->opacity();
-}
-
-QObject *SGItemNodeInstance::parent() const
-{
- if (!sgItem() || !sgItem()->parentItem())
- return 0;
-
- return sgItem()->parentItem();
-}
-
-bool SGItemNodeInstance::equalSGItem(QSGItem *item) const
-{
- return item == sgItem();
-}
-
-QImage SGItemNodeInstance::renderImage() const
-{
- return designerSupport()->renderImageForItem(sgItem());
-}
-
-bool SGItemNodeInstance::isMovable() const
-{
- return m_isMovable && sgItem() && sgItem()->parentItem();
-}
-
-void SGItemNodeInstance::setMovable(bool movable)
-{
- m_isMovable = movable;
-}
-
-SGItemNodeInstance::Pointer SGItemNodeInstance::create(QObject *object)
-{
- QSGItem *sgItem = qobject_cast<QSGItem*>(object);
-
- Q_ASSERT(sgItem);
-
- Pointer instance(new SGItemNodeInstance(sgItem));
-
- instance->setHasContent(anyItemHasContent(sgItem));
- sgItem->setFlag(QSGItem::ItemHasContents, true);
-
- if (sgItem->inherits("QSGText"))
- instance->setResizable(false);
-
- static_cast<QDeclarativeParserStatus*>(sgItem)->classBegin();
-
- instance->populateResetValueHash();
-
- return instance;
-}
-
-void SGItemNodeInstance::initialize(const ObjectNodeInstance::Pointer &objectNodeInstance)
-{
- if (instanceId() == 0) {
- DesignerSupport::setRootItem(nodeInstanceServer()->sgView(), sgItem());
- } else {
- sgItem()->setParentItem(qobject_cast<QSGItem*>(nodeInstanceServer()->sgView()->rootObject()));
- }
-
- designerSupport()->refFromEffectItem(sgItem());
- ObjectNodeInstance::initialize(objectNodeInstance);
- sgItem()->update();
-}
-
-bool SGItemNodeInstance::isSGItem() const
-{
- return true;
-}
-
-QSizeF SGItemNodeInstance::size() const
-{
- if (isValid()) {
- double implicitWidth = sgItem()->implicitWidth();
- if (!m_hasWidth
- && implicitWidth // WORKAROUND
- && sgItem()->width() <= 0
- && implicitWidth != sgItem()->width()
- && !hasBindingForProperty("width")) {
- sgItem()->blockSignals(true);
- sgItem()->setWidth(implicitWidth);
- sgItem()->blockSignals(false);
- }
-
- double implicitHeight = sgItem()->implicitHeight();
- if (!m_hasHeight
- && implicitWidth // WORKAROUND
- && sgItem()->height() <= 0
- && implicitHeight != sgItem()->height()
- && !hasBindingForProperty("height")) {
- sgItem()->blockSignals(true);
- sgItem()->setHeight(implicitHeight);
- sgItem()->blockSignals(false);
- }
-
- }
-
- if (isRootNodeInstance()) {
- if (!m_hasWidth) {
- sgItem()->blockSignals(true);
- if (sgItem()->width() < 10.)
- sgItem()->setWidth(100.);
- sgItem()->blockSignals(false);
- }
-
- if (!m_hasHeight) {
- sgItem()->blockSignals(true);
- if (sgItem()->height() < 10.)
- sgItem()->setHeight(100.);
- sgItem()->blockSignals(false);
- }
- }
-
- return QSizeF(sgItem()->width(), sgItem()->height());
-}
-
-QRectF SGItemNodeInstance::boundingRect() const
-{
- if (isValid()) {
- double implicitWidth = sgItem()->implicitWidth();
- if (!m_hasWidth
- && implicitWidth // WORKAROUND
- && sgItem()->width() <= 0
- && implicitWidth != sgItem()->width()
- && !hasBindingForProperty("width")) {
- sgItem()->blockSignals(true);
- sgItem()->setWidth(implicitWidth);
- sgItem()->blockSignals(false);
- }
-
- double implicitHeight = sgItem()->implicitHeight();
- if (!m_hasHeight
- && implicitWidth // WORKAROUND
- && sgItem()->height() <= 0
- && implicitHeight != sgItem()->height()
- && !hasBindingForProperty("height")) {
- sgItem()->blockSignals(true);
- sgItem()->setHeight(implicitHeight);
- sgItem()->blockSignals(false);
- }
-
- }
-
- if (isRootNodeInstance()) {
- if (!m_hasWidth) {
- sgItem()->blockSignals(true);
- if (sgItem()->width() < 10.)
- sgItem()->setWidth(100.);
- sgItem()->blockSignals(false);
- }
-
- if (!m_hasHeight) {
- sgItem()->blockSignals(true);
- if (sgItem()->height() < 10.)
- sgItem()->setHeight(100.);
- sgItem()->blockSignals(false);
- }
- }
-
- if (sgItem())
- return sgItem()->boundingRect();
-
- return QRectF();
-}
-
-void SGItemNodeInstance::setPropertyVariant(const QString &name, const QVariant &value)
-{
- if (name == "state")
- return; // states are only set by us
-
- if (name == "height") {
- m_height = value.toDouble();
- if (value.isValid())
- m_hasHeight = true;
- else
- m_hasHeight = false;
- }
-
- if (name == "width") {
- m_width = value.toDouble();
- if (value.isValid())
- m_hasWidth = true;
- else
- m_hasWidth = false;
- }
-
- if (name == "x")
- m_x = value.toDouble();
-
- if (name == "y")
- m_y = value.toDouble();
-
- ObjectNodeInstance::setPropertyVariant(name, value);
-
- refresh();
-}
-
-void SGItemNodeInstance::setPropertyBinding(const QString &name, const QString &expression)
-{
- if (name == "state")
- return; // states are only set by us
-
- ObjectNodeInstance::setPropertyBinding(name, expression);
-}
-
-QVariant SGItemNodeInstance::property(const QString &name) const
-{
- if (name == "width" && !hasBindingForProperty("width")) {
- double implicitWidth = sgItem()->implicitWidth();
- if (!m_hasWidth
- && implicitWidth // WORKAROUND
- && sgItem()->width() <= 0
- && implicitWidth != sgItem()->width()) {
- sgItem()->blockSignals(true);
- sgItem()->setWidth(implicitWidth);
- sgItem()->blockSignals(false);
- }
- }
-
- if (name == "height" && !hasBindingForProperty("height")) {
- double implicitHeight = sgItem()->implicitHeight();
- if (!m_hasHeight
- && implicitHeight // WORKAROUND
- && sgItem()->width() <= 0
- && implicitHeight != sgItem()->height()) {
- sgItem()->blockSignals(true);
- sgItem()->setHeight(implicitHeight);
- sgItem()->blockSignals(false);
- }
- }
-
- return ObjectNodeInstance::property(name);
-}
-
-void SGItemNodeInstance::resetHorizontal()
- {
- setPropertyVariant("x", m_x);
- if (m_width > 0.0) {
- setPropertyVariant("width", m_width);
- } else {
- setPropertyVariant("width", sgItem()->implicitWidth());
- }
-}
-
-void SGItemNodeInstance::resetVertical()
- {
- setPropertyVariant("y", m_y);
- if (m_height > 0.0) {
- setPropertyVariant("height", m_height);
- } else {
- setPropertyVariant("height", sgItem()->implicitWidth());
- }
-}
-
-static void repositioning(QSGItem *item)
-{
- if (!item)
- return;
-
-// QDeclarativeBasePositioner *positioner = qobject_cast<QDeclarativeBasePositioner*>(item);
-// if (positioner)
-// positioner->rePositioning();
-
- if (item->parentItem())
- repositioning(item->parentItem());
-}
-
-void SGItemNodeInstance::refresh()
-{
- repositioning(sgItem());
-}
-
-void SGItemNodeInstance::doComponentComplete()
-{
- if (sgItem()) {
- if (DesignerSupport::isComponentComplete(sgItem()))
- return;
- static_cast<QDeclarativeParserStatus*>(sgItem())->componentComplete();
- }
-
- sgItem()->update();
-}
-
-bool SGItemNodeInstance::isResizable() const
-{
- return m_isResizable && sgItem() && sgItem()->parentItem();
-}
-
-void SGItemNodeInstance::setResizable(bool resizeable)
-{
- m_isResizable = resizeable;
-}
-
-int SGItemNodeInstance::penWidth() const
-{
- return DesignerSupport::borderWidth(sgItem());
-}
-
-void SGItemNodeInstance::resetProperty(const QString &name)
-{
- if (name == "height") {
- m_hasHeight = false;
- m_height = 0.0;
- }
-
- if (name == "width") {
- m_hasWidth = false;
- m_width = 0.0;
- }
-
- if (name == "x")
- m_x = 0.0;
-
- if (name == "y")
- m_y = 0.0;
-
- DesignerSupport::resetAnchor(sgItem(), name);
-
- if (name == "anchors.fill") {
- resetHorizontal();
- resetVertical();
- } else if (name == "anchors.centerIn") {
- resetHorizontal();
- resetVertical();
- } else if (name == "anchors.top") {
- resetVertical();
- } else if (name == "anchors.left") {
- resetHorizontal();
- } else if (name == "anchors.right") {
- resetHorizontal();
- } else if (name == "anchors.bottom") {
- resetVertical();
- } else if (name == "anchors.horizontalCenter") {
- resetHorizontal();
- } else if (name == "anchors.verticalCenter") {
- resetVertical();
- } else if (name == "anchors.baseline") {
- resetVertical();
- }
-
- ObjectNodeInstance::resetProperty(name);
-}
-
-void SGItemNodeInstance::reparent(const ObjectNodeInstance::Pointer &oldParentInstance, const QString &oldParentProperty, const ObjectNodeInstance::Pointer &newParentInstance, const QString &newParentProperty)
-{
- if (oldParentInstance && oldParentInstance->isPositioner()) {
- setInPositioner(false);
- setMovable(true);
- }
-
- ObjectNodeInstance::reparent(oldParentInstance, oldParentProperty, newParentInstance, newParentProperty);
-
- if (newParentInstance && newParentInstance->isPositioner()) {
- setInPositioner(true);
- setMovable(false);
- }
-
- if (oldParentInstance && oldParentInstance->isPositioner() && !(newParentInstance && newParentInstance->isPositioner())) {
- if (!hasBindingForProperty("x"))
- setPropertyVariant("x", m_x);
-
- if (!hasBindingForProperty("y"))
- setPropertyVariant("y", m_y);
- }
-
- refresh();
- DesignerSupport::updateDirtyNode(sgItem());
-}
-
-static bool isValidAnchorName(const QString &name)
-{
- static QStringList anchorNameList(QStringList() << "anchors.top"
- << "anchors.left"
- << "anchors.right"
- << "anchors.bottom"
- << "anchors.verticalCenter"
- << "anchors.horizontalCenter"
- << "anchors.fill"
- << "anchors.centerIn"
- << "anchors.baseline");
-
- return anchorNameList.contains(name);
-}
-
-bool SGItemNodeInstance::hasAnchor(const QString &name) const
-{
- return DesignerSupport::hasAnchor(sgItem(), name);
-}
-
-QPair<QString, ServerNodeInstance> SGItemNodeInstance::anchor(const QString &name) const
-{
- if (!isValidAnchorName(name) || !DesignerSupport::hasAnchor(sgItem(), name))
- return ObjectNodeInstance::anchor(name);
-
- QPair<QString, QObject*> nameObjectPair = DesignerSupport::anchorLineTarget(sgItem(), name, context());
-
- QObject *targetObject = nameObjectPair.second;
- QString targetName = nameObjectPair.first;
-
- if (targetObject && nodeInstanceServer()->hasInstanceForObject(targetObject)) {
- return qMakePair(targetName, nodeInstanceServer()->instanceForObject(targetObject));
- } else {
- return ObjectNodeInstance::anchor(name);
- }
-}
-
-QList<ServerNodeInstance> SGItemNodeInstance::stateInstances() const
-{
- QList<ServerNodeInstance> instanceList;
- QList<QObject*> stateList = DesignerSupport::statesForItem(sgItem());
- foreach (QObject *state, stateList)
- {
- if (state && nodeInstanceServer()->hasInstanceForObject(state))
- instanceList.append(nodeInstanceServer()->instanceForObject(state));
- }
-
- return instanceList;
-}
-
-bool SGItemNodeInstance::isAnchoredBySibling() const
-{
- if (sgItem()->parentItem()) {
- foreach (QSGItem *siblingItem, sgItem()->parentItem()->childItems()) { // search in siblings for a anchor to this item
- if (siblingItem) {
- if (DesignerSupport::isAnchoredTo(siblingItem, sgItem()))
- return true;
- }
- }
- }
-
- return false;
-}
-
-bool SGItemNodeInstance::isAnchoredByChildren() const
-{
- if (DesignerSupport::areChildrenAnchoredTo(sgItem(), sgItem())) // search in children for a anchor to this item
- return true;
-
- return false;
-}
-
-QSGItem *SGItemNodeInstance::sgItem() const
-{
- if (object() == 0)
- return 0;
-
- Q_ASSERT(qobject_cast<QSGItem*>(object()));
- return static_cast<QSGItem*>(object());
-}
-
-DesignerSupport *SGItemNodeInstance::designerSupport() const
-{
- return qt5NodeInstanceServer()->designerSupport();
-}
-
-Qt5NodeInstanceServer *SGItemNodeInstance::qt5NodeInstanceServer() const
-{
- return qobject_cast<Qt5NodeInstanceServer*>(nodeInstanceServer());
-}
-
-} // namespace Internal
-} // namespace QmlDesigner
-
-#endif //QT_VERSION
diff --git a/src/tools/qmlpuppet/qml2puppet/instances/sgitemnodeinstance.h b/src/tools/qmlpuppet/qml2puppet/instances/sgitemnodeinstance.h
deleted file mode 100644
index de17a6216e..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/instances/sgitemnodeinstance.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#ifndef SGITEMNODEINSTANCE_H
-#define SGITEMNODEINSTANCE_H
-
-#include <QtGlobal>
-
-#if QT_VERSION >= 0x050000
-
-#include "objectnodeinstance.h"
-
-#include <QSGItem>
-#include <designersupportfunctions.h>
-
-namespace QmlDesigner {
-namespace Internal {
-
-class SGItemNodeInstance : public ObjectNodeInstance
-{
-public:
- typedef QSharedPointer<SGItemNodeInstance> Pointer;
- typedef QWeakPointer<SGItemNodeInstance> WeakPointer;
-
- ~SGItemNodeInstance();
-
- static Pointer create(QObject *objectToBeWrapped);
- void initialize(const ObjectNodeInstance::Pointer &objectNodeInstance);
-
- bool isSGItem() const;
-
- QRectF boundingRect() const;
- QPointF position() const;
- QSizeF size() const;
- QTransform transform() const;
- QTransform customTransform() const;
- QTransform sceneTransform() const;
- double opacity() const;
-
- QObject *parent() const;
-
- double rotation() const;
- double scale() const;
- QPointF transformOriginPoint() const;
- double zValue() const;
-
- bool equalSGItem(QSGItem *item) const;
-
- bool hasContent() const;
-
- QList<ServerNodeInstance> childItems() const;
- QList<ServerNodeInstance> childItemsForChild(QSGItem *childItem) const;
-
- bool isMovable() const;
- void setMovable(bool movable);
-
- void setPropertyVariant(const QString &name, const QVariant &value);
- void setPropertyBinding(const QString &name, const QString &expression);
-
- QVariant property(const QString &name) const;
- void resetProperty(const QString &name);
-
- void reparent(const ObjectNodeInstance::Pointer &oldParentInstance, const QString &oldParentProperty, const ObjectNodeInstance::Pointer &newParentInstance, const QString &newParentProperty);
-
- int penWidth() const;
-
- bool hasAnchor(const QString &name) const;
- QPair<QString, ServerNodeInstance> anchor(const QString &name) const;
- bool isAnchoredBySibling() const;
- bool isAnchoredByChildren() const;
- void doComponentComplete();
-
- bool isResizable() const;
- void setResizable(bool resizeable);
-
- void setHasContent(bool hasContent);
-
- QList<ServerNodeInstance> stateInstances() const;
-
- QImage renderImage() const;
-
- DesignerSupport *designerSupport() const;
- Qt5NodeInstanceServer *qt5NodeInstanceServer() const;
-
-protected:
- SGItemNodeInstance(QSGItem*);
- QSGItem *sgItem() const;
- void resetHorizontal();
- void resetVertical();
- void refresh();
-
-private: //variables
- bool m_hasHeight;
- bool m_hasWidth;
- bool m_isResizable;
- bool m_hasContent;
- bool m_isMovable;
- double m_x;
- double m_y;
- double m_width;
- double m_height;
-};
-
-} // namespace Internal
-} // namespace QmlDesigner
-
-#endif // QT_VERSION
-#endif // SGITEMNODEINSTANCE_H
-
diff --git a/src/tools/qmlpuppet/qml2puppet/main.cpp b/src/tools/qmlpuppet/qml2puppet/main.cpp
deleted file mode 100644
index f1b1c6b90e..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/main.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include <QtDebug>
-
-#include <QApplication>
-#include <QStringList>
-
-#include <qt5nodeinstanceclientproxy.h>
-
-#ifdef ENABLE_QT_BREAKPAD
-#include <qtsystemexceptionhandler.h>
-#endif
-
-#ifdef Q_OS_WIN
-#include <windows.h>
-#endif
-
-int main(int argc, char *argv[])
-{
- QApplication application(argc, argv);
-
- if (application.arguments().count() != 4)
- return -1;
-
- QCoreApplication::setOrganizationName("Nokia");
- QCoreApplication::setOrganizationDomain("nokia.com");
- QCoreApplication::setApplicationName("Qml2Puppet");
- QCoreApplication::setApplicationVersion("1.0.0");
-
-#ifdef ENABLE_QT_BREAKPAD
- QtSystemExceptionHandler systemExceptionHandler;
-#endif
-
- new QmlDesigner::Qt5NodeInstanceClientProxy(&application);
-
-#if defined(Q_OS_WIN) && defined(QT_NO_DEBUG)
- SetErrorMode(SEM_NOGPFAULTERRORBOX); //We do not want to see any message boxes
-#endif
-
- return application.exec();
-}
diff --git a/src/tools/qmlpuppet/qml2puppet/qml2puppet.pro b/src/tools/qmlpuppet/qml2puppet/qml2puppet.pro
deleted file mode 100644
index 1edcb30464..0000000000
--- a/src/tools/qmlpuppet/qml2puppet/qml2puppet.pro
+++ /dev/null
@@ -1,41 +0,0 @@
-TARGET = qml2puppet
-
-TEMPLATE = app
-
-QT += core gui declarative network
-
-contains (QT_CONFIG, webkit) {
- QT += webkit
-}
-
-QT += core-private declarative-private gui-private script-private
-
-DEFINES += QWEAKPOINTER_ENABLE_ARROW
-
-include(../../../../qtcreator.pri)
-DESTDIR = $$IDE_BIN_PATH
-include(../../../rpath.pri)
-
-include (instances/instances.pri)
-include (../instances/instances.pri)
-include (../commands/commands.pri)
-include (../container/container.pri)
-include (../interfaces/interfaces.pri)
-
-QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
-!isEmpty(QT_BREAKPAD_ROOT_PATH) {
- include($$QT_BREAKPAD_ROOT_PATH/qtbreakpad.pri)
-}
-
-SOURCES += main.cpp
-RESOURCES += ../qmlpuppet.qrc
-
-OTHER_FILES += Info.plist.in
-macx {
- info.input = Info.plist.in
- info.output = $$IDE_BIN_PATH/$${TARGET}.app/Contents/Info.plist
- QMAKE_SUBSTITUTES += info
-} else {
- target.path = /bin
- INSTALLS += target
-}
diff --git a/src/tools/qmlpuppet/qmlpuppet.pro b/src/tools/qmlpuppet/qmlpuppet.pro
index 2ef506f68e..8fadbfe12f 100644
--- a/src/tools/qmlpuppet/qmlpuppet.pro
+++ b/src/tools/qmlpuppet/qmlpuppet.pro
@@ -3,10 +3,6 @@ TEMPLATE = subdirs
include(../../../qtcreator.pri)
include(../../private_headers.pri)
-minQtVersion(5, 0, 0) {
- SUBDIRS += qml2puppet
-}
-
exists($${QT_PRIVATE_HEADERS}/QtDeclarative/private/qdeclarativecontext_p.h) {
minQtVersion(4, 7, 1) {
SUBDIRS += qmlpuppet
diff --git a/src/tools/qmlpuppet/qmlpuppet.qrc b/src/tools/qmlpuppet/qmlpuppet.qrc
deleted file mode 100644
index ceb6142cb3..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/qtquickplugin">
- <file>images/template_image.png</file>
- <file>html/welcome.html</file>
- <file>images/webkit.png</file>
- </qresource>
-</RCC>
diff --git a/src/tools/qmlpuppet/qmlpuppet/Info.plist.in b/src/tools/qmlpuppet/qmlpuppet/Info.plist.in
deleted file mode 100644
index 7d0d6a1039..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/Info.plist.in
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
- <key>NSHumanReadableCopyright</key>
- <string>(C) 2008-2011 Nokia Corporation
-Commercial Usage
-
-Licensees holding valid Qt Commercial licenses may use this file in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
-
-GNU Lesser General Public License Usage
-
-Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation and appearing in the file LICENSE.LGPL included in the packaging of this file. Please review the following information to ensure the GNU Lesser General Public License version 2.1 requirements will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
- <key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
- <key>CFBundleIdentifier</key>
- <string>com.nokia.qtcreator.qmlpuppet</string>
- <key>CFBundleVersion</key>
- <string>$$QTCREATOR_VERSION</string>
- <key>CFBundleShortVersionString</key>
- <string>$$QTCREATOR_VERSION</string>
- <key>LSUIElement</key>
- <string>1</string>
-</dict>
-</plist>
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/graphicsobjectnodeinstance.cpp b/src/tools/qmlpuppet/qmlpuppet/instances/graphicsobjectnodeinstance.cpp
deleted file mode 100644
index 306165709f..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/graphicsobjectnodeinstance.cpp
+++ /dev/null
@@ -1,283 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "graphicsobjectnodeinstance.h"
-
-#include <QGraphicsObject>
-#include "private/qgraphicsitem_p.h"
-#include <QStyleOptionGraphicsItem>
-#include <QPixmap>
-#include <QSizeF>
-
-namespace QmlDesigner {
-namespace Internal {
-
-GraphicsObjectNodeInstance::GraphicsObjectNodeInstance(QGraphicsObject *graphicsObject)
- : ObjectNodeInstance(graphicsObject),
- m_isMovable(true)
-{
-}
-
-QGraphicsObject *GraphicsObjectNodeInstance::graphicsObject() const
-{
- if (object() == 0)
- return 0;
-
- Q_ASSERT(qobject_cast<QGraphicsObject*>(object()));
- return static_cast<QGraphicsObject*>(object());
-}
-
-bool GraphicsObjectNodeInstance::hasContent() const
-{
- return m_hasContent;
-}
-
-QList<ServerNodeInstance> GraphicsObjectNodeInstance::childItems() const
-{
- QList<ServerNodeInstance> instanceList;
- foreach(QGraphicsItem *item, graphicsObject()->childItems())
- {
- QGraphicsObject *childObject = item->toGraphicsObject();
- if (childObject && nodeInstanceServer()->hasInstanceForObject(childObject)) {
- instanceList.append(nodeInstanceServer()->instanceForObject(childObject));
- } else { //there might be an item in between the parent instance
- //and the child instance.
- //Popular example is flickable which has a viewport item between
- //the flickable item and the flickable children
- instanceList.append(childItemsForChild(item)); //In such a case we go deeper inside the item and
- //search for child items with instances.
- }
- }
-
- return instanceList;
-}
-
-QList<ServerNodeInstance> GraphicsObjectNodeInstance::childItemsForChild(QGraphicsItem *childItem) const
-{
- QList<ServerNodeInstance> instanceList;
- if (childItem) {
-
- foreach(QGraphicsItem *item, childItem->childItems())
- {
- QGraphicsObject *childObject = item->toGraphicsObject();
- if (childObject && nodeInstanceServer()->hasInstanceForObject(childObject)) {
- instanceList.append(nodeInstanceServer()->instanceForObject(childObject));
- } else {
- instanceList.append(childItemsForChild(item));
- }
- }
- }
- return instanceList;
-}
-
-void GraphicsObjectNodeInstance::setHasContent(bool hasContent)
-{
- m_hasContent = hasContent;
-}
-
-QPointF GraphicsObjectNodeInstance::position() const
-{
- return graphicsObject()->pos();
-}
-
-QSizeF GraphicsObjectNodeInstance::size() const
-{
- return graphicsObject()->boundingRect().size();
-}
-
-QTransform GraphicsObjectNodeInstance::transform() const
-{
- if (!nodeInstanceServer()->hasInstanceForObject(object()))
- return sceneTransform();
-
- ServerNodeInstance nodeInstanceParent = nodeInstanceServer()->instanceForObject(object()).parent();
-
- if (!nodeInstanceParent.isValid())
- return sceneTransform();
-
- QGraphicsObject *graphicsObjectParent = qobject_cast<QGraphicsObject*>(nodeInstanceParent.internalObject());
- if (graphicsObjectParent)
- return graphicsObject()->itemTransform(graphicsObjectParent);
- else
- return sceneTransform();
-}
-
-QTransform GraphicsObjectNodeInstance::customTransform() const
-{
- return graphicsObject()->transform();
-}
-
-QTransform GraphicsObjectNodeInstance::sceneTransform() const
-{
- return graphicsObject()->sceneTransform();
-}
-
-double GraphicsObjectNodeInstance::rotation() const
-{
- return graphicsObject()->rotation();
-}
-
-double GraphicsObjectNodeInstance::scale() const
-{
- return graphicsObject()->scale();
-}
-
-QList<QGraphicsTransform *> GraphicsObjectNodeInstance::transformations() const
-{
- return graphicsObject()->transformations();
-}
-
-QPointF GraphicsObjectNodeInstance::transformOriginPoint() const
-{
- return graphicsObject()->transformOriginPoint();
-}
-
-double GraphicsObjectNodeInstance::zValue() const
-{
- return graphicsObject()->zValue();
-}
-
-double GraphicsObjectNodeInstance::opacity() const
-{
- return graphicsObject()->opacity();
-}
-
-QObject *GraphicsObjectNodeInstance::parent() const
-{
- if (!graphicsObject() || !graphicsObject()->parentItem())
- return 0;
-
- return graphicsObject()->parentItem()->toGraphicsObject();
-}
-
-QRectF GraphicsObjectNodeInstance::boundingRect() const
-{
- return graphicsObject()->boundingRect();
-}
-
-bool GraphicsObjectNodeInstance::isGraphicsObject() const
-{
- return true;
-}
-
-void GraphicsObjectNodeInstance::setPropertyVariant(const QString &name, const QVariant &value)
-{
- ObjectNodeInstance::setPropertyVariant(name, value);
-}
-
-void GraphicsObjectNodeInstance::setPropertyBinding(const QString &name, const QString &expression)
-{
- ObjectNodeInstance::setPropertyBinding(name, expression);
-}
-
-QVariant GraphicsObjectNodeInstance::property(const QString &name) const
-{
- return ObjectNodeInstance::property(name);
-}
-
-bool GraphicsObjectNodeInstance::equalGraphicsItem(QGraphicsItem *item) const
-{
- return item == graphicsObject();
-}
-
-void initOption(QGraphicsItem *item, QStyleOptionGraphicsItem *option, const QTransform &transform)
-{
- QGraphicsItemPrivate *privateItem = QGraphicsItemPrivate::get(item);
- privateItem->initStyleOption(option, transform, QRegion());
-}
-
-QImage GraphicsObjectNodeInstance::renderImage() const
-{
- QRectF boundingRect = graphicsObject()->boundingRect();
- QSize boundingSize = boundingRect.size().toSize();
-
- QImage image(boundingSize, QImage::Format_ARGB32_Premultiplied);
-
- if (image.isNull())
- return image;
-
- image.fill(0x00000000);
-
- QPainter painter(&image);
- painter.translate(-boundingRect.topLeft());
-
- if (hasContent()) {
- QStyleOptionGraphicsItem option;
- initOption(graphicsObject(), &option, painter.transform());
- graphicsObject()->paint(&painter, &option);
- }
-
- foreach(QGraphicsItem *graphicsItem, graphicsObject()->childItems())
- paintRecursively(graphicsItem, &painter);
-
- return image;
-}
-
-void GraphicsObjectNodeInstance::paintRecursively(QGraphicsItem *graphicsItem, QPainter *painter) const
-{
- QGraphicsObject *graphicsObject = graphicsItem->toGraphicsObject();
- if (graphicsObject) {
- if (nodeInstanceServer()->hasInstanceForObject(graphicsObject))
- return; //we already keep track of this object elsewhere
- }
-
- if (graphicsItem->isVisible()) {
- painter->save();
- painter->setTransform(graphicsItem->itemTransform(graphicsItem->parentItem()), true);
- painter->setOpacity(graphicsItem->opacity() * painter->opacity());
- QStyleOptionGraphicsItem option;
- initOption(graphicsItem, &option, painter->transform());
- graphicsItem->paint(painter, &option);
- foreach(QGraphicsItem *childItem, graphicsItem->childItems()) {
- paintRecursively(childItem, painter);
- }
- painter->restore();
- }
-}
-
-void GraphicsObjectNodeInstance::paintUpdate()
-{
- graphicsObject()->update();
-}
-
-bool GraphicsObjectNodeInstance::isMovable() const
-{
- return m_isMovable && graphicsObject() && graphicsObject()->parentItem();
-}
-
-void GraphicsObjectNodeInstance::setMovable(bool movable)
-{
- m_isMovable = movable;
-}
-
-} // namespace Internal
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/graphicsobjectnodeinstance.h b/src/tools/qmlpuppet/qmlpuppet/instances/graphicsobjectnodeinstance.h
deleted file mode 100644
index dd4b819704..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/graphicsobjectnodeinstance.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef GRAPHICSOBJECTNODEINSTANCE_H
-#define GRAPHICSOBJECTNODEINSTANCE_H
-
-#include "objectnodeinstance.h"
-
-QT_BEGIN_NAMESPACE
-class QGraphicsObject;
-QT_END_NAMESPACE
-
-namespace QmlDesigner {
-namespace Internal {
-
-class GraphicsObjectNodeInstance : public ObjectNodeInstance
-{
-public:
- GraphicsObjectNodeInstance(QGraphicsObject *graphicsObject);
- QImage renderImage() const;
-
- bool isGraphicsObject() const;
-
- QRectF boundingRect() const;
- QPointF position() const;
- QSizeF size() const;
- QTransform transform() const;
- QTransform customTransform() const;
- QTransform sceneTransform() const;
- double opacity() const;
-
- QObject *parent() const;
-
- double rotation() const;
- double scale() const;
- QList<QGraphicsTransform *> transformations() const;
- QPointF transformOriginPoint() const;
- double zValue() const;
-
- bool equalGraphicsItem(QGraphicsItem *item) const;
-
- void setPropertyVariant(const QString &name, const QVariant &value);
- void setPropertyBinding(const QString &name, const QString &expression);
- QVariant property(const QString &name) const;
-
- bool hasContent() const;
-
- QList<ServerNodeInstance> childItems() const;
- QList<ServerNodeInstance> childItemsForChild(QGraphicsItem *childItem) const;
-
- void paintUpdate();
-
- bool isMovable() const;
- void setMovable(bool movable);
-
-
-protected:
- void setHasContent(bool hasContent);
- QGraphicsObject *graphicsObject() const;
- void paintRecursively(QGraphicsItem *graphicsItem, QPainter *painter) const;
-
-private: // variables
- bool m_hasContent;
- bool m_isMovable;
-};
-
-} // namespace Internal
-} // namespace QmlDesigner
-
-#endif // GRAPHICSOBJECTNODEINSTANCE_H
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/instances.pri b/src/tools/qmlpuppet/qmlpuppet/instances/instances.pri
deleted file mode 100644
index 890faf94ae..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/instances.pri
+++ /dev/null
@@ -1,19 +0,0 @@
-INCLUDEPATH += $$PWD/
-
-HEADERS += $$PWD/qt4nodeinstanceserver.h
-HEADERS += $$PWD/qt4nodeinstanceclientproxy.h
-HEADERS += $$PWD/qt4informationnodeinstanceserver.h
-HEADERS += $$PWD/qt4rendernodeinstanceserver.h
-HEADERS += $$PWD/qt4previewnodeinstanceserver.h
-HEADERS += $$PWD/graphicsobjectnodeinstance.h
-HEADERS += $$PWD/positionernodeinstance.h
-HEADERS += $$PWD/qmlgraphicsitemnodeinstance.h
-
-SOURCES += $$PWD/qt4nodeinstanceserver.cpp
-SOURCES += $$PWD/qt4nodeinstanceclientproxy.cpp
-SOURCES += $$PWD/qt4informationnodeinstanceserver.cpp
-SOURCES += $$PWD/qt4rendernodeinstanceserver.cpp
-SOURCES += $$PWD/qt4previewnodeinstanceserver.cpp
-SOURCES += $$PWD/graphicsobjectnodeinstance.cpp
-SOURCES += $$PWD/qmlgraphicsitemnodeinstance.cpp
-SOURCES += $$PWD/positionernodeinstance.cpp
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/positionernodeinstance.cpp b/src/tools/qmlpuppet/qmlpuppet/instances/positionernodeinstance.cpp
deleted file mode 100644
index 718f8a3f06..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/positionernodeinstance.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "positionernodeinstance.h"
-#include <private/qdeclarativepositioners_p.h>
-
-namespace QmlDesigner {
-namespace Internal {
-
-PositionerNodeInstance::PositionerNodeInstance(QDeclarativeBasePositioner *item)
- : QmlGraphicsItemNodeInstance(item)
-{
-}
-
-bool PositionerNodeInstance::isPositioner() const
-{
- return true;
-}
-
-bool PositionerNodeInstance::isResizable() const
-{
- return false;
-}
-
-void PositionerNodeInstance::setPropertyVariant(const QString &name, const QVariant &value)
-{
- if (name == "move" || name == "add")
- return;
-
- QmlGraphicsItemNodeInstance::setPropertyVariant(name, value);
-}
-
-void PositionerNodeInstance::setPropertyBinding(const QString &name, const QString &expression)
-{
- if (name == "move" || name == "add")
- return;
-
- QmlGraphicsItemNodeInstance::setPropertyBinding(name, expression);
-}
-
-PositionerNodeInstance::Pointer PositionerNodeInstance::create(QObject *object)
-{
- QDeclarativeBasePositioner *positioner = qobject_cast<QDeclarativeBasePositioner*>(object);
-
- Q_ASSERT(positioner);
-
- Pointer instance(new PositionerNodeInstance(positioner));
-
- instance->setHasContent(!positioner->flags().testFlag(QGraphicsItem::ItemHasNoContents));
- positioner->setFlag(QGraphicsItem::ItemHasNoContents, false);
-
- static_cast<QDeclarativeParserStatus*>(positioner)->classBegin();
-
- instance->populateResetValueHash();
-
- return instance;
-}
-}
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/positionernodeinstance.h b/src/tools/qmlpuppet/qmlpuppet/instances/positionernodeinstance.h
deleted file mode 100644
index 1a0406e274..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/positionernodeinstance.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef POSITIONERNODEINSTANCE_H
-#define POSITIONERNODEINSTANCE_H
-
-#include "qmlgraphicsitemnodeinstance.h"
-
-QT_BEGIN_NAMESPACE
-class QDeclarativeBasePositioner;
-QT_END_NAMESPACE
-
-namespace QmlDesigner {
-namespace Internal {
-
-class PositionerNodeInstance : public QmlGraphicsItemNodeInstance
-{
-public:
- typedef QSharedPointer<PositionerNodeInstance> Pointer;
- typedef QWeakPointer<PositionerNodeInstance> WeakPointer;
-
- static Pointer create(QObject *objectToBeWrapped);
-
- void setPropertyVariant(const QString &name, const QVariant &value);
- void setPropertyBinding(const QString &name, const QString &expression);
-
- bool isPositioner() const;
-
- bool isResizable() const;
-
-
-protected:
- PositionerNodeInstance(QDeclarativeBasePositioner *item);
-};
-
-} // namespace Internal
-} // namespace QmlDesigner
-
-#endif // POSITIONERNODEINSTANCE_H
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/qmlgraphicsitemnodeinstance.cpp b/src/tools/qmlpuppet/qmlpuppet/instances/qmlgraphicsitemnodeinstance.cpp
deleted file mode 100644
index 13c8a105f5..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/qmlgraphicsitemnodeinstance.cpp
+++ /dev/null
@@ -1,629 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "qmlgraphicsitemnodeinstance.h"
-
-#include <QDeclarativeExpression>
-
-#include <private/qdeclarativeanchors_p.h>
-#include <private/qdeclarativeanchors_p_p.h>
-#include <private/qdeclarativeitem_p.h>
-#include <private/qdeclarativeproperty_p.h>
-#include <private/qdeclarativerectangle_p.h>
-#include <private/qdeclarativepositioners_p.h>
-#include <private/qdeclarativestategroup_p.h>
-
-
-#include <cmath>
-
-#include <QHash>
-
-namespace QmlDesigner {
-namespace Internal {
-
-QmlGraphicsItemNodeInstance::QmlGraphicsItemNodeInstance(QDeclarativeItem *item)
- : GraphicsObjectNodeInstance(item),
- m_hasHeight(false),
- m_hasWidth(false),
- m_isResizable(true),
- m_x(0.0),
- m_y(0.0),
- m_width(0.0),
- m_height(0.0)
-{
-}
-
-QmlGraphicsItemNodeInstance::~QmlGraphicsItemNodeInstance()
-{
-}
-
-bool anyItemHasContent(QGraphicsItem *graphicsItem)
-{
- if (!graphicsItem->flags().testFlag(QGraphicsItem::ItemHasNoContents))
- return true;
-
- foreach (QGraphicsItem *childItem, graphicsItem->childItems()) {
- if (anyItemHasContent(childItem))
- return true;
- }
-
- return false;
-}
-
-QmlGraphicsItemNodeInstance::Pointer QmlGraphicsItemNodeInstance::create(QObject *object)
-{
- QDeclarativeItem *qmlGraphicsItem = dynamic_cast<QDeclarativeItem*>(object);
-
- Q_ASSERT(qmlGraphicsItem);
-
- Pointer instance(new QmlGraphicsItemNodeInstance(qmlGraphicsItem));
-
- instance->setHasContent(anyItemHasContent(qmlGraphicsItem));
- qmlGraphicsItem->setFlag(QGraphicsItem::ItemHasNoContents, false);
-
- if (qmlGraphicsItem->inherits("QDeclarativeText"))
- instance->setResizable(false);
-
- static_cast<QDeclarativeParserStatus*>(qmlGraphicsItem)->classBegin();
-
- instance->populateResetValueHash();
-
- return instance;
-}
-
-bool QmlGraphicsItemNodeInstance::isQmlGraphicsItem() const
-{
- return true;
-}
-
-QSizeF QmlGraphicsItemNodeInstance::size() const
-{
- if (isValid()) {
- double implicitWidth = qmlGraphicsItem()->implicitWidth();
- if (!m_hasWidth
- && implicitWidth // WORKAROUND
- && qmlGraphicsItem()->width() <= 0
- && implicitWidth != qmlGraphicsItem()->width()
- && !hasBindingForProperty("width")) {
- qmlGraphicsItem()->blockSignals(true);
- qmlGraphicsItem()->setWidth(implicitWidth);
- qmlGraphicsItem()->blockSignals(false);
- }
-
- double implicitHeight = qmlGraphicsItem()->implicitHeight();
- if (!m_hasHeight
- && implicitWidth // WORKAROUND
- && qmlGraphicsItem()->height() <= 0
- && implicitHeight != qmlGraphicsItem()->height()
- && !hasBindingForProperty("height")) {
- qmlGraphicsItem()->blockSignals(true);
- qmlGraphicsItem()->setHeight(implicitHeight);
- qmlGraphicsItem()->blockSignals(false);
- }
-
- }
-
- if (isRootNodeInstance()) {
- if (!m_hasWidth) {
- qmlGraphicsItem()->blockSignals(true);
- if (qmlGraphicsItem()->width() < 10.)
- qmlGraphicsItem()->setWidth(100.);
- qmlGraphicsItem()->blockSignals(false);
- }
-
- if (!m_hasHeight) {
- qmlGraphicsItem()->blockSignals(true);
- if (qmlGraphicsItem()->height() < 10.)
- qmlGraphicsItem()->setHeight(100.);
- qmlGraphicsItem()->blockSignals(false);
- }
- }
-
- return QSizeF(qmlGraphicsItem()->width(), qmlGraphicsItem()->height());
-}
-
-QRectF QmlGraphicsItemNodeInstance::boundingRect() const
-{
- if (isValid()) {
- double implicitWidth = qmlGraphicsItem()->implicitWidth();
- if (!m_hasWidth
- && implicitWidth // WORKAROUND
- && qmlGraphicsItem()->width() <= 0
- && implicitWidth != qmlGraphicsItem()->width()
- && !hasBindingForProperty("width")) {
- qmlGraphicsItem()->blockSignals(true);
- qmlGraphicsItem()->setWidth(implicitWidth);
- qmlGraphicsItem()->blockSignals(false);
- }
-
- double implicitHeight = qmlGraphicsItem()->implicitHeight();
- if (!m_hasHeight
- && implicitWidth // WORKAROUND
- && qmlGraphicsItem()->height() <= 0
- && implicitHeight != qmlGraphicsItem()->height()
- && !hasBindingForProperty("height")) {
- qmlGraphicsItem()->blockSignals(true);
- qmlGraphicsItem()->setHeight(implicitHeight);
- qmlGraphicsItem()->blockSignals(false);
- }
-
- }
-
- if (isRootNodeInstance()) {
- if (!m_hasWidth) {
- qmlGraphicsItem()->blockSignals(true);
- if (qmlGraphicsItem()->width() < 10.)
- qmlGraphicsItem()->setWidth(100.);
- qmlGraphicsItem()->blockSignals(false);
- }
-
- if (!m_hasHeight) {
- qmlGraphicsItem()->blockSignals(true);
- if (qmlGraphicsItem()->height() < 10.)
- qmlGraphicsItem()->setHeight(100.);
- qmlGraphicsItem()->blockSignals(false);
- }
- }
-
- if (qmlGraphicsItem())
- return qmlGraphicsItem()->boundingRect();
-
- return QRectF();
-}
-
-void QmlGraphicsItemNodeInstance::setPropertyVariant(const QString &name, const QVariant &value)
-{
- if (name == "state")
- return; // states are only set by us
-
- if (name == "height") {
- m_height = value.toDouble();
- if (value.isValid())
- m_hasHeight = true;
- else
- m_hasHeight = false;
- }
-
- if (name == "width") {
- m_width = value.toDouble();
- if (value.isValid())
- m_hasWidth = true;
- else
- m_hasWidth = false;
- }
-
- if (name == "x")
- m_x = value.toDouble();
-
- if (name == "y")
- m_y = value.toDouble();
-
- GraphicsObjectNodeInstance::setPropertyVariant(name, value);
-
- refresh();
-}
-
-void QmlGraphicsItemNodeInstance::setPropertyBinding(const QString &name, const QString &expression)
-{
- if (name == "state")
- return; // states are only set by us
-
- GraphicsObjectNodeInstance::setPropertyBinding(name, expression);
-}
-
-QVariant QmlGraphicsItemNodeInstance::property(const QString &name) const
-{
- if (name == "width" && !hasBindingForProperty("width")) {
- double implicitWidth = qmlGraphicsItem()->implicitWidth();
- if (!m_hasWidth
- && implicitWidth // WORKAROUND
- && qmlGraphicsItem()->width() <= 0
- && implicitWidth != qmlGraphicsItem()->width()) {
- qmlGraphicsItem()->blockSignals(true);
- qmlGraphicsItem()->setWidth(implicitWidth);
- qmlGraphicsItem()->blockSignals(false);
- }
- }
-
- if (name == "height" && !hasBindingForProperty("height")) {
- double implicitHeight = qmlGraphicsItem()->implicitHeight();
- if (!m_hasHeight
- && implicitHeight // WORKAROUND
- && qmlGraphicsItem()->width() <= 0
- && implicitHeight != qmlGraphicsItem()->height()) {
- qmlGraphicsItem()->blockSignals(true);
- qmlGraphicsItem()->setHeight(implicitHeight);
- qmlGraphicsItem()->blockSignals(false);
- }
- }
-
- return GraphicsObjectNodeInstance::property(name);
-}
-
-void QmlGraphicsItemNodeInstance::resetHorizontal()
- {
- setPropertyVariant("x", m_x);
- if (m_width > 0.0) {
- setPropertyVariant("width", m_width);
- } else {
- setPropertyVariant("width", qmlGraphicsItem()->implicitWidth());
- }
-}
-
-void QmlGraphicsItemNodeInstance::resetVertical()
- {
- setPropertyVariant("y", m_y);
- if (m_height > 0.0) {
- setPropertyVariant("height", m_height);
- } else {
- setPropertyVariant("height", qmlGraphicsItem()->implicitWidth());
- }
-}
-
-static void repositioning(QDeclarativeItem *item)
-{
- if (!item)
- return;
-
-// QDeclarativeBasePositioner *positioner = qobject_cast<QDeclarativeBasePositioner*>(item);
-// if (positioner)
-// positioner->rePositioning();
-
- if (item->parentObject())
- repositioning(qobject_cast<QDeclarativeItem*>(item->parentObject()));
-}
-
-void QmlGraphicsItemNodeInstance::refresh()
-{
- repositioning(qmlGraphicsItem());
-}
-
-void QmlGraphicsItemNodeInstance::doComponentComplete()
-{
- if (qmlGraphicsItem()) {
- if (static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(qmlGraphicsItem()))->componentComplete)
- return;
- static_cast<QDeclarativeParserStatus*>(qmlGraphicsItem())->componentComplete();
- QGraphicsItemPrivate::get(qmlGraphicsItem())->sendParentChangeNotification = 1;
- }
-
- graphicsObject()->update();
-}
-
-bool QmlGraphicsItemNodeInstance::isResizable() const
-{
- return m_isResizable && qmlGraphicsItem() && qmlGraphicsItem()->parentItem();
-}
-
-void QmlGraphicsItemNodeInstance::setResizable(bool resizeable)
-{
- m_isResizable = resizeable;
-}
-
-int QmlGraphicsItemNodeInstance::penWidth() const
-{
- QDeclarativeRectangle *rectangle = qobject_cast<QDeclarativeRectangle*>(object());
- if (rectangle)
- return rectangle->border()->width();
-
- return GraphicsObjectNodeInstance::penWidth();
-}
-
-void QmlGraphicsItemNodeInstance::resetProperty(const QString &name)
-{
- if (name == "height") {
- m_hasHeight = false;
- m_height = 0.0;
- }
-
- if (name == "width") {
- m_hasWidth = false;
- m_width = 0.0;
- }
-
- if (name == "x")
- m_x = 0.0;
-
- if (name == "y")
- m_y = 0.0;
-
-
- if (name == "anchors.fill") {
- anchors()->resetFill();
- resetHorizontal();
- resetVertical();
- } else if (name == "anchors.centerIn") {
- anchors()->resetCenterIn();
- resetHorizontal();
- resetVertical();
- } else if (name == "anchors.top") {
- anchors()->resetTop();
- resetVertical();
- } else if (name == "anchors.left") {
- anchors()->resetLeft();
- resetHorizontal();
- } else if (name == "anchors.right") {
- anchors()->resetRight();
- resetHorizontal();
- } else if (name == "anchors.bottom") {
- anchors()->resetBottom();
- resetVertical();
- } else if (name == "anchors.horizontalCenter") {
- anchors()->resetHorizontalCenter();
- resetHorizontal();
- } else if (name == "anchors.verticalCenter") {
- anchors()->resetVerticalCenter();
- resetVertical();
- } else if (name == "anchors.baseline") {
- anchors()->resetBaseline();
- resetVertical();
- }
-
- GraphicsObjectNodeInstance::resetProperty(name);
-}
-
-void QmlGraphicsItemNodeInstance::reparent(const ObjectNodeInstance::Pointer &oldParentInstance, const QString &oldParentProperty, const ObjectNodeInstance::Pointer &newParentInstance, const QString &newParentProperty)
-{
- if (oldParentInstance && oldParentInstance->isPositioner()) {
- setInPositioner(false);
- setMovable(true);
- }
-
- GraphicsObjectNodeInstance::reparent(oldParentInstance, oldParentProperty, newParentInstance, newParentProperty);
-
- if (newParentInstance && newParentInstance->isPositioner()) {
- setInPositioner(true);
- setMovable(false);
- }
-
- if (oldParentInstance && oldParentInstance->isPositioner() && !(newParentInstance && newParentInstance->isPositioner())) {
- if (!hasBindingForProperty("x"))
- setPropertyVariant("x", m_x);
-
- if (!hasBindingForProperty("y"))
- setPropertyVariant("y", m_y);
- }
-
- refresh();
-}
-
-QDeclarativeAnchors::Anchor anchorLineFlagForName(const QString &name)
-{
- if (name == "anchors.top")
- return QDeclarativeAnchors::TopAnchor;
-
- if (name == "anchors.left")
- return QDeclarativeAnchors::LeftAnchor;
-
- if (name == "anchors.bottom")
- return QDeclarativeAnchors::BottomAnchor;
-
- if (name == "anchors.right")
- return QDeclarativeAnchors::RightAnchor;
-
- if (name == "anchors.horizontalCenter")
- return QDeclarativeAnchors::HCenterAnchor;
-
- if (name == "anchors.verticalCenter")
- return QDeclarativeAnchors::VCenterAnchor;
-
- if (name == "anchors.baseline")
- return QDeclarativeAnchors::BaselineAnchor;
-
-
- Q_ASSERT_X(false, Q_FUNC_INFO, "wrong anchor name - this should never happen");
- return QDeclarativeAnchors::LeftAnchor;
-}
-
-QString propertyNameForAnchorLine(const QDeclarativeAnchorLine::AnchorLine &anchorLine)
-{
- switch(anchorLine) {
- case QDeclarativeAnchorLine::Left: return "left";
- case QDeclarativeAnchorLine::Right: return "right";
- case QDeclarativeAnchorLine::Top: return "top";
- case QDeclarativeAnchorLine::Bottom: return "bottom";
- case QDeclarativeAnchorLine::HCenter: return "horizontalCenter";
- case QDeclarativeAnchorLine::VCenter: return "verticalCenter";
- case QDeclarativeAnchorLine::Baseline: return "baseline";
- case QDeclarativeAnchorLine::Invalid:
- default: return QString();
- }
-}
-
-static bool isValidAnchorName(const QString &name)
-{
- static QStringList anchorNameList(QStringList() << "anchors.top"
- << "anchors.left"
- << "anchors.right"
- << "anchors.bottom"
- << "anchors.verticalCenter"
- << "anchors.horizontalCenter"
- << "anchors.fill"
- << "anchors.centerIn"
- << "anchors.baseline");
-
- return anchorNameList.contains(name);
-}
-
-QPair<QString, ServerNodeInstance> QmlGraphicsItemNodeInstance::anchor(const QString &name) const
-{
- if (!isValidAnchorName(name) || !hasAnchor(name))
- return GraphicsObjectNodeInstance::anchor(name);
-
- QObject *targetObject = 0;
- QString targetName;
-
- if (name == "anchors.fill") {
- targetObject = anchors()->fill();
- } else if (name == "anchors.centerIn") {
- targetObject = anchors()->centerIn();
- } else {
- QDeclarativeProperty metaProperty(object(), name, context());
- if (!metaProperty.isValid())
- return GraphicsObjectNodeInstance::anchor(name);
-
- QDeclarativeAnchorLine anchorLine = metaProperty.read().value<QDeclarativeAnchorLine>();
- if (anchorLine.anchorLine != QDeclarativeAnchorLine::Invalid) {
- targetObject = anchorLine.item;
- targetName = propertyNameForAnchorLine(anchorLine.anchorLine);
- }
-
- }
-
- if (targetObject && nodeInstanceServer()->hasInstanceForObject(targetObject)) {
- return qMakePair(targetName, nodeInstanceServer()->instanceForObject(targetObject));
- } else {
- return GraphicsObjectNodeInstance::anchor(name);
- }
-}
-
-QList<ServerNodeInstance> QmlGraphicsItemNodeInstance::stateInstances() const
-{
- QList<ServerNodeInstance> instanceList;
- QList<QDeclarativeState *> stateList = QDeclarativeItemPrivate::get(qmlGraphicsItem())->_states()->states();
- foreach(QDeclarativeState *state, stateList)
- {
- if (state && nodeInstanceServer()->hasInstanceForObject(state))
- instanceList.append(nodeInstanceServer()->instanceForObject(state));
- }
-
- return instanceList;
-}
-
-bool QmlGraphicsItemNodeInstance::hasAnchor(const QString &name) const
-{
- if (!isValidAnchorName(name))
- return false;
-
- if (name == "anchors.fill")
- return anchors()->fill() != 0;
-
- if (name == "anchors.centerIn")
- return anchors()->centerIn() != 0;
-
- if (name == "anchors.right")
- return anchors()->right().item != 0;
-
- if (name == "anchors.top")
- return anchors()->top().item != 0;
-
- if (name == "anchors.left")
- return anchors()->left().item != 0;
-
- if (name == "anchors.bottom")
- return anchors()->bottom().item != 0;
-
- if (name == "anchors.horizontalCenter")
- return anchors()->horizontalCenter().item != 0;
-
- if (name == "anchors.verticalCenter")
- return anchors()->verticalCenter().item != 0;
-
- if (name == "anchors.baseline")
- return anchors()->baseline().item != 0;
-
- return anchors()->usedAnchors().testFlag(anchorLineFlagForName(name));
-}
-
-bool isAnchoredTo(QDeclarativeItem *fromItem, QDeclarativeItem *toItem)
-{
- Q_ASSERT(dynamic_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(fromItem)));
- QDeclarativeItemPrivate *fromItemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(fromItem));
- QDeclarativeAnchors *anchors = fromItemPrivate->anchors();
- return anchors->fill() == toItem
- || anchors->centerIn() == toItem
- || anchors->bottom().item == toItem
- || anchors->top().item == toItem
- || anchors->left().item == toItem
- || anchors->right().item == toItem
- || anchors->verticalCenter().item == toItem
- || anchors->horizontalCenter().item == toItem
- || anchors->baseline().item == toItem;
-}
-
-bool areChildrenAnchoredTo(QDeclarativeItem *fromItem, QDeclarativeItem *toItem)
-{
- foreach(QGraphicsItem *childGraphicsItem, fromItem->childItems()) {
- QDeclarativeItem *childItem = qobject_cast<QDeclarativeItem*>(childGraphicsItem->toGraphicsObject());
- if (childItem) {
- if (isAnchoredTo(childItem, toItem))
- return true;
-
- if (areChildrenAnchoredTo(childItem, toItem))
- return true;
- }
- }
-
- return false;
-}
-
-bool QmlGraphicsItemNodeInstance::isAnchoredBySibling() const
-{
- if (qmlGraphicsItem()->parentItem()) {
- foreach(QGraphicsItem *siblingGraphicsItem, qmlGraphicsItem()->parentItem()->childItems()) { // search in siblings for a anchor to this item
- QDeclarativeItem *siblingItem = qobject_cast<QDeclarativeItem*>(siblingGraphicsItem->toGraphicsObject());
- if (siblingItem) {
- if (isAnchoredTo(siblingItem, qmlGraphicsItem()))
- return true;
- }
- }
- }
-
- return false;
-}
-
-bool QmlGraphicsItemNodeInstance::isAnchoredByChildren() const
-{
- if (areChildrenAnchoredTo(qmlGraphicsItem(), qmlGraphicsItem())) // search in children for a anchor to this item
- return true;
-
- return false;
-}
-
-QDeclarativeItem *QmlGraphicsItemNodeInstance::qmlGraphicsItem() const
-{
- if (object() == 0)
- return 0;
-
- Q_ASSERT(qobject_cast<QDeclarativeItem*>(object()));
- return static_cast<QDeclarativeItem*>(object());
-}
-
-QDeclarativeAnchors *QmlGraphicsItemNodeInstance::anchors() const
-{
- Q_ASSERT(dynamic_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(qmlGraphicsItem())));
- QDeclarativeItemPrivate *itemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(qmlGraphicsItem()));
- return itemPrivate->anchors();
-}
-
-} // namespace Internal
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/qmlgraphicsitemnodeinstance.h b/src/tools/qmlpuppet/qmlpuppet/instances/qmlgraphicsitemnodeinstance.h
deleted file mode 100644
index 31a1f2c285..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/qmlgraphicsitemnodeinstance.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef QMLGRAPHICSITEMNODEINSTANCE_H
-#define QMLGRAPHICSITEMNODEINSTANCE_H
-
-#include "graphicsobjectnodeinstance.h"
-#include <QDeclarativeItem>
-#include <QWeakPointer>
-
-
-namespace QmlDesigner {
-namespace Internal {
-
-class QmlGraphicsItemNodeInstance : public GraphicsObjectNodeInstance
-{
-public:
- typedef QSharedPointer<QmlGraphicsItemNodeInstance> Pointer;
- typedef QWeakPointer<QmlGraphicsItemNodeInstance> WeakPointer;
-
- ~QmlGraphicsItemNodeInstance();
-
- static Pointer create(QObject *objectToBeWrapped);
-
- bool isQmlGraphicsItem() const;
-
- QSizeF size() const;
- QRectF boundingRect() const;
-// void updateAnchors();
-
- void setPropertyVariant(const QString &name, const QVariant &value);
- void setPropertyBinding(const QString &name, const QString &expression);
-
- QVariant property(const QString &name) const;
- void resetProperty(const QString &name);
-
- void reparent(const ObjectNodeInstance::Pointer &oldParentInstance, const QString &oldParentProperty, const ObjectNodeInstance::Pointer &newParentInstance, const QString &newParentProperty);
-
- int penWidth() const;
-
- bool hasAnchor(const QString &name) const;
- QPair<QString, ServerNodeInstance> anchor(const QString &name) const;
- bool isAnchoredBySibling() const;
- bool isAnchoredByChildren() const;
- void doComponentComplete();
-
- bool isResizable() const;
- void setResizable(bool resizeable);
-
-
- QList<ServerNodeInstance> stateInstances() const;
-
-protected:
- QmlGraphicsItemNodeInstance(QDeclarativeItem *item);
- QDeclarativeItem *qmlGraphicsItem() const;
- QDeclarativeAnchors *anchors() const;
- void resetHorizontal();
- void resetVertical();
- void refresh();
-
-private: //variables
- bool m_hasHeight;
- bool m_hasWidth;
- bool m_isResizable;
- double m_x;
- double m_y;
- double m_width;
- double m_height;
-};
-
-}
-}
-#endif // QMLGRAPHICSITEMNODEINSTANCE_H
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/qt4informationnodeinstanceserver.cpp b/src/tools/qmlpuppet/qmlpuppet/instances/qt4informationnodeinstanceserver.cpp
deleted file mode 100644
index bbde41f8d9..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/qt4informationnodeinstanceserver.cpp
+++ /dev/null
@@ -1,282 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#include "qt4informationnodeinstanceserver.h"
-
-#include <QGraphicsItem>
-#include <private/qgraphicsitem_p.h>
-#include <private/qgraphicsscene_p.h>
-#include <QDeclarativeEngine>
-#include <QDeclarativeView>
-#include <QFileSystemWatcher>
-#include <QUrl>
-#include <QSet>
-#include <QDir>
-#include <QVariant>
-#include <QMetaType>
-#include <QDeclarativeComponent>
-#include <QDeclarativeContext>
-#include <private/qlistmodelinterface_p.h>
-#include <QAbstractAnimation>
-#include <private/qabstractanimation_p.h>
-
-#include "servernodeinstance.h"
-#include "childrenchangeeventfilter.h"
-#include "propertyabstractcontainer.h"
-#include "propertybindingcontainer.h"
-#include "propertyvaluecontainer.h"
-#include "instancecontainer.h"
-#include "createinstancescommand.h"
-#include "changefileurlcommand.h"
-#include "clearscenecommand.h"
-#include "reparentinstancescommand.h"
-#include "changevaluescommand.h"
-#include "changebindingscommand.h"
-#include "changeidscommand.h"
-#include "removeinstancescommand.h"
-#include "nodeinstanceclientinterface.h"
-#include "removepropertiescommand.h"
-#include "valueschangedcommand.h"
-#include "informationchangedcommand.h"
-#include "pixmapchangedcommand.h"
-#include "commondefines.h"
-#include "childrenchangeeventfilter.h"
-#include "changestatecommand.h"
-#include "childrenchangedcommand.h"
-#include "completecomponentcommand.h"
-#include "componentcompletedcommand.h"
-#include "createscenecommand.h"
-
-#include "dummycontextobject.h"
-
-namespace QmlDesigner {
-
-Qt4InformationNodeInstanceServer::Qt4InformationNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :
- Qt4NodeInstanceServer(nodeInstanceClient)
-{
-}
-
-void Qt4InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands()
-{
- static bool inFunction = false;
- if (!inFunction) {
- inFunction = true;
-
- QSet<ServerNodeInstance> informationChangedInstanceSet;
- QVector<InstancePropertyPair> propertyChangedList;
- bool adjustSceneRect = false;
-
- if (declarativeView()) {
- foreach (QGraphicsItem *item, declarativeView()->items()) {
- QGraphicsObject *graphicsObject = item->toGraphicsObject();
- if (graphicsObject && hasInstanceForObject(graphicsObject)) {
- ServerNodeInstance instance = instanceForObject(graphicsObject);
- QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(item);
-
- if (d->dirtySceneTransform || d->geometryChanged || d->dirty)
- informationChangedInstanceSet.insert(instance);
-
- if (d->geometryChanged) {
- if (instance.isRootNodeInstance())
- declarativeView()->scene()->setSceneRect(item->boundingRect());
- }
-
- }
- }
-
- foreach (const InstancePropertyPair& property, changedPropertyList()) {
- const ServerNodeInstance instance = property.first;
- const QString propertyName = property.second;
-
- if (instance.isValid()) {
- if (instance.isRootNodeInstance() && (propertyName == "width" || propertyName == "height"))
- adjustSceneRect = true;
-
- if (propertyName.contains("anchors"))
- informationChangedInstanceSet.insert(instance);
-
- if (propertyName == "parent") {
- informationChangedInstanceSet.insert(instance);
- m_parentChangedSet.insert(instance);
- }
-
- propertyChangedList.append(property);
- }
- }
-
- clearChangedPropertyList();
- resetAllItems();
-
- if (!informationChangedInstanceSet.isEmpty())
- nodeInstanceClient()->informationChanged(createAllInformationChangedCommand(informationChangedInstanceSet.toList()));
-
- if (!propertyChangedList.isEmpty())
- nodeInstanceClient()->valuesChanged(createValuesChangedCommand(propertyChangedList));
-
- if (!m_parentChangedSet.isEmpty()) {
- sendChildrenChangedCommand(m_parentChangedSet.toList());
- m_parentChangedSet.clear();
- }
-
- if (adjustSceneRect) {
- QRectF boundingRect = rootNodeInstance().boundingRect();
- if (boundingRect.isValid()) {
- declarativeView()->setSceneRect(boundingRect);
- }
- }
-
- if (!m_completedComponentList.isEmpty()) {
- nodeInstanceClient()->componentCompleted(createComponentCompletedCommand(m_completedComponentList));
- m_completedComponentList.clear();
- }
-
- slowDownRenderTimer();
- nodeInstanceClient()->flush();
- nodeInstanceClient()->synchronizeWithClientProcess();
- }
-
- inFunction = false;
- }
-
-}
-
-void Qt4InformationNodeInstanceServer::reparentInstances(const ReparentInstancesCommand &command)
-{
- foreach(const ReparentContainer &container, command.reparentInstances()) {
- ServerNodeInstance instance = instanceForId(container.instanceId());
- if (instance.isValid()) {
- m_parentChangedSet.insert(instance);
- }
- }
-
- Qt4NodeInstanceServer::reparentInstances(command);
-}
-
-void Qt4InformationNodeInstanceServer::clearScene(const ClearSceneCommand &command)
-{
- NodeInstanceServer::clearScene(command);
-
- m_parentChangedSet.clear();
- m_completedComponentList.clear();
-}
-
-void Qt4InformationNodeInstanceServer::createScene(const CreateSceneCommand &command)
-{
- Qt4NodeInstanceServer::createScene(command);
-
- QList<ServerNodeInstance> instanceList;
- foreach(const InstanceContainer &container, command.instances()) {
- ServerNodeInstance instance = instanceForId(container.instanceId());
- if (instance.isValid()) {
- instanceList.append(instance);
- }
- }
-
- nodeInstanceClient()->informationChanged(createAllInformationChangedCommand(instanceList, true));
- nodeInstanceClient()->valuesChanged(createValuesChangedCommand(instanceList));
- sendChildrenChangedCommand(instanceList);
- nodeInstanceClient()->componentCompleted(createComponentCompletedCommand(instanceList));
-
-}
-
-void Qt4InformationNodeInstanceServer::sendChildrenChangedCommand(const QList<ServerNodeInstance> childList)
-{
- QSet<ServerNodeInstance> parentSet;
- QList<ServerNodeInstance> noParentList;
-
- foreach (const ServerNodeInstance &child, childList) {
- if (!child.hasParent())
- noParentList.append(child);
- else
- parentSet.insert(child.parent());
- }
-
-
- foreach (const ServerNodeInstance &parent, parentSet)
- nodeInstanceClient()->childrenChanged(createChildrenChangedCommand(parent, parent.childItems()));
-
- if (!noParentList.isEmpty())
- nodeInstanceClient()->childrenChanged(createChildrenChangedCommand(ServerNodeInstance(), noParentList));
-
-}
-
-void Qt4InformationNodeInstanceServer::completeComponent(const CompleteComponentCommand &command)
-{
- Qt4NodeInstanceServer::completeComponent(command);
-
- QList<ServerNodeInstance> instanceList;
- foreach(qint32 instanceId, command.instances()) {
- ServerNodeInstance instance = instanceForId(instanceId);
- if (instance.isValid()) {
- instanceList.append(instance);
- }
- }
-
- m_completedComponentList.append(instanceList);
-
- nodeInstanceClient()->valuesChanged(createValuesChangedCommand(instanceList));
- nodeInstanceClient()->informationChanged(createAllInformationChangedCommand(instanceList, true));
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/qt4informationnodeinstanceserver.h b/src/tools/qmlpuppet/qmlpuppet/instances/qt4informationnodeinstanceserver.h
deleted file mode 100644
index ea5aa990e9..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/qt4informationnodeinstanceserver.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#ifndef INFORMATIONNODEINSTANCESERVER_H
-#define INFORMATIONNODEINSTANCESERVER_H
-
-#include "qt4nodeinstanceserver.h"
-
-namespace QmlDesigner {
-
-class Qt4InformationNodeInstanceServer : public Qt4NodeInstanceServer
-{
- Q_OBJECT
-public:
- explicit Qt4InformationNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);
-
- void reparentInstances(const ReparentInstancesCommand &command);
- void clearScene(const ClearSceneCommand &command);
- void createScene(const CreateSceneCommand &command);
- void completeComponent(const CompleteComponentCommand &command);
-
-protected:
- void collectItemChangesAndSendChangeCommands();
- void sendChildrenChangedCommand(const QList<ServerNodeInstance> childList);
-
-private:
- QSet<ServerNodeInstance> m_parentChangedSet;
- QList<ServerNodeInstance> m_completedComponentList;
-};
-
-} // namespace QmlDesigner
-
-#endif // INFORMATIONNODEINSTANCESERVER_H
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceclientproxy.cpp b/src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceclientproxy.cpp
deleted file mode 100644
index 91fe2417c0..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceclientproxy.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#include "qt4nodeinstanceclientproxy.h"
-
-#include <QCoreApplication>
-
-#include "qt4informationnodeinstanceserver.h"
-#include "qt4previewnodeinstanceserver.h"
-#include "qt4rendernodeinstanceserver.h"
-
-namespace QmlDesigner {
-
-Qt4NodeInstanceClientProxy::Qt4NodeInstanceClientProxy(QObject *parent) :
- NodeInstanceClientProxy(parent)
-{
- if (QCoreApplication::arguments().at(2) == QLatin1String("previewmode")) {
- setNodeInstanceServer(new Qt4PreviewNodeInstanceServer(this));
- } else if (QCoreApplication::arguments().at(2) == QLatin1String("editormode")) {
- setNodeInstanceServer(new Qt4InformationNodeInstanceServer(this));
- } else if (QCoreApplication::arguments().at(2) == QLatin1String("rendermode")) {
- setNodeInstanceServer(new Qt4RenderNodeInstanceServer(this));
- }
-
- initializeSocket();
-}
-
-} // namespace QmlDesigner
-
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceclientproxy.h b/src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceclientproxy.h
deleted file mode 100644
index 4722a2df23..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceclientproxy.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#ifndef QMLDESIGNER_QT4NODEINSTANCECLIENTPROXY_H
-#define QMLDESIGNER_QT4NODEINSTANCECLIENTPROXY_H
-
-#include "nodeinstanceclientproxy.h"
-
-namespace QmlDesigner {
-
-class Qt4NodeInstanceClientProxy : public NodeInstanceClientProxy
-{
- Q_OBJECT
-public:
- explicit Qt4NodeInstanceClientProxy(QObject *parent = 0);
-};
-
-} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_QT4NODEINSTANCECLIENTPROXY_H
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceserver.cpp b/src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceserver.cpp
deleted file mode 100644
index 75cc69993a..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceserver.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#include "qt4nodeinstanceserver.h"
-
-#include "createscenecommand.h"
-
-#include <QDeclarativeView>
-#include <QDeclarativeEngine>
-#include <QFileInfo>
-#include <QGraphicsObject>
-#include <private/qgraphicsitem_p.h>
-#include <private/qgraphicsscene_p.h>
-#include <QDeclarativeContext>
-
-namespace QmlDesigner {
-
-Qt4NodeInstanceServer::Qt4NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient)
- : NodeInstanceServer(nodeInstanceClient)
-{
- addImportString("import QtQuick 1.0\n");
-}
-
-Qt4NodeInstanceServer::~Qt4NodeInstanceServer()
-{
- delete declarativeView();
-}
-
-QSGView *Qt4NodeInstanceServer::sgView() const
-{
- return 0;
-}
-
-QDeclarativeView *Qt4NodeInstanceServer::declarativeView() const
-{
- return m_declarativeView.data();
-}
-
-QDeclarativeEngine *Qt4NodeInstanceServer::engine() const
-{
- if (declarativeView())
- return declarativeView()->engine();
-
- return 0;
-}
-
-void Qt4NodeInstanceServer::initializeView(const QVector<AddImportContainer> &/*importVector*/)
-{
- Q_ASSERT(!declarativeView());
-
- m_declarativeView = new QDeclarativeView;
-#ifndef Q_WS_MAC
- declarativeView()->setAttribute(Qt::WA_DontShowOnScreen, true);
-#endif
- declarativeView()->setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
- declarativeView()->show();
-#ifdef Q_WS_MAC
- declarativeView()->setAttribute(Qt::WA_DontShowOnScreen, true);
-#endif
-}
-
-void Qt4NodeInstanceServer::resizeCanvasSizeToRootItemSize()
-{
- QGraphicsObject *rootGraphicsObject = qobject_cast<QGraphicsObject*>(rootNodeInstance().internalObject());
- if (rootGraphicsObject) {
- declarativeView()->scene()->addItem(rootGraphicsObject);
- declarativeView()->setSceneRect(rootGraphicsObject->boundingRect());
- }
-}
-
-void Qt4NodeInstanceServer::resetAllItems()
-{
- static_cast<QGraphicsScenePrivate*>(QObjectPrivate::get(declarativeView()->scene()))->processDirtyItemsEmitted = true;
-
- foreach (QGraphicsItem *item, declarativeView()->items())
- static_cast<QGraphicsScenePrivate*>(QObjectPrivate::get(declarativeView()->scene()))->resetDirtyItem(item);
-}
-
-bool Qt4NodeInstanceServer::nonInstanceChildIsDirty(QGraphicsObject *graphicsObject) const
-{
- QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(graphicsObject);
- if (d->dirtyChildren) {
- foreach (QGraphicsItem *child, graphicsObject->childItems()) {
- QGraphicsObject *childGraphicsObject = child->toGraphicsObject();
- if (hasInstanceForObject(childGraphicsObject))
- continue;
-
- QGraphicsItemPrivate *childPrivate = QGraphicsItemPrivate::get(child);
- if (childPrivate->dirty || nonInstanceChildIsDirty(childGraphicsObject))
- return true;
- }
- }
-
- return false;
-}
-
-QList<ServerNodeInstance> Qt4NodeInstanceServer::setupScene(const CreateSceneCommand &command)
-{
- setupFileUrl(command.fileUrl());
- setupImports(command.imports());
-
- static_cast<QGraphicsScenePrivate*>(QObjectPrivate::get(declarativeView()->scene()))->processDirtyItemsEmitted = true;
-
- QList<ServerNodeInstance> instanceList = setupInstances(command);
-
- declarativeView()->scene()->setSceneRect(rootNodeInstance().boundingRect());
-
- return instanceList;
-}
-
-void Qt4NodeInstanceServer::refreshBindings()
-{
- static int counter = 0;
-
- engine()->rootContext()->setContextProperty(QString("__%1").arg(counter++), 0); // refreshing bindings
-}
-
-} // QmlDesigner
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceserver.h b/src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceserver.h
deleted file mode 100644
index 60c41f2780..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceserver.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/**************************************************************************
-
-**
-
-** This file is part of Qt Creator
-
-**
-
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-
-**
-
-** Contact: Nokia Corporation (qt-info@nokia.com)
-
-**
-
-** No Commercial Usage
-
-**
-
-** This file contains pre-release code and may not be distributed.
-
-** You may use this file in accordance with the terms and conditions
-
-** contained in the Technology Preview License Agreement accompanying
-
-** this package.
-
-**
-
-** GNU Lesser General Public License Usage
-
-**
-
-** Alternatively, this file may be used under the terms of the GNU Lesser
-
-** General Public License version 2.1 as published by the Free Software
-
-** Foundation and appearing in the file LICENSE.LGPL included in the
-
-** packaging of this file. Please review the following information to
-
-** ensure the GNU Lesser General Public License version 2.1 requirements
-
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-
-**
-
-** In addition, as a special exception, Nokia gives you certain additional
-
-** rights. These rights are described in the Nokia Qt LGPL Exception
-
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-
-**
-
-** If you have questions regarding the use of this file, please contact
-
-** Nokia at qt-info@nokia.com.
-
-**
-
-**************************************************************************/
-
-#ifndef QT4NODEINSTANCESERVER_H
-#define QT4NODEINSTANCESERVER_H
-
-#include "nodeinstanceserver.h"
-
-QT_BEGIN_NAMESPACE
-class DesignerSupport;
-QT_END_NAMESPACE
-
-namespace QmlDesigner {
-
-class Qt4NodeInstanceServer : public NodeInstanceServer
-{
- Q_OBJECT
-public:
- Qt4NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);
- ~Qt4NodeInstanceServer();
-
- QSGView *sgView() const;
- QDeclarativeView *declarativeView() const;
- QDeclarativeEngine *engine() const;
- void refreshBindings();
-
-protected:
- void initializeView(const QVector<AddImportContainer> &importVector);
- void resizeCanvasSizeToRootItemSize();
- void resetAllItems();
- bool nonInstanceChildIsDirty(QGraphicsObject *graphicsObject) const;
- QList<ServerNodeInstance> setupScene(const CreateSceneCommand &command);
-
-private:
- QWeakPointer<QDeclarativeView> m_declarativeView;
-};
-
-} // QmlDesigner
-#endif // QT4NODEINSTANCESERVER_H
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/qt4previewnodeinstanceserver.cpp b/src/tools/qmlpuppet/qmlpuppet/instances/qt4previewnodeinstanceserver.cpp
deleted file mode 100644
index fd90a0e1f7..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/qt4previewnodeinstanceserver.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "qt4previewnodeinstanceserver.h"
-
-#include "nodeinstanceclientinterface.h"
-#include "statepreviewimagechangedcommand.h"
-#include "createscenecommand.h"
-
-#include <QPainter>
-#include <QDeclarativeView>
-
-namespace QmlDesigner {
-
-Qt4PreviewNodeInstanceServer::Qt4PreviewNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :
- Qt4NodeInstanceServer(nodeInstanceClient)
-{
- setRenderTimerInterval(200);
- setSlowRenderTimerInterval(2000);
-}
-
-void Qt4PreviewNodeInstanceServer::createScene(const CreateSceneCommand &command)
-{
- initializeView(command.imports());
- setupScene(command);
-
- startRenderTimer();
-}
-void Qt4PreviewNodeInstanceServer::startRenderTimer()
-{
- if (timerId() != 0)
- killTimer(timerId());
-
- int timerId = startTimer(renderTimerInterval());
-
- setTimerId(timerId);
-}
-
-void Qt4PreviewNodeInstanceServer::collectItemChangesAndSendChangeCommands()
-{
- static bool inFunction = false;
-
- if (!inFunction && nodeInstanceClient()->bytesToWrite() < 10000) {
- inFunction = true;
- QVector<ImageContainer> imageContainerVector;
- imageContainerVector.append(ImageContainer(0, renderPreviewImage()));
-
- foreach (ServerNodeInstance instance, rootNodeInstance().stateInstances()) {
- instance.activateState();
- imageContainerVector.append(ImageContainer(instance.instanceId(), renderPreviewImage()));
- instance.deactivateState();
- }
-
- nodeInstanceClient()->statePreviewImagesChanged(StatePreviewImageChangedCommand(imageContainerVector));
-
- slowDownRenderTimer();
- inFunction = false;
- }
-}
-
-void Qt4PreviewNodeInstanceServer::changeState(const ChangeStateCommand &/*command*/)
-{
-
-}
-
-QImage Qt4PreviewNodeInstanceServer::renderPreviewImage()
-{
- QSize size = rootNodeInstance().boundingRect().size().toSize();
- size.scale(100, 100, Qt::KeepAspectRatio);
-
- QImage image(size, QImage::Format_ARGB32);
- image.fill(0xFFFFFFFF);
-
- if (declarativeView()) {
- QPainter painter(&image);
- painter.setRenderHint(QPainter::Antialiasing, true);
- painter.setRenderHint(QPainter::TextAntialiasing, true);
- painter.setRenderHint(QPainter::SmoothPixmapTransform, true);
- painter.setRenderHint(QPainter::HighQualityAntialiasing, true);
- painter.setRenderHint(QPainter::NonCosmeticDefaultPen, true);
-
- declarativeView()->scene()->render(&painter, image.rect(), rootNodeInstance().boundingRect().toRect(), Qt::IgnoreAspectRatio);
- }
-
- return image;
-}
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/qt4previewnodeinstanceserver.h b/src/tools/qmlpuppet/qmlpuppet/instances/qt4previewnodeinstanceserver.h
deleted file mode 100644
index 1c64519861..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/qt4previewnodeinstanceserver.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef QT4PREVIEWNODEINSTANCESERVER_H
-#define QT4PREVIEWNODEINSTANCESERVER_H
-
-#include "qt4nodeinstanceserver.h"
-
-namespace QmlDesigner {
-
-class Qt4PreviewNodeInstanceServer : public Qt4NodeInstanceServer
-{
- Q_OBJECT
-public:
- explicit Qt4PreviewNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);
-
- void createScene(const CreateSceneCommand &command);
- void changeState(const ChangeStateCommand &command);
-
- QImage renderPreviewImage();
-
-protected:
- void collectItemChangesAndSendChangeCommands();
- void startRenderTimer();
-
-private:
- ServerNodeInstance m_actualState;
-};
-
-} // namespace QmlDesigner
-
-#endif // QT4PREVIEWNODEINSTANCESERVER_H
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/qt4rendernodeinstanceserver.cpp b/src/tools/qmlpuppet/qmlpuppet/instances/qt4rendernodeinstanceserver.cpp
deleted file mode 100644
index abeeda1e20..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/qt4rendernodeinstanceserver.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include "qt4rendernodeinstanceserver.h"
-
-#include <QGraphicsItem>
-#include <private/qgraphicsitem_p.h>
-#include <private/qgraphicsscene_p.h>
-#include <QDeclarativeEngine>
-#include <QDeclarativeView>
-#include <QFileSystemWatcher>
-#include <QUrl>
-#include <QSet>
-#include <QDir>
-#include <QVariant>
-#include <QMetaType>
-#include <QDeclarativeComponent>
-#include <QDeclarativeContext>
-#include <private/qlistmodelinterface_p.h>
-#include <QAbstractAnimation>
-#include <private/qabstractanimation_p.h>
-
-#include "servernodeinstance.h"
-#include "childrenchangeeventfilter.h"
-#include "propertyabstractcontainer.h"
-#include "propertybindingcontainer.h"
-#include "propertyvaluecontainer.h"
-#include "instancecontainer.h"
-#include "createinstancescommand.h"
-#include "changefileurlcommand.h"
-#include "clearscenecommand.h"
-#include "reparentinstancescommand.h"
-#include "changevaluescommand.h"
-#include "changebindingscommand.h"
-#include "changeidscommand.h"
-#include "removeinstancescommand.h"
-#include "nodeinstanceclientinterface.h"
-#include "removepropertiescommand.h"
-#include "valueschangedcommand.h"
-#include "informationchangedcommand.h"
-#include "pixmapchangedcommand.h"
-#include "commondefines.h"
-#include "childrenchangeeventfilter.h"
-#include "changestatecommand.h"
-#include "childrenchangedcommand.h"
-#include "completecomponentcommand.h"
-#include "componentcompletedcommand.h"
-#include "createscenecommand.h"
-
-#include "dummycontextobject.h"
-
-namespace QmlDesigner {
-
-Qt4RenderNodeInstanceServer::Qt4RenderNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :
- Qt4NodeInstanceServer(nodeInstanceClient)
-{
-}
-
-void Qt4RenderNodeInstanceServer::collectItemChangesAndSendChangeCommands()
-{
- static bool inFunction = false;
- if (!inFunction) {
- inFunction = true;
-
- bool adjustSceneRect = false;
-
- if (declarativeView()) {
- foreach (QGraphicsItem *item, declarativeView()->items()) {
- QGraphicsObject *graphicsObject = item->toGraphicsObject();
- if (graphicsObject && hasInstanceForObject(graphicsObject)) {
- ServerNodeInstance instance = instanceForObject(graphicsObject);
- QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(item);
-
- if((d->dirty && d->notifyBoundingRectChanged)|| (d->dirty) || nonInstanceChildIsDirty(graphicsObject))
- m_dirtyInstanceSet.insert(instance);
-
- if (d->geometryChanged) {
- if (instance.isRootNodeInstance())
- declarativeView()->scene()->setSceneRect(item->boundingRect());
- }
-
- }
- }
-
- foreach (const InstancePropertyPair& property, changedPropertyList()) {
- const ServerNodeInstance instance = property.first;
- const QString propertyName = property.second;
-
- if (instance.isRootNodeInstance() && (propertyName == "width" || propertyName == "height"))
- adjustSceneRect = true;
-
- if (propertyName == "width" || propertyName == "height")
- m_dirtyInstanceSet.insert(instance);
- }
-
- clearChangedPropertyList();
- resetAllItems();
-
- if (!m_dirtyInstanceSet.isEmpty() && nodeInstanceClient()->bytesToWrite() < 10000) {
- nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(m_dirtyInstanceSet.toList()));
- m_dirtyInstanceSet.clear();
- }
-
- if (adjustSceneRect) {
- QRectF boundingRect = rootNodeInstance().boundingRect();
- if (boundingRect.isValid()) {
- declarativeView()->setSceneRect(boundingRect);
- }
- }
-
- slowDownRenderTimer();
- nodeInstanceClient()->flush();
- nodeInstanceClient()->synchronizeWithClientProcess();
- }
-
- inFunction = false;
- }
-}
-
-void Qt4RenderNodeInstanceServer::createScene(const CreateSceneCommand &command)
-{
- Qt4NodeInstanceServer::createScene(command);
-
- QList<ServerNodeInstance> instanceList;
- foreach(const InstanceContainer &container, command.instances()) {
- ServerNodeInstance instance = instanceForId(container.instanceId());
- if (instance.isValid()) {
- instanceList.append(instance);
- }
- }
-
- nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(instanceList));
-}
-
-void Qt4RenderNodeInstanceServer::clearScene(const ClearSceneCommand &command)
-{
- Qt4NodeInstanceServer::clearScene(command);
-
- m_dirtyInstanceSet.clear();
-}
-
-void Qt4RenderNodeInstanceServer::completeComponent(const CompleteComponentCommand &command)
-{
- Qt4NodeInstanceServer::completeComponent(command);
-
- QList<ServerNodeInstance> instanceList;
- foreach(qint32 instanceId, command.instances()) {
- ServerNodeInstance instance = instanceForId(instanceId);
- if (instance.isValid()) {
- instanceList.append(instance);
- }
- }
-
- nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(instanceList));
-}
-
-} // namespace QmlDesigner
diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/qt4rendernodeinstanceserver.h b/src/tools/qmlpuppet/qmlpuppet/instances/qt4rendernodeinstanceserver.h
deleted file mode 100644
index dde4056a65..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/instances/qt4rendernodeinstanceserver.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#ifndef RENDERNODEINSTANCESERVER_H
-#define RENDERNODEINSTANCESERVER_H
-
-#include "qt4nodeinstanceserver.h"
-
-namespace QmlDesigner {
-
-class Qt4RenderNodeInstanceServer : public Qt4NodeInstanceServer
-{
- Q_OBJECT
-public:
- explicit Qt4RenderNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);
-
- void createScene(const CreateSceneCommand &command);
- void clearScene(const ClearSceneCommand &command);
- void completeComponent(const CompleteComponentCommand &command);
-
-protected:
- void collectItemChangesAndSendChangeCommands();
-
-private:
- QSet<ServerNodeInstance> m_dirtyInstanceSet;
-};
-
-} // namespace QmlDesigner
-
-#endif // RENDERNODEINSTANCESERVER_H
diff --git a/src/tools/qmlpuppet/qmlpuppet/main.cpp b/src/tools/qmlpuppet/qmlpuppet/main.cpp
deleted file mode 100644
index bbc168008f..0000000000
--- a/src/tools/qmlpuppet/qmlpuppet/main.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (info@qt.nokia.com)
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at info@qt.nokia.com.
-**
-**************************************************************************/
-
-#include <QtDebug>
-
-#include <QApplication>
-#include <QStringList>
-
-#include <qt4nodeinstanceclientproxy.h>
-
-#ifdef ENABLE_QT_BREAKPAD
-#include <qtsystemexceptionhandler.h>
-#endif
-
-#ifdef Q_OS_WIN
-#include <windows.h>
-#endif
-
-int main(int argc, char *argv[])
-{
- QApplication application(argc, argv);
-
- if (application.arguments().count() != 4)
- return -1;
-
- QCoreApplication::setOrganizationName("Nokia");
- QCoreApplication::setOrganizationDomain("nokia.com");
- QCoreApplication::setApplicationName("QmlPuppet");
- QCoreApplication::setApplicationVersion("1.1.0");
-
-#ifdef ENABLE_QT_BREAKPAD
- QtSystemExceptionHandler systemExceptionHandler;
-#endif
-
- new QmlDesigner::Qt4NodeInstanceClientProxy(&application);
-
-#if defined(Q_OS_WIN) && defined(QT_NO_DEBUG)
- SetErrorMode(SEM_NOGPFAULTERRORBOX); //We do not want to see any message boxes
-#endif
-
- return application.exec();
-}
diff --git a/src/tools/qmlpuppet/qmlpuppet/qmlpuppet.pro b/src/tools/qmlpuppet/qmlpuppet/qmlpuppet.pro
index 253fddf533..a901cbbf9f 100644
--- a/src/tools/qmlpuppet/qmlpuppet/qmlpuppet.pro
+++ b/src/tools/qmlpuppet/qmlpuppet/qmlpuppet.pro
@@ -7,39 +7,9 @@ include(../../../private_headers.pri)
DESTDIR = $$IDE_BIN_PATH
include(../../../rpath.pri)
-QT += core gui declarative network
-
-contains (QT_CONFIG, webkit) {
- QT += webkit
-}
-minQtVersion(5, 0, 0) {
- QT += core-private declarative-private gui-private script-private
-}
-DEFINES += QWEAKPOINTER_ENABLE_ARROW
-
-
-
-
-include (instances/instances.pri)
-include (../instances/instances.pri)
-include (../commands/commands.pri)
-include (../container/container.pri)
-include (../interfaces/interfaces.pri)
+include(../../../../share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri)
QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
!isEmpty(QT_BREAKPAD_ROOT_PATH) {
include($$QT_BREAKPAD_ROOT_PATH/qtbreakpad.pri)
-}
-
-SOURCES += main.cpp
-RESOURCES += ../qmlpuppet.qrc
-
-OTHER_FILES += Info.plist.in
-macx {
- info.input = Info.plist.in
- info.output = $$IDE_BIN_PATH/$${TARGET}.app/Contents/Info.plist
- QMAKE_SUBSTITUTES += info
-} else {
- target.path = /bin
- INSTALLS += target
-}
+} \ No newline at end of file