Adding wip version for meego harmattan
[feedingit] / psa_harmattan / feedingit / deb_dist / feedingit-0.1.0 / debian / feedingit / usr / share / feedingit / qml / common / Menu.qml
1 import Qt 4.7
2
3 Item {
4 //    anchors.fill: parent;
5     width: 300; //height: 0;
6     //anchors.top: parent.top; anchors.bottom: parent.bottom
7     y: -parent.height
8
9     function getConfig() {
10         config.hideReadFeeds = controller.getConfig("hideReadFeeds");
11         config.hideReadArticles = controller.getConfig("hideReadArticles");
12
13     }
14
15     Switch {
16         id: hideReadFeedsSwitch;
17         text: qsTr("Hide Read Feeds");
18         value: config.hideReadFeeds
19         onClicked: config.hideReadFeeds = (config.hideReadFeeds == "False") ? "True" : "False"
20     }
21
22     Switch {
23         id: hideReadArticlesSwitch;
24         text: qsTr("Hide Read Articles");
25         value: config.hideReadArticles
26         onClicked: config.hideReadArticles = (config.hideReadArticles == "False") ? "True" : "False"
27         anchors.top: hideReadFeedsSwitch.bottom
28     }
29
30     Switch {
31         id: lockRotation;
32         text: qsTr("Lock Rotation");
33         value: container.lockRotation ? "True" : "False"
34         onClicked: { container.lockRotation=!container.lockRotation;
35             container.selectedOrientation = (container.lockRotation) ? container.activeOrientation : Orientation.UnknownOrientation }
36         anchors.top: hideReadArticlesSwitch.bottom
37     }
38
39     Switch {
40         id: editMode;
41         text: qsTr("Enter Edit Mode");
42         value: container.editMode ? "True" : "False"
43         onClicked: { container.editMode=!container.editMode; }
44         anchors.top: lockRotation.bottom
45     }
46
47     Rectangle {
48         id: closeButton
49         height: 50;
50         gradient: Gradient {
51             GradientStop {
52                 position: 0.00;
53                 color: "#343434";
54             }
55             GradientStop {
56                 position: 1.00;
57                 color: "#ffffff";
58             }
59         }
60         radius: 10;
61         width:  parent.width
62         anchors.top: editMode.bottom
63
64         MouseArea {
65             id: mouseRegion
66             anchors.fill: closeButton
67             onClicked: { config.isShown = false }
68         }
69     }
70
71 //    ListView {
72 //        id: configList; model: configs; delegate: configDelegate; z: 6;
73 //        cacheBuffer: 100; width: parent.width; height: parent.height;
74 //    }
75
76 //    XmlListModel {
77
78 //        id: configs
79
80 //        //source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+tags+"&" : "")+"format=rss2"
81 //        //source: "/home/ymarcoz/feedlist.xml"
82 //        source: "http://localhost:8000/config"
83 //        query: "/xml/config"
84 //        //namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"
85
86 //        XmlRole { name: "hideReadFeeds"; query: "hideReadFeeds/string()" }
87 //        XmlRole { name: "hideReadArticles"; query: "hideReadArticles/string()" }
88 //        //XmlRole { name: "catid"; query: "catid/string()"; isKey: true }
89
90 //    }
91
92 //    Component {
93 //        id: configDelegate
94
95 //        Item {
96
97 //            id: wrapper; width: wrapper.ListView.view.width; height: 86
98 //            Item {
99 //                id: moveMe
100 //                height: parent.height
101 //                Rectangle { color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
102 //                Rectangle {
103 //                    x: 6; y: 4; width: 77; height: parent.height - 9; color: "white"; smooth: true
104
105 //                }
106 //                Column {
107 //                    x: 92; width: wrapper.ListView.view.width - 95; y: 15; spacing: 2
108 //                    Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" }
109 //                    //Text { text: feedname; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
110 //                }
111 //            }
112 //            MouseArea { anchors.fill: wrapper; onClicked: { container.categoryClicked(catid); } }
113 //        }
114 //    }
115
116     Component.onCompleted: getConfig();
117 }