--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/src/videocollectionuiloader.cpp Thu Apr 01 23:22:15 2010 +0300
@@ -0,0 +1,175 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <qset.h>
+#include <qstring.h>
+#include <hblistview.h>
+
+#include "videocollectionuiloader.h"
+#include "videolistview.h"
+#include "videolistwidget.h"
+#include "videohintwidget.h"
+#include "videolistselectiondialog.h"
+
+#include "videocollectionuiloaderdata.h"
+
+bool VideoCollectionUiLoaderData::mFindFailure = false;
+bool VideoCollectionUiLoaderData::mFailDialogLoad = false;
+QStringList VideoCollectionUiLoaderData::mFindFailureNameList;
+
+VideoCollectionUiLoader::VideoCollectionUiLoader():
+ HbDocumentLoader(),
+ mTimerId(0)
+{
+ // not stubbed
+}
+
+VideoCollectionUiLoader::~VideoCollectionUiLoader()
+{
+ VideoCollectionUiLoaderData::reset();
+}
+
+void VideoCollectionUiLoader::startLoading(QSet<QString> uiSections,
+ QObject *receiver,
+ const char *widgetSlot,
+ const char *objectSlot)
+{
+ Q_UNUSED(uiSections);
+ Q_UNUSED(receiver);
+ Q_UNUSED(widgetSlot);
+ Q_UNUSED(objectSlot);
+ // not stubbed
+}
+
+void VideoCollectionUiLoader::setIsService(bool isService)
+{
+ Q_UNUSED(isService);
+ // not stubbed
+}
+
+QGraphicsWidget* VideoCollectionUiLoader::doFindWidget(const QString &name)
+{
+ QGraphicsWidget *widget = 0;
+ widget = HbDocumentLoader::findWidget(name);
+ return widget;
+}
+
+QObject* VideoCollectionUiLoader::doFindObject(const QString &name)
+{
+ QObject *object = 0;
+ object = HbDocumentLoader::findObject(name);
+ return object;
+}
+
+void VideoCollectionUiLoader::addToQueue(Params ¶ms)
+{
+ Q_UNUSED(params);
+ // not stubbed
+}
+
+void VideoCollectionUiLoader::initWidget(QGraphicsWidget *widget,
+ const QString &name)
+{
+ Q_UNUSED(widget);
+ Q_UNUSED(name);
+ // not stubbed
+}
+
+void VideoCollectionUiLoader::initObject(QObject *object,
+ const QString &name)
+{
+ Q_UNUSED(object);
+ Q_UNUSED(name);
+ // not stubbed
+}
+
+void VideoCollectionUiLoader::timerEvent(QTimerEvent *event)
+{
+ Q_UNUSED(event);
+ // not stubbed
+}
+
+QObject* VideoCollectionUiLoader::createObject(const QString& type,
+ const QString &name)
+{
+ QObject* object = doFindObject(name);
+ if (!object)
+ {
+ if (type == VideoListView::staticMetaObject.className())
+ {
+ object = new VideoListView(this);
+ }
+ else if (type == VideoListWidget::staticMetaObject.className())
+ {
+ object = new VideoListWidget(this);
+ }
+ else if ( type == VideoListSelectionDialog::staticMetaObject.className() )
+ {
+ if(!VideoCollectionUiLoaderData::mFailDialogLoad)
+ {
+ object = new VideoListSelectionDialog(this);
+
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ else if (type == VideoHintWidget::staticMetaObject.className())
+ {
+ object = new VideoHintWidget(this);
+ }
+ if (object)
+ {
+ object->setObjectName(name);
+
+ if (VideoCollectionUiLoaderData::mFindFailure)
+ {
+ if (!VideoCollectionUiLoaderData::mFindFailureNameList.empty())
+ {
+ if (VideoCollectionUiLoaderData::mFindFailureNameList.contains(name))
+ {
+ delete object;
+ object = 0;
+ }
+ }
+ else
+ {
+ delete object;
+ object = 0;
+ }
+ }
+ return object;
+ }
+
+ object = HbDocumentLoader::createObject(type, name);
+ }
+
+ return object;
+}
+
+void VideoCollectionUiLoader::runNext()
+{
+ // not stubbed
+}
+
+bool VideoCollectionUiLoader::isValid(const Params ¶ms)
+{
+ Q_UNUSED(params);
+ // not stubbed
+ return true;
+}