Launcher.qml 986 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import QtQuick 1.1;
  2. import com.nokia.meego 1.0;
  3. Page {
  4. id: launcherPage;
  5. anchors.margins: rootWin.pageMargin;
  6. ListView {
  7. id: launcherView
  8. height: parent.height;
  9. width: parent.width;
  10. spacing: 10;
  11. model: appsModel;
  12. delegate: appDelegate;
  13. cacheBuffer: 100;
  14. }
  15. Component {
  16. id: appDelegate;
  17. Item {
  18. height: appIcon.height;
  19. width: launcherView.width;
  20. Image {
  21. id: appIcon;
  22. anchors.left: parent.left;
  23. smooth: true;
  24. source: model.icon;
  25. height: 80;
  26. width: 80;
  27. }
  28. Label {
  29. id: appName;
  30. height: appIcon.height;
  31. width: parent.width - appIcon.width - 20 - 32;
  32. font.bold: true;
  33. font.pixelSize: 20;
  34. anchors.top: appIcon.top;
  35. anchors.left: appIcon.right;
  36. anchors.leftMargin: 16;
  37. text: model.name;
  38. verticalAlignment: Text.AlignVCenter;
  39. }
  40. MouseArea {
  41. anchors.fill: parent;
  42. z: -1;
  43. onClicked: {
  44. rootWin.launch(model.wgtpath, model.path, model.startfile);
  45. }
  46. }
  47. }
  48. }
  49. }