|
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 #include "videocollectionuiloader.h" |
|
19 #include "videolistview.h" |
|
20 #include "videolistselectiondialog.h" |
|
21 #include "videolistwidget.h" |
|
22 #include "videohintwidget.h" |
|
23 |
|
24 // --------------------------------------------------------------------------- |
|
25 // VideoCollectionUiLoader |
|
26 // --------------------------------------------------------------------------- |
|
27 // |
|
28 VideoCollectionUiLoader::VideoCollectionUiLoader() : |
|
29 HbDocumentLoader() |
|
30 { |
|
31 } |
|
32 |
|
33 // --------------------------------------------------------------------------- |
|
34 // ~VideoCollectionUiLoader |
|
35 // --------------------------------------------------------------------------- |
|
36 // |
|
37 VideoCollectionUiLoader::~VideoCollectionUiLoader() |
|
38 { |
|
39 } |
|
40 |
|
41 // --------------------------------------------------------------------------- |
|
42 // createObject |
|
43 // --------------------------------------------------------------------------- |
|
44 // |
|
45 QObject* VideoCollectionUiLoader::createObject( const QString& type, const QString &name ) |
|
46 { |
|
47 QObject* object = 0; |
|
48 |
|
49 if ( type == VideoListView::staticMetaObject.className() ) |
|
50 { |
|
51 object = new VideoListView(this); |
|
52 } |
|
53 else if ( type == VideoListSelectionDialog::staticMetaObject.className() ) |
|
54 { |
|
55 object = new VideoListSelectionDialog(this); |
|
56 } |
|
57 else if ( type == VideoListWidget::staticMetaObject.className() ) |
|
58 { |
|
59 object = new VideoListWidget(); |
|
60 } |
|
61 else if ( type == VideoHintWidget::staticMetaObject.className() ) |
|
62 { |
|
63 object = new VideoHintWidget(this); |
|
64 } |
|
65 if ( object ) |
|
66 { |
|
67 object->setObjectName( name ); |
|
68 return object; |
|
69 } |
|
70 |
|
71 return HbDocumentLoader::createObject( type, name ); |
|
72 } |