on xenial help sign in
Unused stuff with new-scopes
7928b34Albert Astals
qml/Dash/Apps/AppPreview.qmldeleted−167
@@ -1,167 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Components.ListItems 0.1 as ListItems
20−import ".."
21−import "../Generic"
22−import "../Previews"
23−import "../../Components"
24−
25−GenericPreview {
26− id: root
27−
28− signal sendUserReview(string review)
29−
30− previewImages: previewImagesComponent
31− description: descriptionComponent
32− header: headerComponent
33−
34− // TODO: Ratings are not yet complete... enable this once they work
35− //ratings: ratingsComponent
36−
37− Component {
38− id: previewImagesComponent
39− ListView {
40− id: previewImageListView
41− spacing: units.gu(1)
42− orientation: ListView.Horizontal
43− height: units.gu(22)
44− model: previewData.infoMap["more-screenshots"] != null ? previewData.infoMap["more-screenshots"].value : [previewData.image]
45− cacheBuffer: width * 3
46−
47− // FIXME: Because of ListViews inside ListViews inside Flickables inside ListViews (and some more)
48− // we finally reached the point where this ListView doesn't correctly get swipe input any more but
49− // instead the parent ListView is the one that is swiped. This MouseArea sort of creates a blocking
50− // layer to make sure this ListView can be swiped, regardless of what's behind it.
51− MouseArea {
52− anchors.fill: parent
53− enabled: parent.contentWidth > parent.width
54− }
55−
56− LazyImage {
57− objectName: "placeholderScreenshot"
58− anchors {
59− top: parent.top
60− bottom: parent.bottom
61− }
62− scaleTo: "height"
63− source: "broken_image"
64− initialWidth: units.gu(13)
65− visible: previewImageListView.count == 0
66− }
67−
68− delegate: LazyImage {
69− id: shape
70− anchors {
71− top: parent.top
72− bottom: parent.bottom
73− }
74− source: modelData ? modelData : ""
75− scaleTo: "height"
76− initialWidth: units.gu(13)
77− }
78− }
79− }
80−
81− Component {
82− id: headerComponent
83− Header {
84− objectName: "previewHeader"
85− title: previewData.title
86− icon: previewData.appIcon
87− subtitle: root.previewData.infoMap["publisher"] ? root.previewData.infoMap["publisher"].value : ""
88− rating: Math.round(root.previewData.rating * 10)
89− reviews: root.previewData.numRatings
90− rated: root.previewData.infoMap["rated"] ? root.previewData.infoMap["rated"].value : 0
91− }
92− }
93−
94− Component {
95− id: descriptionComponent
96− Column {
97− spacing: units.gu(1)
98−
99− Label {
100− objectName: "descriptionLabel"
101− anchors { left: parent.left; right: parent.right }
102− text: root.previewData.description
103− fontSize: "medium"
104− color: Theme.palette.selected.backgroundText
105− opacity: .6
106− wrapMode: Text.WordWrap
107− style: Text.Raised
108− styleColor: "black"
109− }
110− }
111− }
112−
113− Component {
114− id: ratingsComponent
115− Column {
116− id: columnReviewRating
117− objectName: "columnReviewRating"
118− visible: root.previewData.rating >= 0
119−
120− spacing: units.gu(1)
121− height: childrenRect.height
122−
123− ListItems.ThinDivider { }
124−
125− Item {
126− anchors { left: parent.left; right: parent.right }
127− height: rateLabel.height
128−
129− Label {
130− id: rateLabel
131− fontSize: "medium"
132− color: "white"
133− style: Text.Raised
134− styleColor: "black"
135− opacity: .9
136− text: i18n.tr("Rate this")
137−
138− anchors.left: parent.left
139− anchors.verticalCenter: parent.verticalCenter
140− }
141−
142− // FIXME these need to be made interactive and connected to the scope
143− RatingStars {
144− anchors.right: parent.right
145− anchors.verticalCenter: parent.verticalCenter
146− }
147− }
148−
149− ListItems.ThinDivider { }
150−
151− Reviews {
152− id: appReviews
153− objectName: "appReviews"
154−
155− anchors { left: parent.left; right: parent.right }
156−
157− model: root.previewData.infoMap["comments"] ? root.previewData.infoMap["comments"].value : undefined
158−
159− onSendReview: root.sendUserReview(review);
160−
161− onEditing: {
162− root.ensureVisible(appReviews.textArea);
163− }
164− }
165− }
166− }
167−}
qml/Dash/Apps/DashPluginFilterGrid.qmldeleted−47
@@ -1,47 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−import "../Generic"
21−
22−GenericFilterGrid {
23− id: filtergrid
24−
25− delegate: Tile {
26− id: tile
27− objectName: "delegate" + index
28− width: filtergrid.cellWidth
29− height: filtergrid.cellHeight
30− text: model.title
31− imageWidth: filtergrid.iconWidth
32− imageHeight: filtergrid.iconHeight
33− source: model.icon
34−
35− style: FlatTileStyle {
36− disabled: model.rendererHints['scope_disabled'] === 1;
37− }
38−
39− onClicked: {
40− filtergrid.clicked(index, tile.y)
41− }
42−
43− onPressAndHold: {
44− filtergrid.pressAndHold(index, tile.y)
45− }
46− }
47−}
qml/Dash/Apps/FrequentlyUsedAppsModel.qmldeleted−110
@@ -1,110 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−
19−ListModel {
20− ListElement {
21− uri: "application://dialer-app.desktop"
22− icon: "../../graphics/applicationIcons/phone-app.png"
23− category: 0
24− mimetype: "application/x-desktop"
25− title: "Dialer"
26− comment: ""
27− dndUri: "file:///usr/share/applications/dialer-app.desktop"
28− metadata: "subscope:applications.scope/applications-non-click.scope"
29− }
30− ListElement {
31− uri: "application://messaging-app.desktop"
32− icon: "../../graphics/applicationIcons/messages-app.png"
33− category: 0
34− mimetype: "application/x-desktop"
35− title: "Messaging"
36− comment: ""
37− dndUri: "file:///usr/share/applications/messaging-app.desktop"
38− metadata: "subscope:applications.scope/applications-non-click.scope"
39− }
40− ListElement {
41− uri: "application://address-book-app.desktop"
42− icon: "../../graphics/applicationIcons/contacts-app.png"
43− category: 0
44− mimetype: "application/x-desktop"
45− title: "Contacts"
46− comment: ""
47− dndUri: "file:///usr/share/applications/address-book-app.desktop"
48− metadata: "subscope:applications.scope/applications-non-click.scope"
49− }
50− ListElement {
51− uri: "application://camera-app.desktop"
52− icon: "../../graphics/applicationIcons/camera.png"
53− category: 0
54− mimetype: "application/x-desktop"
55− title: "Camera"
56− comment: ""
57− dndUri: "file:///usr/share/applications/camera-app.desktop"
58− metadata: "subscope:applications.scope/applications-non-click.scope"
59− }
60− ListElement {
61− uri: "application://gallery-app.desktop"
62− icon: "../../graphics/applicationIcons/gallery.png"
63− category: 0
64− mimetype: "application/x-desktop"
65− title: "Gallery"
66− comment: ""
67− dndUri: "file:///usr/share/applications/gallery.desktop"
68− metadata: "subscope:applications.scope/applications-non-click.scope"
69− }
70− ListElement {
71− uri: "appid://com.ubuntu.developer.webapps.webapp-facebook/webapp-facebook/current-user-version"
72− icon: "../../graphics/applicationIcons/facebook.png"
73− category: 0
74− mimetype: "application/x-desktop"
75− title: "Facebook"
76− comment: ""
77− dndUri: "appid://com.ubuntu.developer.webapps.webapp-facebook/webapp-facebook/current-user-version"
78− metadata: "subscope:applications.scope/applications-click.scope?app_id=com.ubuntu.developer.webapps.webapp-facebook"
79− }
80− ListElement {
81− uri: "application://webbrowser-app.desktop"
82− icon: "../../graphics/applicationIcons/browser.png"
83− category: 0
84− mimetype: "application/x-desktop"
85− title: "Browser"
86− comment: ""
87− dndUri: "file:///usr/share/applications/webbrowser-app.desktop"
88− metadata: "subscope:applications.scope/applications-non-click.scope"
89− }
90− ListElement {
91− uri: "appid://com.ubuntu.developer.webapps.webapp-gmail/webapp-gmail/current-user-version"
92− icon: "../../graphics/applicationIcons/gmail.png"
93− category: 0
94− mimetype: "application/x-desktop"
95− title: "GMail"
96− comment: ""
97− dndUri: "appid://com.ubuntu.developer.webapps.webapp-gmail/webapp-gmail/current-user-version"
98− metadata: "subscope:applications.scope/applications-click.scope?app_id=com.ubuntu.developer.webapps.webapp-gmail"
99− }
100− ListElement {
101− uri: "application://ubuntu-system-settings.desktop"
102− icon: "../../graphics/applicationIcons/system-settings.png"
103− category: 0
104− mimetype: "application/x-desktop"
105− title: "System Settings"
106− comment: ""
107− dndUri: "file:///usr/share/applications/ubuntu-system-settings.desktop"
108− metadata: "subscope:applications.scope/applications-non-click.scope"
109− }
110−}
qml/Dash/DashCarousel.qmldeleted−47
@@ -1,47 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../Components"
20−
21−DashRenderer {
22− id: dashCarousel
23−
24− property alias cacheBuffer: carousel.cacheBuffer
25− property alias itemComponent: carousel.itemComponent
26− property alias minimumTileWidth: carousel.minimumTileWidth
27− property alias selectedItemScaleFactor: carousel.selectedItemScaleFactor
28− property alias tileAspectRatio: carousel.tileAspectRatio
29−
30− currentItem: carousel.currentItem
31− height: carousel.implicitHeight + units.gu(6)
32− verticalSpacing: units.gu(3)
33−
34− Carousel {
35− id: carousel
36− anchors.fill: parent
37− tileAspectRatio: 198 / 288
38− minimumTileWidth: units.gu(13)
39− selectedItemScaleFactor: 1.14
40− cacheBuffer: 1404 // 18px * 13gu * 6
41− model: dashCarousel.model
42− highlightIndex: dashCarousel.highlightIndex
43−
44− onClicked: dashCarousel.clicked(index, itemY)
45− onPressAndHold: dashCarousel.pressAndHold(index, itemY)
46− }
47−}
qml/Dash/DashHome.qmldeleted−39
@@ -1,39 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Utils 0.1
20−import "../Components"
21−import "../Components/ListItems"
22−import "Apps"
23−
24−GenericScopeView {
25− id: root
26− objectName: "DashHome"
27−
28− SearchableResultModel {
29− id: appsModel
30−
31− model: FrequentlyUsedAppsModel {}
32− filterRole: 3
33− searchQuery: root.scope.searchQuery
34− }
35−
36− onScopeChanged: {
37− root.scope.categories.overrideResults("applications.scope", appsModel);
38− }
39−}
qml/Dash/DashPreview.qmldeleted−208
@@ -1,208 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: root
22−
23− property int keyboardSize: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
24− property var previewData
25− property alias showProcessingAction: waitingForActionMouseArea.enabled
26−
27− property real previewWidthRatio: 0.5
28− property bool isCurrent: false
29−
30− property Component previewImages
31− property Component header
32− property Component actions
33− property Component description
34− property Component ratings
35−
36− readonly property bool narrowMode: width <= height * 1.5
37− readonly property int columnWidth: narrowMode ? contentRow.width : (contentRow.width / 3) - contentRow.spacing
38− readonly property int contentSpacing: units.gu(3)
39−
40− clip: true
41−
42− function ensureVisible(item) {
43− var o = leftFlickable.mapFromItem(item, 0, 0, item.width, item.height);
44− var keyboardY = shell.height - root.keyboardSize;
45− if ((o.y + o.height) > keyboardY) {
46− leftFlickable.contentY += o.y + o.height - keyboardY;
47− }
48− }
49−
50− Connections {
51− target: shell.applicationManager
52− onMainStageFocusedApplicationChanged: {
53− root.close();
54− }
55− onSideStageFocusedApplicationChanged: {
56− root.close();
57− }
58− }
59−
60− onPreviewDataChanged: showProcessingAction = false
61−
62− MouseArea {
63− anchors.fill: parent
64− }
65−
66− Row {
67− id: contentRow
68− anchors {
69− left: parent.left
70− top: parent.top
71− right: parent.right
72− bottom: parent.bottom
73− topMargin: root.contentSpacing
74− leftMargin: root.contentSpacing
75− rightMargin: root.contentSpacing
76− }
77− height: childrenRect.height
78−
79− spacing: units.gu(2)
80−
81−
82− Flickable {
83− id: leftFlickable
84− objectName: "leftFlickable"
85− anchors {
86− top: parent.top
87− bottom: parent.bottom
88− }
89− width: root.columnWidth
90− contentHeight: leftColumn.height + root.contentSpacing
91− anchors.bottomMargin: root.keyboardSize
92− clip: true
93−
94− Behavior on contentY { NumberAnimation { duration: 300 } }
95−
96− Column {
97− id: leftColumn
98− objectName: "leftColumn"
99− height: childrenRect.height
100− spacing: root.contentSpacing
101− anchors {
102− left: parent.left
103− right: parent.right
104− }
105− }
106− }
107−
108− Flickable {
109− id: centerFlickable
110− anchors {
111− top: parent.top
112− bottom: parent.bottom
113− }
114− width: root.columnWidth
115− contentHeight: centerColumn.height
116− clip: true
117−
118− Column {
119− id: centerColumn
120− objectName: "centerColumn"
121− height: childrenRect.height
122− anchors {
123− left: parent.left
124− right: parent.right
125− }
126− spacing: root.contentSpacing
127− }
128− }
129−
130− Flickable {
131− id: rightFlickable
132− anchors {
133− top: parent.top
134− bottom: parent.bottom
135− }
136− width: root.columnWidth
137− contentHeight: rightColumn.height
138− clip: true
139−
140− Column {
141− id: rightColumn
142− objectName: "rightColumn"
143− height: childrenRect.height
144− anchors {
145− left: parent.left
146− right: parent.right
147− }
148− }
149− }
150− }
151−
152− Loader {
153− id: previewImageLoader
154− parent: leftColumn
155− sourceComponent: root.previewImages
156− anchors {
157− left: parent.left
158− right: parent.right
159− }
160− }
161−
162− Loader {
163− id: ratingsLoader
164− parent: root.narrowMode ? leftColumn : rightColumn
165− anchors {
166− left: parent.left
167− right: parent.right
168− }
169− sourceComponent: root.ratings
170− }
171−
172− Loader {
173− id: descriptionLoader
174− parent: root.narrowMode ? leftColumn : centerColumn
175− anchors {
176− left: parent.left
177− right: parent.right
178− }
179− sourceComponent: root.description
180− }
181−
182− Loader {
183− id: actionsLoader
184− parent: root.narrowMode ? leftColumn : centerColumn
185− anchors {
186− left: parent.left
187− right: parent.right
188− }
189− sourceComponent: root.actions
190− }
191−
192− Loader {
193− id: headerLoader
194− parent: root.narrowMode ? leftColumn : centerColumn
195− anchors {
196− left: parent.left
197− right: parent.right
198− }
199− sourceComponent: root.header
200− }
201−
202− MouseArea {
203− id: waitingForActionMouseArea
204− objectName: "waitingForActionMouseArea"
205− anchors.fill: parent
206− enabled: false
207− }
208−}
qml/Dash/DashPreviewPlaceholder.qmldeleted−25
@@ -1,25 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−DashPreview {
21− ActivityIndicator {
22− anchors.centerIn: parent
23− running: visible
24− }
25−}
qml/Dash/Generic/FlatTileStyle.qmldeleted−79
@@ -1,79 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: tile
22−
23− property bool disabled: false
24−
25− anchors.fill: parent
26−
27− Image {
28− id: icon
29− objectName: "image"
30− width: styledItem.imageWidth
31− height: styledItem.imageHeight
32−
33− anchors.horizontalCenter: parent.horizontalCenter
34−
35− sourceSize { width: width; height: height }
36− asynchronous: true
37− cache: false
38− source: styledItem.source
39− fillMode: styledItem.fillMode
40− opacity: tile.disabled ? 0.3 : 1.0
41− horizontalAlignment: Image.AlignHCenter
42− verticalAlignment: Image.AlignVCenter
43− }
44−
45− UbuntuShape {
46− id: borderPressed
47− objectName: "borderPressed"
48−
49− anchors.fill: icon
50− radius: "medium"
51− borderSource: "radius_pressed.sci"
52− opacity: styledItem.pressed ? 1.0 : 0.0
53− Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
54− }
55−
56− Label {
57− id: label
58− objectName: "label"
59− anchors {
60− baseline: icon.bottom
61− baselineOffset: units.gu(2)
62− left: parent.left
63− right: parent.right
64− leftMargin: units.gu(1)
65− rightMargin: units.gu(1)
66− }
67−
68− color: Theme.palette.selected.backgroundText
69− opacity: 0.9
70− style: Text.Raised
71− styleColor: "black"
72− fontSize: "small"
73− elide: Text.ElideMiddle
74− horizontalAlignment: styledItem.horizontalAlignment
75− text: styledItem.text
76− wrapMode: Text.Wrap
77− maximumLineCount: styledItem.maximumLineCount
78− }
79−}
qml/Dash/Generic/GenericCarousel.qmldeleted−53
@@ -1,53 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−import ".."
21−
22−DashCarousel {
23− id: genericCarousel
24− itemComponent: carouselDelegateGeneric
25−
26− Component {
27− id: carouselDelegateGeneric
28−
29− BaseCarouselDelegate {
30− id: item
31− objectName: "carouselDelegate"
32−
33− UbuntuShape {
34− anchors.fill: parent
35− radius: "medium"
36− borderSource: ""
37− image: Image {
38− asynchronous: true
39− sourceSize { width: item.width; height: item.height }
40− source: model ? model.icon : ""
41− }
42− }
43−
44− BorderImage {
45− anchors.centerIn: parent
46− opacity: 0.6
47− source: "../../Components/graphics/non-selected.sci"
48− width: parent.width + units.gu(1.5)
49− height: parent.height + units.gu(1.5)
50− }
51− }
52− }
53−}
qml/Dash/Generic/GenericFilterGrid.qmldeleted−46
@@ -1,46 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−import ".."
21−
22−DashFilterGrid {
23− id: genericFilterGrid
24−
25− property int iconWidth: units.gu(8)
26− property int iconHeight: units.gu(7.5)
27−
28− minimumHorizontalSpacing: units.gu(0.5)
29− delegateWidth: units.gu(11)
30− delegateHeight: units.gu(9.5)
31− verticalSpacing: units.gu(2)
32−
33− delegate: Tile {
34− id: tile
35− objectName: "delegate" + index
36− width: genericFilterGrid.cellWidth
37− height: genericFilterGrid.cellHeight
38− text: model.title
39− imageWidth: genericFilterGrid.iconWidth
40− imageHeight: genericFilterGrid.iconHeight
41− source: model.icon
42−
43− onClicked: genericFilterGrid.clicked(index, tile.y)
44− onPressAndHold: genericFilterGrid.pressAndHold(index, tile.y)
45− }
46−}
qml/Dash/Generic/GenericFilterGridPotrait.qmldeleted−28
@@ -1,28 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−
21−GenericFilterGrid {
22− minimumHorizontalSpacing: units.gu(0.5)
23− delegateWidth: units.gu(11)
24− delegateHeight: units.gu(18)
25− verticalSpacing: units.gu(2)
26− iconWidth: (width / columns) * 0.8
27− iconHeight: iconWidth * 16 / 11
28−}
qml/Dash/Generic/GenericPreview.qmldeleted−197
@@ -1,197 +0,0 @@
1−/*
2− * Copyright (C) 2013, 2014 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Components.ListItems 0.1 as ListItems
20−import Ubuntu.DownloadDaemonListener 0.1
21−import "../../Components"
22−import ".."
23−import "../Previews"
24−
25−DashPreview {
26− id: genericPreview
27−
28− previewImages: previewImagesComponent
29− header: headerComponent
30− actions: (previewData.infoMap !== undefined && previewData.infoMap["show_progressbar"]) ? progressComponent : actionsComponent
31− description: descriptionComponent
32−
33− Component {
34− id: previewImagesComponent
35−
36− LazyImage {
37− objectName: "genericPreviewImage"
38− anchors {
39− left: parent.left
40− right: parent.right
41− }
42− scaleTo: "width"
43− source: genericPreview.previewData.image
44− initialHeight: width
45− }
46− }
47−
48− Component {
49− id: headerComponent
50− Header {
51− title: previewData.title
52− subtitle: previewData.subtitle
53− }
54− }
55−
56− Component {
57− id: actionsComponent
58−
59− Column {
60− id: buttonList
61− spacing: units.gu(1)
62− Repeater {
63− objectName: "buttonList"
64− model: previewData.actions
65−
66− delegate: Button {
67− objectName: "button" + index
68− width: parent.width
69− height: buttonList.buttonHeight
70− color: Theme.palette.selected.foreground
71− text: modelData.displayName
72− iconSource: modelData.iconHint
73− iconPosition: "right"
74− onClicked: {
75− previewData.execute(modelData.id, { })
76− genericPreview.showProcessingAction = true;
77− }
78− }
79− }
80− }
81− }
82−
83− Component {
84− id: progressComponent
85−
86− ProgressBar {
87− id: progressBar
88− objectName: "progressBar"
89− value: 0
90− maximumValue: 100
91− height: units.gu(5)
92−
93− property var model: previewData.actions
94−
95− DownloadTracker {
96− service: "com.canonical.applications.Downloader"
97− dbusPath: previewData.infoMap["progressbar_source"] ? previewData.infoMap["progressbar_source"].value : ""
98−
99− onProgress: {
100− var percentage = parseInt(received * 100 / total);
101− progressBar.value = percentage;
102− }
103−
104− onFinished: {
105− previewData.execute(progressBar.model[0].id, { })
106− }
107−
108− onError: {
109− previewData.execute(progressBar.model[1].id, { "error": error });
110− }
111− }
112−
113− }
114− }
115−
116− Component {
117− id: descriptionComponent
118− Column {
119− spacing: units.gu(2)
120−
121− Label {
122− id: descriptionLabel
123− objectName: "descriptionLabel"
124− anchors { left: parent.left; right: parent.right }
125− visible: text != ""
126− fontSize: "small"
127− opacity: 0.6
128− color: "white"
129− text: previewData.description.replace(/[\r\n]/g, "<br />")
130− style: Text.Raised
131− styleColor: "black"
132− wrapMode: Text.WordWrap
133− textFormat: Text.RichText
134− // FIXME: workaround for https://bugreports.qt-project.org/browse/QTBUG-33020
135− onWidthChanged: { wrapMode = Text.NoWrap; wrapMode = Text.WordWrap }
136− }
137−
138− Column {
139− objectName: "infoHintColumn"
140− anchors {
141− left: parent.left
142− right: parent.right
143− }
144− Repeater {
145− objectName: "infoHintRepeater"
146− model: previewData.infoHints
147−
148− delegate: Item {
149− objectName: "infoHintItem" + index
150− width: parent.width
151− height: units.gu(5)
152− Row {
153− width: parent.width
154− spacing: units.gu(1)
155− property int columnWidth: (width - spacing) / 2
156− anchors.verticalCenter: parent.verticalCenter
157−
158− Label {
159− objectName: "displayNameLabel"
160− visible: valueLabel.visible
161− fontSize: "small"
162− opacity: 0.9
163− color: "white"
164− horizontalAlignment: Text.AlignLeft
165− width: parent.columnWidth
166− text: modelData.displayName
167− style: Text.Raised
168− styleColor: "black"
169− }
170− Label {
171− id: valueLabel
172− objectName: "valueLabel"
173− visible: modelData.value != ""
174− fontSize: "small"
175− opacity: 0.6
176− color: "white"
177− horizontalAlignment: Text.AlignRight
178− width: parent.columnWidth
179− text: modelData.value ? modelData.value : ""
180− style: Text.Raised
181− styleColor: "black"
182− wrapMode: Text.WordWrap
183− }
184− }
185− ListItems.ThinDivider {
186− anchors {
187− left: parent.left
188− bottom: parent.bottom
189− right: parent.right
190− }
191− }
192− }
193− }
194− }
195− }
196− }
197−}
qml/Dash/Generic/WeatherFilterGrid.qmldeleted−47
@@ -1,47 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−
21−GenericFilterGrid {
22− id: filtergrid
23−
24− delegateHeight: units.gu(11.5)
25−
26− delegate: Tile {
27− id: tile
28− objectName: "delegate" + index
29− width: filtergrid.cellWidth
30− height: filtergrid.cellHeight
31− text: model.title
32− imageWidth: filtergrid.iconWidth
33− imageHeight: filtergrid.iconHeight
34− source: model.icon
35− maximumLineCount: 2
36−
37− style: FlatTileStyle {}
38−
39− onClicked: {
40− filtergrid.clicked(index, tile.y)
41− }
42−
43− onPressAndHold: {
44− filtergrid.pressAndHold(index, tile.y)
45− }
46− }
47−}
qml/Dash/Movie/MoviePreview.qmldeleted−71
@@ -1,71 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import ".."
20−import "../Generic"
21−import "../../Components"
22−import "../Previews"
23−
24−GenericPreview {
25− id: root
26−
27− property bool ready: previewData ? true : false
28− property url url: ready ? previewData.image : ""
29−
30− previewImages: previewImageComponent
31− header: headerComponent
32−
33− Component {
34− id: previewImageComponent
35− LazyImage {
36− anchors.left: parent.left
37− anchors.right: parent.right
38− scaleTo: "width"
39− visible: height > 0
40− source: root.url
41− initialHeight: width * 10 / 16
42−
43− Image {
44− objectName: "playButton"
45− anchors.centerIn: parent
46− readonly property bool bigButton: parent.width > units.gu(40)
47− width: bigButton ? units.gu(8) : units.gu(4.5)
48− height: width
49− source: "../graphics/play_button%1%2.png".arg(previewImageMouseArea.pressed ? "_active" : "").arg(bigButton ? "_big" : "")
50− }
51−
52− MouseArea {
53− id: previewImageMouseArea
54− anchors.fill: parent
55− onClicked: {
56− Qt.openUrlExternally(previewData.result.uri);
57− }
58− }
59− }
60− }
61−
62− Component {
63− id: headerComponent
64− Header {
65− title: previewData.title
66− rating: Math.round(previewData.rating * 10)
67− reviews: previewData.numRatings
68− rated: previewData.infoMap["rated"] ? previewData.infoMap["rated"].value : 0
69− }
70− }
71−}
qml/Dash/Music/CarouselDelegateMusic.qmldeleted−42
@@ -1,42 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−
21−BaseCarouselDelegate {
22− id: item
23−
24− UbuntuShape {
25− anchors.fill: parent
26− radius: "medium"
27− borderSource: ""
28− image: Image {
29− asynchronous: true
30− sourceSize { width: item.width; height: item.height }
31− source: model ? model.icon : ""
32− }
33− }
34−
35− BorderImage {
36− anchors.centerIn: parent
37− opacity: 0.6
38− source: "../../Components/graphics/non-selected.sci"
39− width: parent.width + units.gu(1.5)
40− height: parent.height + units.gu(1.5)
41− }
42−}
qml/Dash/Music/MusicCarousel.qmldeleted−34
@@ -1,34 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import "../../Components"
19−import ".."
20−
21−DashCarousel {
22− id: musicCarousel
23− tileAspectRatio: 1
24− minimumTileWidth: units.gu(13)
25− itemComponent: carouselDelegateMusic
26− selectedItemScaleFactor: 1.2
27− cacheBuffer: 1404 // 18px * 13gu * 6
28−
29− Component {
30− id: carouselDelegateMusic
31− CarouselDelegateMusic {
32− }
33− }
34−}
qml/Dash/Music/MusicFilterGrid.qmldeleted−48
@@ -1,48 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import "../../Components"
19−import "../Generic"
20−
21−GenericFilterGrid {
22− id: musicFilterGrid
23−
24− delegateWidth: units.gu(11)
25− delegateHeight: units.gu(16)
26− iconWidth: units.gu(11)
27− iconHeight: units.gu(11)
28−
29− delegate: Tile {
30− id: tile
31− objectName: "delegate" + index
32− width: musicFilterGrid.cellWidth
33− height: musicFilterGrid.cellHeight
34− text: model.comment
35− imageWidth: musicFilterGrid.iconWidth
36− imageHeight: musicFilterGrid.iconHeight
37− source: model.icon
38− maximumLineCount: 2
39− horizontalAlignment: Text.AlignLeft
40−
41− style: MusicTileStyle {
42− artist: model.title
43− }
44−
45− onClicked: musicFilterGrid.clicked(index, tile.y)
46− onPressAndHold: musicFilterGrid.pressAndHold(index, tile.y)
47− }
48−}
qml/Dash/Music/MusicPreview.qmldeleted−203
@@ -1,203 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import QtMultimedia 5.0
19−import Ubuntu.Components 0.1
20−import Ubuntu.Components.ListItems 0.1
21−import ".."
22−import "../Generic"
23−import "../../Components"
24−import "../Previews"
25−
26−GenericPreview {
27− id: root
28−
29− previewImages: previewImageComponent
30− header: headerComponent
31− description: descriptionComponent
32−
33− Component {
34− id: previewImageComponent
35− LazyImage {
36− height: units.gu(22)
37− scaleTo: "height"
38− source: previewData ? previewData.image : ""
39− initialHeight: height
40− initialWidth: height
41− }
42− }
43−
44− Component {
45− id: headerComponent
46− Header {
47− title: previewData.title
48− subtitle: previewData.subtitle
49− }
50− }
51−
52− Component {
53− id: descriptionComponent
54−
55− Item {
56− height: childrenRect.height
57− Audio {
58− id: audioPlayer
59− objectName: "audioPlayer"
60− property real progress: audioPlayer.position / audioPlayer.duration
61−
62− property Item playingItem
63−
64− Component.onDestruction: {
65− audioPlayer.stop();
66− }
67−
68− onErrorStringChanged: console.warn("Audio player error:", errorString)
69−
70− }
71−
72− Connections {
73− target: root
74− onIsCurrentChanged: {
75− if (!root.isCurrent) {
76− audioPlayer.stop();
77− }
78− }
79− }
80−
81− Column {
82− anchors { left: parent.left; right: parent.right }
83− visible: trackRepeater.count > 0
84−
85− ThinDivider {
86− objectName: "topDivider"
87− anchors { left: parent.left; right: parent.right }
88− }
89−
90− Repeater {
91− id: trackRepeater
92− objectName: "trackRepeater"
93−
94− model: previewData.tracks
95−
96− delegate: Item {
97− id: trackItem
98− objectName: "trackItem" + index
99− anchors { left: parent.left; right: parent.right }
100− height: units.gu(5)
101− property bool isPlayingItem: audioPlayer.playingItem == trackItem
102−
103− function play() {
104− audioPlayer.stop();
105− // Make sure we change the source, even if two items point to the same uri location
106− audioPlayer.source = "";
107− audioPlayer.source = model.uri;
108− audioPlayer.playingItem = trackItem;
109− audioPlayer.play();
110− }
111−
112− Row {
113− id: trackRow
114− width: parent.width
115− spacing: units.gu(1)
116− property int column1Width: units.gu(3)
117− property int column2Width: width - (2 * spacing) - column1Width - column3Width
118− property int column3Width: units.gu(4)
119− anchors.verticalCenter: parent.verticalCenter
120−
121− Button {
122− objectName: "playButton"
123− width: trackRow.column1Width
124− height: width
125− iconSource: audioPlayer.playbackState == Audio.PlayingState && trackItem.isPlayingItem ? "image://theme/media-playback-pause" : "image://theme/media-playback-start"
126−
127− // Can't be "transparent" or "#00xxxxxx" as the button optimizes away the surrounding shape
128− // FIXME when this is resolved: https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1251685
129− color: "#01000000"
130−
131− onClicked: {
132− if (trackItem.isPlayingItem) {
133− if (audioPlayer.playbackState == Audio.PlayingState) {
134− audioPlayer.pause();
135− } else if (audioPlayer.playbackState == Audio.PausedState){
136− audioPlayer.play();
137− }
138− } else {
139− trackItem.play();
140− }
141− }
142− }
143−
144− Label {
145− objectName: "trackTitleLabel"
146− fontSize: "small"
147− opacity: 0.9
148− color: "white"
149− horizontalAlignment: Text.AlignLeft
150− anchors.verticalCenter: parent.verticalCenter
151− width: parent.column2Width
152− text: title
153− style: Text.Raised
154− styleColor: "black"
155− elide: Text.ElideRight
156−
157− UbuntuShape {
158− id: progressBarFill
159− objectName: "progressBarFill"
160− color: UbuntuColors.orange
161− anchors.left: progressBarImage.left
162− anchors.right: progressBarImage.right
163− anchors.verticalCenter: progressBarImage.verticalCenter
164− height: units.dp(2)
165− anchors.margins: units.dp(2)
166− anchors.rightMargin: maxWidth - (maxWidth * audioPlayer.progress) + units.dp(2)
167− visible: progressBarImage.visible
168− property int maxWidth: progressBarImage.width - units.dp(4)
169− }
170−
171− Image {
172− id: progressBarImage
173− anchors { left: parent.left; top: parent.bottom; right: parent.right }
174− height: units.dp(6)
175− visible: audioPlayer.playbackState != Audio.StoppedState && trackItem.isPlayingItem && model.length.length > 0
176− source: "graphics/music_progress_bg.png"
177− }
178− }
179−
180− Label {
181− id: valueLabel
182− objectName: "timeLabel"
183− fontSize: "small"
184− opacity: 0.9
185− color: "white"
186− anchors.verticalCenter: parent.verticalCenter
187− horizontalAlignment: Text.AlignRight
188− width: parent.column3Width
189− text: length
190− style: Text.Raised
191− styleColor: "black"
192− }
193− }
194−
195− ThinDivider {
196− anchors { left: parent.left; bottom: parent.bottom; right: parent.right }
197− }
198− }
199− }
200− }
201− }
202− }
203−}
qml/Dash/Music/MusicTileStyle.qmldeleted−102
@@ -1,102 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: tile
22−
23− property alias artist: artistLabel.text
24−
25− anchors.fill: parent
26−
27− UbuntuShape {
28− id: icon
29− anchors {
30− top: parent.top
31− horizontalCenter: parent.horizontalCenter
32− }
33− radius: "medium"
34− width: styledItem.imageWidth
35− height: styledItem.imageHeight
36− image: Image {
37− id: image
38− objectName: "image"
39− sourceSize { width: icon.width; height: icon.height }
40− asynchronous: true
41− cache: false
42− source: styledItem.source
43− fillMode: styledItem.fillMode
44− horizontalAlignment: Image.AlignHCenter
45− verticalAlignment: Image.AlignVCenter
46− }
47− }
48−
49− UbuntuShape {
50− id: borderPressed
51− objectName: "borderPressed"
52−
53− anchors.fill: icon
54− radius: "medium"
55− borderSource: "radius_pressed.sci"
56− opacity: styledItem.pressed ? 1.0 : 0.0
57− Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
58− }
59−
60− Label {
61− id: label
62− objectName: "label"
63− anchors {
64− baseline: icon.bottom
65− baselineOffset: units.gu(2)
66− left: icon.left
67− right: parent.right
68− rightMargin: units.gu(1)
69− leftMargin: units.dp(2)
70− }
71−
72− color: Theme.palette.selected.backgroundText
73− opacity: 0.9
74− style: Text.Raised
75− styleColor: "black"
76− fontSize: "small"
77− font.weight: Font.Bold
78− elide: Text.ElideRight
79− horizontalAlignment: styledItem.horizontalAlignment
80− text: styledItem.text
81− wrapMode: Text.Wrap
82− maximumLineCount: styledItem.maximumLineCount
83− }
84−
85− Label {
86− id: artistLabel
87− anchors {
88− top: label.bottom
89− left: label.left
90− right: label.right
91− rightMargin: units.gu(1)
92− }
93−
94− color: Theme.palette.selected.backgroundText
95− opacity: 0.9
96− style: Text.Raised
97− styleColor: "black"
98− fontSize: "x-small"
99− elide: Text.ElideMiddle
100− horizontalAlignment: styledItem.horizontalAlignment
101− }
102−}
qml/Dash/PreviewDelegateMapper.qmldeleted−38
@@ -1,38 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−
19−QtObject {
20− property var d: QtObject {
21− readonly property string genericPreview: "Generic/GenericPreview.qml"
22− readonly property string appPreview: "Apps/AppPreview.qml"
23− property var previewDelegateMapping: {"preview-generic": genericPreview,
24− "preview-application": appPreview,
25− "preview-movie": "Movie/MoviePreview.qml",
26− "preview-music": "Music/MusicPreview.qml",
27− }
28− }
29−
30− function map(rendererName) {
31− var customPreview = d.previewDelegateMapping[rendererName]
32− if (customPreview != undefined) {
33− return customPreview
34− }
35− console.debug("Renderer "+rendererName+" not found, using preview-generic")
36− return d.genericPreview
37− }
38−}
qml/Dash/ScopeDelegateMapper.qml+1−3
@@ -17,9 +17,7 @@
17import QtQuick 2.0
17import QtQuick 2.0
18
18
19QtObject {
19QtObject {
20− property var scopeDelegateMapping: {"clickscope": "DashApps.qml",
20+ property var scopeDelegateMapping: {"clickscope": "DashApps.qml"}
21− "home.scope": "DashHome.qml"
22− }
23 property string genericScope: "GenericScopeView.qml"
21 property string genericScope: "GenericScopeView.qml"
24
22
25 function map(scopeId) {
23 function map(scopeId) {
qml/Dash/Video/CarouselDelegateVideo.qmldeleted−42
@@ -1,42 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−
21−BaseCarouselDelegate {
22− id: item
23−
24− UbuntuShape {
25− anchors.fill: parent
26− radius: "medium"
27− borderSource: ""
28− image: Image {
29− asynchronous: true
30− sourceSize { width: item.width; height: item.height }
31− source: model ? model.icon : ""
32− }
33− }
34−
35− BorderImage {
36− anchors.centerIn: parent
37− opacity: 0.6
38− source: "../../Components/graphics/non-selected.sci"
39− width: parent.width + units.gu(1.5)
40− height: parent.height + units.gu(1.5)
41− }
42−}
qml/Dash/Video/VideoCarousel.qmldeleted−34
@@ -1,34 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import "../../Components"
19−import ".."
20−
21−DashCarousel {
22− id: videosCarousel
23− tileAspectRatio: 198 / 288
24− minimumTileWidth: units.gu(13)
25− itemComponent: carouselDelegateVideo
26− selectedItemScaleFactor: 1.14
27− cacheBuffer: 1404 // 18px * 13gu * 6
28−
29− Component {
30− id: carouselDelegateVideo
31− CarouselDelegateVideo {
32− }
33− }
34−}
qml/Dash/Video/VideoFilterGrid.qmldeleted−47
@@ -1,47 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−import "../Generic"
21−
22−GenericFilterGrid {
23− id: videoFilterGrid
24−
25− delegateWidth: units.gu(11)
26− delegateHeight: units.gu(15)
27− iconWidth: units.gu(11)
28− iconHeight: units.gu(11)
29−
30− delegate: Tile {
31− id: tile
32− objectName: "delegate" + index
33− width: videoFilterGrid.cellWidth
34− height: videoFilterGrid.cellHeight
35− text: model.title
36− imageWidth: videoFilterGrid.iconWidth
37− imageHeight: videoFilterGrid.iconHeight
38− source: model.icon
39− maximumLineCount: 2
40− horizontalAlignment: Text.AlignLeft
41−
42− style: VideoTileStyle {}
43−
44− onClicked: videoFilterGrid.clicked(index, tile.y)
45− onPressAndHold: videoFilterGrid.pressAndHold(index, tile.y)
46− }
47−}
qml/Dash/Video/VideoTileStyle.qmldeleted−87
@@ -1,87 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: tile
22−
23− anchors.fill: parent
24−
25− Image {
26− id: icon
27− anchors {
28− top: parent.top
29− horizontalCenter: parent.horizontalCenter
30− }
31− width: styledItem.imageWidth
32− height: styledItem.imageHeight
33− source: "graphics/movie_icon_holder.png"
34−
35− Image {
36− id: image
37− objectName: "image"
38− anchors {
39− fill: parent;
40− topMargin: units.gu(2);
41− bottomMargin: units.gu(2)
42− }
43− sourceSize { width: icon.width; height: icon.height }
44− asynchronous: true
45− cache: false
46− source: styledItem.source
47− fillMode: styledItem.fillMode
48− horizontalAlignment: Image.AlignHCenter
49− verticalAlignment: Image.AlignVCenter
50− }
51− }
52−
53− UbuntuShape {
54− id: borderPressed
55− objectName: "borderPressed"
56−
57− anchors.fill: icon
58− radius: "medium"
59− borderSource: "radius_pressed.sci"
60− opacity: styledItem.pressed ? 1.0 : 0.0
61− Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
62− }
63−
64− Label {
65− id: label
66− objectName: "label"
67− anchors {
68− baseline: icon.bottom
69− baselineOffset: units.gu(2)
70− left: icon.left
71− right: parent.right
72− rightMargin: units.gu(1)
73− leftMargin: units.dp(2)
74− }
75−
76− color: Theme.palette.selected.backgroundText
77− opacity: 0.9
78− style: Text.Raised
79− styleColor: "black"
80− fontSize: "small"
81− elide: Text.ElideRight
82− horizontalAlignment: styledItem.horizontalAlignment
83− text: styledItem.text
84− wrapMode: Text.Wrap
85− maximumLineCount: styledItem.maximumLineCount
86− }
87−}
qml/Dash/Video/graphics/icon_button_amazon@20.pngdeleted

Binary file not shown.

qml/Dash/Video/graphics/icon_button_u1@20.pngdeleted

Binary file not shown.

qml/Dash/Video/graphics/movie_icon_holder@27.pngdeleted

Binary file not shown.