videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackdocumentloader.cpp
author hgs
Fri, 02 Jul 2010 17:14:33 +0300
changeset 42 17f382c040b1
parent 41 229f037ce963
permissions -rw-r--r--
201025_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:  Implementation of QMPXVideoPlaybackDocumentLoader
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
41
hgs
parents: 37
diff changeset
    18
// Version : %version: 14 %
30
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
hgs
parents:
diff changeset
    21
hgs
parents:
diff changeset
    22
#include "mpxvideo_debug.h"
35
hgs
parents: 30
diff changeset
    23
#include "mpxvideoplaybackcontrolbar.h"
30
hgs
parents:
diff changeset
    24
#include "mpxvideoplaybackdocumentloader.h"
hgs
parents:
diff changeset
    25
#include "mpxvideoplaybackfiledetailswidget.h"
hgs
parents:
diff changeset
    26
#include "mpxvideoplaybackcontrolscontroller.h"
hgs
parents:
diff changeset
    27
#include "mpxvideoplaybackcontrolconfiguration.h"
hgs
parents:
diff changeset
    28
#include "mpxvideoplaybackdetailsplaybackwindow.h"
hgs
parents:
diff changeset
    29
hgs
parents:
diff changeset
    30
// -------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
    31
// QMPXVideoPlaybackDocumentLoader::QMPXVideoPlaybackDocumentLoader
hgs
parents:
diff changeset
    32
// -------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
    33
//
hgs
parents:
diff changeset
    34
QMPXVideoPlaybackDocumentLoader::QMPXVideoPlaybackDocumentLoader( 
hgs
parents:
diff changeset
    35
        QMPXVideoPlaybackControlsController *controller )
hgs
parents:
diff changeset
    36
{
hgs
parents:
diff changeset
    37
    MPX_ENTER_EXIT(_L("QMPXVideoPlaybackDocumentLoader::QMPXVideoPlaybackDocumentLoader()"));
hgs
parents:
diff changeset
    38
hgs
parents:
diff changeset
    39
    mController = controller;
hgs
parents:
diff changeset
    40
}
hgs
parents:
diff changeset
    41
hgs
parents:
diff changeset
    42
// -------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
    43
// QMPXVideoPlaybackDocumentLoader::~QMPXVideoPlaybackDocumentLoader
hgs
parents:
diff changeset
    44
// -------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
    45
//
hgs
parents:
diff changeset
    46
QMPXVideoPlaybackDocumentLoader::~QMPXVideoPlaybackDocumentLoader()
hgs
parents:
diff changeset
    47
{
37
hgs
parents: 36
diff changeset
    48
    MPX_DEBUG(_L("QMPXVideoPlaybackDocumentLoader::~QMPXVideoPlaybackDocumentLoader") );
30
hgs
parents:
diff changeset
    49
}
hgs
parents:
diff changeset
    50
hgs
parents:
diff changeset
    51
// -------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
    52
// QMPXVideoPlaybackDocumentLoader::createObject()
hgs
parents:
diff changeset
    53
// -------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
    54
//
hgs
parents:
diff changeset
    55
QObject *QMPXVideoPlaybackDocumentLoader::createObject( const QString& type, const QString &name )
hgs
parents:
diff changeset
    56
{
37
hgs
parents: 36
diff changeset
    57
    MPX_ENTER_EXIT(
hgs
parents: 36
diff changeset
    58
        _L("QMPXVideoPlaybackDocumentLoader::createObject()"),
hgs
parents: 36
diff changeset
    59
        _L("type = %s, name = %s"), type.data(), name.data() );
hgs
parents: 36
diff changeset
    60
    
30
hgs
parents:
diff changeset
    61
    QObject *object = NULL;
hgs
parents:
diff changeset
    62
35
hgs
parents: 30
diff changeset
    63
    if ( name == "controlBarLayout" )
hgs
parents: 30
diff changeset
    64
    {
hgs
parents: 30
diff changeset
    65
        object = new QMPXVideoPlaybackControlBar( mController );
hgs
parents: 30
diff changeset
    66
        object->setObjectName( name );
hgs
parents: 30
diff changeset
    67
    }
30
hgs
parents:
diff changeset
    68
    else if ( name == "fileDetailsLayout" )
hgs
parents:
diff changeset
    69
    {
hgs
parents:
diff changeset
    70
        object = new QMPXVideoPlaybackFileDetailsWidget( mController );
hgs
parents:
diff changeset
    71
        object->setObjectName( name );
hgs
parents:
diff changeset
    72
    }
hgs
parents:
diff changeset
    73
    else if ( name == "detailsPlaybackWindow" )
hgs
parents:
diff changeset
    74
    {
hgs
parents:
diff changeset
    75
        object = new QMPXVideoPlaybackDetailsPlaybackWindow( mController );
hgs
parents:
diff changeset
    76
        object->setObjectName( name );
hgs
parents:
diff changeset
    77
    }
hgs
parents:
diff changeset
    78
    else
hgs
parents:
diff changeset
    79
    {
hgs
parents:
diff changeset
    80
        object = HbDocumentLoader::createObject( type, name );
hgs
parents:
diff changeset
    81
    }
hgs
parents:
diff changeset
    82
hgs
parents:
diff changeset
    83
    return object;
hgs
parents:
diff changeset
    84
}
hgs
parents:
diff changeset
    85
hgs
parents:
diff changeset
    86
// End of file