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
QtOhosAppKit Namespace Reference

Namespaces

namespace  Private
namespace  FileShare
 \inmodule QtOhosAppKit
namespace  Pasteboard
 \inmodule QtOhosAppKit
namespace  ShareKit
 \inmodule QtOhosAppKit
namespace  Window
 \inmodule QtOhosAppKit

Classes

class  OpenLinkOptions
class  OnContinueContext
 \inmodule QtOhosAppKit More...
struct  StartAbilityResult
class  AbilityContext
 \inmodule QtOhosAppKit More...
class  BundleInfo
 \inmodule QtOhosAppKit More...
class  AppContext
 \inmodule QtOhosAppKit More...
class  OperationStatus
 \inmodule QtOhosAppKit More...
class  WindowCreateParams
 \inmodule QtOhosAppKit More...
class  StartOptions
 \inmodule QtOhosAppKit More...
class  Want
 \inmodule QtOhosAppKit More...
class  WantInfo
 \variable QtOhosAppKit::Want::deviceId More...
struct  ElementName

Enumerations

enum class  WantFlag { AuthReadUriPermission = 1 << 0 , AuthWriteUriPermission = 1 << 1 , InstallOnDemand = 1 << 2 }

Functions

std::shared_ptr< OperationStatusstartAbility (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 options.
std::shared_ptr< OperationStatusstartAbilityByType (const QString &appType, const QJsonObject &wantParameters)
 Starts an Ability for a given appType and wantParameters.
void startNewAbilityInstance (QWidget *instanceWidget)
 Starts another instance of the UIAbility used by the Qt app with specified widget inside.
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 start without any start options.
void setAbilityInstanceDestroyEnabled (QWindow *instanceWindow, bool destroyEnabled)
 Sets whether the Ability related with instanceWindow can be automatically destroyed by the system when the user clicks on the window's "close" button.
std::optional< QByteArraytryGetOnContinueData (const Want &want)
 Tries to get continuation / migration related data that was provided on the source device.
std::shared_ptr< OpenLinkOptionscreateOpenLinkOptions ()
bool authorizeFilePath (QWindow *parentWindow, const QString &filePath)
std::shared_ptr< WindowCreateParamscreateWindowCreateParams ()
 Creates WindowCreateParams instance.
std::shared_ptr< StartOptionscreateStartOptions ()
 Creates StartOptions instance.
std::optional< double > tryGetNativeWindowId (QWindow *window)
std::optional< double > tryGetScreenDisplayId (QScreen *screen)

Enumeration Type Documentation

◆ WantFlag

enum class QtOhosAppKit::WantFlag
strong
Enumerator
AuthReadUriPermission 
AuthWriteUriPermission 
InstallOnDemand 

Definition at line 34 of file qohoswant_p.h.

Function Documentation

◆ authorizeFilePath()

bool QtOhosAppKit::authorizeFilePath ( QWindow * parentWindow,
const QString & filePath )

Definition at line 85 of file qohosfileutils.cpp.

◆ createOpenLinkOptions()

std::shared_ptr< OpenLinkOptions > QtOhosAppKit::createOpenLinkOptions ( )

Definition at line 1256 of file qohosabilitycontext.cpp.

◆ createStartOptions()

std::shared_ptr< StartOptions > QtOhosAppKit::createStartOptions ( )

Creates StartOptions instance.

Definition at line 527 of file qohosstartoptions.cpp.

◆ createWindowCreateParams()

std::shared_ptr< WindowCreateParams > QtOhosAppKit::createWindowCreateParams ( )

Creates WindowCreateParams instance.

Definition at line 517 of file qohosstartoptions.cpp.

◆ setAbilityInstanceDestroyEnabled()

void QtOhosAppKit::setAbilityInstanceDestroyEnabled ( QWindow * instanceWindow,
bool destroyEnabled )

Sets whether the Ability related with instanceWindow can be automatically destroyed by the system when the user clicks on the window's "close" button.

If destroyEnabled is true, the system destroys the Ability automatically (and Qt needs to adapt to this). If destroyEnabled = false, the window is not automatically destroyed, but instead standard Qt path for window close is triggered, i.e. QWindow::close().

By default, the flag is set to false.

See also
QtOhosAppKit::AbilityContext::setDestroyFromSystemEnabled()

Definition at line 1216 of file qohosabilitycontext.cpp.

◆ startAbility()

std::shared_ptr< OperationStatus > QtOhosAppKit::startAbility ( const Want & want,
std::shared_ptr< StartOptions > options = nullptr )

Starts an Ability for a given want and options; pass a null options to start without any start options.

See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/js-apis-inner-application-uiabilitycontext-V5#uiabilitycontextstartability-1} {Start Ability}.

Warning
Currently, operation status result is hardcoded as "successful" (even if ability were not started).

Definition at line 1161 of file qohosabilitycontext.cpp.

◆ startAbilityByType()

std::shared_ptr< OperationStatus > QtOhosAppKit::startAbilityByType ( const QString & appType,
const QJsonObject & wantParameters )

Starts an Ability for a given appType and wantParameters.

See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/js-apis-inner-application-uiabilitycontext-V5#uiabilitycontextstartabilitybytype11-1} {Start Ability}.

Returns
true on success

Definition at line 1176 of file qohosabilitycontext.cpp.

◆ startAppProcess()

void QtOhosAppKit::startAppProcess ( const QString & processId,
const Want & requestWant,
std::shared_ptr< StartOptions > options = nullptr )

Starts application process for a given processId, requestWant and options; pass a null options to start without any start options.

Definition at line 1198 of file qohosabilitycontext.cpp.

◆ startNewAbilityInstance()

void QtOhosAppKit::startNewAbilityInstance ( QWidget * instanceWidget)

Starts another instance of the UIAbility used by the Qt app with specified widget inside.

The caller should pass newly created QWidget instanceWidget, without any setting any parent, calling show() or winId() on it.

Definition at line 1187 of file qohosabilitycontext.cpp.

◆ tryGetNativeWindowId()

std::optional< double > QtOhosAppKit::tryGetNativeWindowId ( QWindow * window)

Definition at line 188 of file qohoswindowutils.cpp.

◆ tryGetOnContinueData()

std::optional< QByteArray > QtOhosAppKit::tryGetOnContinueData ( const Want & want)

Tries to get continuation / migration related data that was provided on the source device.

Returns an empty optional if no such data found. The data is expected to be stored in the want parameters. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-guides/app-continuation-guide} {Application Continuation}.

Definition at line 1229 of file qohosabilitycontext.cpp.

◆ tryGetScreenDisplayId()

std::optional< double > QtOhosAppKit::tryGetScreenDisplayId ( QScreen * screen)

Definition at line 197 of file qohoswindowutils.cpp.