21 #include "clockappcontroller.h" |
21 #include "clockappcontroller.h" |
22 #include "clockviewmanager.h" |
22 #include "clockviewmanager.h" |
23 #include "timezoneclient.h" |
23 #include "timezoneclient.h" |
24 #include "settingsutility.h" |
24 #include "settingsutility.h" |
25 #include "alarmclient.h" |
25 #include "alarmclient.h" |
|
26 #include "OstTraceDefinitions.h" |
|
27 #ifdef OST_TRACE_COMPILER_IN_USE |
|
28 #include "clockappcontrollerifimplTraces.h" |
|
29 #endif |
|
30 |
26 |
31 |
27 /*! |
32 /*! |
28 \class ClockAppControllerIfImpl |
33 \class ClockAppControllerIfImpl |
29 |
34 |
30 This class implements the ClockAppControllerIf interface which is used |
35 This class implements the ClockAppControllerIf interface which is used |
41 ClockAppControllerIfImpl::ClockAppControllerIfImpl( |
46 ClockAppControllerIfImpl::ClockAppControllerIfImpl( |
42 ClockAppController *controller, QObject *parent) |
47 ClockAppController *controller, QObject *parent) |
43 :QObject(parent), |
48 :QObject(parent), |
44 mAppController(controller) |
49 mAppController(controller) |
45 { |
50 { |
|
51 OstTraceFunctionEntry0( CLOCKAPPCONTROLLERIFIMPL_CLOCKAPPCONTROLLERIFIMPL_ENTRY ); |
46 // Construct the timezone client. |
52 // Construct the timezone client. |
47 mTimeZoneClient = TimezoneClient::getInstance(); |
53 mTimeZoneClient = TimezoneClient::getInstance(); |
48 // Construct the settings utility object. |
54 // Construct the settings utility object. |
49 mSettingsUtility = new SettingsUtility(this); |
55 mSettingsUtility = new SettingsUtility(this); |
50 // Construct the alarm client object. |
56 // Construct the alarm client object. |
51 mAlarmClient = new AlarmClient(this); |
57 mAlarmClient = new AlarmClient(this); |
|
58 OstTraceFunctionExit0( CLOCKAPPCONTROLLERIFIMPL_CLOCKAPPCONTROLLERIFIMPL_EXIT ); |
52 } |
59 } |
53 |
60 |
54 /*! |
61 /*! |
55 Destructor. |
62 Destructor. |
56 */ |
63 */ |
57 ClockAppControllerIfImpl::~ClockAppControllerIfImpl() |
64 ClockAppControllerIfImpl::~ClockAppControllerIfImpl() |
58 { |
65 { |
|
66 OstTraceFunctionEntry0( DUP1_CLOCKAPPCONTROLLERIFIMPL_CLOCKAPPCONTROLLERIFIMPL_ENTRY ); |
59 if (!mTimeZoneClient->isNull()) { |
67 if (!mTimeZoneClient->isNull()) { |
60 mTimeZoneClient->deleteInstance(); |
68 mTimeZoneClient->deleteInstance(); |
61 } |
69 } |
62 if (mSettingsUtility) { |
70 if (mSettingsUtility) { |
63 delete mSettingsUtility; |
71 delete mSettingsUtility; |
77 \return TimezoneClient* Pointer to TimezoneClient object. |
86 \return TimezoneClient* Pointer to TimezoneClient object. |
78 \sa ClockAppControllerIf |
87 \sa ClockAppControllerIf |
79 */ |
88 */ |
80 TimezoneClient* ClockAppControllerIfImpl::timezoneClient() |
89 TimezoneClient* ClockAppControllerIfImpl::timezoneClient() |
81 { |
90 { |
|
91 OstTraceFunctionEntry0( CLOCKAPPCONTROLLERIFIMPL_TIMEZONECLIENT_ENTRY ); |
|
92 OstTraceFunctionExit0( CLOCKAPPCONTROLLERIFIMPL_TIMEZONECLIENT_EXIT ); |
82 return mTimeZoneClient; |
93 return mTimeZoneClient; |
83 } |
94 } |
84 |
95 |
85 /*! |
96 /*! |
86 From ClockAppControllerIf. |
97 From ClockAppControllerIf. |
89 \return SettingsUtility* Pointer to SettingsUtility object. |
100 \return SettingsUtility* Pointer to SettingsUtility object. |
90 \sa ClockAppControllerIf |
101 \sa ClockAppControllerIf |
91 */ |
102 */ |
92 SettingsUtility* ClockAppControllerIfImpl::settingsUtility() |
103 SettingsUtility* ClockAppControllerIfImpl::settingsUtility() |
93 { |
104 { |
|
105 OstTraceFunctionEntry0( CLOCKAPPCONTROLLERIFIMPL_SETTINGSUTILITY_ENTRY ); |
|
106 OstTraceFunctionExit0( CLOCKAPPCONTROLLERIFIMPL_SETTINGSUTILITY_EXIT ); |
94 return mSettingsUtility; |
107 return mSettingsUtility; |
95 } |
108 } |
96 |
109 |
97 /*! |
110 /*! |
98 From ClockAppControllerIf. |
111 From ClockAppControllerIf. |
101 \return AlarmClient* Pointer to AlarmClient object. |
114 \return AlarmClient* Pointer to AlarmClient object. |
102 \sa ClockAppControllerIf |
115 \sa ClockAppControllerIf |
103 */ |
116 */ |
104 AlarmClient* ClockAppControllerIfImpl::alarmClient() |
117 AlarmClient* ClockAppControllerIfImpl::alarmClient() |
105 { |
118 { |
|
119 OstTraceFunctionEntry0( CLOCKAPPCONTROLLERIFIMPL_ALARMCLIENT_ENTRY ); |
|
120 OstTraceFunctionExit0( CLOCKAPPCONTROLLERIFIMPL_ALARMCLIENT_EXIT ); |
106 return mAlarmClient; |
121 return mAlarmClient; |
107 } |
122 } |
108 |
123 |
109 /*! |
124 /*! |
110 From ClockAppControllerIf. |
125 From ClockAppControllerIf. |
113 \param viewId The id of the view to be switched to. |
128 \param viewId The id of the view to be switched to. |
114 \sa ClockAppControllerIf |
129 \sa ClockAppControllerIf |
115 */ |
130 */ |
116 void ClockAppControllerIfImpl::switchToView(ClockViews viewId) |
131 void ClockAppControllerIfImpl::switchToView(ClockViews viewId) |
117 { |
132 { |
|
133 OstTraceFunctionEntry0( CLOCKAPPCONTROLLERIFIMPL_SWITCHTOVIEW_ENTRY ); |
118 mAppController->mViewManager->showView(viewId); |
134 mAppController->mViewManager->showView(viewId); |
|
135 OstTraceFunctionExit0( CLOCKAPPCONTROLLERIFIMPL_SWITCHTOVIEW_EXIT ); |
119 } |
136 } |
120 |
137 |
121 // End of file --Don't remove this. |
138 // End of file --Don't remove this. |