1 /**************************************************************************
5 ** This file is part of Qt Creator
9 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
13 ** Contact: Nokia Corporation (qt-info@nokia.com)
17 ** No Commercial Usage
21 ** This file contains pre-release code and may not be distributed.
23 ** You may use this file in accordance with the terms and conditions
25 ** contained in the Technology Preview License Agreement accompanying
31 ** GNU Lesser General Public License Usage
35 ** Alternatively, this file may be used under the terms of the GNU Lesser
37 ** General Public License version 2.1 as published by the Free Software
39 ** Foundation and appearing in the file LICENSE.LGPL included in the
41 ** packaging of this file. Please review the following information to
43 ** ensure the GNU Lesser General Public License version 2.1 requirements
45 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
49 ** In addition, as a special exception, Nokia gives you certain additional
51 ** rights. These rights are described in the Nokia Qt LGPL Exception
53 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
57 ** If you have questions regarding the use of this file, please contact
59 ** Nokia at info@nokia.com.
63 **************************************************************************/
65 #ifndef QMLDESIGNER_ANCHORCHANGESNODEINSTANCE_H
66 #define QMLDESIGNER_ANCHORCHANGESNODEINSTANCE_H
68 #include "objectnodeinstance.h"
69 #include <private/qdeclarativestateoperations_p.h>
72 #include <QWeakPointer>
75 class QDeclarativeProperty;
78 namespace QmlDesigner {
82 class AnchorChangesNodeInstance : public ObjectNodeInstance
85 typedef QSharedPointer<AnchorChangesNodeInstance> Pointer;
86 typedef QWeakPointer<AnchorChangesNodeInstance> WeakPointer;
88 static Pointer create(QObject *objectToBeWrapped);
90 virtual void setPropertyVariant(const QString &name, const QVariant &value);
91 virtual void setPropertyBinding(const QString &name, const QString &expression);
92 virtual QVariant property(const QString &name) const;
93 virtual void resetProperty(const QString &name);
95 using ObjectNodeInstance::reparent; // keep the virtual reparent(...) method around
96 void reparent(const ServerNodeInstance &oldParentInstance, const QString &oldParentProperty, const ServerNodeInstance &newParentInstance, const QString &newParentProperty);
99 AnchorChangesNodeInstance(QDeclarativeAnchorChanges *object);
100 QDeclarativeAnchorChanges *changesObject() const;
103 } // namespace Internal
104 } // namespace QmlDesigner
106 #endif // QMLDESIGNER_ANCHORCHANGESNODEINSTANCE_H