Merge lp:~dragly/ubuntu-rssreader-app/initial-design into lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk

Proposed by Svenn-Arne Dragly
Status: Merged
Approved by: Joey Chan
Approved revision: 9
Merged at revision: 6
Proposed branch: lp:~dragly/ubuntu-rssreader-app/initial-design
Merge into: lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk
Diff against target: 606 lines (+242/-135)
9 files modified
EntryListPage.qml (+12/-28)
EntryListTab.qml (+12/-0)
FeedListPage.qml (+15/-9)
SingleEntryPage.qml (+20/-0)
TodayPage.qml (+77/-0)
databasemodule.js (+47/-15)
rssreader.qmlproject (+1/-1)
tabshelper.js (+1/-0)
ubuntu-rssreader-app.qml (+57/-82)
To merge this branch: bzr merge lp:~dragly/ubuntu-rssreader-app/initial-design
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Ubuntu Shorts Developers Pending
Review via email: mp+158862@code.launchpad.net

Commit message

Implemented design proposal with horizontal swipes between feeds on main screen.

Description of the change

Changed the layout of the app to show feeds in tabs in the main view. Sideways scrolling changes feed. Currently no page for "all" feeds - to be added. Very hackish solution to show multiple tabs with auto-generated QML on the fly. Needs upstream fix (see bug #1124071 for details).
The layout is based on a combination of Tabs + PageStack. The topmost element of the stack is the only with tabs (to avoid confusion with the back key on lower levels).
Feed list is accessible from the toolbar icon.
Single feeds may be seen via this menu.
Single entries are shown in a separate page.
Adding feeds is reflected in updated tabs in the main view.
Updated databasemodule.js with function to read feed information. Also removed global dbResult object in favor of functions returning values/objects. (Could possibly be replaced with asynchronous callbacks, but the LocalStorage API is synchronous, so this should not result in any problems.)

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

FAILED: Continuous integration, rev:9
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~dragly/ubuntu-rssreader-app/initial-design/+merge/158862/+edit-commit-message

http://91.189.93.125:8080/job/ubuntu-rssreader-app-ci/7/
Executed test runs:
    SUCCESS: http://91.189.93.125:8080/job/ubuntu-rssreader-app-quantal-amd64-ci/7
    SUCCESS: http://91.189.93.125:8080/job/ubuntu-rssreader-app-raring-amd64-ci/7

Click here to trigger a rebuild:
http://91.189.93.125:8080/job/ubuntu-rssreader-app-ci/7/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

FAILED: Autolanding.
No commit message was specified in the merge proposal. Hit 'Add commit message' on the merge proposal web page or follow the link below. You can approve the merge proposal yourself to rerun.
https://code.launchpad.net/~dragly/ubuntu-rssreader-app/initial-design/+merge/158862/+edit-commit-message

review: Needs Fixing (continuous-integration)
Revision history for this message
Joey Chan (qqworini) wrote :

Well, I can approve but Jenkins Bot can't :P

Svenn-Arne, pls add commit message soon

Revision history for this message
Svenn-Arne Dragly (dragly) wrote :

> Well, I can approve but Jenkins Bot can't :P
>
> Svenn-Arne, pls add commit message soon

Thanks! I've added a commit message now.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== renamed file 'NewsListPage.qml' => 'EntryListPage.qml'
--- NewsListPage.qml 2013-03-24 13:19:16 +0000
+++ EntryListPage.qml 2013-04-15 08:44:35 +0000
@@ -7,20 +7,19 @@
77
8import "databasemodule.js" as DB8import "databasemodule.js" as DB
99
10import QtWebKit 3.0
11
12Page {10Page {
1311
14 signal backRequst12 signal backRequst
13 property string feedLink: ""
1514
16 /* 1. Loading data from database by url.15 /* 1. Loading data from database by url.
17 * 2. Appending data to ListModel for displaying.16 * 2. Appending data to ListModel for displaying.
18 */17 */
19 function loadEntriesByUrl(strUrl) {18 function loadEntriesByUrl(strUrl) {
20 newsListModel.clear()19 newsListModel.clear()
21 var isAll = (strUrl === "")20 var isAll = (feedLink === "")
22 DB.loadEntries(strUrl, isAll)21 var entries = DB.loadEntries(feedLink, isAll)
23 var entries = DB.dbResult.rows22// var entries = DB.dbResult.rows
24 for (var i = 0; i < entries.length; i++) {23 for (var i = 0; i < entries.length; i++) {
25 newsListModel.append({"title":entries.item(i).title,24 newsListModel.append({"title":entries.item(i).title,
26 "pubDate":entries.item(i).pubDate,25 "pubDate":entries.item(i).pubDate,
@@ -28,6 +27,11 @@
28 "description":entries.item(i).description,27 "description":entries.item(i).description,
29 "hash":entries.item(i).hash})28 "hash":entries.item(i).hash})
30 }29 }
30 console.log("Loaded entries by URL " + strUrl)
31 }
32
33 onFeedLinkChanged: {
34 loadEntriesByUrl(feedLink)
31 }35 }
3236
33 tools: ToolbarActions {37 tools: ToolbarActions {
@@ -43,12 +47,8 @@
43 ListView {47 ListView {
44 id: newsList48 id: newsList
4549
46 width: parent.width
47 height: units.gu(40)
48 clip: true50 clip: true
49 anchors {51 anchors.fill: parent
50 top: parent.top
51 }
5252
53 model: ListModel {53 model: ListModel {
54 id: newsListModel54 id: newsListModel
@@ -64,29 +64,13 @@
64 }64 }
6565
66 onClicked: {66 onClicked: {
67 contentLabel.loadHtml((model.content !== "")? model.content : model.description) // FIRST WAY67 mainPageStack.push(singleEntryPage)
68 singleEntryPage.content.loadHtml((model.content !== "")? model.content : model.description) // FIRST WAY
68 // contentLabel.text = (model.content != "")? model.content : model.description // SECOND WAY69 // contentLabel.text = (model.content != "")? model.content : model.description // SECOND WAY
69 }70 }
70 } // delegate71 } // delegate
71 } // ListView72 } // ListView
7273
73 /* FIRST WAY OF DISPLAYING FEED */
74 WebView {
75 id: contentLabel
76 width: parent.width
77
78
79 onNavigationRequested: {
80 if (request.navigationType == 0)
81 request.action = 1
82 }
83
84 anchors {
85 top: newsList.bottom
86 bottom: parent.bottom
87 }
88 }
89
90 /* SECOND WAY OF DISPLAYING FEED. DOES NOT WORK ON MY QT5 LIBS, BUG */74 /* SECOND WAY OF DISPLAYING FEED. DOES NOT WORK ON MY QT5 LIBS, BUG */
91 // Flickable {75 // Flickable {
92 // id: tmpLabelFlick76 // id: tmpLabelFlick
9377
=== added file 'EntryListTab.qml'
--- EntryListTab.qml 1970-01-01 00:00:00 +0000
+++ EntryListTab.qml 2013-04-15 08:44:35 +0000
@@ -0,0 +1,12 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3
4Tab {
5// title: i18n.tr("News") // todo replace with feed name
6 property alias entryListPage: entryListPageLocal
7 property alias feedLink: entryListPageLocal.feedLink
8
9 page: EntryListPage {
10 id: entryListPageLocal
11 }
12}
013
=== modified file 'FeedListPage.qml'
--- FeedListPage.qml 2013-03-24 13:19:16 +0000
+++ FeedListPage.qml 2013-04-15 08:44:35 +0000
@@ -11,19 +11,21 @@
11 id: pageItself11 id: pageItself
1212
13 signal feedSelected(string selectedFeed)13 signal feedSelected(string selectedFeed)
14 signal feedsReloaded
15 signal feedDeleted(string feedLink)
1416
15 ListView {17 ListView {
16 id: feedList18 id: feedList
1719
18 function reloadFeeds() {20 function reloadFeeds() {
19 feedListModel.clear()21 feedListModel.clear()
20 DB.loadFeeds()22 var feeds = DB.loadFeeds()
21 var feeds = DB.dbResult23// var feeds = DB.dbResult
22 for (var i = 0; i < feeds.rows.length; i++) {24 for (var i = 0; i < feeds.length; i++) {
23 feedListModel.append({"link":feeds.rows.item(i).link,25 feedListModel.append({"link":feeds.item(i).link,
24 "displayName":feeds.rows.item(i).displayName,26 "displayName":feeds.item(i).displayName,
25 "siteLink":feeds.rows.item(i).siteLink,27 "siteLink":feeds.item(i).siteLink,
26 "description":feeds.rows.item(i).description})28 "description":feeds.item(i).description})
27 }29 }
28 }30 }
2931
@@ -195,6 +197,7 @@
195 // DB.addEntry(curUrl, entry.title, entry.pubDate, Qt.md5(entry.title) /*TODO MORE DATA IN HASH*/,197 // DB.addEntry(curUrl, entry.title, entry.pubDate, Qt.md5(entry.title) /*TODO MORE DATA IN HASH*/,
196 // entry.description, entry.content)198 // entry.description, entry.content)
197 }199 }
200 feedsReloaded()
198 }201 }
199 break202 break
200 case XmlListModel.Loading:203 case XmlListModel.Loading:
@@ -251,10 +254,12 @@
251 onTriggered: {254 onTriggered: {
252 PopupUtils.close(popover)255 PopupUtils.close(popover)
253 var link = feedListModel.get(feedList.currentIndex).link256 var link = feedListModel.get(feedList.currentIndex).link
254 DB.deleteFeed(link)257 var dbResult = DB.deleteFeed(link)
255 if (DB.dbResult.rowsAffected > 0)258 if (dbResult.rowsAffected > 0) {
256 DB.removeEntriesOfFeed(link)259 DB.removeEntriesOfFeed(link)
257 feedListModel.remove(feedList.currentIndex)260 feedListModel.remove(feedList.currentIndex)
261 }
262 feedDeleted(link)
258 }263 }
259 }264 }
260265
@@ -264,6 +269,7 @@
264 PopupUtils.close(popover)269 PopupUtils.close(popover)
265 DB.dropTables()270 DB.dropTables()
266 feedListModel.clear()271 feedListModel.clear()
272 feedsReloaded()
267 }273 }
268 }274 }
269 } // ActionList275 } // ActionList
270276
=== added file 'SingleEntryPage.qml'
--- SingleEntryPage.qml 1970-01-01 00:00:00 +0000
+++ SingleEntryPage.qml 2013-04-15 08:44:35 +0000
@@ -0,0 +1,20 @@
1import QtQuick 2.0
2
3import QtWebKit 3.0
4
5Rectangle {
6 width: 30
7 height: 30
8 property alias content: contentLabel
9
10 /* FIRST WAY OF DISPLAYING FEED */
11 WebView {
12 id: contentLabel
13 anchors.fill: parent
14
15 onNavigationRequested: {
16 if (request.navigationType == 0)
17 request.action = 1
18 }
19 }
20}
021
=== added file 'TodayPage.qml'
--- TodayPage.qml 1970-01-01 00:00:00 +0000
+++ TodayPage.qml 2013-04-15 08:44:35 +0000
@@ -0,0 +1,77 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3
4import "databasemodule.js" as DB
5import "tabshelper.js" as TabsHelper
6
7Page {
8 id: todayPage
9 visible: false
10 property bool firstRefresh: true
11
12 signal requestFeedListPage
13
14 function refresh() {
15 if(firstRefresh) {
16 todayTabs.destroy()
17 firstRefresh = false
18 }
19 var tabsString = "import QtQuick 2.0; import Ubuntu.Components 0.1; Tabs {id: todayTabs; anchors.fill: parent;"
20 var feeds = DB.loadFeeds()
21 if(feeds.length > 0) {
22 for(var i = 0; i < feeds.length; i++) {
23 var feed = feeds[i];
24 console.log("displayName: " + feed.displayName)
25 // ourTabs.__tabsModel.children[i].title = feed.displayName
26 // ourTabs.__tabsModel.children[i].entryListPage.loadEntriesByUrl(feed.link)
27 tabsString += "EntryListTab {"
28 tabsString += "title: \"" + feed.displayName + "\";"
29 tabsString += "feedLink: \"" + feed.link + "\";"
30 tabsString += "}"
31 }
32 } else {
33 var labelText = i18n.tr("No feeds added.\nClick the feed icon in the toolbar to get started.")
34 tabsString += "Tab { title: \"No feeds\"; page: Page { anchors.fill: parent; Label { anchors.centerIn: parent; text: \"" + labelText + "\"; } } }"
35 }
36 tabsString += "}"; // END Tabs component
37
38 console.log(tabsString)
39 console.log(TabsHelper.tabsObject)
40 if(TabsHelper.tabsObject !== null) {
41 TabsHelper.tabsObject.destroy()
42 }
43
44 TabsHelper.tabsObject = Qt.createQmlObject(tabsString,
45 todayPage, "todayTabs")
46 }
47
48 tools: ToolbarActions {
49 Action {
50 objectName: "action"
51 id: sampleAction
52
53 iconSource: Qt.resolvedUrl("avatar.png")
54 text: i18n.tr("Feeds")
55
56 onTriggered: {
57// mainPageStack.push(feedListPage)
58 requestFeedListPage()
59 }
60 }
61
62// back: Action {
63// onTriggered: {
64// console.log("Back triggered!")
65// }
66// }
67 }
68
69 Tabs {
70 id: todayTabs
71 anchors.fill: parent
72
73 Tab {
74
75 }
76 }
77}
078
=== modified file 'databasemodule.js'
--- databasemodule.js 2013-03-24 13:19:16 +0000
+++ databasemodule.js 2013-04-15 08:44:35 +0000
@@ -22,20 +22,23 @@
2222
23/* This variable will store result of any operation with database.23/* This variable will store result of any operation with database.
24 */24 */
25var dbResult25//var dbResult
2626
27/* Load all feed from database.27/* Load all feed from database.
28 * Mb later we will need some criteria, such as tag, date and so on!28 * Mb later we will need some criteria, such as tag, date and so on!
29 */29 */
30function loadFeeds() {30function loadFeeds() {
31 var db = openStdDataBase()31 var db = openStdDataBase()
3232 var dbResultLocal
33 var feeds
33 db.transaction(function(tx) {34 db.transaction(function(tx) {
34 ensureFeedTableExists(tx)35 ensureFeedTableExists(tx)
35 dbResult = tx.executeSql("SELECT * FROM UserFeeds")36 dbResultLocal = tx.executeSql("SELECT * FROM UserFeeds")
36 console.log("SELECTED: ", dbResult.rows.length)37 console.log("SELECTED: ", dbResultLocal.rows.length)
38 feeds = dbResultLocal.rows
37 }39 }
38 )40 )
41 return feeds;
39}42}
4043
41/* Add feed to database.44/* Add feed to database.
@@ -46,6 +49,7 @@
46 console.log("Database, AddFeed: 0.link can't be empty")49 console.log("Database, AddFeed: 0.link can't be empty")
47 return50 return
48 }51 }
52 var dbResult
4953
50 d.displayName = d.displayName || ""54 d.displayName = d.displayName || ""
51 d.siteLink = d.siteLink || ""55 d.siteLink = d.siteLink || ""
@@ -70,13 +74,14 @@
70 console.log("INSERT ID", dbResult.insertId)74 console.log("INSERT ID", dbResult.insertId)
71 }75 }
72 )76 )
77 return dbResult
73}78}
7479
75/* Update information about feed with new information.80/* Update information about feed with new information.
76 */81 */
77function updateFeedWithInfo(link, d) {82function updateFeedWithInfo(link, d) {
78 var db = openStdDataBase()83 var db = openStdDataBase()
7984 var dbResult
80 db.transaction(function (tx) {85 db.transaction(function (tx) {
81 ensureFeedTableExists(tx)86 ensureFeedTableExists(tx)
82 dbResult = tx.executeSql('UPDATE UserFeeds SET displayName=?, siteLink=?, description=? WHERE link=?',87 dbResult = tx.executeSql('UPDATE UserFeeds SET displayName=?, siteLink=?, description=? WHERE link=?',
@@ -84,19 +89,23 @@
84 console.log("UPDATE, AFFECTED ROWS", dbResult.rowsAffected)89 console.log("UPDATE, AFFECTED ROWS", dbResult.rowsAffected)
85 }90 }
86 )91 )
92 return dbResult
87}93}
8894
89/* Delete feed from database.95/* Delete feed from database.
90 */96 */
91function deleteFeed(link) {97function deleteFeed(link) {
92 var db = openStdDataBase()98 var db = openStdDataBase()
9399 var result
94 db.transaction(function (tx) {100 db.transaction(function (tx) {
101 var dbResultLocal
95 ensureFeedTableExists(tx)102 ensureFeedTableExists(tx)
96 dbResult = tx.executeSql('DELETE FROM UserFeeds WHERE link = ?', [link])103 dbResultLocal = tx.executeSql('DELETE FROM UserFeeds WHERE link = ?', [link])
97 console.log("DELETE, AFFECTED ROWS", dbResult.rowsAffected)104 console.log("DELETE, AFFECTED ROWS", dbResultLocal.rowsAffected)
105 result = dbResultLocal
98 }106 }
99 )107 )
108 return result
100}109}
101110
102/* Select all entries from database.111/* Select all entries from database.
@@ -104,22 +113,43 @@
104function loadEntries(feedLink, all) {113function loadEntries(feedLink, all) {
105 all = all || false114 all = all || false
106 var db = openStdDataBase()115 var db = openStdDataBase()
116 var entries;
107117
108 db.transaction(function(tx) {118 db.transaction(function(tx) {
109 ensureEntriesTableExists(tx)119 ensureEntriesTableExists(tx)
120 var dbResultLocal
110 if (all)121 if (all)
111 dbResult = tx.executeSql('SELECT * FROM FeedEntries')122 dbResultLocal = tx.executeSql('SELECT * FROM FeedEntries')
112 else dbResult = tx.executeSql('SELECT * FROM FeedEntries WHERE feedLink = ?', [feedLink])123 else dbResultLocal = tx.executeSql('SELECT * FROM FeedEntries WHERE feedLink = ?', [feedLink])
113 console.log("loadEntries, SELECTED ROWS", dbResult.rows.length)124 console.log("loadEntries, SELECTED ROWS", dbResultLocal.rows.length)
114 }125 entries = dbResultLocal.rows;
115 )126 }
127 )
128 return entries;
129}
130
131/* Select all entries from database.
132 */
133function loadFeed(feedLink) {
134 var db = openStdDataBase()
135 var feed = {displayName: "Unknown"}
136 db.transaction(function(tx) {
137 ensureEntriesTableExists(tx)
138 var dbResult = tx.executeSql('SELECT * FROM UserFeeds WHERE link = ?', [feedLink])
139 console.log("feedName, SELECTED ROWS", dbResult.rows.length)
140 if(dbResult.rows.length > 0) {
141 feed = dbResult.rows.item(0)
142 }
143 }
144 )
145 return feed
116}146}
117147
118/* Append entry to database.148/* Append entry to database.
119 */149 */
120function addEntry(feedLink, hash, d) {150function addEntry(feedLink, hash, d) {
121 var db = openStdDataBase()151 var db = openStdDataBase()
122152 var dbResult
123 if (feedLink === undefined || hash === undefined) {153 if (feedLink === undefined || hash === undefined) {
124 console.log("Database, addEntry: feedLink and hash can't be undefined")154 console.log("Database, addEntry: feedLink and hash can't be undefined")
125 return155 return
@@ -142,18 +172,20 @@
142 // console.log("ENTRY INSERT ID", dbResult.insertId)172 // console.log("ENTRY INSERT ID", dbResult.insertId)
143 }173 }
144 )174 )
175 return dbResult
145}176}
146177
147/* Remove all entries from database by feed link.178/* Remove all entries from database by feed link.
148 */179 */
149function removeEntriesOfFeed(feedLink) {180function removeEntriesOfFeed(feedLink) {
150 var db = openStdDataBase()181 var db = openStdDataBase()
151182 var dbResult
152 db.transaction(function(tx) {183 db.transaction(function(tx) {
153 ensureEntriesTableExists(tx)184 ensureEntriesTableExists(tx)
154 dbResult = tx.executeSql('DELETE FROM FeedEntries WHERE feedLink = ?', [feedLink])185 dbResult = tx.executeSql('DELETE FROM FeedEntries WHERE feedLink = ?', [feedLink])
155 }186 }
156 )187 )
188 return dbResult
157}189}
158190
159/* Only for debug purposes.191/* Only for debug purposes.
160192
=== modified file 'rssreader.qmlproject'
--- rssreader.qmlproject 2013-03-02 20:42:07 +0000
+++ rssreader.qmlproject 2013-04-15 08:44:35 +0000
@@ -3,7 +3,7 @@
3import QmlProject 1.13import QmlProject 1.1
44
5Project {5Project {
6 mainFile: "rssreader.qml"6 mainFile: "ubuntu-rssreader-app.qml"
77
8 /* Include .qml, .js, and image files from current directory and subdirectories */8 /* Include .qml, .js, and image files from current directory and subdirectories */
9 QmlFiles {9 QmlFiles {
1010
=== added file 'tabshelper.js'
--- tabshelper.js 1970-01-01 00:00:00 +0000
+++ tabshelper.js 2013-04-15 08:44:35 +0000
@@ -0,0 +1,1 @@
1var tabsObject = null;
02
=== modified file 'ubuntu-rssreader-app.qml'
--- ubuntu-rssreader-app.qml 2013-04-11 21:21:44 +0000
+++ ubuntu-rssreader-app.qml 2013-04-15 08:44:35 +0000
@@ -9,6 +9,8 @@
9 second Tab has a single ToolbarAction.9 second Tab has a single ToolbarAction.
10*/10*/
1111
12import "databasemodule.js" as DB
13
12MainView {14MainView {
13 // objectName for functional testing purposes (autopilot-qt5)15 // objectName for functional testing purposes (autopilot-qt5)
14 objectName: "rssreader"16 objectName: "rssreader"
@@ -17,89 +19,62 @@
17 width: units.gu(50)19 width: units.gu(50)
18 height: units.gu(75)20 height: units.gu(75)
1921
20 22 PageStack {
21 Tabs {23 id: mainPageStack
22 id: tabs24 Component.onCompleted: {
25 push(todayPage)
26 todayPage.refresh()
27 }
23 anchors.fill: parent28 anchors.fill: parent
2429 __showHeader: false
25 Tab {30 TodayPage {
26 objectName: "Tab1"31 id: todayPage
27 32 visible: false
28 title: i18n.tr("RSS Reader")33 onRequestFeedListPage: mainPageStack.push(feedListPage)
29 34 }
30 page: FeedListPage {35
31 id: feedListPage36 FeedListPage {
3237 id: feedListPage
33 onFeedSelected: {38 visible: false
34 console.log("Feed SELECTED, switch tab next")39 anchors.fill: parent
35 newsListPage.loadEntriesByUrl(selectedFeed)40 onFeedSelected: {
36 tabs.selectedTabIndex = 141 if(selectedFeed != "") {
37 }42 mainPageStack.push(selectedEntryListPageView)
38 }43 selectedEntryListPage.feedLink = selectedFeed
39 }44 var feed = DB.loadFeed(selectedFeed)
4045 selectedEntryTab.title = feed.displayName
41 Tab {46 } else {
42 title: i18n.tr("News") // todo replace with feed name47 mainPageStack.clear()
4348 mainPageStack.push(todayPage)
44 page: NewsListPage {49 }
45 id: newsListPage50 }
4651 onFeedsReloaded: {
47 onBackRequst: {52 todayPage.refresh()
48 tabs.selectedTabIndex = 053 }
49 }54 onFeedDeleted: {
50 }55 todayPage.refresh()
51 }56 }
52 57 }
53 // Second tab begins here58 Page {
54 Tab {59 anchors.fill: parent
55 objectName: "Tab2"60 id: selectedEntryListPageView
56 61 visible: false
57 title: i18n.tr("Optional Screen")62 Tabs {
58 page: Page {63 anchors.fill: parent
59 id: secondPage64 Tab {
60 anchors.margins: units.gu(2)65 id: selectedEntryTab
61 66 title: i18n.tr("Selected feed") // todo replace with feed name
62 tools: ToolbarActions {67 page: EntryListPage {
63 Action {68 anchors.fill: parent
64 objectName: "action"69 id: selectedEntryListPage
65 id: sampleAction70 }
66 71 }
67 iconSource: Qt.resolvedUrl("avatar.png")72 }
68 text: i18n.tr("Tap me!")73 }
69 74 SingleEntryPage {
70 onTriggered: {75 id: singleEntryPage
71 label.text = i18n.tr("Toolbar icon tapped")76 visible: false
72 }77 anchors.fill: parent
73 }
74
75 back: Action {
76 onTriggered: {
77 console.log("Back triggered!")
78 }
79 }
80 }
81
82
83
84 Column {
85 anchors.centerIn: parent
86 Label {
87 id: label
88 objectName: "label"
89
90 text: i18n.tr("Swipe from bottom to up to reveal the toolbar.")
91 }
92
93 Button {
94 text: "Toolbar Test"
95 width: units.gu(15)
96 anchors.horizontalCenter: parent.horizontalCenter
97 onClicked: {
98 secondPage.tools.active = true
99 }
100 }
101 }
102 }
103 }78 }
104 }79 }
105}80}

Subscribers

People subscribed via source and target branches