Advertisement
Guest User

ServiceList.qml

a guest
Jan 19th, 2014
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. [nemo@localhost test1]$ cat pages/ServiceList.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: serviceListPage
  9. SilicaListView {
  10. id: serviceListView
  11. width: serviceListPage.width
  12. height: serviceListPage.height
  13. model: serviceModel
  14. delegate: ListItem {
  15. width: ListView.view.width
  16. height: serviceListRow.height
  17. onClicked: {
  18. pageStack.push(serviceDetail, serviceModel.get(index))
  19. }
  20. Row {
  21. id: serviceListRow
  22. height: serviceListSwitch.height
  23. spacing: Theme.paddingSmall
  24. TextSwitch {
  25. id: serviceListSwitch
  26. text: service
  27. checked: ( status == 1 )
  28. description: ( status == 1 ? "started" : "stopped" )
  29. onCheckedChanged: {
  30. description=(checked ? "started" : "stopped")
  31. }
  32. }
  33. }
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement