1// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QT3DCORE_QSYSTEMINFORMATIONSERVICE_P_H
5#define QT3DCORE_QSYSTEMINFORMATIONSERVICE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <Qt3DCore/qt3dcore_global.h>
19#include <QtCore/qstringlist.h>
20#include <QtCore/qvariant.h>
21
22#include <Qt3DCore/private/qservicelocator_p.h>
23
24QT_BEGIN_NAMESPACE
25
26namespace Qt3DCore {
27
28class QSystemInformationServicePrivate;
29struct JobRunStats;
30
31class Q_3DCORESHARED_EXPORT QSystemInformationService : public QAbstractServiceProvider
32{
33 Q_OBJECT
34 Q_PROPERTY(bool traceEnabled READ isTraceEnabled WRITE setTraceEnabled NOTIFY traceEnabledChanged)
35 Q_PROPERTY(bool graphicsTraceEnabled READ isGraphicsTraceEnabled WRITE setGraphicsTraceEnabled NOTIFY graphicsTraceEnabledChanged)
36 Q_PROPERTY(bool commandServerEnabled READ isCommandServerEnabled CONSTANT)
37public:
38 QSystemInformationService(QAspectEngine *aspectEngine);
39
40 bool isTraceEnabled() const;
41 bool isGraphicsTraceEnabled() const;
42 bool isCommandServerEnabled() const;
43
44 QStringList aspectNames() const;
45 int threadPoolThreadCount() const;
46
47 void writePreviousFrameTraces();
48 Q_INVOKABLE void revealLogFolder();
49
50public Q_SLOTS:
51 void setTraceEnabled(bool traceEnabled);
52 void setGraphicsTraceEnabled(bool graphicsTraceEnabled);
53 QVariant executeCommand(const QString &command);
54 void dumpCommand(const QString &command);
55
56signals:
57 void traceEnabledChanged(bool traceEnabled);
58 void graphicsTraceEnabledChanged(bool graphicsTraceEnabled);
59
60protected:
61 Q_DECLARE_PRIVATE(QSystemInformationService)
62 QSystemInformationService(QAspectEngine *aspectEngine, const QString &description);
63 QSystemInformationService(QSystemInformationServicePrivate &dd);
64};
65
66} // namespace Qt3DCore
67
68QT_END_NAMESPACE
69
70#endif // QT3DCORE_QSYSTEMINFORMATIONSERVICE_P_H
71

source code of qt3d/src/core/services/qsysteminformationservice_p.h