36
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef VIDEOCOLLECTIONUILOADERDEF_H
|
|
19 |
#define VIDEOCOLLECTIONUILOADERDEF_H
|
|
20 |
|
|
21 |
// Constants
|
|
22 |
static const char* DOCML_VIDEOCOLLECTIONVIEW_FILE = ":/layout/collectionview.docml";
|
|
23 |
static const char* DOCML_VIDEOCOLLECTIONVIEW_SECTION_LIST = "listsSection";
|
|
24 |
static const char* DOCML_NAME_VIEW = "view";
|
|
25 |
|
|
26 |
// Videocollection View
|
|
27 |
static const char* DOCML_NAME_VC_HEADINGBANNER = "vc:mBanner";
|
|
28 |
static const char* DOCML_NAME_VC_COLLECTIONWIDGET = "vc:mCollectionWidget";
|
|
29 |
static const char* DOCML_NAME_VC_COLLECTIONCONTENTWIDGET = "vc:mCollectionContentWidget";
|
|
30 |
static const char* DOCML_NAME_VC_VIDEOLISTWIDGET = "vc:mListWidget";
|
|
31 |
|
|
32 |
// Videocollection Options Menu
|
|
33 |
static const char* DOCML_NAME_OPTIONS_MENU = "vc:mOptionsMenu";
|
|
34 |
static const char* DOCML_NAME_SORT_MENU = "vc:mSortBy";
|
|
35 |
|
|
36 |
static const char* DOCML_NAME_SORT_BY_DATE = "vc:mDate";
|
|
37 |
static const char* DOCML_NAME_SORT_BY_NAME = "vc:mName";
|
|
38 |
static const char* DOCML_NAME_SORT_BY_NUMBER_OF_ITEMS = "vc:mNumberOfItems";
|
|
39 |
static const char* DOCML_NAME_SORT_BY_SIZE = "vc:mSize";
|
|
40 |
|
|
41 |
static const char* DOCML_NAME_ADD_TO_COLLECTION = "vc:mAddtoCollection";
|
|
42 |
static const char* DOCML_NAME_CREATE_COLLECTION = "vc:mCreateNewCollection";
|
|
43 |
static const char* DOCML_NAME_DELETE_MULTIPLE = "vc:mDeleteMultiple";
|
|
44 |
|
66
|
45 |
// Videocollection no content label
|
|
46 |
static const char* DOCML_NAME_NO_CONTENT_LABEL = "vc:mNoContentLabel";
|
36
|
47 |
|
|
48 |
// video multiselection dialog
|
|
49 |
static const char* DOCML_VIDEOSELECTIONDIALOG_FILE = ":/layout/videolistselectiondialog.docml";
|
|
50 |
static const char* DOCML_NAME_DIALOG = "mMultiSelectionDialog";
|
|
51 |
static const char* DOCML_NAME_DLG_HEADINGLBL = "mHeadingLabel";
|
|
52 |
static const char* DOCML_NAME_CHECK_CONTAINER = "mCheckBoxContainer";
|
|
53 |
static const char* DOCML_NAME_MARKALL = "mCheckMarkAll";
|
37
|
54 |
static const char* DOCML_NAME_LBL_MARKALL = "mCheckBoxText";
|
36
|
55 |
static const char* DOCML_NAME_LBL_SELECTION = "mSelectionCount";
|
|
56 |
static const char* DOCML_NAME_LIST_CONTAINER = "mListContainer";
|
|
57 |
|
|
58 |
// async loading timeout
|
|
59 |
static const int ASYNC_FIND_TIMEOUT = 50; // ms
|
|
60 |
|
|
61 |
/** VideoCollectionUiLoader parameter class */
|
|
62 |
class VideoCollectionUiLoaderParam
|
|
63 |
{
|
|
64 |
public:
|
|
65 |
enum // Loading phases
|
|
66 |
{
|
|
67 |
LoadPhasePrimary,
|
|
68 |
LoadPhaseSecondary
|
|
69 |
};
|
|
70 |
|
|
71 |
public:
|
|
72 |
VideoCollectionUiLoaderParam(const QString& name,
|
|
73 |
const char *docml,
|
|
74 |
bool isWidget,
|
|
75 |
int loadPhase):
|
|
76 |
mName(name),
|
|
77 |
mIsWidget(isWidget),
|
|
78 |
mReceiver(0),
|
|
79 |
mDocml(docml),
|
|
80 |
mSection(0),
|
|
81 |
mMember(0),
|
|
82 |
mPhase(loadPhase)
|
|
83 |
{
|
|
84 |
// members already set
|
|
85 |
}
|
|
86 |
|
|
87 |
VideoCollectionUiLoaderParam(const QString& name,
|
|
88 |
const char *docml,
|
|
89 |
const char *section,
|
|
90 |
bool isWidget,
|
|
91 |
int loadPhase):
|
|
92 |
mName(name),
|
|
93 |
mIsWidget(isWidget),
|
|
94 |
mReceiver(0),
|
|
95 |
mDocml(docml),
|
|
96 |
mSection(section),
|
|
97 |
mMember(0),
|
|
98 |
mPhase(loadPhase)
|
|
99 |
{
|
|
100 |
// members already set
|
|
101 |
}
|
|
102 |
|
|
103 |
VideoCollectionUiLoaderParam(const QString& name,
|
|
104 |
const char *docml,
|
|
105 |
const char *section,
|
|
106 |
bool isWidget,
|
|
107 |
int loadPhase,
|
|
108 |
QObject *receiver,
|
|
109 |
const char *member):
|
|
110 |
mName(name),
|
|
111 |
mIsWidget(isWidget),
|
|
112 |
mReceiver(receiver),
|
|
113 |
mDocml(docml),
|
|
114 |
mSection(section),
|
|
115 |
mMember(member),
|
|
116 |
mPhase(loadPhase)
|
|
117 |
{
|
|
118 |
// members already set
|
|
119 |
}
|
|
120 |
|
|
121 |
bool operator==(const VideoCollectionUiLoaderParam ¶m) const
|
|
122 |
{
|
|
123 |
return mName == param.mName && mDocml == param.mDocml && mSection == param.mSection;
|
|
124 |
}
|
|
125 |
|
|
126 |
bool operator==(const QString &name) const
|
|
127 |
{
|
|
128 |
return mName == name;
|
|
129 |
}
|
|
130 |
|
|
131 |
public:
|
|
132 |
QString mName;
|
|
133 |
bool mIsWidget;
|
|
134 |
QObject *mReceiver;
|
|
135 |
const char *mDocml;
|
|
136 |
const char *mSection;
|
|
137 |
const char *mMember;
|
|
138 |
int mPhase;
|
|
139 |
};
|
|
140 |
|
|
141 |
#endif//VIDEOCOLLECTIONUILOADERDEF_H
|