phoneplugins/infowidgetplugin/infowidget/src/infowidget.cpp
changeset 46 bc5a64e5bc3c
parent 45 6b911d05207e
child 50 377c906a8701
child 56 5bcb308bd24d
equal deleted inserted replaced
45:6b911d05207e 46:bc5a64e5bc3c
    53 */
    53 */
    54 
    54 
    55 // Local constants 
    55 // Local constants 
    56 const int INFOWIDGET_DEFAULT_HEIGHT = 100;
    56 const int INFOWIDGET_DEFAULT_HEIGHT = 100;
    57 const int INFOWIDGET_DEFAULT_WIDTH = 200;
    57 const int INFOWIDGET_DEFAULT_WIDTH = 200;
       
    58 const int INFOWIDGET_MARQUEE_START_DELAY = 5000; 
    58 const char *TS_FILE_OPERATOR_WIDGET = "operator_widget"; 
    59 const char *TS_FILE_OPERATOR_WIDGET = "operator_widget"; 
    59 const char *TS_FILE_COMMON = "common";
    60 const char *TS_FILE_COMMON = "common";
    60 const char *BACKGROUND_FRAME_NAME = "qtg_fr_hswidget_normal"; 
    61 const char *BACKGROUND_FRAME_NAME = "qtg_fr_hswidget_normal"; 
    61 
    62 
    62 /*!
    63 /*!
    63     InfoWidget::InfoWidget() 
    64     Constructor.  
    64 */
    65 */
    65 InfoWidget::InfoWidget(QGraphicsItem* parent, Qt::WindowFlags flags)
    66 InfoWidget::InfoWidget(QGraphicsItem* parent, Qt::WindowFlags flags)
    66     : HbWidget(parent, flags),
    67     : HbWidget(parent, flags),
    67     m_animationState(AnimationIdle), 
    68     m_animationState(AnimationIdle), 
    68     m_engine(NULL), 
    69     m_engine(NULL), 
    74     m_layoutChanging(false),
    75     m_layoutChanging(false),
    75     m_dragEvent(false), 
    76     m_dragEvent(false), 
    76     m_initialized(false)
    77     m_initialized(false)
    77 {
    78 {
    78     INSTALL_TRACE_MSG_HANDLER; 
    79     INSTALL_TRACE_MSG_HANDLER; 
    79     
    80     DPRINT;
    80     DPRINT << ": IN";
       
    81     
    81     
    82     // Localization file loading
    82     // Localization file loading
    83     installTranslator(TS_FILE_OPERATOR_WIDGET);
    83     installTranslator(TS_FILE_OPERATOR_WIDGET);
    84     installTranslator(TS_FILE_COMMON);
    84     installTranslator(TS_FILE_COMMON);
    85 
    85 
   118     // transferred for frame item
   118     // transferred for frame item
   119     m_backgroundFrameItem = new HbFrameItem(
   119     m_backgroundFrameItem = new HbFrameItem(
   120             backgroundFrameDrawer.take(), this);  
   120             backgroundFrameDrawer.take(), this);  
   121     
   121     
   122     setBackgroundItem(m_backgroundFrameItem); 
   122     setBackgroundItem(m_backgroundFrameItem); 
   123 
   123 }
   124     DPRINT << ": OUT";
   124 
   125 }
   125 /*!
   126 
   126     Destructor.  
   127 /*!
       
   128     InfoWidget::~InfoWidget() 
       
   129 */
   127 */
   130 InfoWidget::~InfoWidget()
   128 InfoWidget::~InfoWidget()
   131 {
   129 {
   132     DPRINT << ": IN";
   130     DPRINT;
   133     
       
   134     // Force layout manager to delete widgets 
   131     // Force layout manager to delete widgets 
   135     // before InfoWidget is destroyed   
   132     // before InfoWidget is destroyed   
   136     m_layoutManager->destroyWidgets(); 
   133     m_layoutManager->destroyWidgets(); 
   137     
   134     
   138     // Remove and delete language translators 
   135     // Remove and delete language translators 
   139     removeTranslators(); 
   136     removeTranslators(); 
   140     
       
   141     DPRINT << ": OUT"; 
       
   142     UNINSTALL_TRACE_MSG_HANDLER;
   137     UNINSTALL_TRACE_MSG_HANDLER;
   143 }
   138 }
   144 
   139 
   145 /*!
   140 /*!
   146     InfoWidget::onInitialize()
       
   147     
       
   148     Called by HS framework, saved preference data
   141     Called by HS framework, saved preference data
   149     is available when onInitialize() is called and 
   142     is available when onInitialize() is called and 
   150     meta-object data reading should be done here      
   143     meta-object data reading should be done here.       
   151 */
   144 */
   152 void InfoWidget::onInitialize()
   145 void InfoWidget::onInitialize()
   153 {
   146 {
   154     DPRINT << ": IN";
   147     DPRINT; 
   155     
       
   156     m_initialized = true; 
   148     m_initialized = true; 
   157     
       
   158     // Initialize preferences from meta-object data
   149     // Initialize preferences from meta-object data
   159     if (!readPersistentPreferences()) {
   150     if (!readPersistentPreferences()) {
   160 
   151 
   161         // Reading failed, initialize default values  
   152         // Reading failed, initialize default values  
   162         m_preferences->setPreference(InfoWidgetPreferences::DisplaySpn, 
   153         m_preferences->setPreference(InfoWidgetPreferences::DisplaySpn, 
   175     m_backgroundFrameItem->resize(size());
   166     m_backgroundFrameItem->resize(size());
   176     
   167     
   177     // Listen for model changes 
   168     // Listen for model changes 
   178     QObject::connect(m_engine.data(), SIGNAL(modelChanged()), 
   169     QObject::connect(m_engine.data(), SIGNAL(modelChanged()), 
   179             this, SLOT(readModel()), Qt::UniqueConnection); 
   170             this, SLOT(readModel()), Qt::UniqueConnection); 
   180     
   171 }
   181     DPRINT << ": OUT";
   172 
   182 }
   173 /*!
   183 
   174     This slot is called by HomeScreen framework 
   184 /*!
   175     when the widget is uninstalled.    
   185     InfoWidget::onUninitialize() 
       
   186 */
   176 */
   187 void InfoWidget::onUninitialize()
   177 void InfoWidget::onUninitialize()
   188 {
   178 {
   189     DPRINT << ": IN";
   179     DPRINT;
   190     stopMarquees();
   180     stopMarquees();
   191     m_initialized = false; 
   181     m_initialized = false; 
   192     m_engine->suspend();
   182     m_engine->suspend();
   193     DPRINT << ": OUT";
   183 }
   194 }
   184 
   195 
   185 /*!
   196 /*!
   186     This slot is called by HomeScreen framework 
   197     InfoWidget::onShow() 
   187     when the widget visibility is gained.    
   198 */
   188 */
   199 void InfoWidget::onShow()
   189 void InfoWidget::onShow()
   200 {
   190 {
   201     DPRINT;
   191     DPRINT;
   202     if (m_initialized) { 
   192     if (m_initialized) { 
   204         updateInfoDisplay(); 
   194         updateInfoDisplay(); 
   205     }
   195     }
   206 }
   196 }
   207 
   197 
   208 /*!
   198 /*!
   209     InfoWidget::onHide() 
   199     This slot is called by HomeScreen framework 
       
   200     when the widget visibility is lost.    
   210 */
   201 */
   211 void InfoWidget::onHide()
   202 void InfoWidget::onHide()
   212 {
   203 {
   213     DPRINT;
   204     DPRINT;
   214     if (m_initialized) { 
   205     if (m_initialized) { 
   216         stopMarquees(); 
   207         stopMarquees(); 
   217     }
   208     }
   218 }
   209 }
   219 
   210 
   220 /*!
   211 /*!
   221     InfoWidget::timerEvent() 
   212     Handles timer events.  
   222 */
   213 */
   223 void InfoWidget::timerEvent(QTimerEvent *event)
   214 void InfoWidget::timerEvent(QTimerEvent *event)
   224 {
   215 {
   225     Q_UNUSED(event); 
   216     Q_UNUSED(event); 
   226     
   217     
   237         m_timerId = 0;
   228         m_timerId = 0;
   238     }
   229     }
   239 }
   230 }
   240 
   231 
   241 /*!
   232 /*!
   242     InfoWidget::installTranslator() 
   233     Install widget translator for given translation file.  
   243 */
   234 */
   244 bool InfoWidget::installTranslator(QString translationFile)
   235 bool InfoWidget::installTranslator(QString translationFile)
   245 {
   236 {
   246     DPRINT << ": IN";
   237     DPRINT;
   247 
       
   248     QString lang = QLocale::system().name();
   238     QString lang = QLocale::system().name();
   249     QString path = "z:/resource/qt/translations/";
   239     QString path = "z:/resource/qt/translations/";
   250     bool translatorLoaded(false);  
   240     bool translatorLoaded(false);  
   251     
   241     
   252     QScopedPointer<QTranslator> widgetTranslator; 
   242     QScopedPointer<QTranslator> widgetTranslator; 
   256     if (translatorLoaded) {
   246     if (translatorLoaded) {
   257         qApp->installTranslator(widgetTranslator.data());
   247         qApp->installTranslator(widgetTranslator.data());
   258         m_translators.append(widgetTranslator.take()); 
   248         m_translators.append(widgetTranslator.take()); 
   259         DPRINT << ": translator installed: " << translationFile; 
   249         DPRINT << ": translator installed: " << translationFile; 
   260     }
   250     }
   261     
       
   262     DPRINT << ": OUT";
       
   263     return translatorLoaded;
   251     return translatorLoaded;
   264 }
   252 }
   265 
   253 
   266 /*!
   254 /*!
   267     InfoWidget::removeTranslators()
   255     Remove translators. No need to call 
   268     
   256     QApplication::removeTranslator, 
   269     Remove translators from qApp and delete objects 
   257     QTranslator object removes itself before deletion.  
   270 */
   258 */
   271 void InfoWidget::removeTranslators()
   259 void InfoWidget::removeTranslators()
   272 {
   260 {
   273     DPRINT << ": IN";
   261     DPRINT;
   274 
       
   275     foreach (QTranslator *translator, m_translators) {
       
   276         qApp->removeTranslator(translator);
       
   277     }    
       
   278     qDeleteAll(m_translators);
   262     qDeleteAll(m_translators);
   279     m_translators.clear();
   263     m_translators.clear();
   280     
   264 }
   281     DPRINT << ": OUT";
   265 
   282 }
   266 /*!
   283 
   267     Returns bounding rect. 
   284 /*!
       
   285     InfoWidget::boundingRect() 
       
   286 */
   268 */
   287 QRectF InfoWidget::boundingRect() const
   269 QRectF InfoWidget::boundingRect() const
   288 {   
   270 {   
   289     return rect();
   271     return rect();
   290 }
   272 }
   291 
   273 
   292 /*!
   274 /*!
   293     InfoWidget::sizeHint() 
   275     Calculate widget size hint based on visible row count.  
   294     
       
   295     Calculate size hint based on visible rows count 
       
   296 */
   276 */
   297 QSizeF InfoWidget::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const   
   277 QSizeF InfoWidget::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const   
   298 {
   278 {
   299     Q_UNUSED(which);
   279     Q_UNUSED(which);
   300     Q_UNUSED(constraint); 
   280     Q_UNUSED(constraint); 
   323     DPRINT << ": returning size: " << requiredSize;
   303     DPRINT << ": returning size: " << requiredSize;
   324     return requiredSize; 
   304     return requiredSize; 
   325 }
   305 }
   326 
   306 
   327 /*!
   307 /*!
   328     InfoWidget::sizePolicy() 
   308     Returns size polizy for the widget.   
   329 */
   309 */
   330 QSizePolicy InfoWidget::sizePolicy () const 
   310 QSizePolicy InfoWidget::sizePolicy () const 
   331 {
   311 {
   332     DPRINT;
   312     DPRINT;
   333     return QSizePolicy(
   313     return QSizePolicy(
   334             QSizePolicy::Fixed, 
   314             QSizePolicy::Fixed, 
   335             QSizePolicy::Fixed); 
   315             QSizePolicy::Fixed); 
   336 }
   316 }
   337 
   317 
   338 /*!
   318 /*!
   339     InfoWidget::updateItemsVisibility() 
   319     Update item visibility based on display preferences.   
   340 */
   320 */
   341 void InfoWidget::updateItemsVisibility()
   321 void InfoWidget::updateItemsVisibility()
   342 {
   322 {
   343     DPRINT <<": IN"; 
   323     DPRINT; 
   344     int layoutRows = 0; 
   324     int layoutRows = 0; 
   345     QList<QGraphicsWidget *> widgetsToHide; 
       
   346     
   325     
   347     // Update layout according to item visibility settings
   326     // Update layout according to item visibility settings
   348     if (m_preferences->preference(InfoWidgetPreferences::DisplaySpn).compare(
   327     if (m_preferences->preference(InfoWidgetPreferences::DisplaySpn).compare(
   349             DISPLAY_SETTING_ON) == 0) {
   328             DISPLAY_SETTING_ON) == 0) {
   350         layoutRows++;
   329         layoutRows++;
   367     } else {
   346     } else {
   368         m_layoutManager->removeWidget(InfoWidgetLayoutManager::RoleSatMarqueeItem); 
   347         m_layoutManager->removeWidget(InfoWidgetLayoutManager::RoleSatMarqueeItem); 
   369         m_layoutManager->removeWidget(InfoWidgetLayoutManager::RoleSatTextIcon); 
   348         m_layoutManager->removeWidget(InfoWidgetLayoutManager::RoleSatTextIcon); 
   370     }
   349     }
   371     
   350     
   372     DPRINT << ": visible layout rows count: " << layoutRows;
   351     if (m_animatingItems.count() == 0) {
       
   352         m_animatingItem = NULL; 
       
   353     }
       
   354     
   373     m_layoutManager->setLayoutRows(layoutRows);
   355     m_layoutManager->setLayoutRows(layoutRows);
   374 }
   356 }
   375 
   357 
   376 /*!
   358 /*!
   377     InfoWidget::layoutInfoDisplay()
   359     Layout info display.    
   378     
       
   379     Layout info display    
       
   380 */
   360 */
   381 void InfoWidget::layoutInfoDisplay()
   361 void InfoWidget::layoutInfoDisplay()
   382 {  
   362 {  
   383     DPRINT << ": IN";
   363     DPRINT;
   384     
       
   385     QGraphicsLayout *infoDisplayLayout = 
   364     QGraphicsLayout *infoDisplayLayout = 
   386         m_layoutManager->layoutInfoDisplay(); 
   365         m_layoutManager->layoutInfoDisplay(); 
   387     
   366     
   388     if (!m_layout->count()) {
   367     if (!m_layout->count()) {
   389         QGraphicsWidget *contentWidget = 
   368         QGraphicsWidget *contentWidget = 
   391         if (contentWidget) {
   370         if (contentWidget) {
   392             // Add content widget to main layout 
   371             // Add content widget to main layout 
   393             m_layout->addItem(contentWidget);
   372             m_layout->addItem(contentWidget);
   394         }
   373         }
   395     }
   374     }
   396 
       
   397     updateItemsVisibility(); 
   375     updateItemsVisibility(); 
   398     
       
   399     endChanges();
   376     endChanges();
   400     DPRINT << ": OUT";
   377 }
   401 }
   378 
   402 
   379 /*!
   403 /*!
   380     Layout and display settings dialog.    
   404     InfoWidget::layoutSettingsDialog()
       
   405     
       
   406     Layout and display settings dialog    
       
   407 */
   381 */
   408 void InfoWidget::layoutSettingsDialog()
   382 void InfoWidget::layoutSettingsDialog()
   409 {  
   383 {  
   410     DPRINT << ": IN";
   384     DPRINT;
   411     startChanges();
   385     startChanges();
   412     
   386     
   413     m_layoutManager->reloadWidgets(InfoWidgetLayoutManager::SettingsDialog); 
   387     m_layoutManager->reloadWidgets(InfoWidgetLayoutManager::SettingsDialog); 
   414     QGraphicsLayout *settingDialogLayout =
   388     QGraphicsLayout *settingDialogLayout =
   415             m_layoutManager->layoutSettingsDialog(); 
   389             m_layoutManager->layoutSettingsDialog(); 
   418         HbDialog *settingsDialog = qobject_cast<HbDialog *>(
   392         HbDialog *settingsDialog = qobject_cast<HbDialog *>(
   419                 m_layoutManager->getWidget(InfoWidgetLayoutManager::
   393                 m_layoutManager->getWidget(InfoWidgetLayoutManager::
   420                 RoleSettingsDialog)); 
   394                 RoleSettingsDialog)); 
   421 
   395 
   422         if (settingsDialog) {
   396         if (settingsDialog) {
   423             DPRINT << ": settingsDialog has been returned from layout manager";
       
   424             initializeSettingsDialogItems();
   397             initializeSettingsDialogItems();
   425             
       
   426             settingsDialog->setDismissPolicy(HbDialog::NoDismiss); 
   398             settingsDialog->setDismissPolicy(HbDialog::NoDismiss); 
   427             settingsDialog->setTimeout(HbDialog::NoTimeout);
   399             settingsDialog->setTimeout(HbDialog::NoTimeout);
   428             settingsDialog->open(this, 
   400             settingsDialog->open(this, 
   429                     SLOT(settingsDialogClosed(HbAction *))); 
   401                     SLOT(settingsDialogClosed(HbAction *))); 
   430             }
   402             }
   431     }    
   403     }    
   432     DPRINT << ": OUT";
   404 }
   433 }
   405 
   434 
   406 /*!
   435 /*!
       
   436     InfoWidget::initializeSettingsDialogItems()
       
   437     
       
   438     Set up initial check box states 
   407     Set up initial check box states 
   439     and connect signals to local slots  
   408     and connect signals to local slots.  
   440 */
   409 */
   441 void InfoWidget::initializeSettingsDialogItems()
   410 void InfoWidget::initializeSettingsDialogItems()
   442 {  
   411 {  
   443     DPRINT << ": IN";
   412     DPRINT;
   444 
       
   445     // Connect display setting check boxes
   413     // Connect display setting check boxes
   446     HbCheckBox *spnCheckBox = 
   414     HbCheckBox *spnCheckBox = 
   447             qobject_cast<HbCheckBox *>(m_layoutManager->getWidget(
   415             qobject_cast<HbCheckBox *>(m_layoutManager->getWidget(
   448                     InfoWidgetLayoutManager::RoleSpnCheckBox));
   416                     InfoWidgetLayoutManager::RoleSpnCheckBox));
   449     if (spnCheckBox) {
   417     if (spnCheckBox) {
   476         
   444         
   477         QObject::connect(satTextCheckBox, SIGNAL(stateChanged(int)), 
   445         QObject::connect(satTextCheckBox, SIGNAL(stateChanged(int)), 
   478                 this, SLOT(satDisplaySettingChanged(int)), 
   446                 this, SLOT(satDisplaySettingChanged(int)), 
   479                 Qt::UniqueConnection); 
   447                 Qt::UniqueConnection); 
   480     }
   448     }
   481     
   449 }
   482     DPRINT << ": OUT";
   450 
   483 }
   451 /*!
   484 
       
   485 /*!
       
   486     InfoWidget::updateInfoDisplayItem() 
       
   487     
       
   488     Fetch widget based on item role and update 
   452     Fetch widget based on item role and update 
   489     item specific data. 
   453     item specific data. 
   490 */
   454 */
   491 void InfoWidget::updateInfoDisplayItem(
   455 void InfoWidget::updateInfoDisplayItem(
   492         InfoWidgetLayoutManager::LayoutItemRole itemRole, 
   456         InfoWidgetLayoutManager::LayoutItemRole itemRole, 
   499     if (marqueeItem) {
   463     if (marqueeItem) {
   500         marqueeItem->setText(text);
   464         marqueeItem->setText(text);
   501         marqueeItem->setTextColor( HbColorScheme::color(
   465         marqueeItem->setTextColor( HbColorScheme::color(
   502                 "qtc_hs_list_item_title_normal"));
   466                 "qtc_hs_list_item_title_normal"));
   503         
   467         
   504         // Update widget effective size if not already set  
   468         // Update widget effective size
   505         marqueeItem->adjustSize(); 
   469         marqueeItem->adjustSize();
   506         if (!m_layoutManager->textFitsToRect(
   470         if (!m_layoutManager->textFitsToRect(
   507                 text,
   471                 text,
   508                 marqueeItem->font(), 
   472                 marqueeItem->font(), 
   509                 marqueeItem->rect())) {
   473                 marqueeItem->rect())) {
   510             DPRINT << ": enable marquee animation";
   474             DPRINT << ": enable marquee animation";
   512         }
   476         }
   513     }
   477     }
   514 }
   478 }
   515 
   479 
   516 /*!
   480 /*!
   517     InfoWidget::updateInfoDisplay() 
       
   518     
       
   519     Model or visibility data has changed, 
   481     Model or visibility data has changed, 
   520     update info display widgets accordingly. 
   482     update info display widgets accordingly. 
   521 */
   483 */
   522 void InfoWidget::updateInfoDisplay()
   484 void InfoWidget::updateInfoDisplay()
   523 {
   485 {
   524     DPRINT << ": IN"; 
   486     DPRINT; 
   525     
       
   526     if (m_initialized) {
   487     if (m_initialized) {
   527         stopMarquees();
   488         stopMarquees();
   528         
   489         
   529         if (m_layoutManager->currentDisplayRole() == 
   490         if (m_layoutManager->currentDisplayRole() == 
   530                 InfoWidgetLayoutManager::InfoDisplay )
   491                 InfoWidgetLayoutManager::InfoDisplay) {
   531             {
   492             
   532             QString text;
       
   533             InfoWidgetEngine::ModelData modelData = m_engine->modelData(); 
   493             InfoWidgetEngine::ModelData modelData = m_engine->modelData(); 
   534         
   494         
   535             // Update service provider name item
   495             // Update service provider name item
   536             text = modelData.serviceProviderName();
   496             QString text = modelData.serviceProviderName();
   537             updateInfoDisplayItem(InfoWidgetLayoutManager::RoleSpnMarqueeItem, text); 
   497             updateInfoDisplayItem(
       
   498                     InfoWidgetLayoutManager::RoleSpnMarqueeItem, text); 
   538 
   499 
   539             // Update MCN name item
   500             // Update MCN name item
   540             text = modelData.mcnName();
   501             text = modelData.mcnName();
   541             updateInfoDisplayItem(InfoWidgetLayoutManager::RoleMcnMarqueeItem, text); 
   502             updateInfoDisplayItem(
       
   503                     InfoWidgetLayoutManager::RoleMcnMarqueeItem, text); 
   542             
   504             
   543             // Update SAT display text item
   505             // Update SAT display text item
   544             text = modelData.satDisplayText();
   506             text = modelData.satDisplayText();
   545             updateInfoDisplayItem(InfoWidgetLayoutManager::RoleSatMarqueeItem, text); 
   507             updateInfoDisplayItem(
       
   508                     InfoWidgetLayoutManager::RoleSatMarqueeItem, text); 
   546         }
   509         }
   547         
   510         
   548         if (m_animatingItems.count() > 0) {
   511         if (m_animatingItems.count() > 0) {
   549             startMarquees(StartDelayed); 
   512             startMarquees(); 
   550         }
   513         }
   551     }
   514     }
   552 }
   515 }
   553 
   516 
   554 /*!
   517 /*!
   555     InfoWidget::readModel() 
   518     Read model data. 
   556     
   519     Model's modelChanged - signal is connected to this slot.  
   557     Read model data. Model's modelChanged - signal is connected to this slot.  
       
   558 */
   520 */
   559 void InfoWidget::readModel()
   521 void InfoWidget::readModel()
   560 {
   522 {
   561     DPRINT << ": IN"; 
   523     DPRINT; 
   562 
       
   563     if (m_layoutManager->currentDisplayRole() == 
   524     if (m_layoutManager->currentDisplayRole() == 
   564             InfoWidgetLayoutManager::InfoDisplay) { 
   525             InfoWidgetLayoutManager::InfoDisplay) { 
   565         updateInfoDisplay(); 
   526         updateInfoDisplay(); 
   566     }
   527     }
   567     DPRINT << ": OUT";
   528 }
   568 }
   529 
   569 
   530 /*!
   570 /*!
   531     Model error signal is connected to this slot. 
   571     InfoWidget::handleModelError() 
       
   572     
       
   573     Model error signal is connected to this slot 
       
   574 */
   532 */
   575 void InfoWidget::handleModelError(int operation,int errorCode)
   533 void InfoWidget::handleModelError(int operation,int errorCode)
   576 {
   534 {
   577     DWARNING << ": operation: " << operation << " error: " << errorCode; 
   535     DWARNING << ": operation: " << operation << 
   578 }
   536                 " error: " << errorCode; 
   579 
   537 }
   580 /*!
   538 
   581     InfoWidget::mousePressEvent() 
   539 /*!
       
   540     Mouse press handler. 
   582 */
   541 */
   583 void InfoWidget::mousePressEvent(QGraphicsSceneMouseEvent *event)
   542 void InfoWidget::mousePressEvent(QGraphicsSceneMouseEvent *event)
   584 {
   543 {
   585     Q_UNUSED(event);
   544     Q_UNUSED(event);
   586     
       
   587     // Clear flag 
   545     // Clear flag 
   588     m_dragEvent = false; 
   546     m_dragEvent = false; 
   589 }
   547 }
   590 
   548 
   591 /*!
   549 /*!
   592     InfoWidget::mouseReleaseEvent() 
   550     Mouse release handler.  
   593 */
   551 */
   594 void InfoWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
   552 void InfoWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
   595 {
   553 {
   596     Q_UNUSED(event);
   554     Q_UNUSED(event);
   597 
   555     // If widget wasn't dragged 
   598     // If in info display and widget wasn't dragged 
       
   599     // layout and open settings dialog
   556     // layout and open settings dialog
   600     if ((!m_dragEvent) && 
   557     if ((!m_dragEvent) && 
   601           m_layoutManager->currentDisplayRole() == 
   558           m_layoutManager->currentDisplayRole() == 
   602                   InfoWidgetLayoutManager::InfoDisplay) {
   559                   InfoWidgetLayoutManager::InfoDisplay) {
   603         DPRINT << ": layout and display settings dialog";
   560         DPRINT << ": layout and display settings dialog";
   604         layoutSettingsDialog();
   561         layoutSettingsDialog();
   605     } 
   562     } 
   606     
   563     
   607     // Clear flag 
   564     // Clear flag 
   608     m_dragEvent = false; 
   565     m_dragEvent = false; 
   609 
   566 }
   610 }
   567 
   611 
   568 /*!
   612 /*!
   569     Mouse move handler.  
   613     InfoWidget::mouseMoveEvent() 
       
   614 */
   570 */
   615 void InfoWidget::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
   571 void InfoWidget::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
   616 {
   572 {
   617     Q_UNUSED(event);
   573     Q_UNUSED(event);
   618     
       
   619     // Mouse is moving 
   574     // Mouse is moving 
   620     // after mouse press event
   575     // after mouse press event
   621     m_dragEvent = true; 
   576     m_dragEvent = true; 
   622 }
   577 }
   623 
   578 
   624 /*!
   579 /*!
   625     InfoWidget::spnDisplaySettingChanged() 
   580     Slot for handling Spn display setting change.  
   626 */
   581 */
   627 void InfoWidget::spnDisplaySettingChanged(int state)
   582 void InfoWidget::spnDisplaySettingChanged(int state)
   628 {
   583 {
   629     DPRINT << ": state: " << state;
   584     DPRINT << ": state: " << state;
   630     if (state == Qt::Checked){
   585     if (state == Qt::Checked){
   635                 InfoWidgetPreferences::DisplaySpn, DISPLAY_SETTING_OFF);
   590                 InfoWidgetPreferences::DisplaySpn, DISPLAY_SETTING_OFF);
   636     }
   591     }
   637 }
   592 }
   638 
   593 
   639 /*!
   594 /*!
   640     InfoWidget::mcnDisplaySettingChanged() 
   595     Slot for handling Mcn display setting change. 
   641 */
   596 */
   642 void InfoWidget::mcnDisplaySettingChanged(int state)
   597 void InfoWidget::mcnDisplaySettingChanged(int state)
   643 {
   598 {
   644     DPRINT << ": state: " << state; 
   599     DPRINT << ": state: " << state; 
   645     if (state == Qt::Checked){
   600     if (state == Qt::Checked){
   650                 InfoWidgetPreferences::DisplayMcn, DISPLAY_SETTING_OFF);
   605                 InfoWidgetPreferences::DisplayMcn, DISPLAY_SETTING_OFF);
   651     }
   606     }
   652 }
   607 }
   653 
   608 
   654 /*!
   609 /*!
   655     InfoWidget::satDisplaySettingChanged() 
   610     Slot for handling SAT display setting change. 
   656 */
   611 */
   657 void InfoWidget::satDisplaySettingChanged(int state)
   612 void InfoWidget::satDisplaySettingChanged(int state)
   658 {
   613 {
   659     DPRINT << ": state: " << state; 
   614     DPRINT << ": state: " << state; 
   660     if (state == Qt::Checked){
   615     if (state == Qt::Checked){
   665                 InfoWidgetPreferences::DisplaySatText, DISPLAY_SETTING_OFF);
   620                 InfoWidgetPreferences::DisplaySatText, DISPLAY_SETTING_OFF);
   666     }
   621     }
   667 }
   622 }
   668 
   623 
   669 /*!
   624 /*!
   670     InfoWidget::mcnDisplay() 
       
   671     
       
   672     Getter function for Meta-object property "mcnDisplay"
   625     Getter function for Meta-object property "mcnDisplay"
   673 */
   626 */
   674 QString InfoWidget::mcnDisplay()
   627 QString InfoWidget::mcnDisplay()
   675 {
   628 {
   676     DPRINT; 
   629     DPRINT; 
   677     return m_preferences->preference(
   630     return m_preferences->preference(
   678             InfoWidgetPreferences::DisplayMcn); 
   631             InfoWidgetPreferences::DisplayMcn); 
   679 }
   632 }
   680 
   633 
   681 /*!
   634 /*!
   682     InfoWidget::setMcnDisplay() 
       
   683     
       
   684     Setter function for Meta-object property "mcnDisplay"
   635     Setter function for Meta-object property "mcnDisplay"
   685 */
   636 */
   686 void InfoWidget::setMcnDisplay(QString value)
   637 void InfoWidget::setMcnDisplay(QString value)
   687 {
   638 {
   688     DPRINT;
   639     DPRINT;
   689     m_preferences->setPreference(
   640     m_preferences->setPreference(
   690             InfoWidgetPreferences::DisplayMcn, value);
   641             InfoWidgetPreferences::DisplayMcn, value);
   691     }
   642     }
   692 
   643 
   693 /*!
   644 /*!
   694     InfoWidget::homeZoneDisplay() 
       
   695     
       
   696     Getter function for Meta-object property "homeZoneDisplay"
   645     Getter function for Meta-object property "homeZoneDisplay"
   697 */
   646 */
   698 QString InfoWidget::homeZoneDisplay()
   647 QString InfoWidget::homeZoneDisplay()
   699 {
   648 {
   700     DPRINT; 
   649     DPRINT; 
   701     return m_preferences->preference(
   650     return m_preferences->preference(
   702             InfoWidgetPreferences::DisplayHomeZone); 
   651             InfoWidgetPreferences::DisplayHomeZone); 
   703 }
   652 }
   704 
   653 
   705 /*!
   654 /*!
   706     InfoWidget::setHomeZoneDisplay()
       
   707     
       
   708     Setter function for Meta-object property "homeZoneDisplay" 
   655     Setter function for Meta-object property "homeZoneDisplay" 
   709 */
   656 */
   710 void InfoWidget::setHomeZoneDisplay(QString value)
   657 void InfoWidget::setHomeZoneDisplay(QString value)
   711 {
   658 {
   712     DPRINT; 
   659     DPRINT; 
   713     m_preferences->setPreference(
   660     m_preferences->setPreference(
   714             InfoWidgetPreferences::DisplayHomeZone, value);
   661             InfoWidgetPreferences::DisplayHomeZone, value);
   715 }
   662 }
   716 
   663 
   717 /*!
   664 /*!
   718     InfoWidget::activeLineDisplay() 
       
   719     
       
   720     Getter function for Meta-object property "activeLineDisplay"
   665     Getter function for Meta-object property "activeLineDisplay"
   721 */
   666 */
   722 QString InfoWidget::activeLineDisplay()
   667 QString InfoWidget::activeLineDisplay()
   723 {
   668 {
   724     DPRINT; 
   669     DPRINT; 
   725     return m_preferences->preference(
   670     return m_preferences->preference(
   726             InfoWidgetPreferences::DisplayActiveLine);
   671             InfoWidgetPreferences::DisplayActiveLine);
   727 }
   672 }
   728 
   673 
   729 /*!
   674 /*!
   730     InfoWidget::setActiveLineDisplay() 
       
   731     
       
   732     Setter function for Meta-object property "activeLineDisplay"
   675     Setter function for Meta-object property "activeLineDisplay"
   733 */
   676 */
   734 void InfoWidget::setActiveLineDisplay(QString value)
   677 void InfoWidget::setActiveLineDisplay(QString value)
   735 {
   678 {
   736     DPRINT; 
   679     DPRINT; 
   749     return m_preferences->preference(
   692     return m_preferences->preference(
   750             InfoWidgetPreferences::DisplaySatText);
   693             InfoWidgetPreferences::DisplaySatText);
   751 }
   694 }
   752 
   695 
   753 /*!
   696 /*!
   754     InfoWidget::setSatDisplay()
       
   755     
       
   756     Setter function for Meta-object property "satDisplay" 
   697     Setter function for Meta-object property "satDisplay" 
   757 */
   698 */
   758 void InfoWidget::setSatDisplay(QString value)
   699 void InfoWidget::setSatDisplay(QString value)
   759 {
   700 {
   760     DPRINT;
   701     DPRINT;
   761     m_preferences->setPreference(
   702     m_preferences->setPreference(
   762             InfoWidgetPreferences::DisplaySatText, value);
   703             InfoWidgetPreferences::DisplaySatText, value);
   763 }
   704 }
   764 
   705 
   765 /*!
   706 /*!
   766     InfoWidget::spnDisplay()
       
   767     
       
   768     Getter function for Meta-object property "spnDisplay" 
   707     Getter function for Meta-object property "spnDisplay" 
   769 */
   708 */
   770 QString InfoWidget::spnDisplay()
   709 QString InfoWidget::spnDisplay()
   771 {
   710 {
   772     DPRINT; 
   711     DPRINT; 
   773     return m_preferences->preference(
   712     return m_preferences->preference(
   774             InfoWidgetPreferences::DisplaySpn);
   713             InfoWidgetPreferences::DisplaySpn);
   775 }
   714 }
   776 
   715 
   777 /*!
   716 /*!
   778     InfoWidget::setSpnDisplay()
       
   779     
       
   780     Setter function for Meta-object property "spnDisplay" 
   717     Setter function for Meta-object property "spnDisplay" 
   781 */
   718 */
   782 void InfoWidget::setSpnDisplay(QString value)
   719 void InfoWidget::setSpnDisplay(QString value)
   783 {
   720 {
   784     DPRINT;
   721     DPRINT;
   785     m_preferences->setPreference(
   722     m_preferences->setPreference(
   786             InfoWidgetPreferences::DisplaySpn, value);
   723             InfoWidgetPreferences::DisplaySpn, value);
   787 }
   724 }
   788 
   725 
   789 /*!
   726 /*!
   790     InfoWidget::readPersistentPreferences()
       
   791     
       
   792     Read Meta-object properties and store to preference handler. 
   727     Read Meta-object properties and store to preference handler. 
   793     Restores preferences from previous session.   
   728     Restores preferences from previous session.   
   794 */
   729 */
   795 bool InfoWidget::readPersistentPreferences()
   730 bool InfoWidget::readPersistentPreferences()
   796 {
   731 {
   825         
   760         
   826     return changed; 
   761     return changed; 
   827 }
   762 }
   828 
   763 
   829 /*!
   764 /*!
   830     InfoWidget::initializeCheckBoxStates()
       
   831     
       
   832     Read display settings from preference store 
   765     Read display settings from preference store 
   833     and set check box initial states accordingly. 
   766     and set check box initial states accordingly. 
   834 */
   767 */
   835 void InfoWidget::initializeCheckBoxStates()
   768 void InfoWidget::initializeCheckBoxStates()
   836 {
   769 {
   837     DPRINT;
   770     DPRINT;
   838     HbCheckBox *spnCheckBox = qobject_cast<HbCheckBox *>(m_layoutManager->getWidget(
   771     HbCheckBox *spnCheckBox = qobject_cast<HbCheckBox *>(m_layoutManager->getWidget(
   839             InfoWidgetLayoutManager::RoleSpnCheckBox));
   772             InfoWidgetLayoutManager::RoleSpnCheckBox));
   840     if (spnCheckBox) {
   773     if (spnCheckBox) {
   841     spnCheckBox->setChecked(m_preferences->isPreferenceSet(
   774         spnCheckBox->setChecked(m_preferences->isPreferenceSet(
   842                 InfoWidgetPreferences::DisplaySpn));
   775                 InfoWidgetPreferences::DisplaySpn));
   843     }
   776     }
   844     
   777     
   845     HbCheckBox *mcnCheckBox = qobject_cast<HbCheckBox *>(m_layoutManager->getWidget(
   778     HbCheckBox *mcnCheckBox = qobject_cast<HbCheckBox *>(m_layoutManager->getWidget(
   846             InfoWidgetLayoutManager::RoleMcnCheckBox));
   779             InfoWidgetLayoutManager::RoleMcnCheckBox));
   856                 InfoWidgetPreferences::DisplaySatText));
   789                 InfoWidgetPreferences::DisplaySatText));
   857     }
   790     }
   858 }
   791 }
   859 
   792 
   860 /*!
   793 /*!
   861     InfoWidget::settingsEditingFinished()
   794     Handles settings validating and storing
       
   795     when the settings dialog is closed with Ok action.   
   862 */
   796 */
   863 void InfoWidget::settingsEditingFinished()
   797 void InfoWidget::settingsEditingFinished()
   864 {
   798 {
   865     DPRINT << ": IN";
   799     DPRINT;
   866     
   800      
   867     // Save settings data if validation succeeds 
       
   868     if (m_preferences->validate()) {
   801     if (m_preferences->validate()) {
   869         DPRINT << ": switching to info display";
   802 
   870         
       
   871         // Signal HS framework to store Meta-object 
   803         // Signal HS framework to store Meta-object 
   872         // preferences if changed 
   804         // preferences if preferences have changed. 
   873         if (m_preferences->storePreferences()) {
   805         if (m_preferences->storePreferences()) {
   874             emit setPreferences(
   806             emit setPreferences(
   875                     m_preferences->preferenceNames());
   807                     m_preferences->preferenceNames());
   876             }
   808             }
   877         
   809         
   882         m_layoutManager->removeWidget(
   814         m_layoutManager->removeWidget(
   883                 InfoWidgetLayoutManager::RoleSettingsDialog,
   815                 InfoWidgetLayoutManager::RoleSettingsDialog,
   884                 true);
   816                 true);
   885         
   817         
   886     } else {
   818     } else {
   887         DPRINT << ": settings validation failed";
       
   888         // Cancel edit mode 
   819         // Cancel edit mode 
   889         settingsEditingCancelled();
   820         settingsEditingCancelled();
   890         
   821         
   891         // Display warning note
   822         // Display warning note
   892         settingsValidationFailed();
   823         settingsValidationFailed();
   893     }
   824     }
   894     
   825 }
   895     DPRINT << ": OUT";
   826 
   896 }
   827 /*!
   897 
       
   898 /*!
       
   899     InfoWidget::settingsEditingCancelled()
       
   900     
       
   901     Slot to be called when settings editing 
   828     Slot to be called when settings editing 
   902     shouldn't cause change set of visible items. 
   829     shouldn't cause change set of visible items. 
   903     Restores previous state.  
   830     Restores previous state.  
   904 */
   831 */
   905 void InfoWidget::settingsEditingCancelled()
   832 void InfoWidget::settingsEditingCancelled()
   913             InfoWidgetLayoutManager::RoleSettingsDialog,
   840             InfoWidgetLayoutManager::RoleSettingsDialog,
   914             true); 
   841             true); 
   915 }
   842 }
   916 
   843 
   917 /*!
   844 /*!
   918     InfoWidget::settingsDialogClosed()
   845     Slot to be called when settings dialog is about to close. 
   919     
       
   920     Slot to be called when settings dialog is about to close
       
   921 */
   846 */
   922 void InfoWidget::settingsDialogClosed(HbAction* action)
   847 void InfoWidget::settingsDialogClosed(HbAction* action)
   923 {
   848 {
   924     DPRINT << ": IN";
   849     DPRINT;
   925     if (action) {
   850     if (action) {
   926         if (action->text() == hbTrId("txt_common_button_ok")) {
   851         if (action->text() == hbTrId("txt_common_button_ok")) {
   927             settingsEditingFinished(); 
   852             settingsEditingFinished(); 
   928         } else if (action->text() == hbTrId("txt_common_button_cancel") ) {
   853         } else if (action->text() == hbTrId("txt_common_button_cancel")) {
   929             settingsEditingCancelled(); 
   854             settingsEditingCancelled(); 
   930         }       
   855         }       
   931     } else {
   856     } else {
   932         DPRINT << ": null action";
       
   933         settingsEditingCancelled(); 
   857         settingsEditingCancelled(); 
   934     }
   858     }
   935      
   859      
   936     // Switch to info display 
   860     // Switch to info display 
   937     layoutInfoDisplay();
   861     layoutInfoDisplay();
   938     DPRINT << ": OUT";
   862 }
   939 }
   863 
   940 
   864 /*!
   941 /*!
   865     Handle start of changes, called when settings dialog
   942     InfoWidget::startChanges()
   866     is shown and layout changes are expected.      
   943 */
   867 */
   944 void InfoWidget::startChanges()
   868 void InfoWidget::startChanges()
   945 {
   869 {
   946     DPRINT;
   870     DPRINT;
   947     m_layoutChanging = true;
   871     m_layoutChanging = true;
   948     if (m_animationState != AnimationIdle) {
   872     if (m_animationState != AnimationIdle) {
   949             stopMarquees(); 
   873         stopMarquees(); 
   950     }
   874     }
   951 }
   875 }
   952 
   876 
   953 /*!
   877 /*!
   954     InfoWidget::endChanges()
   878     Handle end of changes, called when settings dialog
       
   879     is closed and layout changes are to be finished.      
   955 */
   880 */
   956 void InfoWidget::endChanges()
   881 void InfoWidget::endChanges()
   957 {
   882 {
   958     DPRINT;
   883     DPRINT;
   959     updateGeometry();
   884     updateGeometry();
   960     updateInfoDisplay();
   885     updateInfoDisplay();
   961     
       
   962     m_layoutChanging = false;
   886     m_layoutChanging = false;
   963 }
   887 }
   964 
   888 
   965 /*!
   889 /*!
   966    \reimp
   890    \reimp
   974    }
   898    }
   975    HbWidget::changeEvent(event);
   899    HbWidget::changeEvent(event);
   976 }
   900 }
   977 
   901 
   978 /*!
   902 /*!
   979    InfoWidget::settingsValidationFailed()
       
   980    
       
   981    Slot to be called when preference validation has failed. 
   903    Slot to be called when preference validation has failed. 
   982    Displays warning message box
       
   983 */
   904 */
   984 void InfoWidget::settingsValidationFailed()
   905 void InfoWidget::settingsValidationFailed()
   985 {
   906 {
   986    DPRINT;
   907    DPRINT;
   987    if (m_initialized) {
   908    if (m_initialized) {
   989                hbTrId("txt_operatorwidget_info_select_one"));
   910                hbTrId("txt_operatorwidget_info_select_one"));
   990    }
   911    }
   991 }
   912 }
   992 
   913 
   993 /*!
   914 /*!
   994    InfoWidget::startMarquees()
       
   995    
       
   996    Start marquee animations. 
   915    Start marquee animations. 
   997    First find existing marquee items and 
   916    First find existing marquee items and 
   998    enable marquee sequence
   917    enable marquee sequence. 
   999 */
   918 */
  1000 bool InfoWidget::startMarquees(AnimationStartDelay delay)
   919 bool InfoWidget::startMarquees()
  1001 {  
   920 {  
  1002     DPRINT;
   921     DPRINT;
  1003     bool started(true); 
   922     bool started(true); 
  1004     
   923     
  1005     if (m_animationState == AnimationOngoing || 
   924     if (m_animationState == AnimationOngoing || 
  1007         return false; 
   926         return false; 
  1008         }
   927         }
  1009       
   928       
  1010     int animatingItemsCount = m_animatingItems.count();  
   929     int animatingItemsCount = m_animatingItems.count();  
  1011     if (animatingItemsCount > 0) {
   930     if (animatingItemsCount > 0) {
  1012         HbMarqueeItem *marqueeItem(NULL);  
   931         foreach (HbMarqueeItem *marqueeItem, m_animatingItems) {
  1013         foreach (marqueeItem, m_animatingItems) {
   932             if (marqueeItem) {
  1014             if (animatingItemsCount > 1) {
   933                 if (animatingItemsCount > 1) {
  1015                 // Multiple items, connect to marqueeNext() 
   934                     // Multiple items, connect to marqueeNext() 
  1016                 // sequence logic
   935                     // sequence logic
  1017                 QObject::connect(
   936                     QObject::connect(
  1018                         marqueeItem,SIGNAL(animationStopped()),
   937                             marqueeItem, SIGNAL(animationStopped()),
  1019                         this, SLOT(marqueeNext()), 
   938                             this, SLOT(marqueeNext()), 
  1020                         Qt::UniqueConnection);
   939                             Qt::QueuedConnection);
  1021                 marqueeItem->setLoopCount(1); 
   940                     marqueeItem->setLoopCount(1); 
  1022             } else if (animatingItemsCount ==1 ){
   941                 } else if (animatingItemsCount == 1){
  1023                 // Single item, set continuous marquee mode 
   942                     // Single item, set continuous marquee mode 
  1024                 marqueeItem->setLoopCount(-1); 
   943                     marqueeItem->setLoopCount(-1); 
       
   944                 }
  1025             }
   945             }
  1026         }
   946         }
  1027         
   947         
  1028         // Store marquee sequence start item 
   948         // Store marquee sequence start item 
  1029         m_animatingItem = m_animatingItems.first();
   949         m_animatingItem = m_animatingItems.first();
  1030         
   950         m_animationState = AnimationStarting;
  1031         if (delay == StartNoDelay) {
   951         m_timerId = startTimer(INFOWIDGET_MARQUEE_START_DELAY);
  1032             m_animationState = AnimationOngoing; 
       
  1033             m_animatingItem->startAnimation();
       
  1034         } else if (delay == StartDelayed && !m_timerId) {
       
  1035             m_animationState = AnimationStarting;
       
  1036             m_timerId = startTimer(100);
       
  1037         } 
       
  1038         
       
  1039     } else {
   952     } else {
  1040         // No animating items, not started
   953         DPRINT << ": not started, no animating items";
  1041         DWARNING << ": not done, no animating items";
       
  1042         m_animatingItem = NULL; 
   954         m_animatingItem = NULL; 
  1043         started = false;
   955         started = false;
  1044     }
   956     }
  1045     
       
  1046     return started; 
   957     return started; 
  1047 }
   958 }
  1048 
   959 
  1049 /*!
   960 /*!
  1050    InfoWidget::stopMarquees()
       
  1051    
       
  1052    Stop all marquee animations and reset 
   961    Stop all marquee animations and reset 
  1053    animation state
   962    animation state. 
  1054 */
   963 */
  1055 void InfoWidget::stopMarquees()
   964 void InfoWidget::stopMarquees()
  1056 {  
   965 {  
  1057     DPRINT;
   966     DPRINT;
  1058     if (m_animationState != AnimationIdle && 
   967     if (m_animationState != AnimationIdle && 
  1059         m_animatingItems.count() > 0) {
   968         m_animatingItems.count() > 0) {
  1060         HbMarqueeItem *marqueeItem(NULL);
   969         foreach (HbMarqueeItem *marqueeItem, m_animatingItems) {
  1061         
   970             if (marqueeItem) {
  1062         foreach (marqueeItem, m_animatingItems) {
       
  1063             
       
  1064             // Disconnect if more than one item, 
       
  1065             // single animator doesn't connect to animationStopped() 
       
  1066             if (m_animatingItems.count() > 1) {
       
  1067                 QObject::disconnect(
   971                 QObject::disconnect(
  1068                     marqueeItem, SIGNAL(animationStopped()),
   972                     marqueeItem, SIGNAL(animationStopped()),
  1069                     this, SLOT(marqueeNext()));
   973                     this, SLOT(marqueeNext()));
  1070             }
   974                 
  1071             
   975                 if (marqueeItem->isAnimating()) {
  1072             if (marqueeItem->isAnimating()) {
   976                     marqueeItem->stopAnimation();
  1073                 marqueeItem->stopAnimation();
   977                 }
  1074             }
   978             }
  1075         }
   979         }
  1076     }
   980     }
  1077     
   981     
  1078     // Stop timer 
   982     // Stop timer 
  1085     m_animatingItems.clear();
   989     m_animatingItems.clear();
  1086     m_animatingItem = NULL; 
   990     m_animatingItem = NULL; 
  1087 }
   991 }
  1088 
   992 
  1089 /*!
   993 /*!
  1090    InfoWidget::marqueeNext()
       
  1091    
       
  1092    Starts marquee animation for 
   994    Starts marquee animation for 
  1093    next item in sequence.  
   995    next item in sequence.  
  1094 */
   996 */
  1095 void InfoWidget::marqueeNext()
   997 void InfoWidget::marqueeNext()
  1096 {  
   998 {  
  1115                 m_animatingItem->setLoopCount(1); 
  1017                 m_animatingItem->setLoopCount(1); 
  1116                 m_animatingItem->startAnimation();
  1018                 m_animatingItem->startAnimation();
  1117             }
  1019             }
  1118         }
  1020         }
  1119     }
  1021     }
  1120     
       
  1121 }
  1022 }
  1122 
  1023 
  1123 // End of File. 
  1024 // End of File. 
  1124 
  1025