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
qohosenums_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 QOHOSENUMS_H
5#define QOHOSENUMS_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/qglobal.h>
19#include <array>
20
22
23namespace QtOhos {
24
25namespace enums {
26
119
120namespace kit {
121
147
148}
149
150}
151
152template<typename Enum>
153struct OhosEnumMeta;
154
155template<>
157{
159 static constexpr const char *fullTypeName = "@ohos.app.ability.AbilityConstant.ContinueState";
160 static constexpr std::array<std::pair<Enum, const char *>, 2> enumeratorsNames = {{
161 {Enum::ACTIVE, "ACTIVE"},
162 {Enum::INACTIVE, "INACTIVE"},
163 }};
164};
165
166template<>
168{
170 static constexpr const char *fullTypeName = "@ohos.app.ability.AbilityConstant.OnContinueResult";
171 static constexpr std::array<std::pair<Enum, const char *>, 3> enumeratorsNames = {{
172 {Enum::AGREE, "AGREE"},
173 {Enum::MISMATCH, "MISMATCH"},
174 {Enum::REJECT, "REJECT"},
175 }};
176};
177
178template<>
180{
182 static constexpr const char *fullTypeName = "@ohos.app.ability.ConfigurationConstant.ColorMode";
183 static constexpr std::array<std::pair<Enum, const char *>, 3> enumeratorsNames = {{
184 {Enum::COLOR_MODE_NOT_SET, "COLOR_MODE_NOT_SET"},
185 {Enum::COLOR_MODE_DARK, "COLOR_MODE_DARK"},
186 {Enum::COLOR_MODE_LIGHT, "COLOR_MODE_LIGHT"},
187 }};
188};
189
190template<>
192{
194 static constexpr const char *fullTypeName = "@kit.ShareKit.systemShare.SelectionMode";
195 static constexpr std::array<std::pair<Enum, const char *>, 2> enumeratorsNames = {{
196 {Enum::BATCH, "BATCH"},
197 {Enum::SINGLE, "SINGLE"},
198 }};
199};
200
201template<>
203{
205 static constexpr const char *fullTypeName = "@kit.ShareKit.systemShare.ShareAbilityType";
206 static constexpr std::array<std::pair<Enum, const char *>, 5> enumeratorsNames = {{
207 {Enum::COPY_TO_PASTEBOARD, "COPY_TO_PASTEBOARD"},
208 {Enum::PRINT, "PRINT"},
209 {Enum::SAVE_AS_FILE, "SAVE_AS_FILE"},
210 {Enum::SAVE_TO_MEDIA_ASSET, "SAVE_TO_MEDIA_ASSET"},
211 {Enum::SAVE_TO_SUPERHUB, "SAVE_TO_SUPERHUB"},
212 }};
213};
214
215template<>
217{
219 static constexpr const char *fullTypeName = "@kit.ShareKit.systemShare.SharePreviewMode";
220 static constexpr std::array<std::pair<Enum, const char *>, 2> enumeratorsNames = {{
221 {Enum::DEFAULT, "DEFAULT"},
222 {Enum::DETAIL, "DETAIL"},
223 }};
224};
225
226template<>
228{
230 static constexpr const char *fullTypeName = "@ohos.app.ability.AbilityConstant.WindowMode";
231 static constexpr std::array<std::pair<Enum, const char *>, 3> enumeratorsNames = {{
232 {Enum::WINDOW_MODE_FULLSCREEN, "WINDOW_MODE_FULLSCREEN"},
233 {Enum::WINDOW_MODE_SPLIT_PRIMARY, "WINDOW_MODE_SPLIT_PRIMARY"},
234 {Enum::WINDOW_MODE_SPLIT_SECONDARY, "WINDOW_MODE_SPLIT_SECONDARY"},
235 }};
236};
237
238template<>
240{
242 static constexpr const char *fullTypeName = "@ohos.app.ability.AbilityConstant.LaunchReason";
243 static constexpr std::array<std::pair<Enum, const char *>, 10> enumeratorsNames = {{
244 {Enum::APP_RECOVERY, "APP_RECOVERY"},
245 {Enum::AUTO_STARTUP, "AUTO_STARTUP"},
246 {Enum::CALL, "CALL"},
247 {Enum::CONTINUATION, "CONTINUATION"},
248 {Enum::INSIGHT_INTENT, "INSIGHT_INTENT"},
249 {Enum::PRELOAD, "PRELOAD"},
250 {Enum::PREPARE_CONTINUATION, "PREPARE_CONTINUATION"},
251 {Enum::SHARE, "SHARE"},
252 {Enum::START_ABILITY, "START_ABILITY"},
253 {Enum::UNKNOWN, "UNKNOWN"},
254 }};
255};
256
257template<>
259{
261 static constexpr const char *fullTypeName = "@ohos.app.ability.contextConstant.ProcessMode";
262 static constexpr std::array<std::pair<Enum, const char *>, 3> enumeratorsNames = {{
263 {Enum::ATTACH_TO_STATUS_BAR_ITEM, "ATTACH_TO_STATUS_BAR_ITEM"},
264 {Enum::NEW_PROCESS_ATTACH_TO_PARENT, "NEW_PROCESS_ATTACH_TO_PARENT"},
265 {Enum::NEW_PROCESS_ATTACH_TO_STATUS_BAR_ITEM, "NEW_PROCESS_ATTACH_TO_STATUS_BAR_ITEM"},
266 }};
267};
268
269template<>
271{
273 static constexpr const char *fullTypeName = "@ohos.app.ability.contextConstant.StartupVisibility";
274 static constexpr std::array<std::pair<Enum, const char *>, 2> enumeratorsNames = {{
275 {Enum::STARTUP_HIDE, "STARTUP_HIDE"},
276 {Enum::STARTUP_SHOW, "STARTUP_SHOW"},
277 }};
278};
279
280template<>
282{
284 static constexpr const char *fullTypeName = "@ohos.bundle.bundleManager.SupportWindowMode";
285 static constexpr std::array<std::pair<Enum, const char *>, 3> enumeratorsNames = {{
286 {Enum::FLOATING, "FLOATING"},
287 {Enum::FULL_SCREEN, "FULL_SCREEN"},
288 {Enum::SPLIT, "SPLIT"},
289 }};
290};
291
292template<>
294{
296 static constexpr const char *fullTypeName = "@ohos.window.AnimationType";
297 static constexpr std::array<std::pair<Enum, const char *>, 1> enumeratorsNames = {{
298 {Enum::FADE_IN_OUT, "FADE_IN_OUT"},
299 }};
300};
301
302}
303
304QT_END_NAMESPACE
305
306#endif
Combined button and popup list for selecting options.
std::shared_ptr< OperationStatus > startAbility(const Want &want, std::shared_ptr< StartOptions > options)
Starts an Ability for a given want and options; pass a null options to start without any start option...
void startNewAbilityInstance(QWidget *instanceWidget)
Starts another instance of the UIAbility used by the Qt app with specified widget inside.
void setAbilityInstanceDestroyEnabled(QWindow *instanceWindow, bool destroyEnabled)
Sets whether the Ability related with instanceWindow can be automatically destroyed by the system whe...
std::shared_ptr< OperationStatus > startAbilityByType(const QString &appType, const QJsonObject &wantParameters)
Starts an Ability for a given appType and wantParameters.
void startAppProcess(const QString &processId, const Want &requestWant, std::shared_ptr< StartOptions > options)
Starts application process for a given processId, requestWant and options; pass a null options to sta...
std::optional< QByteArray > tryGetOnContinueData(const Want &want)
Tries to get continuation / migration related data that was provided on the source device.
std::shared_ptr< OpenLinkOptions > createOpenLinkOptions()
enums::kit::ShareKit::systemShare::SelectionMode Enum
static constexpr std::array< std::pair< Enum, const char * >, 2 > enumeratorsNames
static constexpr std::array< std::pair< Enum, const char * >, 5 > enumeratorsNames
enums::kit::ShareKit::systemShare::ShareAbilityType Enum
enums::kit::ShareKit::systemShare::SharePreviewMode Enum
static constexpr std::array< std::pair< Enum, const char * >, 2 > enumeratorsNames
static constexpr std::array< std::pair< Enum, const char * >, 2 > enumeratorsNames
enums::ohos::app::ability::AbilityConstant::ContinueState Enum
static constexpr std::array< std::pair< Enum, const char * >, 10 > enumeratorsNames
enums::ohos::app::ability::AbilityConstant::LaunchReason Enum
static constexpr std::array< std::pair< Enum, const char * >, 3 > enumeratorsNames
enums::ohos::app::ability::AbilityConstant::OnContinueResult Enum
static constexpr std::array< std::pair< Enum, const char * >, 3 > enumeratorsNames
enums::ohos::app::ability::AbilityConstant::WindowMode Enum
static constexpr std::array< std::pair< Enum, const char * >, 3 > enumeratorsNames
enums::ohos::app::ability::ConfigurationConstant::ColorMode Enum
static constexpr std::array< std::pair< Enum, const char * >, 3 > enumeratorsNames
enums::ohos::app::ability::contextConstant::ProcessMode Enum
enums::ohos::app::ability::contextConstant::StartupVisibility Enum
static constexpr std::array< std::pair< Enum, const char * >, 2 > enumeratorsNames
static constexpr std::array< std::pair< Enum, const char * >, 3 > enumeratorsNames
enums::ohos::bundle::bundleManager::SupportWindowMode Enum
static constexpr std::array< std::pair< Enum, const char * >, 1 > enumeratorsNames