44 ClockAppControllerIfImpl::ClockAppControllerIfImpl( |
41 ClockAppControllerIfImpl::ClockAppControllerIfImpl( |
45 ClockAppController *controller, QObject *parent) |
42 ClockAppController *controller, QObject *parent) |
46 :QObject(parent), |
43 :QObject(parent), |
47 mAppController(controller) |
44 mAppController(controller) |
48 { |
45 { |
49 qDebug() << "clock: ClockAppControllerIfImpl::ClockAppControllerIfImpl -->"; |
|
50 |
|
51 // Construct the timezone client. |
46 // Construct the timezone client. |
52 mTimeZoneClient = new TimezoneClient(this); |
47 mTimeZoneClient = TimezoneClient::getInstance(); |
53 // Construct the settings utility object. |
48 // Construct the settings utility object. |
54 mSettingsUtility = new SettingsUtility(this); |
49 mSettingsUtility = new SettingsUtility(this); |
55 // Construct the alarm client object. |
50 // Construct the alarm client object. |
56 mAlarmClient = new AlarmClient(this); |
51 mAlarmClient = new AlarmClient(this); |
57 |
|
58 qDebug() << "clock: ClockAppControllerIfImpl::ClockAppControllerIfImpl <--"; |
|
59 } |
52 } |
60 |
53 |
61 /*! |
54 /*! |
62 Destructor. |
55 Destructor. |
63 */ |
56 */ |
64 ClockAppControllerIfImpl::~ClockAppControllerIfImpl() |
57 ClockAppControllerIfImpl::~ClockAppControllerIfImpl() |
65 { |
58 { |
66 qDebug() << "clock: ClockAppControllerIfImpl::~ClockAppControllerIfImpl -->"; |
59 if (!mTimeZoneClient->isNull()) { |
67 |
60 mTimeZoneClient->deleteInstance(); |
68 if (mTimeZoneClient) { |
|
69 delete mTimeZoneClient; |
|
70 mTimeZoneClient = 0; |
|
71 } |
61 } |
72 if (mSettingsUtility) { |
62 if (mSettingsUtility) { |
73 delete mSettingsUtility; |
63 delete mSettingsUtility; |
74 mSettingsUtility = 0; |
64 mSettingsUtility = 0; |
75 } |
65 } |
76 if(mAlarmClient) { |
66 if(mAlarmClient) { |
77 delete mAlarmClient; |
67 delete mAlarmClient; |
78 mAlarmClient = 0; |
68 mAlarmClient = 0; |
79 } |
69 } |
80 |
|
81 qDebug() << "clock: ClockAppControllerIfImpl::~ClockAppControllerIfImpl <--"; |
|
82 } |
70 } |
83 |
71 |
84 |
72 |
85 /*! |
73 /*! |
86 From ClockAppControllerIf. |
74 From ClockAppControllerIf. |
89 \return TimezoneClient* Pointer to TimezoneClient object. |
77 \return TimezoneClient* Pointer to TimezoneClient object. |
90 \sa ClockAppControllerIf |
78 \sa ClockAppControllerIf |
91 */ |
79 */ |
92 TimezoneClient* ClockAppControllerIfImpl::timezoneClient() |
80 TimezoneClient* ClockAppControllerIfImpl::timezoneClient() |
93 { |
81 { |
94 qDebug() << "clock: ClockAppControllerIfImpl::timezoneClient -->"; |
|
95 |
|
96 qDebug() << "clock: ClockAppControllerIfImpl::timezoneClient <--"; |
|
97 |
|
98 return mTimeZoneClient; |
82 return mTimeZoneClient; |
99 } |
83 } |
100 |
84 |
101 /*! |
85 /*! |
102 From ClockAppControllerIf. |
86 From ClockAppControllerIf. |
105 \return SettingsUtility* Pointer to SettingsUtility object. |
89 \return SettingsUtility* Pointer to SettingsUtility object. |
106 \sa ClockAppControllerIf |
90 \sa ClockAppControllerIf |
107 */ |
91 */ |
108 SettingsUtility* ClockAppControllerIfImpl::settingsUtility() |
92 SettingsUtility* ClockAppControllerIfImpl::settingsUtility() |
109 { |
93 { |
110 qDebug() << "clock: ClockAppControllerIfImpl::settingsUtility -->"; |
|
111 |
|
112 qDebug() << "clock: ClockAppControllerIfImpl::settingsUtility <--"; |
|
113 |
|
114 return mSettingsUtility; |
94 return mSettingsUtility; |
115 } |
95 } |
116 |
96 |
117 /*! |
97 /*! |
118 From ClockAppControllerIf. |
98 From ClockAppControllerIf. |
121 \return AlarmClient* Pointer to AlarmClient object. |
101 \return AlarmClient* Pointer to AlarmClient object. |
122 \sa ClockAppControllerIf |
102 \sa ClockAppControllerIf |
123 */ |
103 */ |
124 AlarmClient* ClockAppControllerIfImpl::alarmClient() |
104 AlarmClient* ClockAppControllerIfImpl::alarmClient() |
125 { |
105 { |
126 qDebug() << "clock: ClockAppControllerIfImpl::alarmClient -->"; |
|
127 |
|
128 qDebug() << "clock: ClockAppControllerIfImpl::alarmClient <--"; |
|
129 |
|
130 return mAlarmClient; |
106 return mAlarmClient; |
131 } |
107 } |
132 |
108 |
133 /*! |
109 /*! |
134 From ClockAppControllerIf. |
110 From ClockAppControllerIf. |
137 \param viewId The id of the view to be switched to. |
113 \param viewId The id of the view to be switched to. |
138 \sa ClockAppControllerIf |
114 \sa ClockAppControllerIf |
139 */ |
115 */ |
140 void ClockAppControllerIfImpl::switchToView(ClockViews viewId) |
116 void ClockAppControllerIfImpl::switchToView(ClockViews viewId) |
141 { |
117 { |
142 qDebug() << "clock: ClockAppControllerIfImpl::switchToView -->"; |
|
143 |
|
144 mAppController->mViewManager->showView(viewId); |
118 mAppController->mViewManager->showView(viewId); |
145 |
|
146 qDebug() << "clock: ClockAppControllerIfImpl::switchToView <--"; |
|
147 } |
119 } |
148 |
120 |
149 // End of file --Don't remove this. |
121 // End of file --Don't remove this. |