Editing Quick Widgets
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision |
Your text |
Line 19: |
Line 19: |
| | | |
| == Basic Examples == | | == Basic Examples == |
- |
| |
- | === Application Launcher Button ===
| |
- |
| |
- | <source lang="javascript">
| |
- | import QtQuick 1.0
| |
- | import quickwidgets 1.0
| |
- |
| |
- | Rectangle {
| |
- | // Customize to your fancy
| |
- | property string buttonImage: "/usr/share/icons/hicolor/64x64/hildon/general_email.png"
| |
- | property string appName: "modest"
| |
- | color: "#552a2a2a" // optionally "transparent"
| |
- | radius: 5
| |
- | property int imagePadding: 5
| |
- |
| |
- | width: childrenRect.width+imagePadding
| |
- | height: childrenRect.height+imagePadding
| |
- | id: container;
| |
- |
| |
- | Image {
| |
- | anchors.centerIn: parent
| |
- | id: play
| |
- | smooth: true
| |
- | source: buttonImage
| |
- | MouseArea {
| |
- | id: ma
| |
- | anchors.fill: parent
| |
- | onClicked: {
| |
- | anim.running = true;
| |
- | dbus.run()
| |
- | }
| |
- | }
| |
- | SequentialAnimation {
| |
- | id: anim
| |
- | PropertyAnimation { target: play; property: "scale"; duration: 150; to: 0.9 }
| |
- | PropertyAnimation { target: play; property: "scale"; duration: 100; to: 1.0 }
| |
- | }
| |
- | }
| |
- | Process {
| |
- | id: dbus
| |
- | command: "dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr \
| |
- | /com/nokia/HildonDesktop/AppMgr \
| |
- | com.nokia.HildonDesktop.AppMgr.LaunchApplication string:\""+appName+"\""
| |
- |
| |
- | onCompleted: {}
| |
- | onFailed: {}
| |
- | }
| |
- | }
| |
- | </source>
| |
| | | |
| === Web Browser widget === | | === Web Browser widget === |
Learn more about Contributing to the wiki.