C
QAndroidIntentInfo类
一个用于保存intents信息的工具类。更多...
| 头文件 | #include <QAndroidIntentInfo> |
| CMake | find_package(Qt6 REQUIRED COMPONENTS AndroidAutomotiveBase)target_link_libraries(mytarget PRIVATE Qt6::AndroidAutomotiveBase) |
| 自 | QtAndroidAutomotive 6.5 |
| 在QML中 | androidIntentInfo |
属性
|
|
公共函数
| QAndroidIntentInfo() | |
| QAndroidIntentInfo(const QAndroidIntentInfo &other) | |
| QAndroidIntentInfo(QAndroidIntentInfo &&other) | |
| virtual | ~QAndroidIntentInfo() |
| QString | action() const |
| QStringList | categories() const |
| QString | className() const |
| QString | data() const |
| QVariantMap | extras() const |
| QString | packageName() const |
| void | setAction(const QString &action) |
| void | setCategories(const QStringList &categories) |
| void | setClassName(const QString &className) |
| void | setData(const QString &newData) |
| void | setExtras(const QVariantMap &extras) |
| void | setPackageName(const QString &packageName) |
| QAndroidIntentInfo & | operator=(QAndroidIntentInfo &&other) |
| QAndroidIntentInfo & | operator=(const QAndroidIntentInfo &other) |
详细描述
QAndroidIntentInfo由QAndroidBroadcastTransmitter和QAndroidBroadcastReceiver用于发送和接收广播intents信息。此类提供了由Android Intents提供的API子集。
另请参阅QAndroidBroadcastReceiver::received和QAndroidBroadcastTransmitter::sendBroadcast。
属性文档
action : QString
此属性包含intents的动作。
访问函数
| QString | action() const |
| void | setAction(const QString &action) |
categories : QStringList
该属性存储了这个意图的分类。
访问函数
| QStringList | categories() const |
| void | setCategories(const QStringList &categories) |
className : QString
该属性存储了这个意图的类名。
访问函数
| QString | className() const |
| void | setClassName(const QString &className) |
data : QString
该属性存储了这个意图的数据。
访问函数
| QString | data() const |
| void | setData(const QString &newData) |
extras : QVariantMap
该属性存储了这个意图的额外信息。
访问函数
| QVariantMap | extras() const |
| void | setExtras(const QVariantMap &extras) |
packageName : QString
该属性存储了这个意图的包名。
访问函数
| QString | packageName() const |
| void | setPackageName(const QString &packageName) |
成员函数文档
QAndroidIntentInfo::QAndroidIntentInfo()
默认构造函数
QAndroidIntentInfo::QAndroidIntentInfo(const QAndroidIntentInfo &other)
从other中复制构造了一个QAndroidIntentInfo的实例。
QAndroidIntentInfo::QAndroidIntentInfo(QAndroidIntentInfo &&other)
通过从other中移动操作构建了一个新的QAndroidIntentInfo实例。
[虚拟 noexcept] QAndroidIntentInfo::~QAndroidIntentInfo()
销毁这个QAndroidIntentInfo的实例。
[noexcept] QAndroidIntentInfo &QAndroidIntentInfo::operator=(QAndroidIntentInfo &&other)
将other移动赋值到这个QAndroidIntentInfo。
QAndroidIntentInfo &QAndroidIntentInfo::operator=(const QAndroidIntentInfo &other)
将other赋值到这个QAndroidIntentInfo,并返回对该QAndroidIntentInfo的引用。
在特定的Qt许可证下使用。
了解更多信息。