calendarui/controller/src/calendocloader.cpp
changeset 51 0b38fc5b94c6
parent 45 b6db4fd4947b
child 55 2c54b51f39c4
equal deleted inserted replaced
46:ecd7b9840282 51:0b38fc5b94c6
    25 #include "calenpreviewpane.h"
    25 #include "calenpreviewpane.h"
    26 #include "calencontroller.h"
    26 #include "calencontroller.h"
    27 #include "calenthicklinesdrawer.h"
    27 #include "calenthicklinesdrawer.h"
    28 #include "calencommon.h"
    28 #include "calencommon.h"
    29 #include "calenpluginlabel.h"
    29 #include "calenpluginlabel.h"
       
    30 #include "OstTraceDefinitions.h"
       
    31 #ifdef OST_TRACE_COMPILER_IN_USE
       
    32 #include "calendocloaderTraces.h"
       
    33 #endif
    30 
    34 
    31 // ----------------------------------------------------------------------------
    35 // ----------------------------------------------------------------------------
    32 // CalenDocLoader::CalenDocLoader
    36 // CalenDocLoader::CalenDocLoader
    33 // C++ default Constructor.
    37 // C++ default Constructor.
    34 // (other items were commented in a header).
    38 // (other items were commented in a header).
    35 // ----------------------------------------------------------------------------
    39 // ----------------------------------------------------------------------------
    36 //
    40 //
    37 CalenDocLoader::CalenDocLoader(CCalenController &controller) :
    41 CalenDocLoader::CalenDocLoader(CCalenController &controller) :
    38 	mController(controller)
    42 	mController(controller)
    39 	{
    43 	{
       
    44     OstTraceFunctionEntry0( CALENDOCLOADER_CALENDOCLOADER_ENTRY );
       
    45     
    40 
    46 
       
    47 	OstTraceFunctionExit0( CALENDOCLOADER_CALENDOCLOADER_EXIT );
    41 	}
    48 	}
    42 
    49 
    43 // ----------------------------------------------------------------------------
    50 // ----------------------------------------------------------------------------
    44 // CalenDocLoader::CalenDocLoader
    51 // CalenDocLoader::CalenDocLoader
    45 // C++ default Destructor.
    52 // C++ default Destructor.
    46 // ----------------------------------------------------------------------------
    53 // ----------------------------------------------------------------------------
    47 //
    54 //
    48 CalenDocLoader::~CalenDocLoader()
    55 CalenDocLoader::~CalenDocLoader()
    49 {
    56 {
       
    57     OstTraceFunctionEntry0( DUP1_CALENDOCLOADER_CALENDOCLOADER_ENTRY );
       
    58     
    50 
    59 
       
    60     OstTraceFunctionExit0( DUP1_CALENDOCLOADER_CALENDOCLOADER_EXIT );
    51 }
    61 }
    52 // ----------------------------------------------------------------------------
    62 // ----------------------------------------------------------------------------
    53 // CalenDocLoader::createObject
    63 // CalenDocLoader::createObject
    54 // @brief From HbDocumentLoader
    64 // @brief From HbDocumentLoader
    55 // Called whenever the docml file is parsed to create objects.
    65 // Called whenever the docml file is parsed to create objects.
    60 // ----------------------------------------------------------------------------
    70 // ----------------------------------------------------------------------------
    61 //
    71 //
    62 QObject *CalenDocLoader::createObject(const QString &type,
    72 QObject *CalenDocLoader::createObject(const QString &type,
    63                                              const QString &name)
    73                                              const QString &name)
    64 {
    74 {
       
    75     OstTraceFunctionEntry0( CALENDOCLOADER_CREATEOBJECT_ENTRY );
       
    76     
    65     MCalenServices &services = mController.Services(); 
    77     MCalenServices &services = mController.Services(); 
    66 	if (name == QString(CALEN_AGENDAVIEW)) {
    78 	if (name == QString(CALEN_AGENDAVIEW)) {
    67 		QObject *calenAgendaView = new CalenAgendaView(services);
    79 		QObject *calenAgendaView = new CalenAgendaView(services);
    68 		calenAgendaView->setObjectName(name);
    80 		calenAgendaView->setObjectName(name);
       
    81 		OstTraceFunctionExit0( CALENDOCLOADER_CREATEOBJECT_EXIT );
    69 		return calenAgendaView;
    82 		return calenAgendaView;
    70 	} else if (name == QString(CALEN_AGENDAVIEW_WIDGET)) {
    83 	} else if (name == QString(CALEN_AGENDAVIEW_WIDGET)) {
    71 	    QObject *calenAgendaViewWidget = new CalenAgendaViewWidget(services, this);
    84 	    QObject *calenAgendaViewWidget = new CalenAgendaViewWidget(services, this);
    72 	    calenAgendaViewWidget->setObjectName(name);
    85 	    calenAgendaViewWidget->setObjectName(name);
       
    86 	    OstTraceFunctionExit0( DUP1_CALENDOCLOADER_CREATEOBJECT_EXIT );
    73 	    return calenAgendaViewWidget;
    87 	    return calenAgendaViewWidget;
    74 	} else if (name == QString(CALEN_MONTHVIEW)) { // For Month View
    88 	} else if (name == QString(CALEN_MONTHVIEW)) { // For Month View
    75         QObject *calenMonthView = new CalenMonthView(services);
    89         QObject *calenMonthView = new CalenMonthView(services);
    76         calenMonthView->setObjectName(name);
    90         calenMonthView->setObjectName(name);
       
    91         OstTraceFunctionExit0( DUP2_CALENDOCLOADER_CREATEOBJECT_EXIT );
    77         return calenMonthView;
    92         return calenMonthView;
    78 	} else if (name == QString(CALEN_MONTHGRID)) {
    93 	} else if (name == QString(CALEN_MONTHGRID)) {
    79         QObject *calenMonthGrid = new CalenMonthGrid();
    94         QObject *calenMonthGrid = new CalenMonthGrid();
    80         calenMonthGrid->setObjectName(name);
    95         calenMonthGrid->setObjectName(name);
       
    96         OstTraceFunctionExit0( DUP3_CALENDOCLOADER_CREATEOBJECT_EXIT );
    81         return calenMonthGrid;
    97         return calenMonthGrid;
    82 	} else if(name == QString(CALEN_PREVPREVIEWPANE)) {
    98 	} else if(name == QString(CALEN_PREVPREVIEWPANE)) {
    83         QObject *prevPreviewPane =
    99         QObject *prevPreviewPane =
    84         new CalenPreviewPane(services);
   100         new CalenPreviewPane(services);
    85         prevPreviewPane->setObjectName(name);
   101         prevPreviewPane->setObjectName(name);
       
   102         OstTraceFunctionExit0( DUP4_CALENDOCLOADER_CREATEOBJECT_EXIT );
    86         return prevPreviewPane;
   103         return prevPreviewPane;
    87     } else if(name == QString(CALEN_CURRPREVIEWPANE)) {
   104     } else if(name == QString(CALEN_CURRPREVIEWPANE)) {
    88         QObject *currPreviewPane =
   105         QObject *currPreviewPane =
    89         new CalenPreviewPane(services);
   106         new CalenPreviewPane(services);
    90         currPreviewPane->setObjectName(name);
   107         currPreviewPane->setObjectName(name);
       
   108         OstTraceFunctionExit0( DUP5_CALENDOCLOADER_CREATEOBJECT_EXIT );
    91         return currPreviewPane;
   109         return currPreviewPane;
    92     } else if(name == QString(CALEN_NEXTPREVIEWPANE)) {
   110     } else if(name == QString(CALEN_NEXTPREVIEWPANE)) {
    93         QObject *nextPreviewPane =
   111         QObject *nextPreviewPane =
    94         new CalenPreviewPane(services);
   112         new CalenPreviewPane(services);
    95         nextPreviewPane->setObjectName(name);
   113         nextPreviewPane->setObjectName(name);
       
   114         OstTraceFunctionExit0( DUP6_CALENDOCLOADER_CREATEOBJECT_EXIT );
    96         return nextPreviewPane;
   115         return nextPreviewPane;
    97     } else if (name == QString(CALEN_DAYNAMES_WIDGET)) {
   116     } else if (name == QString(CALEN_DAYNAMES_WIDGET)) {
    98 	    QObject *calenDayNamesWidget = 
   117 	    QObject *calenDayNamesWidget = 
    99         new CalenThickLinesDrawer(CalendarNamespace::CalenDayNameWidget);
   118         new CalenThickLinesDrawer(CalendarNamespace::CalenDayNameWidget);
   100 	    calenDayNamesWidget->setObjectName(name);
   119 	    calenDayNamesWidget->setObjectName(name);
       
   120 	    OstTraceFunctionExit0( DUP7_CALENDOCLOADER_CREATEOBJECT_EXIT );
   101 	    return calenDayNamesWidget;
   121 	    return calenDayNamesWidget;
   102 	} else if (name == QString(CALEN_WEEKNUMBERS_WIDGET)) {
   122 	} else if (name == QString(CALEN_WEEKNUMBERS_WIDGET)) {
   103 	    QObject *calenSWeekNumWidget =
   123 	    QObject *calenSWeekNumWidget =
   104         new CalenThickLinesDrawer(CalendarNamespace::CalenWeekNumWidget);
   124         new CalenThickLinesDrawer(CalendarNamespace::CalenWeekNumWidget);
   105 	    calenSWeekNumWidget->setObjectName(name);
   125 	    calenSWeekNumWidget->setObjectName(name);
       
   126 	    OstTraceFunctionExit0( DUP8_CALENDOCLOADER_CREATEOBJECT_EXIT );
   106 	    return calenSWeekNumWidget;
   127 	    return calenSWeekNumWidget;
   107 	} else if (name == QString(CALEN_PREVREGIONALINFO)) {
   128 	} else if (name == QString(CALEN_PREVREGIONALINFO)) {
   108 		QObject *calenPrevRegionalLabel = new CalenPluginLabel(services);
   129 		QObject *calenPrevRegionalLabel = new CalenPluginLabel(services);
   109 		calenPrevRegionalLabel->setObjectName(name);
   130 		calenPrevRegionalLabel->setObjectName(name);
       
   131 		OstTraceFunctionExit0( DUP9_CALENDOCLOADER_CREATEOBJECT_EXIT );
   110 		return calenPrevRegionalLabel;
   132 		return calenPrevRegionalLabel;
   111 	} else if (name == QString(CALEN_CURRREGIONALINFO)) {
   133 	} else if (name == QString(CALEN_CURRREGIONALINFO)) {
   112 		QObject *calencurrRegionalLabel = new CalenPluginLabel(services);
   134 		QObject *calencurrRegionalLabel = new CalenPluginLabel(services);
   113 		calencurrRegionalLabel->setObjectName(name);
   135 		calencurrRegionalLabel->setObjectName(name);
       
   136 		OstTraceFunctionExit0( DUP10_CALENDOCLOADER_CREATEOBJECT_EXIT );
   114 		return calencurrRegionalLabel;
   137 		return calencurrRegionalLabel;
   115 	} else if (name == QString(CALEN_NEXTREGIONALINFO)) {
   138 	} else if (name == QString(CALEN_NEXTREGIONALINFO)) {
   116 		QObject *calenNextRegionalLabel = new CalenPluginLabel(services);
   139 		QObject *calenNextRegionalLabel = new CalenPluginLabel(services);
   117 		calenNextRegionalLabel->setObjectName(name);
   140 		calenNextRegionalLabel->setObjectName(name);
       
   141 		OstTraceFunctionExit0( DUP11_CALENDOCLOADER_CREATEOBJECT_EXIT );
   118 		return calenNextRegionalLabel;
   142 		return calenNextRegionalLabel;
   119 	} else {
   143 	} else {
       
   144         OstTraceFunctionExit0( DUP12_CALENDOCLOADER_CREATEOBJECT_EXIT );
   120 		return HbDocumentLoader::createObject(type, name);
   145 		return HbDocumentLoader::createObject(type, name);
   121 	}
   146 	}
   122 }
   147 }
   123 
   148 
   124 // End of file	--Don't remove this.
   149 // End of file	--Don't remove this.