[ubuntu] Use new 15.04.1 framework
This commit is contained in:
parent
69e42f2c9e
commit
b9bdef1f69
16 changed files with 74 additions and 66 deletions
|
|
@ -10,23 +10,25 @@
|
|||
//in /usr/share/common-licenses. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
import QtQuick 2.0
|
||||
import Ubuntu.Components 1.1
|
||||
import Ubuntu.Components 1.3
|
||||
|
||||
Page {
|
||||
id: categoriesPage
|
||||
title: qsTr("Tiny Tiny RSS Reader")
|
||||
|
||||
property var categories
|
||||
|
||||
head {
|
||||
actions: [
|
||||
header: PageHeader {
|
||||
title: qsTr("Tiny Tiny RSS Reader")
|
||||
flickable: listView
|
||||
trailingActionBar.actions: [
|
||||
Action {
|
||||
iconName: "settings"
|
||||
onTriggered: pageStack.push(Qt.resolvedUrl("Settings.qml"))
|
||||
}
|
||||
]
|
||||
|
||||
sections {
|
||||
extension: Sections {
|
||||
anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
|
||||
model: [ qsTr("Unread"), qsTr("All") ]
|
||||
selectedIndex: settings.showAll ? 1 : 0
|
||||
onSelectedIndexChanged: {
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
//in /usr/share/common-licenses. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
import QtQuick 2.0
|
||||
import Ubuntu.Components 0.1
|
||||
import Ubuntu.Components.ListItems 0.1 as ListItem
|
||||
import Ubuntu.Components 1.3
|
||||
import Ubuntu.Components.ListItems 1.3 as ListItem
|
||||
|
||||
ListItem.SingleValue {
|
||||
id: listItem
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@
|
|||
//in /usr/share/common-licenses. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
import QtQuick 2.0
|
||||
import Ubuntu.Components 1.1
|
||||
import Ubuntu.Components.ListItems 1.0 as ListItem
|
||||
import Ubuntu.Components.Popups 1.0
|
||||
import Ubuntu.Content 1.1
|
||||
import Ubuntu.Components 1.3
|
||||
import Ubuntu.Components.ListItems 1.3 as ListItem
|
||||
import Ubuntu.Components.Popups 1.3
|
||||
import Ubuntu.Content 1.3
|
||||
|
||||
ActionSelectionPopover {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
//in /usr/share/common-licenses. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
import QtQuick 2.0
|
||||
import Ubuntu.Components 0.1
|
||||
import Ubuntu.Components.ListItems 0.1 as ListItem
|
||||
import Ubuntu.Components 1.3
|
||||
import Ubuntu.Components.ListItems 1.3 as ListItem
|
||||
|
||||
ListItem.Empty {
|
||||
id: listItem
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
//in /usr/share/common-licenses. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
import QtQuick 2.0
|
||||
import Ubuntu.Components 1.1
|
||||
import Ubuntu.Components.Popups 1.0
|
||||
import Ubuntu.Components 1.3
|
||||
import Ubuntu.Components.Popups 1.3
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
//in /usr/share/common-licenses. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
import QtQuick 2.0
|
||||
import Ubuntu.Components 0.1
|
||||
import Ubuntu.Components.ListItems 0.1 as ListItem
|
||||
import Ubuntu.Components 1.3
|
||||
import Ubuntu.Components.ListItems 1.3 as ListItem
|
||||
|
||||
ListItem.Empty {
|
||||
id: listItem
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
//in /usr/share/common-licenses. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
import QtQuick 2.0
|
||||
import Ubuntu.Components 1.1
|
||||
import Ubuntu.Components 1.3
|
||||
|
||||
Page {
|
||||
id: root
|
||||
|
|
@ -21,23 +21,25 @@ Page {
|
|||
property alias currentItem: listView.currentItem
|
||||
|
||||
anchors.fill: parent
|
||||
title: currentItem ? currentItem.title : ""
|
||||
flickable: currentItem ? currentItem.flickable : null
|
||||
|
||||
head.actions: [
|
||||
Action {
|
||||
iconSource: "../resources/ic_star_"+(currentItem.marked?"enabled":"disabled")+".png"
|
||||
onTriggered: {
|
||||
model.toggleStar()
|
||||
header: PageHeader {
|
||||
title: currentItem ? currentItem.title : ""
|
||||
flickable: currentItem ? currentItem.flickable : null
|
||||
trailingActionBar.actions: [
|
||||
Action {
|
||||
iconSource: "../resources/ic_star_"+(currentItem.marked?"enabled":"disabled")+".png"
|
||||
onTriggered: {
|
||||
model.toggleStar()
|
||||
}
|
||||
},
|
||||
Action {
|
||||
iconSource: "../resources/ic_"+(currentItem.unread?"unread":"read")+".png"
|
||||
onTriggered: {
|
||||
model.toggleRead()
|
||||
}
|
||||
}
|
||||
},
|
||||
Action {
|
||||
iconSource: "../resources/ic_"+(currentItem.unread?"unread":"read")+".png"
|
||||
onTriggered: {
|
||||
model.toggleRead()
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: listView
|
||||
|
|
|
|||
|
|
@ -10,15 +10,13 @@
|
|||
//in /usr/share/common-licenses. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
import QtQuick 2.0
|
||||
import Ubuntu.Components 1.1
|
||||
import Ubuntu.Components.ListItems 1.0 as ListItem
|
||||
import Ubuntu.Components 1.3
|
||||
import Ubuntu.Components.ListItems 1.3 as ListItem
|
||||
|
||||
Page {
|
||||
id: feeditemsPage
|
||||
property variant feed
|
||||
|
||||
title: feed.title
|
||||
|
||||
Component.onCompleted: {
|
||||
feedItemModel.feed = feeditemsPage.feed
|
||||
feedItemModel.hasMoreItems = false
|
||||
|
|
@ -30,8 +28,18 @@ Page {
|
|||
pullToRefresh.enabled = true
|
||||
}
|
||||
|
||||
head {
|
||||
sections {
|
||||
header: PageHeader {
|
||||
title: feed.title
|
||||
flickable: listView
|
||||
trailingActionBar.actions: [
|
||||
Action {
|
||||
text: qsTr('Mark all read')
|
||||
iconName: "tick"
|
||||
onTriggered: feedItemModel.catchUp()
|
||||
}
|
||||
]
|
||||
extension: Sections {
|
||||
anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
|
||||
model: [ qsTr("Unread"), qsTr("All") ]
|
||||
selectedIndex: settings.showAll ? 1 : 0
|
||||
onSelectedIndexChanged: {
|
||||
|
|
@ -47,14 +55,6 @@ Page {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
actions: [
|
||||
Action {
|
||||
text: qsTr('Mark all read')
|
||||
iconName: "tick"
|
||||
onTriggered: feedItemModel.catchUp()
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
ListView {
|
||||
|
|
|
|||
|
|
@ -10,14 +10,12 @@
|
|||
//in /usr/share/common-licenses. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
import QtQuick 2.0
|
||||
import Ubuntu.Components 1.1
|
||||
import Ubuntu.Components 1.3
|
||||
|
||||
Page {
|
||||
id: feedsPage
|
||||
property var category
|
||||
|
||||
title: category.title
|
||||
|
||||
Component.onCompleted: {
|
||||
feedModel.category = feedsPage.category
|
||||
feedModel.clear()
|
||||
|
|
@ -28,15 +26,18 @@ Page {
|
|||
pullToRefresh.enabled = true
|
||||
}
|
||||
|
||||
head {
|
||||
actions: [
|
||||
header: PageHeader {
|
||||
title: category.title
|
||||
flickable: listView
|
||||
trailingActionBar.actions: [
|
||||
Action {
|
||||
iconName: "settings"
|
||||
onTriggered: pageStack.push(Qt.resolvedUrl("Settings.qml"))
|
||||
}
|
||||
]
|
||||
|
||||
sections {
|
||||
extension: Sections {
|
||||
anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
|
||||
model: [ qsTr("Unread"), qsTr("All") ]
|
||||
selectedIndex: settings.showAll ? 1 : 0
|
||||
onSelectedIndexChanged: {
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
//in /usr/share/common-licenses. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
import QtQuick 2.0
|
||||
import Ubuntu.Components 1.1
|
||||
import Ubuntu.Content 1.1
|
||||
import Ubuntu.DownloadManager 0.1
|
||||
import Ubuntu.Components 1.3
|
||||
import Ubuntu.Content 1.3
|
||||
import Ubuntu.DownloadManager 1.2
|
||||
|
||||
Page {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import QtQuick 2.0
|
||||
import Ubuntu.Components 0.1
|
||||
import Ubuntu.Components.ListItems 1.0 as ListItem
|
||||
import Ubuntu.Components 1.3
|
||||
import Ubuntu.Components.ListItems 1.3 as ListItem
|
||||
import Ubuntu.Keyboard 0.1
|
||||
|
||||
Item {
|
||||
|
|
|
|||
|
|
@ -20,12 +20,16 @@
|
|||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import Ubuntu.Components 1.1
|
||||
import Ubuntu.Components.ListItems 1.0 as ListItem
|
||||
import Ubuntu.Components 1.3
|
||||
import Ubuntu.Components.ListItems 1.3 as ListItem
|
||||
|
||||
Page {
|
||||
id: settingsPage
|
||||
title: qsTr("Settings")
|
||||
|
||||
header: PageHeader {
|
||||
title: qsTr("Settings")
|
||||
flickable: flickable
|
||||
}
|
||||
|
||||
Flickable {
|
||||
id: flickable
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
//in /usr/share/common-licenses. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
import QtQuick 2.0
|
||||
import Ubuntu.Components 0.1
|
||||
import Ubuntu.Components 1.3
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import QtQuick 2.0
|
||||
import Ubuntu.Components 0.1
|
||||
import Ubuntu.Components 1.3
|
||||
import "../models/tinytinyrss.js" as TTRss
|
||||
import "../models" 1.0
|
||||
|
||||
|
|
@ -16,7 +16,6 @@ MainView {
|
|||
|
||||
width: units.gu(45)
|
||||
height: units.gu(75)
|
||||
useDeprecatedToolbar: false
|
||||
|
||||
PageStack {
|
||||
id: pageStack
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
\"description\": \"Tiny Tiny RSS client\",
|
||||
\"framework\": \"ubuntu-sdk-14.10-qml\",
|
||||
\"framework\": \"ubuntu-sdk-15.04.1-qml\",
|
||||
\"hooks\": {
|
||||
\"ttrss\": {
|
||||
\"apparmor\": \"ttrss.json\",
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@
|
|||
"content_exchange_source",
|
||||
"networking"
|
||||
],
|
||||
"policy_version": 1.2
|
||||
"policy_version": 1.3
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue