~qqworini/ubuntu-rssreader-app/alpha-3

« back to all changes in this revision

Viewing changes to rssview.qml

  • Committer: Tarmac
  • Author(s): Roman Shchekin
  • Date: 2013-06-18 09:03:07 UTC
  • mfrom: (12.1.3 ubuntu-rssreader-app)
  • Revision ID: tarmac-20130618090307-rzpea80zfb4u7iz1
Alpha version. ListView used as main view, logic based on
databasemodule_v2.js.

Approved by Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    PageStack {
67
67
        id: pageStack
68
68
        anchors.fill: parent
69
 
        Component.onCompleted:
70
 
        {
71
 
            push(tabs);                      // use tabs as first page
72
 
//            pageStack.__showHeader = false ; // hide the pageStack header
73
 
        }
 
69
//        Component.onCompleted:
 
70
//        {
 
71
//            push(tabs);                      // use tabs as first page
 
72
////            pageStack.__showHeader = false ; // hide the pageStack header
 
73
//        }
74
74
 
75
75
        Tabs {
76
76
            id: tabs
80
80
            Tab {
81
81
                objectName: "Tab1"
82
82
 
83
 
                title: i18n.tr("RSS Reader")
 
83
                title: i18n.tr("RSS2 Reader")
84
84
                clip: true
85
85
 
86
86
                                                   // main page for RSS feeds viewing
87
 
                page:
88
 
                    Page {
89
 
                    id: page_mosaic
90
 
                    anchors.margins: units.gu(2)
91
 
//                    visible: false
92
 
                    //                clip: true
93
 
 
94
 
                    tools: ToolbarActions {
95
 
                        Action {
96
 
                            objectName: "action"
97
 
 
98
 
                            iconSource: Qt.resolvedUrl("avatar.png")
99
 
                            text: i18n.tr("Change mode")
100
 
 
101
 
                            onTriggered: {
102
 
                                isListMode = isListMode ? false : true ;    // switch mode for mosaic or list
103
 
                            }
104
 
                        }
105
 
                    }
106
 
 
107
 
                    // ListView for RSS feeds
108
 
                    ListView
109
 
                    {
110
 
                        id: feed_view
111
 
                        //                    anchors.left: parent.left
112
 
                        //                    anchors.leftMargin: units.gu(1)
113
 
                        anchors.fill: parent
114
 
                        cacheBuffer: 90
115
 
                        spacing: units.gu(2)
116
 
                        contentHeight: isListMode ? units.gu(7) * count : units.gu(37) * count
117
 
                        model: rssFeeds
118
 
                        delegate: rss_feed_delegate
119
 
                        //                    clip: true
120
 
                    }
 
87
                page: FeedListPage {
 
88
 
 
89
                }
 
90
//                    Page {
 
91
//                    id: page_mosaic
 
92
//                    anchors.margins: units.gu(2)
 
93
////                    visible: false
 
94
//                    //                clip: true
 
95
 
 
96
//                    tools: ToolbarActions {
 
97
//                        Action {
 
98
//                            objectName: "action"
 
99
 
 
100
//                            iconSource: Qt.resolvedUrl("avatar.png")
 
101
//                            text: i18n.tr("Change mode")
 
102
 
 
103
//                            onTriggered: {
 
104
//                                isListMode = isListMode ? false : true ;    // switch mode for mosaic or list
 
105
//                            }
 
106
//                        }
 
107
//                    }
 
108
 
 
109
//                    // ListView for RSS feeds
 
110
//                    ListView
 
111
//                    {
 
112
//                        id: feed_view
 
113
//                        //                    anchors.left: parent.left
 
114
//                        //                    anchors.leftMargin: units.gu(1)
 
115
//                        anchors.fill: parent
 
116
//                        cacheBuffer: 90
 
117
//                        spacing: units.gu(2)
 
118
//                        contentHeight: isListMode ? units.gu(7) * count : units.gu(37) * count
 
119
//                        model: rssFeeds
 
120
//                        delegate: rss_feed_delegate
 
121
//                        //                    clip: true
 
122
//                    }
121
123
                }
122
124
 
123
125
            }
154
156
//                            }
155
157
//                        }
156
158
//                    }
157
 
        }
 
159
//        }
158
160
 
159
161
        // independent page for viewing one RSS feed
160
 
        RssFeedPage
161
 
        {
162
 
            id: feed_page
163
 
            visible: false
164
 
        }
 
162
//        RssFeedPage
 
163
//        {
 
164
//            id: feed_page
 
165
//            visible: false
 
166
//        }
165
167
    }
166
168
 
167
169
//    Component