camerauis/cameraxui/cxui/src/cxuidocumentloader.cpp
changeset 48 42ba2d16bf40
parent 37 64817133cd1d
equal deleted inserted replaced
37:64817133cd1d 48:42ba2d16bf40
    31 #include "cxuisettingradiobuttonlist.h"
    31 #include "cxuisettingradiobuttonlist.h"
    32 #include "cxuizoomslider.h"
    32 #include "cxuizoomslider.h"
    33 #include "cxeengine.h"
    33 #include "cxeengine.h"
    34 #include "cxuienums.h"
    34 #include "cxuienums.h"
    35 
    35 
       
    36 #ifdef Q_OS_SYMBIAN
    36 #include "OstTraceDefinitions.h"
    37 #include "OstTraceDefinitions.h"
    37 #ifdef OST_TRACE_COMPILER_IN_USE
    38 #ifdef OST_TRACE_COMPILER_IN_USE
    38 #include "cxuidocumentloaderTraces.h"
    39 #include "cxuidocumentloaderTraces.h"
    39 #endif
    40 #endif // OST_TRACE_COMPILER_IN_USE
       
    41 #endif // Q_OS_SYMBIAN
    40 
    42 
    41 
    43 
    42 CxuiDocumentLoader::CxuiDocumentLoader(CxeEngine *engine) : HbDocumentLoader(), mEngine(engine)
    44 CxuiDocumentLoader::CxuiDocumentLoader(CxeEngine *engine) : HbDocumentLoader(), mEngine(engine)
    43 {
    45 {
    44 }
    46 }
    45 
    47 
    46 QObject *CxuiDocumentLoader::createObject(const QString& type, const QString &name)
    48 QObject *CxuiDocumentLoader::createObject(const QString& type, const QString &name)
    47 {
    49 {
    48     OstTrace0( camerax_performance, CXUIDOCUMENTLOADER_CREATEOBJECT, "msg: e_CX_DOCLOADER_CREATEOBJECT 1" );
    50     OstTrace0(camerax_performance, CXUIDOCUMENTLOADER_1, "msg: e_CX_DOCUMENTLOADER_CREATEOBJECT 1");
    49     QObject *object = NULL;
    51     QObject *object = NULL;
    50 
    52 
    51     if (type == "HbView") {
    53     if (type == "HbView") {
    52         if (name == CxUiLayout::STILL_PRE_CAPTURE_VIEW) {
    54         if (name == CxUiLayout::STILL_PRE_CAPTURE_VIEW) {
    53             object = new CxuiStillPrecaptureView();
    55             object = new CxuiStillPrecaptureView();
    54         } else if (name == CxUiLayout::VIDEO_PRE_CAPTURE_VIEW) {
    56         } else if (name == CxUiLayout::VIDEO_PRE_CAPTURE_VIEW) {
    55             object = new CxuiVideoPrecaptureView();
    57             object = new CxuiVideoPrecaptureView();
    56         } else if (name == CxUiLayout::POSTCAPTURE_VIEW) {
    58         } else if (name == CxUiLayout::POSTCAPTURE_VIEW) {
    57             object = new CxuiPostcaptureView();
    59             object = new CxuiPostcaptureView();
    58         } else if (name == CxUiLayout::STILL_SCENES_VIEW) {
    60         } else if (name == CxUiLayout::SCENE_MODE_VIEW) {
    59             object = new CxuiSceneModeView(NULL);
    61             object = new CxuiSceneModeView(NULL);
    60         }
    62         }
    61     } else if (type == "HbDialog") {
    63     } else if (type == "HbDialog") {
    62         if (name == CxUiLayout::SETTINGS_DIALOG_WIDGET
    64         if (name == CxUiLayout::SETTINGS_DIALOG_WIDGET
    63          || name == CxUiLayout::SETTINGS_SLIDER_DIALOG_WIDGET) {
    65          || name == CxUiLayout::SETTINGS_SLIDER_DIALOG_WIDGET) {
    70          || name == CxUiLayout::VIDEO_PRE_CAPTURE_ZOOM_SLIDER) {
    72          || name == CxUiLayout::VIDEO_PRE_CAPTURE_ZOOM_SLIDER) {
    71             object = new CxuiZoomSlider();
    73             object = new CxuiZoomSlider();
    72         }
    74         }
    73     } else if (type == "HbRadioButtonList") {
    75     } else if (type == "HbRadioButtonList") {
    74         if (name == CxUiLayout::SETTINGS_DIALOG_CONTENT_WIDGET
    76         if (name == CxUiLayout::SETTINGS_DIALOG_CONTENT_WIDGET
    75          || name == CxUiLayout::SCENE_VIEW_RADIOBUTTONS) {
    77          || name == CxUiLayout::SCENE_MODE_VIEW_RADIOBUTTONS) {
    76             object = new CxuiSettingRadioButtonList(NULL, mEngine);
    78             object = new CxuiSettingRadioButtonList(NULL, mEngine);
    77         }
    79         }
    78     }
    80     }
    79 
    81 
    80     if (object) {
    82     if (object) {
    81         object->setObjectName(name);
    83         object->setObjectName(name);
    82     } else {
    84     } else {
    83         object = HbDocumentLoader::createObject(type, name);
    85         object = HbDocumentLoader::createObject(type, name);
    84     }
    86     }
    85 
    87 
    86     OstTrace0( camerax_performance, DUP1_CXUIDOCUMENTLOADER_CREATEOBJECT, "msg: e_CX_DOCLOADER_CREATEOBJECT 0" );
    88     OstTrace0(camerax_performance, CXUIDOCUMENTLOADER_2, "msg: e_CX_DOCUMENTLOADER_CREATEOBJECT 0");
    87     return object;
    89     return object;
    88 }
    90 }
    89 
    91 
    90 
    92 
    91 
    93