|
30
|
1 |
/*
|
|
|
2 |
* Copyright (c) 2009 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 _VIDEOCOLLECTIONUILOADER_H_
|
|
|
19 |
#define _VIDEOCOLLECTIONUILOADER_H_
|
|
|
20 |
|
|
|
21 |
// System includes
|
|
|
22 |
#include <hbdocumentloader.h>
|
|
|
23 |
|
|
|
24 |
// Constants
|
|
|
25 |
static const char* DOCML_VIDEOCOLLECTIONVIEW_FILE = ":/layout/collectionview.docml";
|
|
|
26 |
static const char* DOCML_NAME_VIEW = "view";
|
|
|
27 |
|
|
|
28 |
// Videocollection View
|
|
|
29 |
static const char* DOCML_NAME_VC_HEADINGBANNER = "vc:mBanner";
|
|
|
30 |
static const char* DOCML_NAME_VC_VIDEOLISTWIDGET = "vc:mListWidget";
|
|
|
31 |
static const char* DOCML_NAME_VC_VIDEOHINTWIDGET = "vc:mHintWidget";
|
|
|
32 |
|
|
|
33 |
// Videocollection Options Menu
|
|
|
34 |
static const char* DOCML_NAME_OPTIONS_MENU = "vc:mOptionsMenu";
|
|
|
35 |
static const char* DOCML_NAME_SORT_MENU = "vc:mSortBy";
|
|
|
36 |
|
|
|
37 |
static const char* DOCML_NAME_SORT_BY_DATE = "vc:mDate";
|
|
|
38 |
static const char* DOCML_NAME_SORT_BY_NAME = "vc:mName";
|
|
|
39 |
static const char* DOCML_NAME_SORT_BY_NUMBER_OF_ITEMS = "vc:mNumberOfItems";
|
|
|
40 |
static const char* DOCML_NAME_SORT_BY_TOTAL_LENGTH = "vc:mTotalLength";
|
|
|
41 |
static const char* DOCML_NAME_SORT_BY_RATING = "vc:mRating";
|
|
|
42 |
static const char* DOCML_NAME_SORT_BY_SIZE = "vc:mSize";
|
|
|
43 |
|
|
|
44 |
static const char* DOCML_NAME_ADD_TO_COLLECTION = "vc:mAddtoCollection";
|
|
|
45 |
static const char* DOCML_NAME_CREATE_COLLECTION = "vc:mCreateNewCollection";
|
|
|
46 |
static const char* DOCML_NAME_DELETE_MULTIPLE = "vc:mDeleteMultiple";
|
|
|
47 |
|
|
|
48 |
static const char* DOCML_NAME_PLAY_IN_QUEUE = "vc:mPlayInQueue";
|
|
|
49 |
static const char* DOCML_NAME_PLAY_ALL_ITEMS = "vc:mPlayAllItems";
|
|
|
50 |
|
|
|
51 |
// Videocollection hint widget
|
|
|
52 |
static const char* DOCML_NAME_NOVIDEOS_LABEL = "vc:mNoVideosLabel";
|
|
|
53 |
|
|
|
54 |
// Class declaration
|
|
|
55 |
class VideoCollectionUiLoader : public HbDocumentLoader
|
|
|
56 |
{
|
|
|
57 |
|
|
|
58 |
public:
|
|
|
59 |
|
|
|
60 |
VideoCollectionUiLoader();
|
|
|
61 |
|
|
|
62 |
~VideoCollectionUiLoader();
|
|
|
63 |
|
|
|
64 |
/**
|
|
|
65 |
* Returns the requested widget casted to correct type
|
|
|
66 |
*
|
|
|
67 |
* @param name Name of the widget
|
|
|
68 |
* @return Pointer to the widget
|
|
|
69 |
*/
|
|
|
70 |
template<class T>
|
|
|
71 |
T* findWidget( QString name )
|
|
|
72 |
{
|
|
|
73 |
return qobject_cast<T*>( HbDocumentLoader::findWidget( name ) );
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
/**
|
|
|
77 |
* Returns the requested object casted to correct type
|
|
|
78 |
*
|
|
|
79 |
* @param name Name of the object
|
|
|
80 |
* @return Pointer to the object
|
|
|
81 |
*/
|
|
|
82 |
template<class T>
|
|
|
83 |
T* findObject( QString name )
|
|
|
84 |
{
|
|
|
85 |
return qobject_cast<T*>( HbDocumentLoader::findObject( name ) );
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
static bool mFindFailure;
|
|
|
89 |
|
|
|
90 |
private:
|
|
|
91 |
|
|
|
92 |
QObject *createObject( const QString& type, const QString &name );
|
|
|
93 |
};
|
|
|
94 |
|
|
|
95 |
#endif // _VIDEOCOLLECTIONUILOADER_H_
|