如何得到QML package的详细API接口
来源:互联网 发布:python 硬件开发 编辑:程序博客网 时间:2024/05/29 17:44
尽管我们的developer网站有丰富的API介绍,但是,有些API的介绍可能并不全,有些API也在不断地演进中。为了得到更详细的API,我们可以通过如下的命令来得到更加详细的信息。比如我们对“SingleDownload”API来得到更加多的信息。
$qmlplugindump Ubuntu.DownloadManager 0.1
显示的结果如下:
import QtQuick.tooling 1.1
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
// 'qmlplugindump Ubuntu.DownloadManager 0.1'
Module {
Component {
name: "Ubuntu::DownloadManager::DownloadError"
prototype: "QObject"
exports: ["Error 0.1"]
exportMetaObjectRevisions: [0]
Property { name: "type"; type: "string"; isReadonly: true }
Property { name: "message"; type: "string"; isReadonly: true }
}
Component {
name: "Ubuntu::DownloadManager::SingleDownload"
prototype: "QObject"
exports: ["SingleDownload 0.1"]
exportMetaObjectRevisions: [0]
Property { name: "autoStart"; type: "bool" }
Property { name: "errorMessage"; type: "string"; isReadonly: true }
Property { name: "isCompleted"; type: "bool"; isReadonly: true }
Property { name: "downloadInProgress"; type: "bool"; isReadonly: true }
Property { name: "allowMobileDownload"; type: "bool" }
Property { name: "throttle"; type: "qulonglong" }
Property { name: "progress"; type: "int"; isReadonly: true }
Property { name: "downloading"; type: "bool"; isReadonly: true }
Property { name: "downloadId"; type: "string"; isReadonly: true }
Property { name: "headers"; type: "QVariantMap" }
Signal {
name: "canceled"
Parameter { name: "success"; type: "bool" }
}
Signal {
name: "finished"
Parameter { name: "path"; type: "string" }
}
Signal {
name: "paused"
Parameter { name: "success"; type: "bool" }
}
Signal {
name: "processing"
Parameter { name: "path"; type: "string" }
}
Signal {
name: "progressReceived"
Parameter { name: "received"; type: "qulonglong" }
Parameter { name: "total"; type: "qulonglong" }
}
Signal {
name: "resumed"
Parameter { name: "success"; type: "bool" }
}
Signal {
name: "started"
Parameter { name: "success"; type: "bool" }
}
Signal {
name: "errorFound"
Parameter { name: "error"; type: "DownloadError&" }
}
Signal { name: "errorChanged" }
Method {
name: "registerError"
Parameter { name: "error"; type: "Error"; isPointer: true }
}
Method {
name: "bindDownload"
Parameter { name: "download"; type: "Download"; isPointer: true }
}
Method {
name: "unbindDownload"
Parameter { name: "download"; type: "Download"; isPointer: true }
}
Method {
name: "onFinished"
Parameter { name: "path"; type: "string" }
}
Method {
name: "onProgress"
Parameter { name: "received"; type: "qulonglong" }
Parameter { name: "total"; type: "qulonglong" }
}
Method {
name: "onPaused"
Parameter { name: "wasPaused"; type: "bool" }
}
Method {
name: "onResumed"
Parameter { name: "wasResumed"; type: "bool" }
}
Method {
name: "onStarted"
Parameter { name: "wasStarted"; type: "bool" }
}
Method {
name: "onCanceled"
Parameter { name: "wasCanceled"; type: "bool" }
}
Method { name: "start" }
Method { name: "pause" }
Method { name: "resume" }
Method { name: "cancel" }
Method {
name: "download"
Parameter { name: "url"; type: "string" }
}
}
Component {
name: "Ubuntu::DownloadManager::UbuntuDownloadManager"
prototype: "QObject"
exports: ["DownloadManager 0.1"]
exportMetaObjectRevisions: [0]
Property { name: "autoStart"; type: "bool" }
Property { name: "cleanDownloads"; type: "bool" }
Property { name: "errorMessage"; type: "string"; isReadonly: true }
Property { name: "downloads"; type: "QVariantList"; isReadonly: true }
Signal { name: "errorChanged" }
Method {
name: "download"
Parameter { name: "url"; type: "string" }
}
}
}
我们通过使用“finished”信号可以得到下载完成的事件而进行分别的处理!
另外一个例子(Push notification)
liuxg@liuxg:~$ qmlplugindump Ubuntu.PushNotifications 0.1import QtQuick.tooling 1.1// This file describes the plugin-supplied types contained in the library.// It is used for QML tooling purposes only.//// This file was auto-generated by:// 'qmlplugindump Ubuntu.PushNotifications 0.1'Module { Component { name: "PushClient" prototype: "QObject" exports: ["PushClient 0.1"] exportMetaObjectRevisions: [0] Property { name: "appId"; type: "string" } Property { name: "token"; type: "string"; isReadonly: true } Property { name: "notifications"; type: "QStringList"; isReadonly: true } Property { name: "status"; type: "string"; isReadonly: true } Property { name: "persistent"; type: "QStringList"; isReadonly: true } Property { name: "count"; type: "int" } Signal { name: "countChanged" Parameter { type: "int" } } Signal { name: "notificationsChanged" Parameter { type: "QStringList" } } Signal { name: "persistentChanged" Parameter { type: "QStringList" } } Signal { name: "appIdChanged" Parameter { type: "string" } } Signal { name: "error" Parameter { type: "string" } } Signal { name: "tokenChanged" Parameter { type: "string" } } Signal { name: "statusChanged" Parameter { type: "string" } } Method { name: "getNotifications" } Method { name: "notified" Parameter { name: "appId"; type: "string" } } Method { name: "emitError" } Method { name: "clearPersistent" Parameter { name: "tags"; type: "QStringList" } } }}
- 如何得到QML package的详细API接口
- 如何得到QML中的TextArea的slider的位置信息
- 如何使用 Lotus Notes C API 接口得到 DDM 的事件信息
- 如何在QML应用中得到一个Item的所有属性,信号及方法
- 如何得到JavaVM,JNIEnv接口
- 如何得到JavaVM,JNIEnv接口
- 如何得到包含隐藏API的Android类库
- 如何得到包含隐藏API的Android类库
- 如何得到包含隐藏API的Android类库
- 如何得到网页中的Frame的HTML接口
- 已知IE窗口的句柄,如何由此得到IHTMLdocument2接口?
- 如何优雅的“编写”api接口文档
- 得到最新PEAR Package的方法
- android API 的核心package
- Qt Qml的console api有哪些
- Package.com.google.gson API 详细 学习(2)
- 如何在QML中使用camera API来拍照
- 如何从IHTMLDOMNode 得到 IHTMLElement 接口
- Face Recognition 主要方法
- 各种排序
- 两级缓存框架 J2Cache 的简单实验
- java中的==、equals和hashCode区别
- C++中的头文件和源文件
- 如何得到QML package的详细API接口
- android:paddingLeft与android:layout_marginLeft的区别
- 谷歌重设SSL警告 植入新版Chrome浏览器
- win8 64位 iis8 安装.net1.1
- 牛腩新闻发布系统--阶段总结(一)
- CocoaPods - 第三方类库管理工具
- DeepLearning tutorial(4)CNN卷积神经网络原理简介+代码详解
- java堆和栈
- Linux vmstat命令实战详解