C

QtAndroidAppsUtils::QAppItem Class

class QtAndroidAppsUtils::QAppItem

A basic Android app element. More...

Header: #include <QAppItem>
CMake: find_package(Qt6 REQUIRED COMPONENTS AndroidAutomotiveBase)
target_link_libraries(mytarget PRIVATE Qt6::AndroidAutomotiveBase)
Inherits: QObject

Public Functions

QAppItem(const QString &packageName, const QString &appName, const QImage &appIcon, bool isSystemApp, QObject *parent = nullptr)
(since QtAndroidAutomotive 6.5) QAppItem(const QString &packageName, const QString &appName, const QImage &appIcon, bool isSystemApp, int uid, QObject *parent = nullptr)
virtual ~QAppItem() override
QImage appIcon() const
const QString appIconString() const
QString appName() const
bool isSystemApp() const
QString packageName() const
(since QtAndroidAutomotive 6.5) int uid() const

Detailed Description

Member Function Documentation

QAppItem::QAppItem(const QString &packageName, const QString &appName, const QImage &appIcon, bool isSystemApp, QObject *parent = nullptr)

Creates an Android app element with the package name packageName, human readable name appName, and an icon appIcon. The isSystemApp argument distinguishes between a user and a system app. The parent argument takes an optional QObject.

[since QtAndroidAutomotive 6.5] QAppItem::QAppItem(const QString &packageName, const QString &appName, const QImage &appIcon, bool isSystemApp, int uid, QObject *parent = nullptr)

Creates an Android app element with the package name packageName, human readable name appName, and an icon appIcon. The isSystemApp argument distinguishes between a user and a system app. The uid argument is the User ID of the application. The parent argument takes an optional QObject.

This function was introduced in QtAndroidAutomotive 6.5.

[override virtual noexcept] QAppItem::~QAppItem()

The class destructor.

QImage QAppItem::appIcon() const

Returns the app icon as a QImage.

const QString QAppItem::appIconString() const

Returns the app icon as a Uri encoded data QString.

Note: Getter function for property appIcon.

QString QAppItem::appName() const

Returns the human-readable app name.

Note: Getter function for property appName.

bool QAppItem::isSystemApp() const

Returns true if the app is a system app, false otherwise.

Note: Getter function for property isSystemApp.

QString QAppItem::packageName() const

Returns the app package name.

Note: Getter function for property packageName.

[since QtAndroidAutomotive 6.5] int QAppItem::uid() const

Returns the User ID for this app.

Note: Getter function for property uid.

This function was introduced in QtAndroidAutomotive 6.5.

Available under certain Qt licenses.
Find out more.