1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef RESOURCECLIENT_H
5#define RESOURCECLIENT_H
6
7#include "message.h"
8#include <QtNetwork/qlocalsocket.h>
9
10QT_BEGIN_NAMESPACE
11
12class ResourceClient : public QObject
13{
14 Q_OBJECT
15public:
16 ResourceClient(const QString &serverName);
17
18 void init();
19
20Q_SIGNALS:
21 void messageReceived(Message::MessagePtr message);
22 void connected();
23
24public Q_SLOTS:
25 void sendMessage(const Message::MessagePtr &message);
26
27private:
28 QString m_serverName;
29 QLocalSocket m_socket;
30};
31
32QT_END_NAMESPACE
33
34#endif // RESOURCECLIENT_H
35

source code of qtquick3d/tools/materialeditor/resourceclient.h