psa: Moved harmattand code to Qt project with sync option
[feedingit] / FeedingIt-Sync / qml / SettingsPage.qml
1 import QtQuick 1.0
2 import com.nokia.meego 1.0
3
4 Page {
5     id: settingsPage
6     anchors.margins: UiConstants.DefaultMargin
7     anchors.fill: parent
8
9     Column {
10         width: parent.width
11         spacing: 15
12
13         SwitchSetting {
14             text: qsTr("Use Dark Theme")
15             checked: controller.getBooleanSetting("theme")
16
17             onSwitched: {
18                 controller.setBooleanSetting("theme", checked)
19                 theme.inverted = checked
20             }
21         }
22
23         SwitchSetting {
24             text: qsTr("Hide Read Feeds")
25             checked: controller.getBooleanSetting("hideReadFeeds")
26
27             onSwitched: {
28                 controller.setBooleanSetting("hideReadFeeds", checked)
29                 settings.hideReadFeeds = checked
30             }
31         }
32
33         SwitchSetting {
34             text: qsTr("Hide Read Articles")
35             checked: controller.getBooleanSetting("hideReadArticles")
36
37             onSwitched: {
38                 controller.setBooleanSetting("hideReadArticles", checked)
39                 settings.hideReadArticles = checked
40             }
41         }
42
43         SwitchSetting {
44             text: qsTr("Cache Images")
45             checked: controller.getBooleanSetting("imageCache")
46
47             onSwitched: {
48                 controller.setBooleanSetting("imageCache", checked)
49             }
50         }
51
52         Button {
53             text: "Automatic Updates"
54             onClicked: controller.openSettings()
55             anchors.horizontalCenter: parent.horizontalCenter
56         }
57
58 //        SwitchSetting {
59 //            text: qsTr("Auto-update every 6 hours (requires application running)")
60 //            checked: controller.getBooleanSetting("autoupdate")
61
62 //            onSwitched: {
63 //                controller.setBooleanSetting("autoupdate", checked)
64 //                settings.autoUpdateEnabled = checked
65 //            }
66 //        }
67
68         SliderSetting {
69             text: qsTr("Article Listing Font Size")
70             value: settings.articleListingTextSize
71             onValueChanged: {
72                 controller.setIntSetting("fontSize", value)
73                 settings.articleListingTextSize = value
74
75             }
76         }
77
78         SliderSetting {
79             text: qsTr("Article Font Size")
80             value: settings.webviewFontSize
81             onValueChanged: {
82                 controller.setIntSetting("artFontSize", value)
83                 settings.webviewFontSize = value
84             }
85          }
86     }
87
88 }