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
qohosappcontext_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 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 QOHOSAPPCONTEXT_P_H
5#define QOHOSAPPCONTEXT_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 <QtCore/qstring.h>
20#include <QtCore/qstringlist.h>
21#include <QtOhosAppKit/private/qohosappbundleinfo_p.h>
22#include <QtOhosAppKit/private/qohoswant_p.h>
23#include <QtOhosAppKit/private/qtohosappkitglobal_p.h>
24#include <functional>
25#include <memory>
26#include <optional>
27
28QT_BEGIN_NAMESPACE
29
30namespace QtOhosAppKit {
31
32class Q_OHOSAPPKIT_EXPORT AppContext : public QObject
33{
35
36public:
37 static AppContext *instance();
38
39 static bool isNoUiChildMode();
40
41 static void startNoUiChildProcess(const QString &libraryName, const QStringList &args);
42
44
45 virtual bool hasSerialPortAccessRight(const QString &portName) const = 0;
49
50 virtual std::shared_ptr<BundleInfo> bundleInfo() const = 0;
51
52 Q_NORETURN virtual void restartApp(const std::optional<Want> &want) = 0;
53
54 virtual double fontSizeScale() const = 0;
55
58
59protected:
62
64};
65
66}
67
68QT_END_NAMESPACE
69
70#endif
\inmodule QtOhosAppKit