screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsranalogclockcontainer.cpp
changeset 86 e4f038c420f7
parent 69 87476091b3f5
equal deleted inserted replaced
81:7dd137878ff8 86:e4f038c420f7
    85 
    85 
    86     // time
    86     // time
    87     mAnalogClockWidget->tick();
    87     mAnalogClockWidget->tick();
    88 
    88 
    89     // date
    89     // date
    90     if (mCurrentOrientation == Qt::Vertical) {
    90     const char *dateFormat = (mCurrentOrientation == Qt::Vertical) ?
    91         mDateLabel->setPlainText(
    91         gDateFormatVerticalStr : gDateFormatHorizontalStr;
    92             HbExtendedLocale().format(QDate::currentDate(), gDateFormatVerticalStr)
    92     QString dateText = HbExtendedLocale().format( QDate::currentDate(), dateFormat );
    93         );
    93     mDateLabel->setPlainText( dateText );
    94     } else {
       
    95         mDateLabel->setPlainText(
       
    96             HbExtendedLocale().format(QDate::currentDate(), gDateFormatHorizontalStr)
       
    97         );
       
    98     }
       
    99     
    94     
   100     SCREENSAVER_TEST_FUNC_EXIT("SnsrAnalogClockContainer::update")
    95     SCREENSAVER_TEST_FUNC_EXIT("SnsrAnalogClockContainer::update")
   101 }
    96 }
   102 
    97 
       
    98 /*!
       
    99     @copydoc SnsrBigClockContainer::updateIntervalInMilliseconds()
       
   100  */
   103 int SnsrAnalogClockContainer::updateIntervalInMilliseconds()
   101 int SnsrAnalogClockContainer::updateIntervalInMilliseconds()
   104 {
   102 {
   105     return 1000;
   103     return 1000;
   106 }
   104 }
   107 
   105 
       
   106 /*!
       
   107     @copydoc SnsrBigClockContainer::loadWidgets()
       
   108  */
   108 void SnsrAnalogClockContainer::loadWidgets()
   109 void SnsrAnalogClockContainer::loadWidgets()
   109 {
   110 {
   110     bool ok(true);
   111     bool ok(true);
   111 
   112 
   112     // reset widget pointers, any previous widgets are already deleted by now
   113     // reset widget pointers, any previous widgets are already deleted by now
   142             qDebug() << "loading: " << gAnalogLayoutDocml << ", section: " << gLandscapeSectionName;
   143             qDebug() << "loading: " << gAnalogLayoutDocml << ", section: " << gLandscapeSectionName;
   143             mDocumentLoader.load(gAnalogLayoutDocml, gLandscapeSectionName, &ok);
   144             mDocumentLoader.load(gAnalogLayoutDocml, gLandscapeSectionName, &ok);
   144             Q_ASSERT_X(ok, gAnalogLayoutDocml, "Invalid section in DocML file.");
   145             Q_ASSERT_X(ok, gAnalogLayoutDocml, "Invalid section in DocML file.");
   145         }
   146         }
   146 
   147 
       
   148         mIndicatorWidget->setLayoutType(SnsrIndicatorWidget::IndicatorsCentered);
       
   149         mIndicatorWidget->setPowerSaveModeColor(false);
   147         initIndicatorWidget();
   150         initIndicatorWidget();
   148         mIndicatorWidget->setLayoutType(SnsrIndicatorWidget::IndicatorsCentered);
       
   149         
   151         
   150         mBackgroundContainerLayout->addItem(mMainView);
   152         mBackgroundContainerLayout->addItem(mMainView);
   151 
   153 
   152         //connect( mSwipeWidget, SIGNAL(swipeDownDetected()), SIGNAL(unlockRequested()) );
   154         //connect( mSwipeWidget, SIGNAL(swipeDownDetected()), SIGNAL(unlockRequested()) );
   153         //mSwipeWidget->start();
   155         //mSwipeWidget->start();