diff options
author | Marco Bubke <marco.bubke@digia.com> | 2012-09-19 15:57:22 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@digia.com> | 2012-09-24 11:46:20 +0200 |
commit | 770ab68c45e4569a840fcb43a9d19976aae58da2 (patch) | |
tree | 905e77039505025462b619f4399438f84775f0e9 /share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummynodeinstance.h | |
parent | 51f847246e48f072df3b8252cea399a35d694123 (diff) |
QmlDesigner.Instances: Refactor the qml2 puppet
Change-Id: Iaa7a744ecf13e011addc573a381ea523d2d50a55
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummynodeinstance.h')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummynodeinstance.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummynodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummynodeinstance.h new file mode 100644 index 0000000000..9724b5dd41 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummynodeinstance.h @@ -0,0 +1,73 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: http://www.qt-project.org/ +** +** +** 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. +** +** +**************************************************************************/ + +#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 |