aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/qml2puppet/qml2puppet/instances/qt5rendernodeinstanceserver.h
blob: 1e0f885da167fcdfb7fb37f62dc032b66f47a91d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include "qt5nodeinstanceserver.h"

namespace QmlDesigner {

class Qt5RenderNodeInstanceServer : public Qt5NodeInstanceServer
{
    Q_OBJECT
public:
    explicit Qt5RenderNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);

    void createScene(const CreateSceneCommand &command) override;
    void clearScene(const ClearSceneCommand &command) override;
    void completeComponent(const CompleteComponentCommand &command) override;
    void removeSharedMemory(const RemoveSharedMemoryCommand &command) override;
    void changePropertyValues(const ChangeValuesCommand &command) override;
    void changePropertyBindings(const ChangeBindingsCommand &command) override;

protected:
    void collectItemChangesAndSendChangeCommands() override;
    ServerNodeInstance findNodeInstanceForItem(QQuickItem *item) const;
    void resizeCanvasToRootItem() override;

private:
    void makeDirtyRecursive(const ServerNodeInstance &instance);

    QSet<ServerNodeInstance> m_dirtyInstanceSet;
};

} // namespace QmlDesigner