calendarui/views/src/calensettingsview.cpp
changeset 51 0b38fc5b94c6
parent 45 b6db4fd4947b
equal deleted inserted replaced
46:ecd7b9840282 51:0b38fc5b94c6
    27 
    27 
    28 #include <CalenUid.h>
    28 #include <CalenUid.h>
    29 #include "calensettingsview.h"
    29 #include "calensettingsview.h"
    30 #include "calenservices.h"
    30 #include "calenservices.h"
    31 #include "calensettings.h"
    31 #include "calensettings.h"
       
    32 #include "OstTraceDefinitions.h"
       
    33 #ifdef OST_TRACE_COMPILER_IN_USE
       
    34 #include "calensettingsviewTraces.h"
       
    35 #endif
       
    36 
    32 
    37 
    33 CalenSettingsView::CalenSettingsView(MCalenServices& services, QGraphicsItem *parent)
    38 CalenSettingsView::CalenSettingsView(MCalenServices& services, QGraphicsItem *parent)
    34 :HbView(parent), 
    39 :HbView(parent), 
    35  mServices(services),
    40  mServices(services),
    36  mCalenSettingsForm(NULL),
    41  mCalenSettingsForm(NULL),
    37  mCalenSettings(NULL),
    42  mCalenSettings(NULL),
    38  mSoftKeyAction(NULL)
    43  mSoftKeyAction(NULL)
    39 {
    44 {
       
    45     OstTraceFunctionEntry0( CALENSETTINGSVIEW_CALENSETTINGSVIEW_ENTRY );
       
    46     
    40 
    47 
    41 	mCalenSettingsForm = new HbDataForm(this);
    48 	mCalenSettingsForm = new HbDataForm(this);
    42 
    49 
    43 	// Set the title text.
    50 	// Set the title text.
    44 	setTitle(hbTrId("txt_calendar_title_calendar"));
    51 	setTitle(hbTrId("txt_calendar_title_calendar"));
    52     	    mCalenSettings->createModel();
    59     	    mCalenSettings->createModel();
    53             setWidget(mCalenSettingsForm);
    60             setWidget(mCalenSettingsForm);
    54         }
    61         }
    55     }
    62     }
    56 	
    63 	
       
    64 	OstTraceFunctionExit0( CALENSETTINGSVIEW_CALENSETTINGSVIEW_EXIT );
    57 }
    65 }
    58 
    66 
    59 CalenSettingsView::~CalenSettingsView()
    67 CalenSettingsView::~CalenSettingsView()
    60 {
    68 {
       
    69     OstTraceFunctionEntry0( DUP1_CALENSETTINGSVIEW_CALENSETTINGSVIEW_ENTRY );
       
    70     
    61 	if (mCalenSettings) {
    71 	if (mCalenSettings) {
    62 		delete mCalenSettings;
    72 		delete mCalenSettings;
    63 	}
    73 	}
    64 	if (mSoftKeyAction) {
    74 	if (mSoftKeyAction) {
    65 		delete mSoftKeyAction;
    75 		delete mSoftKeyAction;
    66 	}
    76 	}
       
    77 	
       
    78 	OstTraceFunctionExit0( DUP1_CALENSETTINGSVIEW_CALENSETTINGSVIEW_EXIT );
    67 }
    79 }
    68 
    80 
    69 void CalenSettingsView::launchPreviousView()
    81 void CalenSettingsView::launchPreviousView()
    70 {
    82 {
       
    83     OstTraceFunctionEntry0( CALENSETTINGSVIEW_LAUNCHPREVIOUSVIEW_ENTRY );
       
    84     
    71 	// Remove the view from mainwindow
    85 	// Remove the view from mainwindow
    72 
    86 
    73 	disconnect(mSoftKeyAction, SIGNAL(triggered()), 
    87 	disconnect(mSoftKeyAction, SIGNAL(triggered()), 
    74 											this, SLOT(launchPreviousView()));
    88 											this, SLOT(launchPreviousView()));
    75 	mServices.MainWindow().removeView(this);
    89 	mServices.MainWindow().removeView(this);
    76 	mServices.IssueNotificationL(ECalenNotifySettingsClosed);
    90 	mServices.IssueNotificationL(ECalenNotifySettingsClosed);
       
    91 	
       
    92 	OstTraceFunctionExit0( CALENSETTINGSVIEW_LAUNCHPREVIOUSVIEW_EXIT );
    77 }
    93 }
    78 
    94 
    79 void CalenSettingsView::initializeForm()
    95 void CalenSettingsView::initializeForm()
    80 {
    96 {
       
    97     OstTraceFunctionEntry0( CALENSETTINGSVIEW_INITIALIZEFORM_ENTRY );
       
    98     
    81     mCalenSettings->populateSettingList();
    99     mCalenSettings->populateSettingList();
    82     
   100     
    83     // Add view on main window and set back softkey
   101     // Add view on main window and set back softkey
    84 	mServices.MainWindow().addView(this);
   102 	mServices.MainWindow().addView(this);
    85 	mSoftKeyAction = new HbAction(Hb::BackNaviAction);
   103 	mSoftKeyAction = new HbAction(Hb::BackNaviAction);
    87 	{
   105 	{
    88 		setNavigationAction(mSoftKeyAction);
   106 		setNavigationAction(mSoftKeyAction);
    89 		connect(mSoftKeyAction, SIGNAL(triggered()), 
   107 		connect(mSoftKeyAction, SIGNAL(triggered()), 
    90 											this, SLOT(launchPreviousView()));
   108 											this, SLOT(launchPreviousView()));
    91 	}
   109 	}
       
   110 	
       
   111 	OstTraceFunctionExit0( CALENSETTINGSVIEW_INITIALIZEFORM_EXIT );
    92 }
   112 }
    93 
   113 
    94 void CalenSettingsView::refreshView()
   114 void CalenSettingsView::refreshView()
    95     {
   115     {
       
   116     OstTraceFunctionEntry0( CALENSETTINGSVIEW_REFRESHVIEW_ENTRY );
       
   117     
    96     //populate the new items 
   118     //populate the new items 
    97     mCalenSettings->populateSettingList();
   119     mCalenSettings->populateSettingList();
       
   120     
       
   121     OstTraceFunctionExit0( CALENSETTINGSVIEW_REFRESHVIEW_EXIT );
    98     }
   122     }
    99 
   123 
   100 // End of file
   124 // End of file