Merge lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk
- add-demo-to-trunk
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Roman Shchekin |
Approved revision: | 7 |
Merged at revision: | 7 |
Proposed branch: | lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk |
Merge into: | lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk |
Diff against target: |
955 lines (+898/-2) 5 files modified
RssFeedDelegate.qml (+152/-0) RssFeedPage.qml (+176/-0) RssItemDelegate.qml (+104/-0) rssview.qml (+275/-0) ubuntu-rssreader-app.qml (+191/-2) |
To merge this branch: | bzr merge lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Roman Shchekin | Approve | ||
Review via email:
|
Commit message
add my first demo into current trunk, click the back button in the bottom bar can go back to current trunk version
Description of the change
add my first demo into current trunk, click the back button in the bottom bar can go back to current trunk version
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Roman Shchekin (mrqtros) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Joey Chan (qqworini) wrote : | # |
> Joey, are you merged your version with my morning trunk update?)
>
>
> 17.04.13 12:56 Joey Chan написал(а):
>
> Joey Chan has proposed merging lp:~qqworini/ubuntu-rssreader-app/add-demo-to-
> trunk into lp:ubuntu-rssreader-app.
>
>
> Commit message:
> add my first demo into current trunk, click the back button in the bottom bar
> can go back to current trunk version
>
>
> Requested reviews:
> Ubuntu RSS Feed Reader Developers (ubuntu-
>
>
> For more details, see:
>
> https:/
> trunk/+merge/159325
>
>
> add my first demo into current trunk, click the back button in the bottom bar
> can go back to current trunk version
>
> --
> https:/
> trunk/+merge/159325
>
> Your team Ubuntu RSS Feed Reader Developers is requested to review the
> proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into lp
> :ubuntu-
no, my modification comes from the trunk version 2013-04-16
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Joey Chan (qqworini) wrote : | # |
I just add my first demo (very early version), didn't modify any code of Svenn's and yours
> > Joey, are you merged your version with my morning trunk update?)
> >
> >
> > 17.04.13 12:56 Joey Chan написал(а):
> >
> > Joey Chan has proposed merging lp:~qqworini/ubuntu-rssreader-app/add-demo-
> to-
> > trunk into lp:ubuntu-rssreader-app.
> >
> >
> > Commit message:
> > add my first demo into current trunk, click the back button in the bottom
> bar
> > can go back to current trunk version
> >
> >
> > Requested reviews:
> > Ubuntu RSS Feed Reader Developers (ubuntu-
> >
> >
> > For more details, see:
> >
> > https:/
> > trunk/+merge/159325
> >
> >
> > add my first demo into current trunk, click the back button in the bottom
> bar
> > can go back to current trunk version
> >
> > --
> > https:/
> > trunk/+merge/159325
> >
> > Your team Ubuntu RSS Feed Reader Developers is requested to review the
> > proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into
> lp
> > :ubuntu-
>
>
> no, my modification comes from the trunk version 2013-04-16
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Roman Shchekin (mrqtros) wrote : | # |
Ok, somebody must approve your request then =)
17.04.13 13:48 Joey Chan написал(а):
I just add my first demo (very early version), didn't modify any code of Svenn's and yours
> > Joey, are you merged your version with my morning trunk update?)
> >
> >
> > 17.04.13 12:56 Joey Chan написал(а):
> >
> > Joey Chan has proposed merging lp:~qqworini/ubuntu-rssreader-app/add-demo-
> to-
> > trunk into lp:ubuntu-rssreader-app.
> >
> >
> > Commit message:
> > add my first demo into current trunk, click the back button in the bottom
> bar
> > can go back to current trunk version
> >
> >
> > Requested reviews:
> > Ubuntu RSS Feed Reader Developers (ubuntu-
> >
> >
> > For more details, see:
> >
> > https:/
> > trunk/+merge/159325
> >
> >
> > add my first demo into current trunk, click the back button in the bottom
> bar
> > can go back to current trunk version
> >
> > --
> > https:/
> > trunk/+merge/159325
> >
> > Your team Ubuntu RSS Feed Reader Developers is requested to review the
> > proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into
> lp
> > :ubuntu-
>
>
> no, my modification comes from the trunk version 2013-04-16
--
https:/
Your team Ubuntu RSS Feed Reader Developers is requested to review the proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into lp:ubuntu-rssreader-app.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Joey Chan (qqworini) wrote : | # |
come on ... u r one of the "somebody"
> Ok, somebody must approve your request then =)
>
>
> 17.04.13 13:48 Joey Chan написал(а):
>
> I just add my first demo (very early version), didn't modify any code of
> Svenn's and yours
>
>
> > > Joey, are you merged your version with my morning trunk update?)
> > >
> > >
> > > 17.04.13 12:56 Joey Chan написал(а):
> > >
> > > Joey Chan has proposed merging lp:~qqworini/ubuntu-rssreader-app/add-demo-
> > to-
> > > trunk into lp:ubuntu-rssreader-app.
> > >
> > >
> > > Commit message:
> > > add my first demo into current trunk, click the back button in the bottom
> > bar
> > > can go back to current trunk version
> > >
> > >
> > > Requested reviews:
> > > Ubuntu RSS Feed Reader Developers (ubuntu-
> > >
> > >
> > > For more details, see:
> > >
> > > https:/
> > > trunk/+merge/159325
> > >
> > >
> > > add my first demo into current trunk, click the back button in the bottom
> > bar
> > > can go back to current trunk version
> > >
> > > --
> > > https:/
> > > trunk/+merge/159325
> > >
> > > Your team Ubuntu RSS Feed Reader Developers is requested to review the
> > > proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into
> > lp
> > > :ubuntu-
> >
> >
> > no, my modification comes from the trunk version 2013-04-16
>
> --
> https:/
>
> Your team Ubuntu RSS Feed Reader Developers is requested to review the
> proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into lp
> :ubuntu-
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Roman Shchekin (mrqtros) wrote : | # |
I am answering this letter from phone :) Can approve only in evening...
17.04.13 14:29 Joey Chan написал(а):
come on ... u r one of the "somebody"
> Ok, somebody must approve your request then =)
>
>
> 17.04.13 13:48 Joey Chan написал(а):
>
> I just add my first demo (very early version), didn't modify any code of
> Svenn's and yours
>
>
> > > Joey, are you merged your version with my morning trunk update?)
> > >
> > >
> > > 17.04.13 12:56 Joey Chan написал(а):
> > >
> > > Joey Chan has proposed merging lp:~qqworini/ubuntu-rssreader-app/add-demo-
> > to-
> > > trunk into lp:ubuntu-rssreader-app.
> > >
> > >
> > > Commit message:
> > > add my first demo into current trunk, click the back button in the bottom
> > bar
> > > can go back to current trunk version
> > >
> > >
> > > Requested reviews:
> > > Ubuntu RSS Feed Reader Developers (ubuntu-
> > >
> > >
> > > For more details, see:
> > >
> > > https:/
> > > trunk/+merge/159325
> > >
> > >
> > > add my first demo into current trunk, click the back button in the bottom
> > bar
> > > can go back to current trunk version
> > >
> > > --
> > > https:/
> > > trunk/+merge/159325
> > >
> > > Your team Ubuntu RSS Feed Reader Developers is requested to review the
> > > proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into
> > lp
> > > :ubuntu-
> >
> >
> > no, my modification comes from the trunk version 2013-04-16
>
> --
> https:/
>
> Your team Ubuntu RSS Feed Reader Developers is requested to review the
> proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into lp
> :ubuntu-
--
https:/
Your team Ubuntu RSS Feed Reader Developers is requested to review the proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into lp:ubuntu-rssreader-app.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Roman Shchekin (mrqtros) wrote : | # |
Joey, are sure that files like databasemodule.js will not be overwritten?!
Or maybe week it will be better to redo this merge in right way? I mean local merge your version with current trunk and only after that submit new proposal?
17.04.13 14:47 Roman Shchekin написал(а):
I am answering this letter from phone :) Can approve only in evening...
17.04.13 14:29 Joey Chan написал(а):
come on ... u r one of the "somebody"
> Ok, somebody must approve your request then =)
>
>
> 17.04.13 13:48 Joey Chan написал(а):
>
> I just add my first demo (very early version), didn't modify any code of
> Svenn's and yours
>
>
> > > Joey, are you merged your version with my morning trunk update?)
> > >
> > >
> > > 17.04.13 12:56 Joey Chan написал(а):
> > >
> > > Joey Chan has proposed merging lp:~qqworini/ubuntu-rssreader-app/add-demo-
> > to-
> > > trunk into lp:ubuntu-rssreader-app.
> > >
> > >
> > > Commit message:
> > > add my first demo into current trunk, click the back button in the bottom
> > bar
> > > can go back to current trunk version
> > >
> > >
> > > Requested reviews:
> > > Ubuntu RSS Feed Reader Developers (ubuntu-
> > >
> > >
> > > For more details, see:
> > >
> > > https:/
> > > trunk/+merge/159325
> > >
> > >
> > > add my first demo into current trunk, click the back button in the bottom
> > bar
> > > can go back to current trunk version
> > >
> > > --
> > > https:/
> > > trunk/+merge/159325
> > >
> > > Your team Ubuntu RSS Feed Reader Developers is requested to review the
> > > proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into
> > lp
> > > :ubuntu-
> >
> >
> > no, my modification comes from the trunk version 2013-04-16
>
> --
> https:/
>
> Your team Ubuntu RSS Feed Reader Developers is requested to review the
> proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into lp
> :ubuntu-
--
https:/
Your team Ubuntu RSS Feed Reader Developers is requested to review the proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into lp:ubuntu-rssreader-app.
https:/
Your team Ubuntu RSS Feed Reader Developers is requested to review the proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into lp:ubuntu-rssreader-app.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Joey Chan (qqworini) wrote : | # |
don't worry, I just put my own files into trunk, other files are remain
> Joey, are sure that files like databasemodule.js will not be overwritten?!
> Or maybe week it will be better to redo this merge in right way? I mean local
> merge your version with current trunk and only after that submit new proposal?
>
>
> 17.04.13 14:47 Roman Shchekin написал(а):
>
> I am answering this letter from phone :) Can approve only in evening...
>
>
>
> 17.04.13 14:29 Joey Chan написал(а):
>
>
> come on ... u r one of the "somebody"
>
>
>
> > Ok, somebody must approve your request then =)
> >
> >
> > 17.04.13 13:48 Joey Chan написал(а):
> >
> > I just add my first demo (very early version), didn't modify any code of
> > Svenn's and yours
> >
> >
> > > > Joey, are you merged your version with my morning trunk update?)
> > > >
> > > >
> > > > 17.04.13 12:56 Joey Chan написал(а):
> > > >
> > > > Joey Chan has proposed merging lp:~qqworini/ubuntu-rssreader-app/add-
> demo-
> > > to-
> > > > trunk into lp:ubuntu-rssreader-app.
> > > >
> > > >
> > > > Commit message:
> > > > add my first demo into current trunk, click the back button in the
> bottom
> > > bar
> > > > can go back to current trunk version
> > > >
> > > >
> > > > Requested reviews:
> > > > Ubuntu RSS Feed Reader Developers (ubuntu-
> > > >
> > > >
> > > > For more details, see:
> > > >
> > > > https:/
> > > > trunk/+merge/159325
> > > >
> > > >
> > > > add my first demo into current trunk, click the back button in the
> bottom
> > > bar
> > > > can go back to current trunk version
> > > >
> > > > --
> > > > https:/
> > > > trunk/+merge/159325
> > > >
> > > > Your team Ubuntu RSS Feed Reader Developers is requested to review the
> > > > proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk
> into
> > > lp
> > > > :ubuntu-
> > >
> > >
> > > no, my modification comes from the trunk version 2013-04-16
> >
> > --
> > https:/
> >
> > Your team Ubuntu RSS Feed Reader Developers is requested to review the
> > proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into
> lp
> > :ubuntu-
>
> --
> https:/
>
>
> Your team Ubuntu RSS Feed Reader Developers is requested to review the
> proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into lp
> :ubuntu-
>
>
>
>
> https:/
>
> Your team Ubuntu RSS Feed Reader Developers is requested to review the
> proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into lp
> :ubuntu-
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Roman Shchekin (mrqtros) : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Roman Shchekin (mrqtros) wrote : | # |
I think do something wrong. Nothing happens when I change status to
Approved and Merged.
Help.
2013/4/17 Roman Shchekin <email address hidden>
> The proposal to merge lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk
> into lp:ubuntu-rssreader-app has been updated.
>
> Status: Merged => Approved
>
> For more details, see:
>
> https:/
> --
>
> https:/
> You are reviewing the proposed merge of
> lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into
> lp:ubuntu-rssreader-app.
>
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
David Planella (dpm) wrote : | # |
Al 17/04/13 17:40, En/na Roman Shchekin ha escrit:
> I think do something wrong. Nothing happens when I change status to
> Approved and Merged.
> Help.
>
Hi Roman,
It might be an issue with Jenkins. Would you mind sending an e-mail
mentioning this to the core apps mailing list?
The Jenkins admins will then look at it and fix things if necessary.
Thanks!
Cheers,
David.
>
> 2013/4/17 Roman Shchekin <email address hidden>
>
>> The proposal to merge lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk
>> into lp:ubuntu-rssreader-app has been updated.
>>
>> Status: Merged => Approved
>>
>> For more details, see:
>>
>> https:/
>> --
>>
>> https:/
>> You are reviewing the proposed merge of
>> lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into
>> lp:ubuntu-rssreader-app.
>>
>
--
David Planella
Ubuntu App Development Liaison
http://
www.ubuntu.com / www.davidplanel
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michael Hall (mhall119) wrote : | # |
It might take a while, Jenkins is an external service that processes merge proposals for a number of different projects, so you have to wait for it to come back around and find this one set to Approved.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Roman Shchekin (mrqtros) wrote : | # |
Hi all!
Svenn, my little fix of your version merged, it's ok. But I haven't seen
that not all functions of my old version (Revision of trunk) works well.
You can fix this? I mean apply your features (like TodayPage) without
changing my previous version?
Cheers,
Roman.
2013/4/18 <email address hidden>
> The proposal to merge lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk
> into lp:ubuntu-rssreader-app has been updated.
>
> Status: Approved => Merged
>
> For more details, see:
>
> https:/
> --
>
> https:/
> You are reviewing the proposed merge of
> lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into
> lp:ubuntu-rssreader-app.
>
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Svenn-Arne Dragly (dragly) wrote : | # |
Hi Roman,
What functions are not working as you'd expect? Is it the functions in
the databasemodule.js file? If so, that is likely because I tried to
change the functions so that they return the results rather than set
the global dbResult. The global object could potentially cause some
trouble with for instance nested loops. It is of course possible that I
might have broken something in the process.
In any case, if you pinpoint the functions that are not working for you
I'd be happy to fix them. If you think the move from a global dbResult
object is a bad idea, I could also revert all changes I've made in
databasemodule.js.
Which would you prefer? That I revert all the changes in
databasemodule.js or that I fix the specific functions that cause
trouble?
I'll hopefully have time to see to it tomorrow.
Cheers,
Svenn-Arne
On Thu 18 Apr 2013 10:31:24 PM CEST, Roman Shchekin wrote:
> Hi all!
>
> Svenn, my little fix of your version merged, it's ok. But I haven't seen
> that not all functions of my old version (Revision of trunk) works well.
> You can fix this? I mean apply your features (like TodayPage) without
> changing my previous version?
>
> Cheers,
> Roman.
>
>
> 2013/4/18 <email address hidden>
>
>> The proposal to merge lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk
>> into lp:ubuntu-rssreader-app has been updated.
>>
>> Status: Approved => Merged
>>
>> For more details, see:
>>
>> https:/
>> --
>>
>> https:/
>> You are reviewing the proposed merge of
>> lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into
>> lp:ubuntu-rssreader-app.
>>
>
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Roman Shchekin (mrqtros) wrote : | # |
Svenn, your solution with local results rather then global is better,
I like current solution.
Few minutes ago I thought that "add" function doesn't work well,
but now I find out that problem was connected with the network.
Now I can see only one issue - my EntryListPage not nested in Tabs
component.
We will fix this later, when Tabs model will be editable?
And I afraid that current version seems little bit inexplicit even for me,
and
especially for designers team. I hope Joey will explain properly our ideas
to them.
2013/4/19 Svenn-Arne Dragly <email address hidden>
> Hi Roman,
>
> What functions are not working as you'd expect? Is it the functions in
> the databasemodule.js file? If so, that is likely because I tried to
> change the functions so that they return the results rather than set
> the global dbResult. The global object could potentially cause some
> trouble with for instance nested loops. It is of course possible that I
> might have broken something in the process.
>
> In any case, if you pinpoint the functions that are not working for you
> I'd be happy to fix them. If you think the move from a global dbResult
> object is a bad idea, I could also revert all changes I've made in
> databasemodule.js.
>
> Which would you prefer? That I revert all the changes in
> databasemodule.js or that I fix the specific functions that cause
> trouble?
>
> I'll hopefully have time to see to it tomorrow.
>
>
> Cheers,
> Svenn-Arne
>
> On Thu 18 Apr 2013 10:31:24 PM CEST, Roman Shchekin wrote:
> > Hi all!
> >
> > Svenn, my little fix of your version merged, it's ok. But I haven't seen
> > that not all functions of my old version (Revision of trunk) works well.
> > You can fix this? I mean apply your features (like TodayPage) without
> > changing my previous version?
> >
> > Cheers,
> > Roman.
> >
> >
> > 2013/4/18 <email address hidden>
> >
> >> The proposal to merge
> lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk
> >> into lp:ubuntu-rssreader-app has been updated.
> >>
> >> Status: Approved => Merged
> >>
> >> For more details, see:
> >>
> >>
> https:/
> >> --
> >>
> >>
> https:/
> >> You are reviewing the proposed merge of
> >> lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into
> >> lp:ubuntu-rssreader-app.
> >>
> >
>
> --
>
> https:/
> You are reviewing the proposed merge of
> lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into
> lp:ubuntu-rssreader-app.
>
Preview Diff
1 | === added file 'RssFeedDelegate.qml' |
2 | --- RssFeedDelegate.qml 1970-01-01 00:00:00 +0000 |
3 | +++ RssFeedDelegate.qml 2013-04-17 08:55:29 +0000 |
4 | @@ -0,0 +1,152 @@ |
5 | +/* |
6 | + license GPL v3 ........... |
7 | + |
8 | + description of this file: |
9 | + a delegate for the ListView in the mainView, each delegate shows a whole rss feed ; |
10 | + |
11 | + Architecture: |
12 | + Item |
13 | + { |
14 | + Column |
15 | + { |
16 | + ListView(for feed title) |
17 | + { |
18 | + Label |
19 | + } |
20 | + |
21 | + ListView(for feed content) |
22 | + { |
23 | + RssItemDelegate |
24 | + } |
25 | + } |
26 | + |
27 | + Component(delegate) |
28 | + |
29 | + XmlListModel(for feed content) |
30 | + |
31 | + XmlListModel(for feed title) |
32 | + } |
33 | +*/ |
34 | + |
35 | +import QtQuick 2.0 |
36 | +import QtQuick.XmlListModel 2.0 |
37 | +import Ubuntu.Components 0.1 |
38 | +import Ubuntu.Components.ListItems 0.1 as ListItem |
39 | + |
40 | +Item { |
41 | + id: rss_feed_delegate |
42 | +// width: 100 |
43 | + height: isList ? units.gu(5) : units.gu(35) |
44 | +// clip: true |
45 | + |
46 | + property string rss_url: "" |
47 | + property bool isList: false |
48 | + |
49 | + signal item_click(int rss_index, string rss_model, string rss_title) |
50 | + |
51 | + Column |
52 | + { |
53 | + width: parent.width |
54 | +// height: units.gu(40) |
55 | + spacing: isList ? 0 : units.gu(1) |
56 | + |
57 | +// Label |
58 | +// { |
59 | +//// ItemStyle.class: "button" |
60 | +// fontSize: "large" |
61 | +// text: "Yahoo Top Stories" |
62 | +// } |
63 | + |
64 | + // a ListView to show the title |
65 | + ListView |
66 | + { |
67 | + id: rsstitle |
68 | + width: parent.width |
69 | + height: units.gu(4) |
70 | + interactive: false |
71 | + contentHeight: units.gu(4) |
72 | + model: rsstitle_model |
73 | + delegate: Label { fontSize: "large"; text: title} |
74 | + clip: true |
75 | + } |
76 | + |
77 | + // a listview to show the RSS content |
78 | + ListView |
79 | + { |
80 | + id: rss_listview |
81 | + width: parent.width |
82 | + height: isList ? 0 : units.gu(30) |
83 | + opacity: isList ? 0 : 1 |
84 | + cacheBuffer: 90 |
85 | + spacing: units.gu(2) |
86 | + boundsBehavior: Flickable.StopAtBounds |
87 | + orientation: ListView.Horizontal |
88 | + contentHeight: units.gu(30) * count |
89 | + model: rssmodel |
90 | + delegate: xmldelegate |
91 | + } |
92 | + } |
93 | + |
94 | + Component |
95 | + { |
96 | + id: xmldelegate |
97 | + |
98 | + RssItemDelegate |
99 | + { |
100 | + width: units.gu(30) |
101 | + height: rss_listview.height |
102 | + rss_title: model_title |
103 | + rss_description: |
104 | + { |
105 | + if (description.split("</a>").length > 1) |
106 | + return description.split("</a>")[1].split("</p>")[0] ; |
107 | + else |
108 | + return description ; |
109 | + } |
110 | + |
111 | + MouseArea |
112 | + { |
113 | + anchors.fill: parent |
114 | + onClicked: |
115 | + { |
116 | + console.log("rss index : " + index) |
117 | + item_click(index, rssmodel.source, rsstitle_model.get(0).title) ; |
118 | + } |
119 | + } |
120 | + |
121 | +// onClick: |
122 | +// { |
123 | +// console.log("rss index : " + index) |
124 | +// click(index, rssmodel.xml, rsstitle_model.get(0).title) ; |
125 | +// } |
126 | + } |
127 | + } |
128 | + |
129 | + /* |
130 | + the both two XmlListModel below use source to load a rss feed url, |
131 | + but this only used in demo, if offline functions implemented, |
132 | + an entire xml content will be pass to both two XmlListModel |
133 | + */ |
134 | + |
135 | + // rss content |
136 | + XmlListModel |
137 | + { |
138 | + id: rssmodel |
139 | + source: rss_url |
140 | + query: "/rss/channel/item" |
141 | + |
142 | + XmlRole { name: "model_title"; query: "title/string()" } |
143 | + XmlRole { name: "description"; query: "description/string()" } |
144 | + } |
145 | + |
146 | + // rss title |
147 | + XmlListModel |
148 | + { |
149 | + id: rsstitle_model |
150 | + source: rss_url |
151 | + query: "/rss/channel" |
152 | + |
153 | + XmlRole { name: "title"; query: "title/string()" } |
154 | + XmlRole { name: "pubdate"; query: "pubDate/string()" } |
155 | + } |
156 | +} |
157 | |
158 | === added file 'RssFeedPage.qml' |
159 | --- RssFeedPage.qml 1970-01-01 00:00:00 +0000 |
160 | +++ RssFeedPage.qml 2013-04-17 08:55:29 +0000 |
161 | @@ -0,0 +1,176 @@ |
162 | +/* |
163 | + license GPL v3 ........... |
164 | + |
165 | + description of this file: |
166 | + a page for viewing a user selected RSS feed ; |
167 | + |
168 | + Architecture: |
169 | + page |
170 | + { |
171 | + ToolbarActions |
172 | + |
173 | + Rectangle |
174 | + { |
175 | + label(RSS feed title) |
176 | + } |
177 | + |
178 | + ListView |
179 | + { |
180 | + } |
181 | + |
182 | + Component(delegate) |
183 | + |
184 | + XmlListModel(rss feed) |
185 | + } |
186 | +*/ |
187 | + |
188 | +import QtQuick 2.0 |
189 | +import QtQuick.XmlListModel 2.0 |
190 | +import Ubuntu.Components 0.1 |
191 | +import Ubuntu.Components.ListItems 0.1 as ListItem |
192 | + |
193 | +Page { |
194 | + id: page_feed |
195 | +// width: 100 |
196 | +// height: 62 |
197 | + property string rssmodel_url: "" |
198 | + property string rsstitle: "" |
199 | + property int rss_index: 0 |
200 | + |
201 | + onRss_indexChanged: |
202 | + { |
203 | + rss_listview.currentIndex = rss_index |
204 | + } |
205 | + |
206 | + tools: ToolbarActions { |
207 | + Action { |
208 | + text: "action 1" |
209 | + iconSource: Qt.resolvedUrl("avatar.png") |
210 | + } |
211 | + Action { |
212 | + text: "action 2" |
213 | + iconSource: Qt.resolvedUrl("avatar.png") |
214 | + } |
215 | + } |
216 | + |
217 | +// Rectangle |
218 | +// { |
219 | +// id: bg |
220 | +// anchors.fill: parent |
221 | +// color: "white" |
222 | +// } |
223 | + |
224 | + ////////////////////////////////////////////// shows the RSS feed title |
225 | + Rectangle |
226 | + { |
227 | + id: rec_title |
228 | + width: parent.width |
229 | + height: label_title.height + units.gu(1) |
230 | + color: "orange" |
231 | + |
232 | + Label |
233 | + { |
234 | + id: label_title |
235 | + anchors.centerIn: parent |
236 | + width: parent.width - units.gu(2) |
237 | + ItemStyle.class: "title" |
238 | + wrapMode: Text.WrapAtWordBoundaryOrAnywhere |
239 | + text: rsstitle |
240 | + color: "white" |
241 | + } |
242 | + } |
243 | + |
244 | + ////////////////////////////////////////////// a listview to show the RSS content |
245 | + ListView |
246 | + { |
247 | + id: rss_listview |
248 | + width: parent.width |
249 | + anchors.bottom: parent.bottom |
250 | + anchors.bottomMargin: units.gu(1) |
251 | + anchors.top: rec_title.bottom |
252 | + anchors.topMargin: units.gu(2) |
253 | + snapMode: ListView.SnapOneItem |
254 | +// height: isList ? 0 : units.gu(30) |
255 | +// opacity: isList ? 0 : 1 |
256 | + cacheBuffer: 90 |
257 | +// spacing: units.gu(2) |
258 | + boundsBehavior: Flickable.StopAtBounds |
259 | + orientation: ListView.Horizontal |
260 | +// currentIndex: rss_index |
261 | + contentHeight: parent.width * count |
262 | + model: rssmodel |
263 | + delegate: xmldelegate |
264 | + } |
265 | + |
266 | + ////////////////////////////////////////////// delegate for ListView |
267 | + Component |
268 | + { |
269 | + id: xmldelegate |
270 | + |
271 | + Column |
272 | + { |
273 | + spacing: units.gu(2) |
274 | + width: rss_listview.width |
275 | + height: rss_listview.height |
276 | + |
277 | + Label |
278 | + { |
279 | + fontSize: "large" |
280 | + text: model_title |
281 | + anchors.horizontalCenter: parent.horizontalCenter |
282 | + width: parent.width - units.gu(2) |
283 | + wrapMode: Text.WrapAtWordBoundaryOrAnywhere |
284 | + color: "black" |
285 | + } |
286 | + |
287 | + Label |
288 | + { |
289 | + text: |
290 | + { |
291 | + if (description.split("</a>").length > 1) |
292 | + return description.split("</a>")[1].split("</p>")[0] ; |
293 | + else |
294 | + return description ; |
295 | + } |
296 | + anchors.horizontalCenter: parent.horizontalCenter |
297 | + width: parent.width - units.gu(1) |
298 | + wrapMode: Text.WrapAtWordBoundaryOrAnywhere |
299 | + color: "black" |
300 | + |
301 | + MouseArea |
302 | + { |
303 | + anchors.fill: parent |
304 | + onClicked: |
305 | + { |
306 | + console.log("current index : " + index) ; |
307 | + } |
308 | + } |
309 | + } |
310 | + } |
311 | + |
312 | +// RssItemDelegate |
313 | +// { |
314 | +// width: units.gu(30) |
315 | +// height: rss_listview.height |
316 | +// rss_title: title |
317 | +// rss_description: |
318 | +// { |
319 | +// if (description.split("</a>").length > 1) |
320 | +// return description.split("</a>")[1].split("</p>")[0] ; |
321 | +// else |
322 | +// return description ; |
323 | +// } |
324 | +// } |
325 | + } |
326 | + |
327 | + ////////////////////////////////////////////////// RSS xml model |
328 | + XmlListModel |
329 | + { |
330 | + id: rssmodel |
331 | + source: rssmodel_url |
332 | + query: "/rss/channel/item" |
333 | + |
334 | + XmlRole { name: "model_title"; query: "title/string()" } |
335 | + XmlRole { name: "description"; query: "description/string()" } |
336 | + } |
337 | +} |
338 | |
339 | === added file 'RssItemDelegate.qml' |
340 | --- RssItemDelegate.qml 1970-01-01 00:00:00 +0000 |
341 | +++ RssItemDelegate.qml 2013-04-17 08:55:29 +0000 |
342 | @@ -0,0 +1,104 @@ |
343 | +/* |
344 | + license GPL v3 ........... |
345 | + |
346 | + description of this file: |
347 | + a delegate for the ListView in the RssFeedDelegate, each delegate shows an item of a rss feed ; |
348 | + |
349 | + Architecture: |
350 | + Item |
351 | + { |
352 | + Column |
353 | + { |
354 | + UbuntuShape(for item title) |
355 | + { |
356 | + Label(title) |
357 | + } |
358 | + |
359 | + UbuntuShape(for item description) |
360 | + { |
361 | + Label(description) |
362 | + } |
363 | + } |
364 | + } |
365 | +*/ |
366 | + |
367 | +import QtQuick 2.0 |
368 | +import Ubuntu.Components 0.1 |
369 | +import Ubuntu.Components.ListItems 0.1 as ListItem |
370 | + |
371 | +Item { |
372 | + id: rss_item_delegate |
373 | +// width: 100 |
374 | +// height: 62 |
375 | + |
376 | + property string rss_title: "" |
377 | + property string rss_description: "" |
378 | + |
379 | + signal click() |
380 | + |
381 | + Column |
382 | + { |
383 | + spacing: units.gu(1) |
384 | + anchors.fill: parent |
385 | + |
386 | + ///////////////////////////////////////////////////// item for title |
387 | + UbuntuShape |
388 | + { |
389 | + id: item_title |
390 | + height: label_title.paintedHeight + units.gu(1) |
391 | + width: rss_item_delegate.width |
392 | + color: "orange" |
393 | + |
394 | + Label |
395 | + { |
396 | + id: label_title |
397 | + text: rss_title |
398 | + anchors.horizontalCenter: parent.horizontalCenter |
399 | + width: parent.width - units.gu(1) |
400 | + wrapMode: Text.WrapAtWordBoundaryOrAnywhere |
401 | + color: "black" |
402 | + } |
403 | + } |
404 | + |
405 | + ///////////////////////////////////////////////////// item for description |
406 | + UbuntuShape |
407 | + { |
408 | + id: item_description |
409 | + height: rss_item_delegate.height - item_title.height - units.gu(1) |
410 | + width: rss_item_delegate.width |
411 | + color: "lightblue" |
412 | + |
413 | +// TextArea |
414 | +// { |
415 | +// id: textarea_description |
416 | +// anchors.horizontalCenter: parent.horizontalCenter |
417 | +// width: parent.width/* - units.gu(1)*/ |
418 | +// height: parent.height |
419 | +// text: rss_description |
420 | +// selectByMouse: false |
421 | +// activeFocusOnPress: false |
422 | +// contentWidth: parent.width |
423 | +// readOnly: true |
424 | +// } |
425 | + Label |
426 | + { |
427 | + id: textarea_description |
428 | + anchors.horizontalCenter: parent.horizontalCenter |
429 | + width: parent.width - units.gu(1) |
430 | + height: parent.height |
431 | + text: rss_description |
432 | + wrapMode: Text.WrapAtWordBoundaryOrAnywhere |
433 | + elide: Text.ElideRight |
434 | + } |
435 | + } |
436 | + } |
437 | + |
438 | +// MouseArea |
439 | +// { |
440 | +// anchors.fill: parent |
441 | +// onClicked: |
442 | +// { |
443 | +// click(); |
444 | +// } |
445 | +// } |
446 | +} |
447 | |
448 | === added file 'rssview.qml' |
449 | --- rssview.qml 1970-01-01 00:00:00 +0000 |
450 | +++ rssview.qml 2013-04-17 08:55:29 +0000 |
451 | @@ -0,0 +1,275 @@ |
452 | +/* |
453 | + license GPL v3 ........... |
454 | + |
455 | + description of this demo: |
456 | + This is a demo about viewing RSS feeds, no offline functions implemented yet; |
457 | + |
458 | + files: |
459 | + rssview.qml : main view of demo |
460 | + RssFeedDelegate.qml : a delegate for listvew in mosaic mode (listview in mainView) |
461 | + RssFeedPage.qml : an independent page for viewing one RSS feed |
462 | + RssItemDelegate.qml : a delegate for listview in RssFeedDelegate.qml |
463 | + |
464 | + Architecture: |
465 | + mainView |
466 | + { |
467 | + pageStack |
468 | + { |
469 | + tabs |
470 | + { |
471 | + tab(feeds) |
472 | + { |
473 | + listview |
474 | + { |
475 | + RssFeedDelegate |
476 | + { |
477 | + RssItemDelegate |
478 | + } |
479 | + } |
480 | + } |
481 | + } |
482 | + |
483 | + RssFeedPage |
484 | + } |
485 | + |
486 | + Component(delegate) |
487 | + |
488 | + ListModel(RSS feeds) |
489 | + } |
490 | +*/ |
491 | + |
492 | +import QtQuick 2.0 |
493 | +import QtQuick.XmlListModel 2.0 |
494 | +import Ubuntu.Components 0.1 |
495 | +import Ubuntu.Components.ListItems 0.1 as ListItem |
496 | +import Ubuntu.Components.Popups 0.1 |
497 | + |
498 | +/*! |
499 | + \brief MainView with Tabs element. |
500 | + First Tab has a single Label and |
501 | + second Tab has a single ToolbarAction. |
502 | +*/ |
503 | + |
504 | +MainView { |
505 | + // objectName for functional testing purposes (autopilot-qt5) |
506 | + id: mainView |
507 | + objectName: "mainView" |
508 | + applicationName: "ubuntutab0" |
509 | + |
510 | + width: units.gu(50) |
511 | + height: units.gu(75) |
512 | + |
513 | + // a property for judging list mode or mosaic mode |
514 | + property bool isListMode: false |
515 | + |
516 | + // this PageStack use for pushing the independent RssFeedPage after user click an RSS item |
517 | + PageStack { |
518 | + id: pageStack |
519 | + anchors.fill: parent |
520 | + Component.onCompleted: |
521 | + { |
522 | + push(tabs); // use tabs as first page |
523 | +// pageStack.__showHeader = false ; // hide the pageStack header |
524 | + } |
525 | + |
526 | + Tabs { |
527 | + id: tabs |
528 | + anchors.fill: parent |
529 | + |
530 | + // First tab begins here |
531 | + Tab { |
532 | + objectName: "Tab1" |
533 | + |
534 | + title: i18n.tr("RSS Reader") |
535 | + clip: true |
536 | + |
537 | + // main page for RSS feeds viewing |
538 | + page: |
539 | + Page { |
540 | + id: page_mosaic |
541 | + anchors.margins: units.gu(2) |
542 | +// visible: false |
543 | + // clip: true |
544 | + |
545 | + tools: ToolbarActions { |
546 | + Action { |
547 | + objectName: "action" |
548 | + |
549 | + iconSource: Qt.resolvedUrl("avatar.png") |
550 | + text: i18n.tr("Change mode") |
551 | + |
552 | + onTriggered: { |
553 | + isListMode = isListMode ? false : true ; // switch mode for mosaic or list |
554 | + } |
555 | + } |
556 | + } |
557 | + |
558 | + // ListView for RSS feeds |
559 | + ListView |
560 | + { |
561 | + id: feed_view |
562 | + // anchors.left: parent.left |
563 | + // anchors.leftMargin: units.gu(1) |
564 | + anchors.fill: parent |
565 | + cacheBuffer: 90 |
566 | + spacing: units.gu(2) |
567 | + contentHeight: isListMode ? units.gu(7) * count : units.gu(37) * count |
568 | + model: rssFeeds |
569 | + delegate: rss_feed_delegate |
570 | + // clip: true |
571 | + } |
572 | + } |
573 | + |
574 | + } |
575 | + |
576 | +// // Second tab begins here |
577 | +// Tab { |
578 | +// objectName: "Tab2" |
579 | + |
580 | +// title: i18n.tr("Optional Screen") |
581 | +// page: Page { |
582 | +// anchors.margins: units.gu(2) |
583 | + |
584 | +// tools: ToolbarActions { |
585 | +// Action { |
586 | +// objectName: "action" |
587 | + |
588 | +// iconSource: Qt.resolvedUrl("avatar.png") |
589 | +// text: i18n.tr("Tap me!") |
590 | + |
591 | +// onTriggered: { |
592 | +// label.text = i18n.tr("Toolbar tapped") |
593 | +// } |
594 | +// } |
595 | +// } |
596 | + |
597 | +// Column { |
598 | +// anchors.centerIn: parent |
599 | +// Label { |
600 | +// id: label |
601 | +// objectName: "label" |
602 | + |
603 | +// text: i18n.tr("Swipe from bottom to up to reveal the toolbar.") |
604 | +// } |
605 | +// } |
606 | +// } |
607 | +// } |
608 | + } |
609 | + |
610 | + // independent page for viewing one RSS feed |
611 | + RssFeedPage |
612 | + { |
613 | + id: feed_page |
614 | + visible: false |
615 | + } |
616 | + } |
617 | + |
618 | +// Component |
619 | +// { |
620 | +// id: xmldelegate |
621 | + |
622 | +// RssItemDelegate |
623 | +// { |
624 | +// width: units.gu(30) |
625 | +// height: xmlview.height |
626 | +// rss_title: title |
627 | +// rss_description: |
628 | +// { |
629 | +// if (description.split("</a>").length > 1) |
630 | +// return description.split("</a>")[1].split("</p>")[0] ; |
631 | +// else |
632 | +// return description ; |
633 | +// } |
634 | +// } |
635 | +// } |
636 | + |
637 | +// XmlListModel |
638 | +// { |
639 | +// id: xmlmodel |
640 | +// source: "http://news.yahoo.com/rss/topstories" |
641 | +// query: "/rss/channel/item" |
642 | + |
643 | +// XmlRole { name: "title"; query: "title/string()" } |
644 | +// XmlRole { name: "description"; query: "description/string()" } |
645 | +// } |
646 | + |
647 | + // delegate for listview |
648 | + Component |
649 | + { |
650 | + id: rss_feed_delegate |
651 | + |
652 | + RssFeedDelegate |
653 | + { |
654 | + width: parent.width |
655 | + rss_url: feed |
656 | + isList: isListMode |
657 | + |
658 | + //////////////////////////////////////////// click an RSS item to push RssFeedPage to stack |
659 | + onItem_click: |
660 | + { |
661 | + feed_page.rssmodel_url = rss_model ; |
662 | + feed_page.rss_index = rss_index ; |
663 | + feed_page.rsstitle = rss_title ; |
664 | + pageStack.push(feed_page); |
665 | + } |
666 | + } |
667 | + } |
668 | + |
669 | + // RSS feeds example |
670 | + ListModel { |
671 | + id: rssFeeds |
672 | + |
673 | + ListElement { name: "Top Stories"; feed: "http://news.yahoo.com/rss/topstories" } |
674 | + ListElement { name: "World"; feed: "http://news.yahoo.com/rss/world" } |
675 | + ListElement { name: "Europe"; feed: "http://news.yahoo.com/rss/europe" } |
676 | + ListElement { name: "Oceania"; feed: "http://news.yahoo.com/rss/oceania" } |
677 | + ListElement { name: "U.S. National"; feed: "http://news.yahoo.com/rss/us" } |
678 | + ListElement { name: "Politics"; feed: "http://news.yahoo.com/rss/linux" } |
679 | + ListElement { name: "Business"; feed: "http://news.yahoo.com/rss/business" } |
680 | + ListElement { name: "Technology"; feed: "http://news.yahoo.com/rss/tech" } |
681 | + ListElement { name: "Entertainment"; feed: "http://news.yahoo.com/rss/entertainment" } |
682 | + ListElement { name: "Health"; feed: "http://news.yahoo.com/rss/health" } |
683 | + ListElement { name: "Science"; feed: "http://news.yahoo.com/rss/science" } |
684 | + ListElement { name: "Sports"; feed: "http://news.yahoo.com/rss/sports" } |
685 | + } |
686 | + |
687 | + // a popup to show options |
688 | + Component { |
689 | + id: popoverComponent |
690 | + |
691 | + Popover { |
692 | + id: popover |
693 | + z: 10 |
694 | + |
695 | + Component.onCompleted: console.log("popup") |
696 | + |
697 | + Column { |
698 | + id: containerLayout |
699 | +// anchors.fill: parent |
700 | + anchors { |
701 | + left: parent.left |
702 | + top: parent.top |
703 | + right: parent.right |
704 | + } |
705 | + |
706 | + ListItem.Standard { |
707 | + text: "Hot" |
708 | +// selected: articleList.filter == 'hot' |
709 | + onClicked: { |
710 | +// articleList.filter = 'hot' |
711 | + PopupUtils.close(popover) |
712 | + } |
713 | + } |
714 | + ListItem.Standard { |
715 | + text: "New" |
716 | +// selected: articleList.filter == 'new' |
717 | + onClicked: { |
718 | +// articleList.filter = 'new' |
719 | + PopupUtils.close(popover) |
720 | + } |
721 | + } |
722 | + |
723 | + } |
724 | + } // Popover |
725 | + } // Popover component |
726 | +} |
727 | |
728 | === modified file 'ubuntu-rssreader-app.qml' |
729 | --- ubuntu-rssreader-app.qml 2013-04-15 08:35:42 +0000 |
730 | +++ ubuntu-rssreader-app.qml 2013-04-17 08:55:29 +0000 |
731 | @@ -1,6 +1,7 @@ |
732 | import QtQuick 2.0 |
733 | import Ubuntu.Components 0.1 |
734 | - |
735 | +import Ubuntu.Components.Popups 0.1 |
736 | +import Ubuntu.Components.ListItems 0.1 as ListItem |
737 | |
738 | |
739 | /*! |
740 | @@ -13,20 +14,53 @@ |
741 | |
742 | MainView { |
743 | // objectName for functional testing purposes (autopilot-qt5) |
744 | + id: mainView |
745 | objectName: "rssreader" |
746 | applicationName: "ubuntu-rssreader-app" |
747 | |
748 | width: units.gu(50) |
749 | height: units.gu(75) |
750 | |
751 | + Component.onCompleted: { |
752 | +// PopupUtils.open(popoverComponent, mainView); |
753 | + } |
754 | + |
755 | +// Rectangle |
756 | +// { |
757 | +// id: test_demo |
758 | +// width: units.gu(10) |
759 | +// height: units.gu(7) |
760 | +// radius: units.gu(2) |
761 | +// color: "lightblue" |
762 | +// opacity: 0.5 |
763 | +// z: 99999999999999999999 |
764 | + |
765 | +// Label |
766 | +// { |
767 | +// text: "launch demo" |
768 | +// } |
769 | + |
770 | +// MouseArea |
771 | +// { |
772 | +// anchors.fill: parent |
773 | +// onClicked: |
774 | +// { |
775 | +// mainPageStack.push(tabs_demo); |
776 | +// } |
777 | +// } |
778 | +// } |
779 | + |
780 | PageStack { |
781 | id: mainPageStack |
782 | Component.onCompleted: { |
783 | push(todayPage) |
784 | todayPage.refresh() |
785 | +// PopupUtils.open(popoverComponent, mainPageStack); |
786 | + push(tabs_demo); |
787 | } |
788 | anchors.fill: parent |
789 | __showHeader: false |
790 | + |
791 | TodayPage { |
792 | id: todayPage |
793 | visible: false |
794 | @@ -76,5 +110,160 @@ |
795 | visible: false |
796 | anchors.fill: parent |
797 | } |
798 | - } |
799 | + |
800 | + ////////////////////////////////////////////////////////////////////// add by Joey Chan ----- 2013-04-17 |
801 | + ////////////////////////////////////////////////////////////////////// my first demo |
802 | + |
803 | + Tabs { |
804 | + id: tabs_demo |
805 | + anchors.fill: parent |
806 | + visible: false |
807 | + |
808 | + // a property for judging list mode or mosaic mode |
809 | + property bool isListMode: false |
810 | + |
811 | + // First tab begins here |
812 | + Tab { |
813 | + objectName: "Tab1" |
814 | + |
815 | + title: i18n.tr("RSS Reader") |
816 | + clip: true |
817 | + |
818 | + // main page for RSS feeds viewing |
819 | + page: |
820 | + Page { |
821 | + id: page_mosaic |
822 | + anchors.margins: units.gu(2) |
823 | + |
824 | + tools: ToolbarActions { |
825 | + Action { |
826 | + objectName: "action" |
827 | + |
828 | + iconSource: Qt.resolvedUrl("avatar.png") |
829 | + text: i18n.tr("Change mode") |
830 | + |
831 | + onTriggered: { |
832 | + tabs_demo.isListMode = tabs_demo.isListMode ? false : true ; // switch mode for mosaic or list |
833 | + } |
834 | + } |
835 | +// Action { |
836 | +// id: popup |
837 | +// objectName: "action1" |
838 | + |
839 | +// iconSource: Qt.resolvedUrl("avatar.png") |
840 | +// text: i18n.tr("popover") |
841 | + |
842 | +// onTriggered: { |
843 | +// PopupUtils.open(popoverComponent, popup.itemHint); |
844 | +// } |
845 | +// } |
846 | + } |
847 | + |
848 | + // ListView for RSS feeds |
849 | + ListView |
850 | + { |
851 | + id: feed_view |
852 | + // anchors.left: parent.left |
853 | + // anchors.leftMargin: units.gu(1) |
854 | + anchors.fill: parent |
855 | + cacheBuffer: 90 |
856 | + spacing: units.gu(2) |
857 | + contentHeight: tabs_demo.isListMode ? units.gu(7) * count : units.gu(37) * count |
858 | + model: rssFeeds |
859 | + delegate: rss_feed_delegate |
860 | + // clip: true |
861 | + } |
862 | + } |
863 | + |
864 | + } |
865 | + |
866 | + } |
867 | + |
868 | + // independent page for viewing one RSS feed |
869 | + RssFeedPage |
870 | + { |
871 | + id: feed_page |
872 | + visible: false |
873 | + } |
874 | + } |
875 | + |
876 | + // delegate for listview |
877 | + Component |
878 | + { |
879 | + id: rss_feed_delegate |
880 | + |
881 | + RssFeedDelegate |
882 | + { |
883 | + width: parent.width |
884 | + rss_url: feed |
885 | + isList: tabs_demo.isListMode |
886 | + |
887 | + //////////////////////////////////////////// click an RSS item to push RssFeedPage to stack |
888 | + onItem_click: |
889 | + { |
890 | + feed_page.rssmodel_url = rss_model ; |
891 | + feed_page.rss_index = rss_index ; |
892 | + feed_page.rsstitle = rss_title ; |
893 | + mainPageStack.push(feed_page); |
894 | + } |
895 | + } |
896 | + } |
897 | + |
898 | + // RSS feeds example |
899 | + ListModel { |
900 | + id: rssFeeds |
901 | + |
902 | + ListElement { name: "Top Stories"; feed: "http://news.yahoo.com/rss/topstories" } |
903 | + ListElement { name: "World"; feed: "http://news.yahoo.com/rss/world" } |
904 | + ListElement { name: "Europe"; feed: "http://news.yahoo.com/rss/europe" } |
905 | + ListElement { name: "Oceania"; feed: "http://news.yahoo.com/rss/oceania" } |
906 | + ListElement { name: "U.S. National"; feed: "http://news.yahoo.com/rss/us" } |
907 | + ListElement { name: "Politics"; feed: "http://news.yahoo.com/rss/linux" } |
908 | + ListElement { name: "Business"; feed: "http://news.yahoo.com/rss/business" } |
909 | + ListElement { name: "Technology"; feed: "http://news.yahoo.com/rss/tech" } |
910 | + ListElement { name: "Entertainment"; feed: "http://news.yahoo.com/rss/entertainment" } |
911 | + ListElement { name: "Health"; feed: "http://news.yahoo.com/rss/health" } |
912 | + ListElement { name: "Science"; feed: "http://news.yahoo.com/rss/science" } |
913 | + ListElement { name: "Sports"; feed: "http://news.yahoo.com/rss/sports" } |
914 | + } |
915 | + |
916 | + // a popup to show options |
917 | + Component { |
918 | + id: popoverComponent |
919 | + |
920 | + Popover { |
921 | + id: popover |
922 | + z: 10 |
923 | + |
924 | + Component.onCompleted: console.log("popup") |
925 | + |
926 | + Column { |
927 | + id: containerLayout |
928 | +// anchors.fill: parent |
929 | + anchors { |
930 | + left: parent.left |
931 | + top: parent.top |
932 | + right: parent.right |
933 | + } |
934 | + |
935 | + ListItem.Standard { |
936 | + text: "Hot" |
937 | +// selected: articleList.filter == 'hot' |
938 | + onClicked: { |
939 | +// articleList.filter = 'hot' |
940 | + PopupUtils.close(popover) |
941 | + } |
942 | + } |
943 | + ListItem.Standard { |
944 | + text: "New" |
945 | +// selected: articleList.filter == 'new' |
946 | + onClicked: { |
947 | +// articleList.filter = 'new' |
948 | + PopupUtils.close(popover) |
949 | + } |
950 | + } |
951 | + |
952 | + } |
953 | + } // Popover |
954 | + } // Popover component |
955 | } |
Joey, are you merged your version with my morning trunk update?)
17.04.13 12:56 Joey Chan написал(а):
Joey Chan has proposed merging lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into lp:ubuntu-rssreader-app.
Commit message:
add my first demo into current trunk, click the back button in the bottom bar can go back to current trunk version
Requested reviews: rssreader- dev)
Ubuntu RSS Feed Reader Developers (ubuntu-
For more details, see:
https:/ /code.launchpad .net/~qqworini/ ubuntu- rssreader- app/add- demo-to- trunk/+ merge/159325
add my first demo into current trunk, click the back button in the bottom bar can go back to current trunk version
-- /code.launchpad .net/~qqworini/ ubuntu- rssreader- app/add- demo-to- trunk/+ merge/159325
https:/
Your team Ubuntu RSS Feed Reader Developers is requested to review the proposed merge of lp:~qqworini/ubuntu-rssreader-app/add-demo-to-trunk into lp:ubuntu-rssreader-app.