aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/designercore/instances/interactiveconnectionmanager.h
blob: e862d1c88d045c44073a69040fcd9eda9956c795 (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
35
36
37
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#pragma once

#include "connectionmanager.h"

namespace QmlDesigner {

class InteractiveConnectionManager : public ConnectionManager
{
    Q_OBJECT

public:
    InteractiveConnectionManager();

    void setUp(NodeInstanceServerInterface *nodeInstanceServer,
               const QString &qrcMappingString,
               ProjectExplorer::Target *target,
               AbstractView *view) override;

    void shutDown() override;

    void showCannotConnectToPuppetWarningAndSwitchToEditMode() override;

protected:
    void dispatchCommand(const QVariant &command, Connection &connection) override;

private:
    void puppetTimeout(Connection &connection);
    void puppetAlive(Connection &connection);

private:
    AbstractView *m_view{};
};

} // namespace QmlDesigner