|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: video collection view plugin's ui utils class |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __VIDEOCOLLECTIONVIEWUTILS_H__ |
|
19 #define __VIDEOCOLLECTIONVIEWUTILS_H__ |
|
20 |
|
21 #include <qobject.h> |
|
22 |
|
23 class VideoCollectionViewUtils : public QObject |
|
24 { |
|
25 Q_OBJECT |
|
26 |
|
27 public: |
|
28 |
|
29 /** |
|
30 * Returns singleton instance for this class. |
|
31 * |
|
32 * WARNING! Not safe to call this from destructor of another function scope static object! |
|
33 * |
|
34 * @return The singleton instance. |
|
35 */ |
|
36 static VideoCollectionViewUtils& instance(); |
|
37 |
|
38 /** |
|
39 * Saves the sorting role and order to cenrep. |
|
40 * |
|
41 * @param role The sorting role. |
|
42 * @param order The sorting order (e.g. ascending or descending). |
|
43 * @return Zero if operation succeeded, less than zero in error cases. |
|
44 */ |
|
45 int saveSortingValues(int role, Qt::SortOrder order); |
|
46 |
|
47 /** |
|
48 * Loads the sorting role and order from cenrep. |
|
49 * |
|
50 * @param role On return contains the sorting role. |
|
51 * @param order On return contains the sorting order |
|
52 * @return Zero if operation succeeded, less than zero in error cases. |
|
53 */ |
|
54 int loadSortingValues(int& role, Qt::SortOrder& order); |
|
55 |
|
56 /** |
|
57 * Get service icon resource strings from cenrep. |
|
58 * |
|
59 * @param icon On return contains the resource string for icon image. |
|
60 * @param iconPressed On return contains the resource string for pressed icon image. |
|
61 * @return Zero if operation succeeded, less than zero in error cases. |
|
62 */ |
|
63 int getServiceIconStrings(QString& icon, QString& iconPressed); |
|
64 |
|
65 /** |
|
66 * Get service URI string. |
|
67 * |
|
68 * @return Service URI string. Invalid string in error cases. |
|
69 */ |
|
70 QString getServiceUriString(); |
|
71 |
|
72 public slots: |
|
73 |
|
74 /** |
|
75 * Shows status msgs |
|
76 * |
|
77 * @param statusCode status code |
|
78 * @param additional additional data gotten from the status |
|
79 */ |
|
80 void showStatusMsgSlot(int statusCode, QVariant &additional); |
|
81 |
|
82 private: |
|
83 |
|
84 /** |
|
85 * disables copy-constructor and assingment operator |
|
86 */ |
|
87 Q_DISABLE_COPY(VideoCollectionViewUtils) |
|
88 |
|
89 /** |
|
90 * constructor |
|
91 */ |
|
92 VideoCollectionViewUtils(); |
|
93 |
|
94 /** |
|
95 * destructor |
|
96 */ |
|
97 virtual ~VideoCollectionViewUtils(); |
|
98 |
|
99 |
|
100 }; |
|
101 |
|
102 #endif //__VIDEOCOLLECTIONUIUTILS_H__ |
|
103 |