Advertisement
Guest User

Untitled

a guest
Jan 19th, 2014
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. Column {
  12. PageHeader {
  13. id: serviceDetailTitle
  14. title: item.service + " service"
  15. }
  16. TextSwitch {
  17. id: serviceDetailStatus
  18. text: ( item.status == 1 ? "started" : "stopped" )
  19. checked: ( item.status == 1 )
  20. onCheckedChanged: {
  21. description=(checked ? "started" : "stopped")
  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. }
  32. TextSwitch {
  33. id: serviceDetailMasked
  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. }
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement