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_HINT_BUTTON = "vc:mHintButton";
|
|
53 |
static const char* DOCML_NAME_HINT_LABEL = "vc:mHintTextLabel";
|
|
54 |
|
|
55 |
// video multiselection dialog
|
|
56 |
static const char* DOCML_VIDEOSELECTIONDIALOG_FILE = ":/layout/videolistselectiondialog.docml";
|
|
57 |
static const char* DOCML_NAME_DIALOG = "mMultiSelectionDialog";
|
|
58 |
static const char* DOCML_NAME_DLG_HEADINGLBL = "mHeadingLabel";
|
|
59 |
static const char* DOCML_NAME_MARKALL = "mCheckMarkAll";
|
|
60 |
static const char* DOCML_NAME_LBL_SELECTION = "mSelectionCount";
|
|
61 |
static const char* DOCML_NAME_LIST_CONTAINER = "mListContainer";
|
|
62 |
|
|
63 |
|
|
64 |
// Class declaration
|
|
65 |
class VideoCollectionUiLoader : public HbDocumentLoader
|
|
66 |
{
|
|
67 |
|
|
68 |
public:
|
|
69 |
|
|
70 |
VideoCollectionUiLoader();
|
|
71 |
|
|
72 |
~VideoCollectionUiLoader();
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Returns the requested widget casted to correct type
|
|
76 |
*
|
|
77 |
* @param name Name of the widget
|
|
78 |
* @return Pointer to the widget
|
|
79 |
*/
|
|
80 |
template<class T>
|
|
81 |
T* findWidget( QString name )
|
|
82 |
{
|
|
83 |
return qobject_cast<T*>( HbDocumentLoader::findWidget( name ) );
|
|
84 |
}
|
|
85 |
|
|
86 |
/**
|
|
87 |
* Returns the requested object casted to correct type
|
|
88 |
*
|
|
89 |
* @param name Name of the object
|
|
90 |
* @return Pointer to the object
|
|
91 |
*/
|
|
92 |
template<class T>
|
|
93 |
T* findObject( QString name )
|
|
94 |
{
|
|
95 |
return qobject_cast<T*>( HbDocumentLoader::findObject( name ) );
|
|
96 |
}
|
|
97 |
|
|
98 |
private:
|
|
99 |
|
|
100 |
QObject *createObject( const QString& type, const QString &name );
|
|
101 |
};
|
|
102 |
|
|
103 |
#endif // _VIDEOCOLLECTIONUILOADER_H_
|