Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmlsysteminformation_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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
4#ifndef QQMLSYSTEMINFORMATION_P_H
5#define QQMLSYSTEMINFORMATION_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 purely as an
12// implementation detail. 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 <QtCore/qobject.h>
19#include <QtQmlCore/private/qqmlcoreglobal_p.h>
20#include <QtQml/qqmlregistration.h>
21
23class Q_QMLCORE_EXPORT QQmlSystemInformation : public QObject
24{
27 QML_NAMED_ELEMENT(SystemInformation)
29
30 Q_PROPERTY(int wordSize READ wordSize CONSTANT FINAL)
31 Q_PROPERTY(QQmlSystemInformation::Endian byteOrder READ byteOrder CONSTANT FINAL)
32 Q_PROPERTY(QString buildCpuArchitecture READ buildCpuArchitecture CONSTANT FINAL)
33 Q_PROPERTY(QString currentCpuArchitecture READ currentCpuArchitecture CONSTANT FINAL)
34 Q_PROPERTY(QString buildAbi READ buildAbi CONSTANT FINAL)
35 Q_PROPERTY(QString kernelType READ kernelType CONSTANT FINAL)
36 Q_PROPERTY(QString kernelVersion READ kernelVersion CONSTANT FINAL)
37 Q_PROPERTY(QString productType READ productType CONSTANT FINAL)
38 Q_PROPERTY(QString productVersion READ productVersion CONSTANT FINAL)
39 Q_PROPERTY(QString prettyProductName READ prettyProductName CONSTANT FINAL)
40 Q_PROPERTY(QString machineHostName READ machineHostName CONSTANT FINAL)
41 Q_PROPERTY(QByteArray machineUniqueId READ machineUniqueId CONSTANT FINAL)
42 Q_PROPERTY(QByteArray bootUniqueId READ bootUniqueId CONSTANT FINAL)
43
44public:
45 enum class Endian { Big, Little };
47
48 explicit QQmlSystemInformation(QObject *parent = nullptr);
49
50 int wordSize() const;
51 Endian byteOrder() const;
52 QString buildCpuArchitecture() const;
53 QString currentCpuArchitecture() const;
54 QString buildAbi() const;
55 QString kernelType() const;
56 QString kernelVersion() const;
57 QString productType() const;
58 QString productVersion() const;
59 QString prettyProductName() const;
60 QString machineHostName() const;
61 QByteArray machineUniqueId() const;
62 QByteArray bootUniqueId() const;
63};
65
66#endif // QQMLSYSTEMINFORMATION_P_H
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
Definition qobject.h:103
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define QML_SINGLETON
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT