4 // anchors.fill: parent;
5 width: parent.width; height: parent.height;
6 //anchors.top: parent.top; anchors.bottom: parent.bottom
7 property bool inEditMode: false
8 signal categoryClicked(string cat)
11 //categories.reload();
12 categories.xml = controller.getCategoryXml()
13 //console.log(controller.getCategoryXml())
17 id: categoryList; model: categories; delegate: categoryDelegate; z: 6;
18 cacheBuffer: 100; width: parent.width; height: parent.height;
25 xml: controller.getCategoryXml()
26 query: "/xml/category"
28 XmlRole { name: "title"; query: "catname/string()" }
29 XmlRole { name: "catid"; query: "catid/string()"; isKey: true }
30 XmlRole { name: "unread"; query: "unread/string()" }
38 id: wrapper; width: wrapper.ListView.view.width; height: 86
42 Rectangle { color: settings.backColour; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
44 // x: 6; y: 4; width: 77; height: parent.height - 9; color: "white"; smooth: true
49 width: wrapper.ListView.view.width /*- 95;*/
54 Text { text: title; color: settings.mainTextColour; width: parent.width; font.bold: true;
55 //height: parent.height
56 elide: Text.ElideRight; style: Text.Raised;
57 styleColor: settings.mainShadowColour;
58 font.pointSize: settings.mainTextSize
59 verticalAlignment: Text.AlignVCenter;
62 text: qsTr("%1 unread items").arg(unread);
63 color: (unread=="0") ? settings.mainTextColour : settings.secondaryTextColour;
64 width: parent.width; font.bold: false;
65 elide: Text.ElideRight;
66 //style: Text.Raised; styleColor: settings.mainShadowColour;
67 font.pointSize: settings.secondaryTextSize
69 //Text { text: feedname; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
72 // x: wrapper.ListView.view.width - 128; y: 12
73 // height: 58; width: 58;
74 // //anchors.horizontalCenter: parent.horizontalCenter;
75 // Image { source: "common/images/wmEditIcon.png" }
77 // anchors.fill: parent; onClicked: { container.categoryEdit(catname, catid); }
79 // visible: inEditMode
82 // x: wrapper.ListView.view.width - 64; y: 12
83 // height: 58; width: 58;
84 // //anchors.horizontalCenter: parent.horizontalCenter;
85 // Image { source: "common/images/delete.png" }
87 // anchors.fill: parent; onClicked: { container.categoryDeleted(catid); }
89 // visible: inEditMode
93 enabled: !inEditMode; anchors.fill: wrapper;
94 onClicked: { categoryClicked(catid); }
96 window.longPressCategory(catid)
99 Component.onCompleted: {
100 if (categories.count == 1) {
101 categoryClicked(catid)