SHOW:
|
|
- or go back to the newest paste.
| 1 | [nemo@localhost test1]$ cat pages/ServiceDetail.qml | |
| 2 | import QtQuick 2.0 | |
| 3 | import Sailfish.Silica 1.0 | |
| 4 | ||
| 5 | // Just a simple example to demo both property binding and doing something via pulley menu action | |
| 6 | // to provide a sample of Sailfish-specific UI testing | |
| 7 | Page {
| |
| 8 | id: serviceDetailPage | |
| 9 | property variant item: null | |
| 10 | SilicaFlickable {
| |
| 11 | - | Row {
|
| 11 | + | Column {
|
| 12 | - | spacing: Theme.paddingSmall |
| 12 | + | |
| 13 | - | height: serviceDetailTitle.height |
| 13 | + | |
| 14 | title: item.service + " service" | |
| 15 | } | |
| 16 | TextSwitch {
| |
| 17 | id: serviceDetailStatus | |
| 18 | text: ( item.status == 1 ? "started" : "stopped" ) | |
| 19 | - | Row {
|
| 19 | + | |
| 20 | - | spacing: Theme.paddingSmall |
| 20 | + | |
| 21 | - | height: serviceDetailStatus.height |
| 21 | + | |
| 22 | } | |
| 23 | } | |
| 24 | TextSwitch {
| |
| 25 | id: serviceDetailEnabled | |
| 26 | text: ( item.enabled == 1 ? "enabled" : "disabled" ) | |
| 27 | checked: ( item.enabled == 1 ) | |
| 28 | onCheckedChanged: {
| |
| 29 | description=(checked ? "enabled" : "disabled") | |
| 30 | } | |
| 31 | - | Row {
|
| 31 | + | |
| 32 | - | spacing: Theme.paddingSmall |
| 32 | + | |
| 33 | - | height: serviceDetailEnabled.height |
| 33 | + | |
| 34 | text: ( item.masked == 1 ? "masked" : "unmasked" ) | |
| 35 | checked: ( item.masked == 1 ) | |
| 36 | onCheckedChanged: {
| |
| 37 | description=(checked ? "masked" : "unmasked") | |
| 38 | } | |
| 39 | } | |
| 40 | Button {
| |
| 41 | id: serviceDetailLog | |
| 42 | text: "log entries" | |
| 43 | - | Row {
|
| 43 | + | |
| 44 | - | spacing: Theme.paddingSmall |
| 44 | + | |
| 45 | - | height: serviceDetailMasked.height |
| 45 | + | |
| 46 | } |