Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmlenginecontrolservice.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant
4
5#ifndef QQMLENGINECONTROLSERVICE_H
6#define QQMLENGINECONTROLSERVICE_H
7
8#include <QMutex>
9#include <private/qqmldebugserviceinterfaces_p.h>
10
11//
12// W A R N I N G
13// -------------
14//
15// This file is not part of the Qt API. It exists purely as an
16// implementation detail. This header file may change from version to
17// version without notice, or even be removed.
18//
19// We mean it.
20//
21
22QT_BEGIN_NAMESPACE
23
24class QQmlEngineControlServiceImpl : public QQmlEngineControlService
25{
26public:
27 enum MessageType {
28 EngineAboutToBeAdded,
29 EngineAdded,
30 EngineAboutToBeRemoved,
31 EngineRemoved
32 };
33
34 enum CommandType {
35 StartWaitingEngine,
36 StopWaitingEngine
37 };
38
39 QQmlEngineControlServiceImpl(QObject *parent = nullptr);
40
41protected:
42 friend class QQmlProfilerServiceFactory;
43
44 QMutex dataMutex;
45 QList<QJSEngine *> startingEngines;
46 QList<QJSEngine *> stoppingEngines;
47 bool blockingMode;
48
49 void messageReceived(const QByteArray &) override;
50 void engineAboutToBeAdded(QJSEngine *) override;
51 void engineAboutToBeRemoved(QJSEngine *) override;
52 void engineAdded(QJSEngine *) override;
53 void engineRemoved(QJSEngine *) override;
54
55 void sendMessage(MessageType type, QJSEngine *engine);
56
57 void stateChanged(State) override;
58};
59
61
62#endif // QQMLENGINECONTROLSERVICE_H
Combined button and popup list for selecting options.