Commit 2b698e31 authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Add override to qml2puppet



Change-Id: Ibdf07c4a35b40f3fc78300a1675270f8295bec42
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent e13e6550
......@@ -66,9 +66,9 @@ void AnchorChangesNodeInstance::resetProperty(const PropertyName &/*name*/)
{
}
void AnchorChangesNodeInstance::reparent(const ServerNodeInstance &/*oldParentInstance*/,
void AnchorChangesNodeInstance::reparent(const ObjectNodeInstance::Pointer &/*oldParentInstance*/,
const PropertyName &/*oldParentProperty*/,
const ServerNodeInstance &/*newParentInstance*/,
const ObjectNodeInstance::Pointer &/*newParentInstance*/,
const PropertyName &/*newParentProperty*/)
{
}
......
......@@ -52,16 +52,16 @@ public:
static Pointer create(QObject *objectToBeWrapped);
virtual void setPropertyVariant(const PropertyName &name, const QVariant &value);
virtual void setPropertyBinding(const PropertyName &name, const QString &expression);
virtual QVariant property(const PropertyName &name) const;
virtual void resetProperty(const PropertyName &name);
void setPropertyVariant(const PropertyName &name, const QVariant &value) Q_DECL_OVERRIDE;
void setPropertyBinding(const PropertyName &name, const QString &expression) Q_DECL_OVERRIDE;
QVariant property(const PropertyName &name) const Q_DECL_OVERRIDE;
void resetProperty(const PropertyName &name) Q_DECL_OVERRIDE;
using ObjectNodeInstance::reparent; // keep the virtual reparent(...) method around
void reparent(const ServerNodeInstance &oldParentInstance,
void reparent(const ObjectNodeInstance::Pointer &oldParentInstance,
const PropertyName &oldParentProperty,
const ServerNodeInstance &newParentInstance,
const PropertyName &newParentProperty);
const ObjectNodeInstance::Pointer &newParentInstance,
const PropertyName &newParentProperty) Q_DECL_OVERRIDE;
protected:
AnchorChangesNodeInstance(QObject *object);
......
......@@ -45,12 +45,12 @@ public:
static Pointer create(QObject *objectToBeWrapped);
void setPropertyVariant(const PropertyName &name, const QVariant &value);
void setPropertyBinding(const PropertyName &name, const QString &expression);
void setPropertyVariant(const PropertyName &name, const QVariant &value) Q_DECL_OVERRIDE;
void setPropertyBinding(const PropertyName &name, const QString &expression) Q_DECL_OVERRIDE;
QVariant property(const PropertyName &name) const;
void resetProperty(const PropertyName &name);
QVariant property(const PropertyName &name) const Q_DECL_OVERRIDE;
void resetProperty(const PropertyName &name) Q_DECL_OVERRIDE;
private:
bool m_isEnabled;
......
......@@ -47,9 +47,9 @@ public:
ComponentNodeInstance(QQmlComponent *component);
static Pointer create(QObject *objectToBeWrapped);
bool hasContent() const;
bool hasContent() const Q_DECL_OVERRIDE;
void setNodeSource(const QString &source);
void setNodeSource(const QString &source) Q_DECL_OVERRIDE;
private: //function
QQmlComponent *component() const;
......
......@@ -45,16 +45,16 @@ public:
static Pointer create();
QRectF boundingRect() const;
QPointF position() const;
QSizeF size() const;
QTransform transform() const;
double opacity() const;
QRectF boundingRect() const Q_DECL_OVERRIDE;
QPointF position() const Q_DECL_OVERRIDE;
QSizeF size() const Q_DECL_OVERRIDE;
QTransform transform() const Q_DECL_OVERRIDE;
double opacity() const Q_DECL_OVERRIDE;
void setPropertyVariant(const PropertyName &name, const QVariant &value);
void setPropertyBinding(const PropertyName &name, const QString &expression);
void setId(const QString &id);
QVariant property(const PropertyName &name) const;
void setPropertyVariant(const PropertyName &name, const QVariant &value) Q_DECL_OVERRIDE;
void setPropertyBinding(const PropertyName &name, const QString &expression) Q_DECL_OVERRIDE;
void setId(const QString &id) Q_DECL_OVERRIDE;
QVariant property(const PropertyName &name) const Q_DECL_OVERRIDE;
void initializePropertyWatcher(const ObjectNodeInstance::Pointer &objectNodeInstance);
......
......@@ -51,7 +51,7 @@ public:
void setObjectNodeInstance(const ObjectNodeInstancePointer &nodeInstance);
virtual int qt_metacall(QMetaObject::Call, int, void **);
virtual int qt_metacall(QMetaObject::Call, int, void **) Q_DECL_OVERRIDE;
protected:
void registerObject(QObject *spiedObject, const PropertyName &prefix = PropertyName());
......
......@@ -47,14 +47,14 @@ public:
static Pointer create(QObject *objectToBeWrapped);
void setPropertyVariant(const PropertyName &name, const QVariant &value);
void setPropertyBinding(const PropertyName &name, const QString &expression);
void setPropertyVariant(const PropertyName &name, const QVariant &value) Q_DECL_OVERRIDE;
void setPropertyBinding(const PropertyName &name, const QString &expression) Q_DECL_OVERRIDE;
bool isPositioner() const;
bool isPositioner() const Q_DECL_OVERRIDE;
bool isResizable() const;
bool isResizable() const Q_DECL_OVERRIDE;
void refreshPositioner();
void refreshPositioner() Q_DECL_OVERRIDE;
protected:
PositionerNodeInstance(QQuickBasePositioner *item);
......
......@@ -99,11 +99,11 @@ void QmlPropertyChangesNodeInstance::resetProperty(const PropertyName &name)
}
void QmlPropertyChangesNodeInstance::reparent(const ServerNodeInstance &oldParentInstance, const PropertyName &oldParentProperty, const ServerNodeInstance &newParentInstance, const PropertyName &newParentProperty)
void QmlPropertyChangesNodeInstance::reparent(const ObjectNodeInstance::Pointer &oldParentInstance, const PropertyName &oldParentProperty, const ObjectNodeInstance::Pointer &newParentInstance, const PropertyName &newParentProperty)
{
changesObject()->detachFromState();
ObjectNodeInstance::reparent(oldParentInstance.internalInstance(), oldParentProperty, newParentInstance.internalInstance(), newParentProperty);
ObjectNodeInstance::reparent(oldParentInstance, oldParentProperty, newParentInstance, newParentProperty);
changesObject()->attachToState();
}
......
......@@ -54,13 +54,13 @@ public:
static Pointer create(QObject *objectToBeWrapped);
virtual void setPropertyVariant(const PropertyName &name, const QVariant &value);
virtual void setPropertyBinding(const PropertyName &name, const QString &expression);
virtual QVariant property(const PropertyName &name) const;
virtual void resetProperty(const PropertyName &name);
virtual void setPropertyVariant(const PropertyName &name, const QVariant &value) Q_DECL_OVERRIDE;
virtual void setPropertyBinding(const PropertyName &name, const QString &expression) Q_DECL_OVERRIDE;
virtual QVariant property(const PropertyName &name) const Q_DECL_OVERRIDE;
virtual void resetProperty(const PropertyName &name) Q_DECL_OVERRIDE;
using ObjectNodeInstance::reparent; // keep the virtual reparent(...) method around
void reparent(const ServerNodeInstance &oldParentInstance, const PropertyName &oldParentProperty, const ServerNodeInstance &newParentInstance, const PropertyName &newParentProperty);
void reparent(const ObjectNodeInstance::Pointer &oldParentInstance, const PropertyName &oldParentProperty, const ObjectNodeInstance::Pointer &newParentInstance, const PropertyName &newParentProperty) Q_DECL_OVERRIDE;
protected:
QmlPropertyChangesNodeInstance(QQuickPropertyChanges *object);
......
......@@ -48,15 +48,15 @@ public:
static Pointer create(QObject *objectToBeWrapped);
void setPropertyVariant(const PropertyName &name, const QVariant &value);
void setPropertyBinding(const PropertyName &name, const QString &expression);
void setPropertyVariant(const PropertyName &name, const QVariant &value) Q_DECL_OVERRIDE;
void setPropertyBinding(const PropertyName &name, const QString &expression) Q_DECL_OVERRIDE;
void activateState();
void deactivateState();
void activateState() Q_DECL_OVERRIDE;
void deactivateState() Q_DECL_OVERRIDE;
bool updateStateVariant(const ObjectNodeInstance::Pointer &target, const PropertyName &propertyName, const QVariant &value);
bool updateStateBinding(const ObjectNodeInstance::Pointer &target, const PropertyName &propertyName, const QString &expression);
bool resetStateProperty(const ObjectNodeInstance::Pointer &target, const PropertyName &propertyName, const QVariant &resetValue);
bool updateStateVariant(const ObjectNodeInstance::Pointer &target, const PropertyName &propertyName, const QVariant &value) Q_DECL_OVERRIDE;
bool updateStateBinding(const ObjectNodeInstance::Pointer &target, const PropertyName &propertyName, const QString &expression) Q_DECL_OVERRIDE;
bool resetStateProperty(const ObjectNodeInstance::Pointer &target, const PropertyName &propertyName, const QVariant &resetValue) Q_DECL_OVERRIDE;
protected:
......
......@@ -47,9 +47,9 @@ public:
static Pointer create(QObject *objectToBeWrapped);
void setPropertyVariant(const PropertyName &name, const QVariant &value);
void setPropertyVariant(const PropertyName &name, const QVariant &value) Q_DECL_OVERRIDE;
bool isTransition() const;
bool isTransition() const Q_DECL_OVERRIDE;
protected:
QQuickTransition *qmlTransition() const;
......
......@@ -41,15 +41,15 @@ class Qt5InformationNodeInstanceServer : public Qt5NodeInstanceServer
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);
void token(const TokenCommand &command);
void removeSharedMemory(const RemoveSharedMemoryCommand &command);
void reparentInstances(const ReparentInstancesCommand &command) Q_DECL_OVERRIDE;
void clearScene(const ClearSceneCommand &command) Q_DECL_OVERRIDE;
void createScene(const CreateSceneCommand &command) Q_DECL_OVERRIDE;
void completeComponent(const CompleteComponentCommand &command) Q_DECL_OVERRIDE;
void token(const TokenCommand &command) Q_DECL_OVERRIDE;
void removeSharedMemory(const RemoveSharedMemoryCommand &command) Q_DECL_OVERRIDE;
protected:
void collectItemChangesAndSendChangeCommands();
void collectItemChangesAndSendChangeCommands() Q_DECL_OVERRIDE;
void sendChildrenChangedCommand(const QList<ServerNodeInstance> childList);
void sendTokenBack();
......
......@@ -48,21 +48,21 @@ public:
Qt5NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);
~Qt5NodeInstanceServer();
QQuickView *quickView() const;
QQmlView *declarativeView() const;
QQmlEngine *engine() const;
void refreshBindings();
QQuickView *quickView() const Q_DECL_OVERRIDE;
QQmlView *declarativeView() const Q_DECL_OVERRIDE;
QQmlEngine *engine() const Q_DECL_OVERRIDE;
void refreshBindings() Q_DECL_OVERRIDE;
DesignerSupport *designerSupport() const;
void createScene(const CreateSceneCommand &command);
void clearScene(const ClearSceneCommand &command);
void createScene(const CreateSceneCommand &command) Q_DECL_OVERRIDE;
void clearScene(const ClearSceneCommand &command) Q_DECL_OVERRIDE;
protected:
void initializeView(const QVector<AddImportContainer> &importVector);
void resizeCanvasSizeToRootItemSize();
void initializeView(const QVector<AddImportContainer> &importVector) Q_DECL_OVERRIDE;
void resizeCanvasSizeToRootItemSize() Q_DECL_OVERRIDE;
void resetAllItems();
QList<ServerNodeInstance> setupScene(const CreateSceneCommand &command);
QList<ServerNodeInstance> setupScene(const CreateSceneCommand &command) Q_DECL_OVERRIDE;
QList<QQuickItem*> allItems() const;
private:
......
......@@ -40,15 +40,15 @@ class Qt5PreviewNodeInstanceServer : public Qt5NodeInstanceServer
public:
explicit Qt5PreviewNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);
void createScene(const CreateSceneCommand &command);
void changeState(const ChangeStateCommand &command);
void removeSharedMemory(const RemoveSharedMemoryCommand &command);
void createScene(const CreateSceneCommand &command) Q_DECL_OVERRIDE;
void changeState(const ChangeStateCommand &command) Q_DECL_OVERRIDE;
void removeSharedMemory(const RemoveSharedMemoryCommand &command) Q_DECL_OVERRIDE;
QImage renderPreviewImage();
protected:
void collectItemChangesAndSendChangeCommands();
void startRenderTimer();
void collectItemChangesAndSendChangeCommands() Q_DECL_OVERRIDE;
void startRenderTimer() Q_DECL_OVERRIDE;
private:
ServerNodeInstance m_actualState;
......
......@@ -40,13 +40,13 @@ class Qt5RenderNodeInstanceServer : public Qt5NodeInstanceServer
public:
explicit Qt5RenderNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);
void createScene(const CreateSceneCommand &command);
void clearScene(const ClearSceneCommand &command);
void completeComponent(const CompleteComponentCommand &command);
void removeSharedMemory(const RemoveSharedMemoryCommand &command);
void createScene(const CreateSceneCommand &command) Q_DECL_OVERRIDE;
void clearScene(const ClearSceneCommand &command) Q_DECL_OVERRIDE;
void completeComponent(const CompleteComponentCommand &command) Q_DECL_OVERRIDE;
void removeSharedMemory(const RemoveSharedMemoryCommand &command) Q_DECL_OVERRIDE;
protected:
void collectItemChangesAndSendChangeCommands();
void collectItemChangesAndSendChangeCommands() Q_DECL_OVERRIDE;
ServerNodeInstance findNodeInstanceForItem(QQuickItem *item) const;
private:
......
......@@ -679,7 +679,7 @@ void QuickItemNodeInstance::createEffectItem(bool createEffectItem)
s_createEffectItem = createEffectItem;
}
void QuickItemNodeInstance::updateDirtyNodeRecursive() const
void QuickItemNodeInstance::updateDirtyNodeRecursive()
{
updateAllDirtyNodeRecursive(quickItem());
}
......
......@@ -49,67 +49,67 @@ public:
~QuickItemNodeInstance();
static Pointer create(QObject *objectToBeWrapped);
void initialize(const ObjectNodeInstance::Pointer &objectNodeInstance);
void initialize(const ObjectNodeInstance::Pointer &objectNodeInstance) Q_DECL_OVERRIDE;
bool isQuickItem() const;
bool isQuickItem() const Q_DECL_OVERRIDE;
QRectF boundingRect() const;
QPointF position() const;
QSizeF size() const;
QTransform transform() const;
QTransform customTransform() const;
QTransform sceneTransform() const;
double opacity() const;
QRectF boundingRect() const Q_DECL_OVERRIDE;
QPointF position() const Q_DECL_OVERRIDE;
QSizeF size() const Q_DECL_OVERRIDE;
QTransform transform() const Q_DECL_OVERRIDE;
QTransform customTransform() const Q_DECL_OVERRIDE;
QTransform sceneTransform() const Q_DECL_OVERRIDE;
double opacity() const Q_DECL_OVERRIDE;
QObject *parent() const;
QObject *parent() const Q_DECL_OVERRIDE;
double rotation() const;
double scale() const;
QPointF transformOriginPoint() const;
double zValue() const;
double rotation() const Q_DECL_OVERRIDE;
double scale() const Q_DECL_OVERRIDE;
QPointF transformOriginPoint() const Q_DECL_OVERRIDE;
double zValue() const Q_DECL_OVERRIDE;
bool equalQuickItem(QQuickItem *item) const;
bool hasContent() const;
bool hasContent() const Q_DECL_OVERRIDE;
QList<ServerNodeInstance> childItems() const;
QList<ServerNodeInstance> childItems() const Q_DECL_OVERRIDE;
QList<ServerNodeInstance> childItemsForChild(QQuickItem *childItem) const;
bool isMovable() const;
bool isMovable() const Q_DECL_OVERRIDE;
void setMovable(bool movable);
void setPropertyVariant(const PropertyName &name, const QVariant &value);
void setPropertyBinding(const PropertyName &name, const QString &expression);
void setPropertyVariant(const PropertyName &name, const QVariant &value) Q_DECL_OVERRIDE;
void setPropertyBinding(const PropertyName &name, const QString &expression) Q_DECL_OVERRIDE;
QVariant property(const PropertyName &name) const;
void resetProperty(const PropertyName &name);
QVariant property(const PropertyName &name) const Q_DECL_OVERRIDE;
void resetProperty(const PropertyName &name) Q_DECL_OVERRIDE;
void reparent(const ObjectNodeInstance::Pointer &oldParentInstance, const PropertyName &oldParentProperty, const ObjectNodeInstance::Pointer &newParentInstance, const PropertyName &newParentProperty);
void reparent(const ObjectNodeInstance::Pointer &oldParentInstance, const PropertyName &oldParentProperty, const ObjectNodeInstance::Pointer &newParentInstance, const PropertyName &newParentProperty) Q_DECL_OVERRIDE;
int penWidth() const;
int penWidth() const Q_DECL_OVERRIDE;
bool hasAnchor(const PropertyName &name) const;
QPair<PropertyName, ServerNodeInstance> anchor(const PropertyName &name) const;
bool isAnchoredBySibling() const;
bool isAnchoredByChildren() const;
void doComponentComplete();
bool hasAnchor(const PropertyName &name) const Q_DECL_OVERRIDE;
QPair<PropertyName, ServerNodeInstance> anchor(const PropertyName &name) const Q_DECL_OVERRIDE;
bool isAnchoredBySibling() const Q_DECL_OVERRIDE;
bool isAnchoredByChildren() const Q_DECL_OVERRIDE;
void doComponentComplete() Q_DECL_OVERRIDE;
bool isResizable() const;
bool isResizable() const Q_DECL_OVERRIDE;
void setResizable(bool resizeable);
void setHasContent(bool hasContent);
QList<ServerNodeInstance> stateInstances() const;
QList<ServerNodeInstance> stateInstances() const Q_DECL_OVERRIDE;
QImage renderImage() const;
QImage renderPreviewImage(const QSize &previewImageSize) const;
QImage renderImage() const Q_DECL_OVERRIDE;
QImage renderPreviewImage(const QSize &previewImageSize) const Q_DECL_OVERRIDE;
DesignerSupport *designerSupport() const;
Qt5NodeInstanceServer *qt5NodeInstanceServer() const;
static void createEffectItem(bool createEffectItem);
void updateDirtyNodeRecursive() const;
void updateDirtyNodeRecursive() Q_DECL_OVERRIDE;
protected:
QuickItemNodeInstance(QQuickItem*);
......
......@@ -76,12 +76,10 @@ void DummyNodeInstance::setPropertyVariant(const PropertyName &/*name*/, const Q
void DummyNodeInstance::setPropertyBinding(const PropertyName &/*name*/, const QString &/*expression*/)
{
}
void DummyNodeInstance::setId(const QString &/*id*/)
{
}
QVariant DummyNodeInstance::property(const PropertyName &/*name*/) const
......@@ -91,7 +89,6 @@ QVariant DummyNodeInstance::property(const PropertyName &/*name*/) const
void DummyNodeInstance::initializePropertyWatcher(const ObjectNodeInstance::Pointer &/*objectNodeInstance*/)
{
}
} // namespace Internal
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment