126 mAmPmLabel->setPlainText( |
124 mAmPmLabel->setPlainText( |
127 HbExtendedLocale().format(QTime::currentTime(), gAmPmFormatStr) |
125 HbExtendedLocale().format(QTime::currentTime(), gAmPmFormatStr) |
128 ); |
126 ); |
129 |
127 |
130 // date |
128 // date |
131 if (mCurrentOrientation == Qt::Vertical) { |
129 const char *dateFormat = (mCurrentOrientation == Qt::Vertical) ? |
132 mDateLabel->setPlainText( |
130 gDateFormatVerticalStr : gDateFormatHorizontalStr; |
133 HbExtendedLocale().format( |
131 QString dateText = HbExtendedLocale().format( QDate::currentDate(), dateFormat ); |
134 QDate::currentDate(), gDateFormatVerticalStr) |
132 mDateLabel->setPlainText( dateText ); |
135 ); |
|
136 } else { |
|
137 mDateLabel->setPlainText( |
|
138 HbExtendedLocale().format( |
|
139 QDate::currentDate(), gDateFormatHorizontalStr) |
|
140 ); |
|
141 } |
|
142 |
133 |
143 updatePosition(); |
134 updatePosition(); |
144 |
135 |
145 SCREENSAVER_TEST_FUNC_EXIT("SnsrOledDigitalClockContainer::update") |
136 SCREENSAVER_TEST_FUNC_EXIT("SnsrOledDigitalClockContainer::update") |
146 } |
137 } |
147 |
138 |
148 int SnsrOledDigitalClockContainer::updateIntervalInMilliseconds() |
139 int SnsrOledDigitalClockContainer::updateIntervalInMilliseconds() |
149 { |
140 { |
150 return 60*1000; |
141 return 60*1000; |
|
142 } |
|
143 |
|
144 /*! |
|
145 @copydoc Screensaver::DisplayPowerMode() |
|
146 */ |
|
147 Screensaver::ScreenPowerMode SnsrOledDigitalClockContainer::displayPowerMode() |
|
148 { |
|
149 return Screensaver::ScreenModeLowPower; |
151 } |
150 } |
152 |
151 |
153 /*! |
152 /*! |
154 @copydoc SnsrBigClockContainer::getActiveScreenRows() |
153 @copydoc SnsrBigClockContainer::getActiveScreenRows() |
155 */ |
154 */ |
220 mDocumentLoader.load(gOledDigitalLayoutDocml, gLandscapeSectionName, &ok); |
220 mDocumentLoader.load(gOledDigitalLayoutDocml, gLandscapeSectionName, &ok); |
221 Q_ASSERT_X(ok, gOledDigitalLayoutDocml, "Invalid section in DocML file."); |
221 Q_ASSERT_X(ok, gOledDigitalLayoutDocml, "Invalid section in DocML file."); |
222 } |
222 } |
223 |
223 |
224 mIndicatorWidget->setLayoutType(SnsrIndicatorWidget::IndicatorsCentered); |
224 mIndicatorWidget->setLayoutType(SnsrIndicatorWidget::IndicatorsCentered); |
|
225 mIndicatorWidget->setPowerSaveModeColor(true); |
225 initIndicatorWidget(); |
226 initIndicatorWidget(); |
226 |
227 |
|
228 // powersave mode color |
|
229 mDateLabel->setTextColor(Qt::white); |
|
230 mAmPmLabel->setTextColor(Qt::white); |
|
231 |
227 mBackgroundContainerLayout->addItem(mMainView); |
232 mBackgroundContainerLayout->addItem(mMainView); |
228 } |
233 } |
229 } |
234 } |
230 |
235 |
231 // end of file |
236 // end of file |