camerauis/cameraxui/cxui/src/cxuidocumentloader.cpp
changeset 42 feebad15db8c
parent 41 67457b2ffb33
child 46 c826656d6714
equal deleted inserted replaced
41:67457b2ffb33 42:feebad15db8c
    43 {
    43 {
    44 }
    44 }
    45 
    45 
    46 QObject *CxuiDocumentLoader::createObject(const QString& type, const QString &name)
    46 QObject *CxuiDocumentLoader::createObject(const QString& type, const QString &name)
    47 {
    47 {
    48     OstTrace0( camerax_performance, CXUIDOCUMENTLOADER_CREATEOBJECT, "msg: e_CX_DOCLOADER_CREATEOBJECT 1" );
    48     OstTrace0(camerax_performance, CXUIDOCUMENTLOADER_1, "msg: e_CX_DOCUMENTLOADER_CREATEOBJECT 1");
    49     QObject *object = NULL;
    49     QObject *object = NULL;
    50 
    50 
    51     if (type == "HbView") {
    51     if (type == "HbView") {
    52         if (name == CxUiLayout::STILL_PRE_CAPTURE_VIEW) {
    52         if (name == CxUiLayout::STILL_PRE_CAPTURE_VIEW) {
    53             object = new CxuiStillPrecaptureView();
    53             object = new CxuiStillPrecaptureView();
    54         } else if (name == CxUiLayout::VIDEO_PRE_CAPTURE_VIEW) {
    54         } else if (name == CxUiLayout::VIDEO_PRE_CAPTURE_VIEW) {
    55             object = new CxuiVideoPrecaptureView();
    55             object = new CxuiVideoPrecaptureView();
    56         } else if (name == CxUiLayout::POSTCAPTURE_VIEW) {
    56         } else if (name == CxUiLayout::POSTCAPTURE_VIEW) {
    57             object = new CxuiPostcaptureView();
    57             object = new CxuiPostcaptureView();
    58         } else if (name == CxUiLayout::STILL_SCENES_VIEW) {
    58         } else if (name == CxUiLayout::SCENE_MODE_VIEW) {
    59             object = new CxuiSceneModeView(NULL);
    59             object = new CxuiSceneModeView(NULL);
    60         }
    60         }
    61     } else if (type == "HbDialog") {
    61     } else if (type == "HbDialog") {
    62         if (name == CxUiLayout::SETTINGS_DIALOG_WIDGET
    62         if (name == CxUiLayout::SETTINGS_DIALOG_WIDGET
    63          || name == CxUiLayout::SETTINGS_SLIDER_DIALOG_WIDGET) {
    63          || name == CxUiLayout::SETTINGS_SLIDER_DIALOG_WIDGET) {
    70          || name == CxUiLayout::VIDEO_PRE_CAPTURE_ZOOM_SLIDER) {
    70          || name == CxUiLayout::VIDEO_PRE_CAPTURE_ZOOM_SLIDER) {
    71             object = new CxuiZoomSlider();
    71             object = new CxuiZoomSlider();
    72         }
    72         }
    73     } else if (type == "HbRadioButtonList") {
    73     } else if (type == "HbRadioButtonList") {
    74         if (name == CxUiLayout::SETTINGS_DIALOG_CONTENT_WIDGET
    74         if (name == CxUiLayout::SETTINGS_DIALOG_CONTENT_WIDGET
    75          || name == CxUiLayout::SCENE_VIEW_RADIOBUTTONS) {
    75          || name == CxUiLayout::SCENE_MODE_VIEW_RADIOBUTTONS) {
    76             object = new CxuiSettingRadioButtonList(NULL, mEngine);
    76             object = new CxuiSettingRadioButtonList(NULL, mEngine);
    77         }
    77         }
    78     }
    78     }
    79 
    79 
    80     if (object) {
    80     if (object) {
    81         object->setObjectName(name);
    81         object->setObjectName(name);
    82     } else {
    82     } else {
    83         object = HbDocumentLoader::createObject(type, name);
    83         object = HbDocumentLoader::createObject(type, name);
    84     }
    84     }
    85 
    85 
    86     OstTrace0( camerax_performance, DUP1_CXUIDOCUMENTLOADER_CREATEOBJECT, "msg: e_CX_DOCLOADER_CREATEOBJECT 0" );
    86     OstTrace0(camerax_performance, CXUIDOCUMENTLOADER_2, "msg: e_CX_DOCUMENTLOADER_CREATEOBJECT 0");
    87     return object;
    87     return object;
    88 }
    88 }
    89 
    89 
    90 
    90 
    91 
    91