qtinternetradio/irhswidgetplugin/src/irhswidget.cpp
changeset 14 896e9dbc5f19
parent 12 608f67c22514
child 15 065198191975
--- a/qtinternetradio/irhswidgetplugin/src/irhswidget.cpp	Tue Jul 06 14:07:20 2010 +0300
+++ b/qtinternetradio/irhswidgetplugin/src/irhswidget.cpp	Wed Aug 18 09:40:26 2010 +0300
@@ -19,6 +19,7 @@
 #include <HbFrameDrawer>
 #include <HbFrameItem>
 #include <QGraphicsLinearLayout>
+#include <QTimer>
 
 // User includes
 #include "irhswidget.h"
@@ -31,6 +32,8 @@
 static const int KIrHsWidgetContentsMargin = 0;
 static const QString KIrHsWidgetBackgroundImage = "qtg_fr_hswidget_normal";
 
+static const int KLaunchLatency = 100; // ms, used for launch nowplyaing view later
+
 // ======== MEMBER FUNCTIONS ========
 // Constructor
 IrHsWidget::IrHsWidget(QGraphicsItem* aParent, Qt::WindowFlags aFlags)
@@ -172,6 +175,11 @@
     enableUserAction();          
 }
 
+void IrHsWidget::launchNowplayingView()
+{
+    mServiceClient->launchIrNowPlaying();  
+}
+
 // ================ handle user press event ===============
 void IrHsWidget::handleCommonAreaAction()
 {
@@ -206,7 +214,8 @@
     switch (mIrState)
     {
         case IrAppState::NoRunStopped:
-            mServiceClient->launchIrNowPlaying();           
+            loadLoadingLayout();
+            QTimer::singleShot(KLaunchLatency, this, SLOT(launchNowplayingView()));
             break;
                     
         case IrAppState::RunningStopped: