2 import com.nokia.meego 1.0
5 // anchors.fill: parent;
6 width: parent.width; height: parent.height;
7 //anchors.top: parent.top; anchors.bottom: parent.bottom
8 property bool inEditMode: false
9 signal categoryClicked(string cat)
12 //categories.reload();
13 categories.xml = controller.getCategoryXml()
14 //console.log(controller.getCategoryXml())
18 id: categoryList; model: categories; delegate: categoryDelegate; z: 6;
19 cacheBuffer: 100; width: parent.width;
20 height: updateBarCategories.visible? parent.height-updateBarCategories.height : parent.height;
22 /*height: parent.height;*/
26 id: updateBarCategories
29 value: window.updateProgressValue
30 visible: window.isUpdateInProgress
31 anchors.bottom: parent.bottom
39 xml: controller.getCategoryXml()
40 query: "/xml/category"
42 XmlRole { name: "title"; query: "catname/string()" }
43 XmlRole { name: "catid"; query: "catid/string()"; isKey: true }
44 XmlRole { name: "unread"; query: "unread/string()" }
52 id: wrapper; width: wrapper.ListView.view.width; height: 86
56 Rectangle { color: settings.backColour; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
58 // x: 6; y: 4; width: 77; height: parent.height - 9; color: "white"; smooth: true
63 width: wrapper.ListView.view.width /*- 95;*/
68 Text { text: title; color: settings.mainTextColour; width: parent.width; font.bold: true;
69 //height: parent.height
70 elide: Text.ElideRight; style: Text.Raised;
71 styleColor: settings.mainShadowColour;
72 font.pointSize: settings.mainTextSize
73 verticalAlignment: Text.AlignVCenter;
76 text: qsTr("%1 unread items").arg(unread);
77 color: (unread=="0") ? settings.mainTextColour : settings.secondaryTextColour;
78 width: parent.width; font.bold: false;
79 elide: Text.ElideRight;
80 //style: Text.Raised; styleColor: settings.mainShadowColour;
81 font.pointSize: settings.secondaryTextSize
83 //Text { text: feedname; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
86 // x: wrapper.ListView.view.width - 128; y: 12
87 // height: 58; width: 58;
88 // //anchors.horizontalCenter: parent.horizontalCenter;
89 // Image { source: "common/images/wmEditIcon.png" }
91 // anchors.fill: parent; onClicked: { container.categoryEdit(catname, catid); }
93 // visible: inEditMode
96 // x: wrapper.ListView.view.width - 64; y: 12
97 // height: 58; width: 58;
98 // //anchors.horizontalCenter: parent.horizontalCenter;
99 // Image { source: "common/images/delete.png" }
101 // anchors.fill: parent; onClicked: { container.categoryDeleted(catid); }
103 // visible: inEditMode
107 enabled: !inEditMode; anchors.fill: wrapper;
108 onClicked: { categoryClicked(catid); }
110 window.longPressCategory(catid)
113 Component.onCompleted: {
114 if (categories.count == 1) {
115 categoryClicked(catid)