Merge lp:~nik90/cliffhanger/more-improvements into lp:~flashback-dev/cliffhanger/trunk
- more-improvements
- Merge into trunk
Status: | Rejected |
---|---|
Rejected by: | Nekhelesh Ramananthan |
Proposed branch: | lp:~nik90/cliffhanger/more-improvements |
Merge into: | lp:~flashback-dev/cliffhanger/trunk |
Diff against target: |
839 lines (+336/-97) 18 files modified
Cliffhanger.qml (+11/-10) backend/GenreList.js (+30/-0) backend/GenreMovies.js (+43/-0) backend/MovieDetails.js (+14/-2) backend/NowPlayingMovie.js (+0/-32) backend/PersonDetails.js (+18/-5) backend/Search.js (+9/-8) components/Grid.qml (+106/-0) ui/home/HomeTab.qml (+1/-2) ui/movie/MovieByGenre.qml (+70/-0) ui/movie/MoviePage.qml (+16/-20) ui/movie/MovieTab.qml (+4/-4) ui/movie/SearchMovie.qml (+1/-1) ui/person/PersonPage.qml (+7/-7) ui/person/PersonTab.qml (+2/-2) ui/person/SearchPerson.qml (+1/-1) ui/tv/SearchTv.qml (+1/-1) ui/tv/TvTab.qml (+2/-2) |
To merge this branch: | bzr merge lp:~nik90/cliffhanger/more-improvements |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nekhelesh Ramananthan | Disapprove | ||
Review via email: mp+195262@code.launchpad.net |
Commit message
- Added a generic grid view element
- Added ability to filter movies by genre
- Reorganised the UI folder
- Merged UpcomingMovie.js and NowPlaying.js files
- Added comments to improve code readibility
Description of the change
- Added a generic grid view element
- Added ability to filter movies by genre
- Reorganised the UI folder
- Merged UpcomingMovie.js and NowPlaying.js files
- Added comments to improve code readibility
- 11. By Nekhelesh Ramananthan
-
small code cleanup
- 12. By Nekhelesh Ramananthan
-
Reorganized the UI folder
- 13. By Nekhelesh Ramananthan
-
Added comments to backend files and improved the poster url returned to carousel
- 14. By Nekhelesh Ramananthan
-
Merged UpcomingMovie.js and NowPlayingMovie.js files
- 15. By Nekhelesh Ramananthan
-
Simplified Search.js
Unmerged revisions
- 15. By Nekhelesh Ramananthan
-
Simplified Search.js
- 14. By Nekhelesh Ramananthan
-
Merged UpcomingMovie.js and NowPlayingMovie.js files
- 13. By Nekhelesh Ramananthan
-
Added comments to backend files and improved the poster url returned to carousel
- 12. By Nekhelesh Ramananthan
-
Reorganized the UI folder
- 11. By Nekhelesh Ramananthan
-
small code cleanup
- 10. By Nekhelesh Ramananthan
-
enabled all tabs again
- 9. By Nekhelesh Ramananthan
-
merge from trunk
- 8. By Nekhelesh Ramananthan
-
Added ability to filter movies by genre
- 7. By Nekhelesh Ramananthan
-
Added new component Grid
Preview Diff
1 | === modified file 'Cliffhanger.qml' | |||
2 | --- Cliffhanger.qml 2013-11-13 20:50:15 +0000 | |||
3 | +++ Cliffhanger.qml 2013-11-14 23:41:47 +0000 | |||
4 | @@ -1,8 +1,10 @@ | |||
5 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
6 | 2 | import Ubuntu.Components 0.1 | 2 | import Ubuntu.Components 0.1 |
7 | 3 | import "ui/movie" | ||
8 | 4 | import "ui/tv" | ||
9 | 5 | import "ui/person" | ||
10 | 6 | import "ui/home" | ||
11 | 3 | import "ui" | 7 | import "ui" |
12 | 4 | import "graphics" | ||
13 | 5 | import "components" | ||
14 | 6 | 8 | ||
15 | 7 | MainView { | 9 | MainView { |
16 | 8 | // objectName for functional testing purposes (autopilot-qt5) | 10 | // objectName for functional testing purposes (autopilot-qt5) |
17 | @@ -21,9 +23,7 @@ | |||
18 | 21 | height: units.gu(75) | 23 | height: units.gu(75) |
19 | 22 | 24 | ||
20 | 23 | // TODO: This is a temporary app background. Final background color needs to be decided. | 25 | // TODO: This is a temporary app background. Final background color needs to be decided. |
21 | 24 | headerColor: UbuntuColors.coolGrey | ||
22 | 25 | backgroundColor: UbuntuColors.coolGrey | 26 | backgroundColor: UbuntuColors.coolGrey |
23 | 26 | footerColor: UbuntuColors.coolGrey | ||
24 | 27 | 27 | ||
25 | 28 | PageStack { | 28 | PageStack { |
26 | 29 | id: pagestack | 29 | id: pagestack |
27 | @@ -34,15 +34,14 @@ | |||
28 | 34 | id: root | 34 | id: root |
29 | 35 | 35 | ||
30 | 36 | // Moviedb App Properties | 36 | // Moviedb App Properties |
33 | 37 | //readonly property string baseUrl: "http://api.themoviedb.org/3" | 37 | readonly property string baseUrl: "http://api.themoviedb.org/3" |
32 | 38 | readonly property string baseUrl: "http://private-4b62-themoviedb.apiary.io/3" | ||
34 | 39 | readonly property string api_Key: "?api_key=d0a2929acb64b7c203071e87a621dfb3" | 38 | readonly property string api_Key: "?api_key=d0a2929acb64b7c203071e87a621dfb3" |
35 | 40 | 39 | ||
36 | 41 | // Home Tab | 40 | // Home Tab |
41 | 42 | // Tab { | 41 | // Tab { |
42 | 43 | // title: "Home" | 42 | // title: "Home" |
43 | 44 | // page: HomeTab {} | 43 | // page: HomeTab {} |
44 | 45 | // } | 44 | // } |
45 | 46 | 45 | ||
46 | 47 | // Movies tab | 46 | // Movies tab |
47 | 48 | Tab { | 47 | Tab { |
48 | @@ -62,10 +61,12 @@ | |||
49 | 62 | page: PersonTab {} | 61 | page: PersonTab {} |
50 | 63 | } | 62 | } |
51 | 64 | 63 | ||
52 | 64 | // About Tab | ||
53 | 65 | Tab { | 65 | Tab { |
54 | 66 | title: "About" | 66 | title: "About" |
55 | 67 | page: About {} | 67 | page: About {} |
56 | 68 | } | 68 | } |
57 | 69 | |||
58 | 69 | } | 70 | } |
59 | 70 | } | 71 | } |
60 | 71 | } | 72 | } |
61 | 72 | 73 | ||
62 | === added file 'backend/GenreList.js' | |||
63 | --- backend/GenreList.js 1970-01-01 00:00:00 +0000 | |||
64 | +++ backend/GenreList.js 2013-11-14 23:41:47 +0000 | |||
65 | @@ -0,0 +1,30 @@ | |||
66 | 1 | WorkerScript.onMessage = function(message) { | ||
67 | 2 | /* | ||
68 | 3 | XML HTTP Request to retrieve the list of genres. The retrieved list is synced | ||
69 | 4 | to a list model with the following structure, | ||
70 | 5 | id -> Unique ID used by the API | ||
71 | 6 | name -> Genre | ||
72 | 7 | */ | ||
73 | 8 | |||
74 | 9 | var XHR = new XMLHttpRequest(); | ||
75 | 10 | |||
76 | 11 | XHR.open("GET", message.url); | ||
77 | 12 | XHR.setRequestHeader("Accept", "application/json"); | ||
78 | 13 | |||
79 | 14 | XHR.onreadystatechange = function() { | ||
80 | 15 | if(XHR.readyState != XHR.DONE) | ||
81 | 16 | return; | ||
82 | 17 | if(XHR.status != 200) | ||
83 | 18 | return; | ||
84 | 19 | |||
85 | 20 | var obj = JSON.parse(XHR.responseText); | ||
86 | 21 | |||
87 | 22 | for(var i=0; i<obj.genres.length; i++) { | ||
88 | 23 | message.model.append({"name": obj.genres[i].name, | ||
89 | 24 | "id": obj.genres[i].id}); | ||
90 | 25 | message.model.sync() | ||
91 | 26 | } | ||
92 | 27 | }; | ||
93 | 28 | |||
94 | 29 | XHR.send(); | ||
95 | 30 | } | ||
96 | 0 | 31 | ||
97 | === added file 'backend/GenreMovies.js' | |||
98 | --- backend/GenreMovies.js 1970-01-01 00:00:00 +0000 | |||
99 | +++ backend/GenreMovies.js 2013-11-14 23:41:47 +0000 | |||
100 | @@ -0,0 +1,43 @@ | |||
101 | 1 | WorkerScript.onMessage = function(message) { | ||
102 | 2 | /* | ||
103 | 3 | XML HTTP Request to retrieve the movies of a certain genre. The retrieved | ||
104 | 4 | results are synced to a list model with the following structure. | ||
105 | 5 | name -> Name of the movie | ||
106 | 6 | thumb_url -> Movie poster thumbnail | ||
107 | 7 | id -> Unique identification ID used by the API | ||
108 | 8 | */ | ||
109 | 9 | |||
110 | 10 | var XHR = new XMLHttpRequest(); | ||
111 | 11 | var thumb_url; | ||
112 | 12 | |||
113 | 13 | // Clear model of any data before syncing it with new data | ||
114 | 14 | message.model.clear() | ||
115 | 15 | |||
116 | 16 | XHR.open("GET", message.url); | ||
117 | 17 | XHR.setRequestHeader("Accept", "application/json"); | ||
118 | 18 | |||
119 | 19 | XHR.onreadystatechange = function() { | ||
120 | 20 | if(XHR.readyState != XHR.DONE) | ||
121 | 21 | return; | ||
122 | 22 | if(XHR.status != 200) | ||
123 | 23 | return; | ||
124 | 24 | |||
125 | 25 | var obj = JSON.parse(XHR.responseText); | ||
126 | 26 | |||
127 | 27 | for(var i=0; i<obj.results.length; i++) { | ||
128 | 28 | |||
129 | 29 | // Ensuring that a valid URL is always sent. | ||
130 | 30 | if (obj.results[i].poster_path == null) | ||
131 | 31 | thumb_url = "../graphics/toolbarIcon.png" | ||
132 | 32 | else | ||
133 | 33 | thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.results[i].poster_path | ||
134 | 34 | |||
135 | 35 | message.model.append({"name": obj.results[i].title, | ||
136 | 36 | "thumb_url": thumb_url, | ||
137 | 37 | "id": obj.results[i].id}); | ||
138 | 38 | message.model.sync() | ||
139 | 39 | } | ||
140 | 40 | }; | ||
141 | 41 | |||
142 | 42 | XHR.send(); | ||
143 | 43 | } | ||
144 | 0 | 44 | ||
145 | === modified file 'backend/MovieDetails.js' | |||
146 | --- backend/MovieDetails.js 2013-11-13 20:50:15 +0000 | |||
147 | +++ backend/MovieDetails.js 2013-11-14 23:41:47 +0000 | |||
148 | @@ -1,4 +1,7 @@ | |||
149 | 1 | WorkerScript.onMessage = function(message) { | 1 | WorkerScript.onMessage = function(message) { |
150 | 2 | /* | ||
151 | 3 | XML HTTP Request to retrieve the details of a movie. | ||
152 | 4 | */ | ||
153 | 2 | 5 | ||
154 | 3 | var XHR = new XMLHttpRequest(); | 6 | var XHR = new XMLHttpRequest(); |
155 | 4 | var thumb_url; | 7 | var thumb_url; |
156 | @@ -14,6 +17,7 @@ | |||
157 | 14 | 17 | ||
158 | 15 | var obj = JSON.parse(XHR.responseText); | 18 | var obj = JSON.parse(XHR.responseText); |
159 | 16 | 19 | ||
160 | 20 | // Syncing the movie cast to the castModel | ||
161 | 17 | for(var i=0; i<obj.credits.cast.length; i++) { | 21 | for(var i=0; i<obj.credits.cast.length; i++) { |
162 | 18 | if (obj.credits.cast[i].profile_path == null) | 22 | if (obj.credits.cast[i].profile_path == null) |
163 | 19 | thumb_url = "null" | 23 | thumb_url = "null" |
164 | @@ -27,6 +31,7 @@ | |||
165 | 27 | message.castModel.sync() | 31 | message.castModel.sync() |
166 | 28 | } | 32 | } |
167 | 29 | 33 | ||
168 | 34 | // Syncing the movie crew to the crewModel | ||
169 | 30 | for(var j=0; j<obj.credits.crew.length; j++) { | 35 | for(var j=0; j<obj.credits.crew.length; j++) { |
170 | 31 | message.crewModel.append({"name": obj.credits.crew[j].name, | 36 | message.crewModel.append({"name": obj.credits.crew[j].name, |
171 | 32 | "id": obj.credits.crew[j].id, | 37 | "id": obj.credits.crew[j].id, |
172 | @@ -34,9 +39,10 @@ | |||
173 | 34 | message.crewModel.sync() | 39 | message.crewModel.sync() |
174 | 35 | } | 40 | } |
175 | 36 | 41 | ||
176 | 42 | // Obtaining movies similar to the movie currently viewed | ||
177 | 37 | for(var i=0; i<obj.similar_movies.results.length; i++) { | 43 | for(var i=0; i<obj.similar_movies.results.length; i++) { |
178 | 38 | if (obj.similar_movies.results[i].poster_path == null) | 44 | if (obj.similar_movies.results[i].poster_path == null) |
180 | 39 | thumb_url = "null" | 45 | thumb_url = "../graphics/toolbarIcon.png" |
181 | 40 | else | 46 | else |
182 | 41 | thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.similar_movies.results[i].poster_path | 47 | thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.similar_movies.results[i].poster_path |
183 | 42 | 48 | ||
184 | @@ -46,7 +52,13 @@ | |||
185 | 46 | message.similarMovieModel.sync() | 52 | message.similarMovieModel.sync() |
186 | 47 | } | 53 | } |
187 | 48 | 54 | ||
189 | 49 | WorkerScript.sendMessage({ 'poster': obj.poster_path, | 55 | if(obj.poster_path == null) |
190 | 56 | thumb_url = "../../graphics/toolbarIcon.png" | ||
191 | 57 | else | ||
192 | 58 | thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.poster_path | ||
193 | 59 | |||
194 | 60 | // Returning movie details such as poster path, title, description, genre, theme etc. | ||
195 | 61 | WorkerScript.sendMessage({ 'poster': thumb_url, | ||
196 | 50 | "title": obj.original_title, | 62 | "title": obj.original_title, |
197 | 51 | "description": obj.overview, | 63 | "description": obj.overview, |
198 | 52 | "runtime": obj.runtime, | 64 | "runtime": obj.runtime, |
199 | 53 | 65 | ||
200 | === removed file 'backend/NowPlayingMovie.js' | |||
201 | --- backend/NowPlayingMovie.js 2013-11-13 20:50:15 +0000 | |||
202 | +++ backend/NowPlayingMovie.js 1970-01-01 00:00:00 +0000 | |||
203 | @@ -1,32 +0,0 @@ | |||
204 | 1 | WorkerScript.onMessage = function(message) { | ||
205 | 2 | |||
206 | 3 | var XHR = new XMLHttpRequest(); | ||
207 | 4 | var thumb_url; | ||
208 | 5 | |||
209 | 6 | XHR.open("GET", message.url); | ||
210 | 7 | XHR.setRequestHeader("Accept", "application/json"); | ||
211 | 8 | |||
212 | 9 | XHR.onreadystatechange = function() { | ||
213 | 10 | if(XHR.readyState != XHR.DONE) | ||
214 | 11 | return; | ||
215 | 12 | if(XHR.status != 200) | ||
216 | 13 | return; | ||
217 | 14 | |||
218 | 15 | var obj = JSON.parse(XHR.responseText); | ||
219 | 16 | |||
220 | 17 | for(var i=0; i<obj.results.length; i++) { | ||
221 | 18 | |||
222 | 19 | if (obj.results[i].poster_path == null) | ||
223 | 20 | thumb_url = "null" | ||
224 | 21 | else | ||
225 | 22 | thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.results[i].poster_path | ||
226 | 23 | |||
227 | 24 | message.model.append({"name": obj.results[i].title, | ||
228 | 25 | "thumb_url": thumb_url, | ||
229 | 26 | "id": obj.results[i].id}); | ||
230 | 27 | message.model.sync() | ||
231 | 28 | } | ||
232 | 29 | }; | ||
233 | 30 | |||
234 | 31 | XHR.send(); | ||
235 | 32 | } | ||
236 | 33 | 0 | ||
237 | === modified file 'backend/PersonDetails.js' | |||
238 | --- backend/PersonDetails.js 2013-11-13 21:28:13 +0000 | |||
239 | +++ backend/PersonDetails.js 2013-11-14 23:41:47 +0000 | |||
240 | @@ -37,11 +37,24 @@ | |||
241 | 37 | } | 37 | } |
242 | 38 | 38 | ||
243 | 39 | for(i=0; i<obj.combined_credits.crew.length; i++) { | 39 | for(i=0; i<obj.combined_credits.crew.length; i++) { |
249 | 40 | message.directedModel.append({"title": obj.combined_credits.crew[i].title, | 40 | if (obj.combined_credits.crew[i].poster_path == null) |
250 | 41 | "character": obj.combined_credits.crew[i].job, | 41 | thumb_url = "null" |
251 | 42 | "media_type": obj.combined_credits.cast[i].media_type, | 42 | else |
252 | 43 | "id": obj.combined_credits.crew[i].id, | 43 | thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.combined_credits.crew[i].poster_path |
253 | 44 | "iconUrl": thumb_url}); | 44 | |
254 | 45 | |||
255 | 46 | if(obj.combined_credits.crew[i].media_type == "movie") | ||
256 | 47 | message.directedModel.append({"title": obj.combined_credits.crew[i].title, | ||
257 | 48 | "character": obj.combined_credits.crew[i].job, | ||
258 | 49 | "media_type": obj.combined_credits.crew[i].media_type, | ||
259 | 50 | "id": obj.combined_credits.crew[i].id, | ||
260 | 51 | "iconUrl": thumb_url}); | ||
261 | 52 | else if(obj.combined_credits.crew[i].media_type == "tv") | ||
262 | 53 | message.directedModel.append({"title": obj.combined_credits.crew[i].name, | ||
263 | 54 | "character": obj.combined_credits.crew[i].job, | ||
264 | 55 | "media_type": obj.combined_credits.crew[i].media_type, | ||
265 | 56 | "id": obj.combined_credits.crew[i].id, | ||
266 | 57 | "iconUrl": thumb_url}); | ||
267 | 45 | message.directedModel.sync() | 58 | message.directedModel.sync() |
268 | 46 | } | 59 | } |
269 | 47 | 60 | ||
270 | 48 | 61 | ||
271 | === modified file 'backend/Search.js' | |||
272 | --- backend/Search.js 2013-11-13 20:50:15 +0000 | |||
273 | +++ backend/Search.js 2013-11-14 23:41:47 +0000 | |||
274 | @@ -2,6 +2,7 @@ | |||
275 | 2 | 2 | ||
276 | 3 | var XHR = new XMLHttpRequest(); | 3 | var XHR = new XMLHttpRequest(); |
277 | 4 | var thumb_url; | 4 | var thumb_url; |
278 | 5 | |||
279 | 5 | message.model.clear() | 6 | message.model.clear() |
280 | 6 | 7 | ||
281 | 7 | XHR.open("GET", message.url); | 8 | XHR.open("GET", message.url); |
282 | @@ -17,8 +18,8 @@ | |||
283 | 17 | 18 | ||
284 | 18 | for(var i=0; i<obj.results.length; i++) { | 19 | for(var i=0; i<obj.results.length; i++) { |
285 | 19 | 20 | ||
288 | 20 | if (message.type == "movie") { | 21 | switch(message.type) { |
289 | 21 | 22 | case "movie": | |
290 | 22 | if (obj.results[i].poster_path == null) | 23 | if (obj.results[i].poster_path == null) |
291 | 23 | thumb_url = "null" | 24 | thumb_url = "null" |
292 | 24 | else | 25 | else |
293 | @@ -27,10 +28,9 @@ | |||
294 | 27 | message.model.append({"name": obj.results[i].title, | 28 | message.model.append({"name": obj.results[i].title, |
295 | 28 | "id": obj.results[i].id, | 29 | "id": obj.results[i].id, |
296 | 29 | "thumb_url": thumb_url}); | 30 | "thumb_url": thumb_url}); |
301 | 30 | } | 31 | break; |
302 | 31 | 32 | ||
303 | 32 | else if (message.type == "person"){ | 33 | case "person": |
300 | 33 | |||
304 | 34 | if (obj.results[i].profile_path == null) | 34 | if (obj.results[i].profile_path == null) |
305 | 35 | thumb_url = "null" | 35 | thumb_url = "null" |
306 | 36 | else | 36 | else |
307 | @@ -39,9 +39,9 @@ | |||
308 | 39 | message.model.append({"name": obj.results[i].name, | 39 | message.model.append({"name": obj.results[i].name, |
309 | 40 | "id": obj.results[i].id, | 40 | "id": obj.results[i].id, |
310 | 41 | "thumb_url": thumb_url}); | 41 | "thumb_url": thumb_url}); |
312 | 42 | } | 42 | break; |
313 | 43 | 43 | ||
315 | 44 | else if (message.type == "tv") { | 44 | case "tv": |
316 | 45 | if (obj.results[i].poster_path == null) | 45 | if (obj.results[i].poster_path == null) |
317 | 46 | thumb_url = "null" | 46 | thumb_url = "null" |
318 | 47 | else | 47 | else |
319 | @@ -50,6 +50,7 @@ | |||
320 | 50 | message.model.append({"name": obj.results[i].name, | 50 | message.model.append({"name": obj.results[i].name, |
321 | 51 | "id": obj.results[i].id, | 51 | "id": obj.results[i].id, |
322 | 52 | "thumb_url": thumb_url}); | 52 | "thumb_url": thumb_url}); |
323 | 53 | break; | ||
324 | 53 | } | 54 | } |
325 | 54 | 55 | ||
326 | 55 | message.model.sync() | 56 | message.model.sync() |
327 | 56 | 57 | ||
328 | === renamed file 'backend/UpcomingMovie.js' => 'backend/TrendingMovie.js' | |||
329 | === added file 'components/Grid.qml' | |||
330 | --- components/Grid.qml 1970-01-01 00:00:00 +0000 | |||
331 | +++ components/Grid.qml 2013-11-14 23:41:47 +0000 | |||
332 | @@ -0,0 +1,106 @@ | |||
333 | 1 | import QtQuick 2.0 | ||
334 | 2 | import Ubuntu.Components 0.1 | ||
335 | 3 | import Ubuntu.Components.ListItems 0.1 | ||
336 | 4 | |||
337 | 5 | Item { | ||
338 | 6 | id: grid | ||
339 | 7 | |||
340 | 8 | // Header Title | ||
341 | 9 | property alias header: header.text | ||
342 | 10 | |||
343 | 11 | // Grid Data Model | ||
344 | 12 | property alias dataModel: gridView.model | ||
345 | 13 | |||
346 | 14 | // Grid Thumbnail size | ||
347 | 15 | property int size: units.gu(12) | ||
348 | 16 | |||
349 | 17 | // Signal triggered when a thumb | ||
350 | 18 | signal thumbClicked(var model) | ||
351 | 19 | |||
352 | 20 | width: parent.width | ||
353 | 21 | |||
354 | 22 | Column { | ||
355 | 23 | id: container | ||
356 | 24 | |||
357 | 25 | anchors.fill: parent | ||
358 | 26 | spacing: units.gu(1) | ||
359 | 27 | |||
360 | 28 | Header { | ||
361 | 29 | id: header | ||
362 | 30 | text: "Default Header Title" | ||
363 | 31 | visible: text != "Default Header Title" | ||
364 | 32 | ActivityIndicator { | ||
365 | 33 | running: dataModel.count === 0 ? true : false | ||
366 | 34 | anchors.right: parent.right | ||
367 | 35 | } | ||
368 | 36 | } | ||
369 | 37 | |||
370 | 38 | Component { | ||
371 | 39 | id: gridDelegate | ||
372 | 40 | Item { | ||
373 | 41 | id: thumbContainer | ||
374 | 42 | |||
375 | 43 | width: grid.size + units.gu(2) | ||
376 | 44 | height: thumbColumn.height | ||
377 | 45 | |||
378 | 46 | Column { | ||
379 | 47 | id: thumbColumn | ||
380 | 48 | spacing: units.gu(0.5) | ||
381 | 49 | anchors.fill: parent | ||
382 | 50 | |||
383 | 51 | // Widget to curve edges and encase the thumbnail | ||
384 | 52 | UbuntuShape { | ||
385 | 53 | id: gridThumb | ||
386 | 54 | |||
387 | 55 | width: grid.size | ||
388 | 56 | height: grid.size + units.gu(5) | ||
389 | 57 | |||
390 | 58 | image: Image { | ||
391 | 59 | source: thumb_url | ||
392 | 60 | fillMode: Image.PreserveAspectFit | ||
393 | 61 | smooth: true | ||
394 | 62 | } | ||
395 | 63 | |||
396 | 64 | MouseArea { | ||
397 | 65 | anchors.fill: parent | ||
398 | 66 | onClicked: grid.thumbClicked(model) | ||
399 | 67 | } | ||
400 | 68 | } | ||
401 | 69 | |||
402 | 70 | // Label showing the movie/tv show name | ||
403 | 71 | Label { | ||
404 | 72 | id: gridThumbDescription | ||
405 | 73 | |||
406 | 74 | text: name | ||
407 | 75 | maximumLineCount: 2 | ||
408 | 76 | elide: Text.ElideRight | ||
409 | 77 | wrapMode: Text.WordWrap | ||
410 | 78 | width: gridThumb.width | ||
411 | 79 | horizontalAlignment: Text.AlignHCenter | ||
412 | 80 | |||
413 | 81 | MouseArea { | ||
414 | 82 | anchors.fill: parent | ||
415 | 83 | onClicked: grid.thumbClicked(model) | ||
416 | 84 | } | ||
417 | 85 | } | ||
418 | 86 | } | ||
419 | 87 | } | ||
420 | 88 | } | ||
421 | 89 | |||
422 | 90 | |||
423 | 91 | GridView { | ||
424 | 92 | id: gridView | ||
425 | 93 | |||
426 | 94 | clip: true | ||
427 | 95 | width: parent.width | ||
428 | 96 | height: parent.height - header.height - parent.spacing | ||
429 | 97 | snapMode: GridView.SnapToRow | ||
430 | 98 | |||
431 | 99 | cellHeight: grid.size + units.gu(12) | ||
432 | 100 | cellWidth: grid.size + container.spacing | ||
433 | 101 | |||
434 | 102 | delegate: gridDelegate | ||
435 | 103 | } | ||
436 | 104 | |||
437 | 105 | } | ||
438 | 106 | } | ||
439 | 0 | 107 | ||
440 | === added directory 'graphics/samples' | |||
441 | === added file 'graphics/samples/america.jpg' | |||
442 | 1 | Binary files graphics/samples/america.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/america.jpg 2013-11-14 23:41:47 +0000 differ | 108 | Binary files graphics/samples/america.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/america.jpg 2013-11-14 23:41:47 +0000 differ |
443 | === added file 'graphics/samples/avengers.jpg' | |||
444 | 2 | Binary files graphics/samples/avengers.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/avengers.jpg 2013-11-14 23:41:47 +0000 differ | 109 | Binary files graphics/samples/avengers.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/avengers.jpg 2013-11-14 23:41:47 +0000 differ |
445 | === added file 'graphics/samples/insidious.jpg' | |||
446 | 3 | Binary files graphics/samples/insidious.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/insidious.jpg 2013-11-14 23:41:47 +0000 differ | 110 | Binary files graphics/samples/insidious.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/insidious.jpg 2013-11-14 23:41:47 +0000 differ |
447 | === added file 'graphics/samples/iron-man.jpg' | |||
448 | 4 | Binary files graphics/samples/iron-man.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/iron-man.jpg 2013-11-14 23:41:47 +0000 differ | 111 | Binary files graphics/samples/iron-man.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/iron-man.jpg 2013-11-14 23:41:47 +0000 differ |
449 | === added file 'graphics/samples/pirates.jpg' | |||
450 | 5 | Binary files graphics/samples/pirates.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/pirates.jpg 2013-11-14 23:41:47 +0000 differ | 112 | Binary files graphics/samples/pirates.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/pirates.jpg 2013-11-14 23:41:47 +0000 differ |
451 | === added file 'graphics/samples/thor.jpg' | |||
452 | 6 | Binary files graphics/samples/thor.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/thor.jpg 2013-11-14 23:41:47 +0000 differ | 113 | Binary files graphics/samples/thor.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/thor.jpg 2013-11-14 23:41:47 +0000 differ |
453 | === added directory 'ui' | |||
454 | === removed directory 'ui' | |||
455 | === renamed file 'ui/About.qml' => 'ui/About.qml' | |||
456 | === added directory 'ui/home' | |||
457 | === renamed file 'ui/HomeTab.qml' => 'ui/home/HomeTab.qml' | |||
458 | --- ui/HomeTab.qml 2013-11-11 11:39:45 +0000 | |||
459 | +++ ui/home/HomeTab.qml 2013-11-14 23:41:47 +0000 | |||
460 | @@ -1,7 +1,6 @@ | |||
461 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
462 | 2 | import Ubuntu.Components 0.1 | 2 | import Ubuntu.Components 0.1 |
465 | 3 | import "../components" | 3 | import "../../components" |
464 | 4 | import "../tests" | ||
466 | 5 | 4 | ||
467 | 6 | Page { | 5 | Page { |
468 | 7 | id: homePage | 6 | id: homePage |
469 | 8 | 7 | ||
470 | === added directory 'ui/movie' | |||
471 | === added file 'ui/movie/MovieByGenre.qml' | |||
472 | --- ui/movie/MovieByGenre.qml 1970-01-01 00:00:00 +0000 | |||
473 | +++ ui/movie/MovieByGenre.qml 2013-11-14 23:41:47 +0000 | |||
474 | @@ -0,0 +1,70 @@ | |||
475 | 1 | import QtQuick 2.0 | ||
476 | 2 | import Ubuntu.Components 0.1 | ||
477 | 3 | import "../../components" | ||
478 | 4 | |||
479 | 5 | Page { | ||
480 | 6 | id: movieByGenrePage | ||
481 | 7 | |||
482 | 8 | title: "Genre" | ||
483 | 9 | visible: false | ||
484 | 10 | flickable: null | ||
485 | 11 | |||
486 | 12 | property string genre_id | ||
487 | 13 | property string genre_url: root.baseUrl + "/genre/list" + root.api_Key | ||
488 | 14 | property string genre_movie_url: root.baseUrl + "/genre/" + genre_id + "/movies" + root.api_Key | ||
489 | 15 | |||
490 | 16 | Component.onCompleted: { | ||
491 | 17 | genreWorker.source = "../../backend/GenreList.js" | ||
492 | 18 | genreWorker.sendMessage({"url": genre_url, "model": genreListModel}) | ||
493 | 19 | } | ||
494 | 20 | |||
495 | 21 | ListModel { id: genreListModel } | ||
496 | 22 | ListModel { id: genreMoviesModel } | ||
497 | 23 | |||
498 | 24 | WorkerScript { id: genreWorker } | ||
499 | 25 | |||
500 | 26 | Flickable { | ||
501 | 27 | clip: true | ||
502 | 28 | anchors.fill: parent | ||
503 | 29 | contentHeight: mainColumn.height + units.gu(5) | ||
504 | 30 | interactive: contentHeight > parent.height | ||
505 | 31 | |||
506 | 32 | Column { | ||
507 | 33 | id: mainColumn | ||
508 | 34 | |||
509 | 35 | anchors { | ||
510 | 36 | left: parent.left; | ||
511 | 37 | right: parent.right; | ||
512 | 38 | top: parent.top; | ||
513 | 39 | margins: units.gu(2) | ||
514 | 40 | } | ||
515 | 41 | |||
516 | 42 | spacing: units.gu(2) | ||
517 | 43 | |||
518 | 44 | OptionSelector { | ||
519 | 45 | text: "Choose movie genre" | ||
520 | 46 | model: genreListModel | ||
521 | 47 | delegate: genreDelegate | ||
522 | 48 | onDelegateClicked: { | ||
523 | 49 | genreMoviesModel.clear() | ||
524 | 50 | genreWorker.source = "../../backend/GenreMovies.js" | ||
525 | 51 | genre_id = genreListModel.get(index).id | ||
526 | 52 | genreWorker.sendMessage({"model": genreMoviesModel, "url": genre_movie_url}) | ||
527 | 53 | } | ||
528 | 54 | } | ||
529 | 55 | |||
530 | 56 | Component { | ||
531 | 57 | id: genreDelegate | ||
532 | 58 | OptionSelectorDelegate { text: name } | ||
533 | 59 | } | ||
534 | 60 | |||
535 | 61 | Grid { | ||
536 | 62 | id: movieList | ||
537 | 63 | dataModel: genreMoviesModel | ||
538 | 64 | visible: genreMoviesModel.count != 0 | ||
539 | 65 | height: units.gu(50) | ||
540 | 66 | onThumbClicked: pageStack.push(Qt.resolvedUrl("MoviePage.qml"), {"movie_id": model.id}) | ||
541 | 67 | } | ||
542 | 68 | } | ||
543 | 69 | } | ||
544 | 70 | } | ||
545 | 0 | 71 | ||
546 | === renamed file 'ui/MoviePage.qml' => 'ui/movie/MoviePage.qml' | |||
547 | --- ui/MoviePage.qml 2013-11-13 20:50:15 +0000 | |||
548 | +++ ui/movie/MoviePage.qml 2013-11-14 23:41:47 +0000 | |||
549 | @@ -2,7 +2,7 @@ | |||
550 | 2 | import Ubuntu.Components 0.1 | 2 | import Ubuntu.Components 0.1 |
551 | 3 | import QtGraphicalEffects 1.0 | 3 | import QtGraphicalEffects 1.0 |
552 | 4 | import Ubuntu.Components.ListItems 0.1 | 4 | import Ubuntu.Components.ListItems 0.1 |
554 | 5 | import "../components" | 5 | import "../../components" |
555 | 6 | 6 | ||
556 | 7 | Page { | 7 | Page { |
557 | 8 | id: moviePage | 8 | id: moviePage |
558 | @@ -21,13 +21,9 @@ | |||
559 | 21 | 21 | ||
560 | 22 | WorkerScript { | 22 | WorkerScript { |
561 | 23 | id: movieWorker | 23 | id: movieWorker |
563 | 24 | source: "../backend/MovieDetails.js" | 24 | source: "../../backend/MovieDetails.js" |
564 | 25 | onMessage: { | 25 | onMessage: { |
570 | 26 | if(messageObject.poster == null) | 26 | thumb.source = messageObject.poster |
566 | 27 | thumb.source = Qt.resolvedUrl("../graphics/toolbarIcon.png") | ||
567 | 28 | else | ||
568 | 29 | thumb.source = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + messageObject.poster | ||
569 | 30 | |||
571 | 31 | title.text = messageObject.title | 27 | title.text = messageObject.title |
572 | 32 | description.text = messageObject.description | 28 | description.text = messageObject.description |
573 | 33 | releaseDate.subText = messageObject.releasedate | 29 | releaseDate.subText = messageObject.releasedate |
574 | @@ -47,15 +43,15 @@ | |||
575 | 47 | 43 | ||
576 | 48 | cast1.text = castModel.get(0).name | 44 | cast1.text = castModel.get(0).name |
577 | 49 | cast1.subText = castModel.get(0).character | 45 | cast1.subText = castModel.get(0).character |
579 | 50 | cast1.icon = castModel.get(0).iconUrl === "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : castModel.get(0).iconUrl; | 46 | cast1.icon = castModel.get(0).iconUrl === "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : castModel.get(0).iconUrl; |
580 | 51 | 47 | ||
581 | 52 | cast2.text = castModel.get(1).name | 48 | cast2.text = castModel.get(1).name |
582 | 53 | cast2.subText = castModel.get(1).character | 49 | cast2.subText = castModel.get(1).character |
584 | 54 | cast2.icon = castModel.get(1).iconUrl === "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : castModel.get(1).iconUrl; | 50 | cast2.icon = castModel.get(1).iconUrl === "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : castModel.get(1).iconUrl; |
585 | 55 | 51 | ||
586 | 56 | cast3.text = castModel.get(2).name | 52 | cast3.text = castModel.get(2).name |
587 | 57 | cast3.subText = castModel.get(2).character | 53 | cast3.subText = castModel.get(2).character |
589 | 58 | cast3.icon = castModel.get(2).iconUrl === "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : castModel.get(2).iconUrl; | 54 | cast3.icon = castModel.get(2).iconUrl === "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : castModel.get(2).iconUrl; |
590 | 59 | 55 | ||
591 | 60 | crew1.text = crewModel.get(0).name | 56 | crew1.text = crewModel.get(0).name |
592 | 61 | crew1.subText = crewModel.get(0).job | 57 | crew1.subText = crewModel.get(0).job |
593 | @@ -108,8 +104,8 @@ | |||
594 | 108 | delegate: Subtitled { | 104 | delegate: Subtitled { |
595 | 109 | text: name | 105 | text: name |
596 | 110 | subText: character | 106 | subText: character |
599 | 111 | icon: iconUrl == "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : iconUrl | 107 | icon: iconUrl == "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : iconUrl |
600 | 112 | onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": id}) | 108 | onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": id}) |
601 | 113 | } | 109 | } |
602 | 114 | } | 110 | } |
603 | 115 | } | 111 | } |
604 | @@ -134,7 +130,7 @@ | |||
605 | 134 | delegate: Subtitled { | 130 | delegate: Subtitled { |
606 | 135 | text: name | 131 | text: name |
607 | 136 | subText: job | 132 | subText: job |
609 | 137 | onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": id}) | 133 | onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": id}) |
610 | 138 | } | 134 | } |
611 | 139 | } | 135 | } |
612 | 140 | } | 136 | } |
613 | @@ -223,7 +219,7 @@ | |||
614 | 223 | Image{ | 219 | Image{ |
615 | 224 | id: star | 220 | id: star |
616 | 225 | width: units.gu(5) | 221 | width: units.gu(5) |
618 | 226 | source: Qt.resolvedUrl("../graphics/rating.png") | 222 | source: Qt.resolvedUrl("../../graphics/rating.png") |
619 | 227 | fillMode: Image.PreserveAspectFit | 223 | fillMode: Image.PreserveAspectFit |
620 | 228 | smooth: true | 224 | smooth: true |
621 | 229 | } | 225 | } |
622 | @@ -271,19 +267,19 @@ | |||
623 | 271 | Subtitled { | 267 | Subtitled { |
624 | 272 | id: cast1; | 268 | id: cast1; |
625 | 273 | progression: true | 269 | progression: true |
627 | 274 | onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": castModel.get(0).id}) | 270 | onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": castModel.get(0).id}) |
628 | 275 | } | 271 | } |
629 | 276 | 272 | ||
630 | 277 | Subtitled { | 273 | Subtitled { |
631 | 278 | id: cast2; | 274 | id: cast2; |
632 | 279 | progression: true | 275 | progression: true |
634 | 280 | onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": castModel.get(1).id}) | 276 | onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": castModel.get(1).id}) |
635 | 281 | } | 277 | } |
636 | 282 | 278 | ||
637 | 283 | Subtitled { | 279 | Subtitled { |
638 | 284 | id: cast3; | 280 | id: cast3; |
639 | 285 | progression: true | 281 | progression: true |
641 | 286 | onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": castModel.get(2).id}) | 282 | onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": castModel.get(2).id}) |
642 | 287 | } | 283 | } |
643 | 288 | 284 | ||
644 | 289 | Standard { | 285 | Standard { |
645 | @@ -298,19 +294,19 @@ | |||
646 | 298 | Subtitled { | 294 | Subtitled { |
647 | 299 | id: crew1; | 295 | id: crew1; |
648 | 300 | progression: true | 296 | progression: true |
650 | 301 | onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": crewModel.get(0).id}) | 297 | onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": crewModel.get(0).id}) |
651 | 302 | } | 298 | } |
652 | 303 | 299 | ||
653 | 304 | Subtitled { | 300 | Subtitled { |
654 | 305 | id: crew2; | 301 | id: crew2; |
655 | 306 | progression: true | 302 | progression: true |
657 | 307 | onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": crewModel.get(1).id}) | 303 | onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": crewModel.get(1).id}) |
658 | 308 | } | 304 | } |
659 | 309 | 305 | ||
660 | 310 | Subtitled { | 306 | Subtitled { |
661 | 311 | id: crew3; | 307 | id: crew3; |
662 | 312 | progression: true | 308 | progression: true |
664 | 313 | onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": crewModel.get(2).id}) | 309 | onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": crewModel.get(2).id}) |
665 | 314 | } | 310 | } |
666 | 315 | 311 | ||
667 | 316 | Standard { | 312 | Standard { |
668 | 317 | 313 | ||
669 | === renamed file 'ui/MovieTab.qml' => 'ui/movie/MovieTab.qml' | |||
670 | --- ui/MovieTab.qml 2013-11-12 17:43:07 +0000 | |||
671 | +++ ui/movie/MovieTab.qml 2013-11-14 23:41:47 +0000 | |||
672 | @@ -1,7 +1,7 @@ | |||
673 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
674 | 2 | import Ubuntu.Components 0.1 | 2 | import Ubuntu.Components 0.1 |
675 | 3 | import Ubuntu.Components.ListItems 0.1 | 3 | import Ubuntu.Components.ListItems 0.1 |
677 | 4 | import "../components" | 4 | import "../../components" |
678 | 5 | 5 | ||
679 | 6 | Page { | 6 | Page { |
680 | 7 | // Movie URLs | 7 | // Movie URLs |
681 | @@ -13,7 +13,7 @@ | |||
682 | 13 | ListModel { | 13 | ListModel { |
683 | 14 | id: nowPlayingModel | 14 | id: nowPlayingModel |
684 | 15 | Component.onCompleted: { | 15 | Component.onCompleted: { |
686 | 16 | homePageWorker.source = "../backend/NowPlayingMovie.js" | 16 | homePageWorker.source = "../../backend/TrendingMovie.js" |
687 | 17 | homePageWorker.sendMessage({'model': nowPlayingModel, 'url': nowPlayingUrl}) | 17 | homePageWorker.sendMessage({'model': nowPlayingModel, 'url': nowPlayingUrl}) |
688 | 18 | } | 18 | } |
689 | 19 | } | 19 | } |
690 | @@ -21,7 +21,7 @@ | |||
691 | 21 | ListModel { | 21 | ListModel { |
692 | 22 | id: upcomingMovieModel | 22 | id: upcomingMovieModel |
693 | 23 | Component.onCompleted: { | 23 | Component.onCompleted: { |
695 | 24 | homePageWorker.source = "../backend/UpcomingMovie.js" | 24 | homePageWorker.source = "../../backend/TrendingMovie.js" |
696 | 25 | homePageWorker.sendMessage({'model': upcomingMovieModel, 'url': upcomingUrl}) | 25 | homePageWorker.sendMessage({'model': upcomingMovieModel, 'url': upcomingUrl}) |
697 | 26 | } | 26 | } |
698 | 27 | } | 27 | } |
699 | @@ -88,7 +88,7 @@ | |||
700 | 88 | Standard { | 88 | Standard { |
701 | 89 | text: "By Genre" | 89 | text: "By Genre" |
702 | 90 | progression: true | 90 | progression: true |
704 | 91 | enabled: false | 91 | onClicked: pageStack.push(Qt.resolvedUrl("MovieByGenre.qml")) |
705 | 92 | } | 92 | } |
706 | 93 | 93 | ||
707 | 94 | Standard { | 94 | Standard { |
708 | 95 | 95 | ||
709 | === renamed file 'ui/SearchMovie.qml' => 'ui/movie/SearchMovie.qml' | |||
710 | --- ui/SearchMovie.qml 2013-11-12 20:09:36 +0000 | |||
711 | +++ ui/movie/SearchMovie.qml 2013-11-14 23:41:47 +0000 | |||
712 | @@ -1,6 +1,6 @@ | |||
713 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
714 | 2 | import Ubuntu.Components 0.1 | 2 | import Ubuntu.Components 0.1 |
716 | 3 | import "../components" | 3 | import "../../components" |
717 | 4 | 4 | ||
718 | 5 | // Page to search for movies | 5 | // Page to search for movies |
719 | 6 | Page { | 6 | Page { |
720 | 7 | 7 | ||
721 | === added directory 'ui/person' | |||
722 | === renamed file 'ui/PersonPage.qml' => 'ui/person/PersonPage.qml' | |||
723 | --- ui/PersonPage.qml 2013-11-13 21:28:13 +0000 | |||
724 | +++ ui/person/PersonPage.qml 2013-11-14 23:41:47 +0000 | |||
725 | @@ -18,10 +18,10 @@ | |||
726 | 18 | 18 | ||
727 | 19 | WorkerScript { | 19 | WorkerScript { |
728 | 20 | id: personWorker | 20 | id: personWorker |
730 | 21 | source: "../backend/PersonDetails.js" | 21 | source: "../../backend/PersonDetails.js" |
731 | 22 | onMessage: { | 22 | onMessage: { |
732 | 23 | if(messageObject.poster == null) | 23 | if(messageObject.poster == null) |
734 | 24 | thumb.source = Qt.resolvedUrl("../graphics/toolbarIcon.png") | 24 | thumb.source = Qt.resolvedUrl("../../graphics/toolbarIcon.png") |
735 | 25 | else | 25 | else |
736 | 26 | thumb.source = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + messageObject.poster | 26 | thumb.source = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + messageObject.poster |
737 | 27 | 27 | ||
738 | @@ -30,7 +30,7 @@ | |||
739 | 30 | birthYear.text = messageObject.birthday == null ? "Not Available" : "Born: " + messageObject.birthday | 30 | birthYear.text = messageObject.birthday == null ? "Not Available" : "Born: " + messageObject.birthday |
740 | 31 | deathYear.text = messageObject.deathday == null ? "Not Available" :"Dead: " + messageObject.deathday | 31 | deathYear.text = messageObject.deathday == null ? "Not Available" :"Dead: " + messageObject.deathday |
741 | 32 | birthPlace.text = messageObject.place_of_birth == null ? "Birth Place Not Available" : messageObject.place_of_birth | 32 | birthPlace.text = messageObject.place_of_birth == null ? "Birth Place Not Available" : messageObject.place_of_birth |
743 | 33 | contact.text = messageObject.homepage | 33 | contact.text = messageObject.homepage == null ? "Homepage Not Available" : messageObject.homepage |
744 | 34 | } | 34 | } |
745 | 35 | } | 35 | } |
746 | 36 | 36 | ||
747 | @@ -168,10 +168,10 @@ | |||
748 | 168 | 168 | ||
749 | 169 | model: actedModel | 169 | model: actedModel |
750 | 170 | delegate: Subtitled { | 170 | delegate: Subtitled { |
752 | 171 | icon: iconUrl == "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : iconUrl | 171 | icon: iconUrl == "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : iconUrl |
753 | 172 | text: title | 172 | text: title |
754 | 173 | subText: character | 173 | subText: character |
756 | 174 | onClicked: media_type == "movie" ? pageStack.push(Qt.resolvedUrl("MoviePage.qml"), {"movie_id": id}) : console.log("Not a movie") | 174 | onClicked: media_type == "movie" ? pageStack.push(Qt.resolvedUrl("../movie/MoviePage.qml"), {"movie_id": id}) : console.log("Not a movie") |
757 | 175 | } | 175 | } |
758 | 176 | } | 176 | } |
759 | 177 | 177 | ||
760 | @@ -191,10 +191,10 @@ | |||
761 | 191 | 191 | ||
762 | 192 | model: directedModel | 192 | model: directedModel |
763 | 193 | delegate: Subtitled { | 193 | delegate: Subtitled { |
765 | 194 | icon: iconUrl == "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : iconUrl | 194 | icon: iconUrl == "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : iconUrl |
766 | 195 | text: title | 195 | text: title |
767 | 196 | subText: character | 196 | subText: character |
769 | 197 | onClicked: media_type == "movie" ? pageStack.push(Qt.resolvedUrl("MoviePage.qml"), {"movie_id": id}) : console.log("Not a movie") | 197 | onClicked: media_type == "movie" ? pageStack.push(Qt.resolvedUrl("../movie/MoviePage.qml"), {"movie_id": id}) : console.log("Not a movie") |
770 | 198 | } | 198 | } |
771 | 199 | } | 199 | } |
772 | 200 | } | 200 | } |
773 | 201 | 201 | ||
774 | === renamed file 'ui/PersonTab.qml' => 'ui/person/PersonTab.qml' | |||
775 | --- ui/PersonTab.qml 2013-11-12 20:09:36 +0000 | |||
776 | +++ ui/person/PersonTab.qml 2013-11-14 23:41:47 +0000 | |||
777 | @@ -1,6 +1,6 @@ | |||
778 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
779 | 2 | import Ubuntu.Components 0.1 | 2 | import Ubuntu.Components 0.1 |
781 | 3 | import "../components" | 3 | import "../../components" |
782 | 4 | 4 | ||
783 | 5 | Page { | 5 | Page { |
784 | 6 | // Person URLs | 6 | // Person URLs |
785 | @@ -9,7 +9,7 @@ | |||
786 | 9 | ListModel { | 9 | ListModel { |
787 | 10 | id: popularModel | 10 | id: popularModel |
788 | 11 | Component.onCompleted: { | 11 | Component.onCompleted: { |
790 | 12 | peopleWorker.source = "../backend/PopularPeople.js" | 12 | peopleWorker.source = "../../backend/PopularPeople.js" |
791 | 13 | peopleWorker.sendMessage({'model': popularModel, 'url': popularUrl}) | 13 | peopleWorker.sendMessage({'model': popularModel, 'url': popularUrl}) |
792 | 14 | } | 14 | } |
793 | 15 | } | 15 | } |
794 | 16 | 16 | ||
795 | === renamed file 'ui/SearchPerson.qml' => 'ui/person/SearchPerson.qml' | |||
796 | --- ui/SearchPerson.qml 2013-11-12 20:09:36 +0000 | |||
797 | +++ ui/person/SearchPerson.qml 2013-11-14 23:41:47 +0000 | |||
798 | @@ -1,6 +1,6 @@ | |||
799 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
800 | 2 | import Ubuntu.Components 0.1 | 2 | import Ubuntu.Components 0.1 |
802 | 3 | import "../components" | 3 | import "../../components" |
803 | 4 | 4 | ||
804 | 5 | // Page to search for persons | 5 | // Page to search for persons |
805 | 6 | Page { | 6 | Page { |
806 | 7 | 7 | ||
807 | === added directory 'ui/tv' | |||
808 | === renamed file 'ui/SearchTv.qml' => 'ui/tv/SearchTv.qml' | |||
809 | --- ui/SearchTv.qml 2013-11-12 20:09:36 +0000 | |||
810 | +++ ui/tv/SearchTv.qml 2013-11-14 23:41:47 +0000 | |||
811 | @@ -1,6 +1,6 @@ | |||
812 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
813 | 2 | import Ubuntu.Components 0.1 | 2 | import Ubuntu.Components 0.1 |
815 | 3 | import "../components" | 3 | import "../../components" |
816 | 4 | 4 | ||
817 | 5 | // Page to search for tv shows | 5 | // Page to search for tv shows |
818 | 6 | Page { | 6 | Page { |
819 | 7 | 7 | ||
820 | === renamed file 'ui/TvTab.qml' => 'ui/tv/TvTab.qml' | |||
821 | --- ui/TvTab.qml 2013-11-12 20:09:36 +0000 | |||
822 | +++ ui/tv/TvTab.qml 2013-11-14 23:41:47 +0000 | |||
823 | @@ -1,6 +1,6 @@ | |||
824 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
825 | 2 | import Ubuntu.Components 0.1 | 2 | import Ubuntu.Components 0.1 |
827 | 3 | import "../components" | 3 | import "../../components" |
828 | 4 | 4 | ||
829 | 5 | Page { | 5 | Page { |
830 | 6 | // Tv Show URLs | 6 | // Tv Show URLs |
831 | @@ -9,7 +9,7 @@ | |||
832 | 9 | ListModel { | 9 | ListModel { |
833 | 10 | id: popularModel | 10 | id: popularModel |
834 | 11 | Component.onCompleted: { | 11 | Component.onCompleted: { |
836 | 12 | tvPageWorker.source = "../backend/PopularShow.js" | 12 | tvPageWorker.source = "../../backend/PopularShow.js" |
837 | 13 | tvPageWorker.sendMessage({'model': popularModel, 'url': popularUrl}) | 13 | tvPageWorker.sendMessage({'model': popularModel, 'url': popularUrl}) |
838 | 14 | } | 14 | } |
839 | 15 | } | 15 | } |
This work done in this MP is being split to smaller MP for convenience and clarity. Hence rejecting this MP.