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
qohossystemlocale.h
Go to the documentation of this file.
1// Copyright (C) 2025 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 QOHOSSYSTEMLOCALE_H
5#define QOHOSSYSTEMLOCALE_H
6
7#include <QtCore/qglobal.h>
8#include <QtCore/qstring.h>
9#include <QtCore/qstringlist.h>
10#include <private/qlocale_p.h>
11
13
15{
16public:
17 QOhosSystemLocale(const QString &systemLocaleId, const QStringList &preferredLanguages);
18
19 QVariant query(QueryType type, QVariant &&in = QVariant()) const override;
20 QLocale fallbackLocale() const override;
21
22private:
23 QString m_systemLocaleId;
24 QStringList m_preferredLanguages;
25};
26
27QT_END_NAMESPACE
28
29#endif // QOHOSSYSTEMLOCALE_H
static QOhosEventDispatcherStopper * instance()
std::enable_if_t< qohosplugincore_h_detail::isQOhosOptional< QOhosInvokeResult< Func, T > >, QOhosInvokeResult< Func, T > > andThen(Func &&func) const
QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QFontDatabasePrivate::ExtendedScript script) const override
Returns a list of alternative fonts for the specified family and style and script using the styleHint...
QFont defaultFont() const override
Returns the default system font.
void populateFontDatabase() override
This function is called once at startup by Qt's internal font database.
static QOhosPlatformIntegration * instance()
QLocale fallbackLocale() const override
QOhosSystemLocale(const QString &systemLocaleId, const QStringList &preferredLanguages)
QVariant query(QueryType type, QVariant &&in=QVariant()) const override
static QXComponentId createForNativeNodeMainWindow(const std::string &qAbilityInstanceId)
JsState & jsState() const
virtual void visitEachQAbilityPeer(const std::function< void(std::shared_ptr< QAbilityPeer >)> &visitor)=0
virtual QNapi::Promise handleCloseRequestFromSystem(JsState &jsState, const std::string &logContextStr, CloseAbilityRequestSource requestSource, std::function< QNapi::Value(JsState &, CloseAbilityRequestResolution)> promiseValueFactory)=0
virtual void handleOnContinueRequestFromSystem(JsState &jsState, QNapi::Object wantParamsObj, QOhosConsumer< JsState &, QOhosAbilityOnContinueResult > resultConsumer)=0
static std::shared_ptr< QUiAbilityPeer > tryCastFromQAbilityPeerOrNull(std::shared_ptr< QAbilityPeer > qAbilityPeer)
bool isCurrentDeviceSupported()
void init(QMap< Type, QVariant > devinfo)
QOhosOptional< RecognizedDeviceType > tryGetRecognizedDeviceType()
QPlatformDialogHelper * createHelper(QPlatformTheme::DialogType type)
Combined button and popup list for selecting options.
std::shared_ptr< void > makeWatchdog()
bool acquireAndCleanPendingAutoStartedInstanceWindowFlag()
std::string const char * mapBoolToTrueFalseStr(bool value)
bool blockEventLoopsWhenSuspended()
void removeMatchingJsQAbilityPeer(QNapi::Object qAbility)
QOhosConsumer< std::function< void()> > makeSingleThreadExecutor(const SingleThreadExecutorConfig &config={})
QJsonObject readChildProcessSetupData()
void updateApplicationState(int state)
bool isOhosNoUiChildMode()
void initJsThreadState(napi_env env, std::map< std::string, QNapi::Reference< QNapi::Function > > &&jsModulesFactories, std::shared_ptr< AppFunctions > appFunctions, QtRunMode qtRunMode)
QOhosPermissionsHelper * getQOhosPermissionsHelperImpl()
bool isGlBackingStoreDefaultEnabled()
void quitApplicationFromJsThread()
std::shared_ptr< QAbilityInstancesManager > makeQAbilityInstancesManager(std::shared_ptr< QAbilityEngine > abilityEngine, std::function< void(JsState &, std::shared_ptr< QAbilityPeer >)> autoStartedInstanceStartupNotifyFunc)
QOhosAbilityOnContinueResult
bool isVsyncOnSoftwareBackingStoreEnabled()
bool isNativeNodeApiMouseEventsEnabled()
bool isNativeNodeApiKeyEventsEnabled()
bool isDebugUseBasicStyleAndThemeEnabled()
bool isDebugDrawQtRasterBackingStoreFlushedRegionEnabled()
void sendChildProcessSetupData(int childPid, QJsonObject setupData)
static bool s_hotStartEnabled
QOhosOptional< std::uint64_t > activeInQtThread
static bool s_autoStartedAbilityInstanceWaitingForQtWindow
QT_END_NAMESPACE static EXTERN_C_START napi_value Init(napi_env env, napi_value exports)
std::function< void()> s_qtAppThreadIdleStateWaitFunc
static std::string s_appSharedLibName
static QList< QByteArray > s_applicationParams
static std::unique_ptr< std::vector< std::string > > s_appArgs
int(* Main)(int, char **)
static int s_appExitCode
QOhosOptional< std::uint64_t > lastRequestedInJsThread
static std::string s_appSharedLibsDirPath
static std::string s_exitCodeFilePath
QOhosConsumer< std::vector< std::string > > s_qtAppThreadMainFuncLauncher
QPlatformFileDialogHelper * makeQOhosPlatformFileDialogHelper()
QT_BEGIN_NAMESPACE constexpr const char * ohosThemeName
QOhosOptional< void > makeEmptyQOhosOptional()
virtual void startNewInstance(QNapi::Object baseQAbility, QObjectThreadSafeRef qwindow, QNapi::Object optStartOptions, std::function< void(JsState &, std::shared_ptr< QAbilityPeer >)> startupNotifyFunc)=0
virtual QOhosOptional< std::string > pendingAutoStartedInstanceId() const =0
virtual QOhosOptional< std::string > tryGetQAbilityInstanceIdFromWant(QNapi::Object appQAbility, QNapi::Object want) const =0
static bool isQtInternalWantFromThisProcess(QNapi::Object want)
static void setLaunchParamOnAbilityObject(JsState &jsState, QNapi::Object ability, QNapi::Object launchParam)
virtual bool isWantFromThisApp(QNapi::Object appQAbility, QNapi::Object want) const =0
virtual void handleStartedUiInstance(JsState &jsState, QNapi::Object qAbility, QNapi::Object windowStage)=0
virtual std::shared_ptr< QUiAbilityPeerBackend > getAbilityPeerBackend(std::shared_ptr< QUiAbilityPeer > uiAbilityPeer)=0
virtual void registerPendingAutoStartedInstance()=0
virtual std::string getQAbilityInstanceIdOrPendingAutoStartedId(QNapi::Object qAbility) const =0
virtual std::shared_ptr< QAbilityEngine > abilityEngine()=0
QOhosOptional< std::size_t > threadPreferredStackSize