qtinternetradio/ui/src/irstationsview.cpp
changeset 3 ee64f059b8e1
parent 2 2e1adbfc62af
child 5 0930554dc389
--- a/qtinternetradio/ui/src/irstationsview.cpp	Mon May 03 12:25:23 2010 +0300
+++ b/qtinternetradio/ui/src/irstationsview.cpp	Fri May 14 15:43:29 2010 +0300
@@ -18,8 +18,9 @@
 #include <hblistview.h>
 #include <hbaction.h>
 #include <QTimer>
+#include <hbprogressdialog.h>
 
-#include "irabstractviewmanager.h"
+#include "irviewmanager.h"
 #include "irstationsview.h"
 #include "irapplication.h"
 #include "irplaycontroller.h"
@@ -42,9 +43,13 @@
                                : IrAbstractListViewBase(aApplication, aViewId),
                                iLogoPreset(NULL),  iPreset(NULL), 
                                iWaitDialog(NULL),
-                               iViewParameter(EIRViewPara_InvalidId),iLastSelectitem(0),
+                               iLastSelectitem(0),
                                iLastPopularItem(0)                          
 {       
+    //this view won't be starting view, don't need lazy init
+    IrAbstractListViewBase::lazyInit();
+    setInitCompleted(true);
+        
     iIconIndexArray.clear();
     iChannelModel = new IrChannelModel(this);
     iListView->setModel(iChannelModel);
@@ -81,16 +86,6 @@
  
 }
 
-void IRStationsView::setViewParameter(TIRViewParameter aParameter)
-{
-    iViewParameter = aParameter;
-}
-
-TIRViewParameter IRStationsView::getViewParameter() const
-{
-    return iViewParameter;
-}
-
 void IRStationsView::loadCategoryStations(int aIndex, const QString &aHeadingText)
 {
     connectToIsdsClient();
@@ -177,6 +172,11 @@
         connect(iIsdsClient, SIGNAL(presetLogoDownloadError()),
                 this, SLOT(presetLogoDownloadError()));
         
+        leftCount = iIconIndexArray.count();
+        if( leftCount > 0 )
+        {
+            iConvertTimer->start();
+        }
         ret = EIR_NoDefault;
         break;
         
@@ -198,16 +198,7 @@
                    this, SLOT(presetLogoDownloadError()));        
         ret = EIR_NoDefault;
         break;
-        
-    case EIR_ViewCommand_EffectFinished:
-        /* when the effect is finished, we start showing the logos  */
-        leftCount = iIconIndexArray.count();
-        if( leftCount > 0 )
-        {
-            iConvertTimer->start();
-        }
-        break;
- 
+
     default:
         break;
     }
@@ -538,11 +529,11 @@
                this, SLOT(operationException(IRQError)));
 }
 
-void IRStationsView::createWaitDialog(QString aStr)
+void IRStationsView::createWaitDialog(const QString &aStr)
 {
     if (!iWaitDialog)
     {
-        iWaitDialog = new HbMessageBox(aStr, HbMessageBox::MessageTypeInformation);
+        iWaitDialog = new HbProgressDialog(HbProgressDialog::WaitDialog);
         iWaitDialog->setTimeout(HbPopup::NoTimeout);
         iWaitDialog->setModal(true);
         iWaitDialog->setDismissPolicy(HbPopup::NoDismiss);
@@ -552,6 +543,7 @@
         connect(action, SIGNAL(triggered()), this, SLOT(cancelRequest()));
     }
 
+    iWaitDialog->setText(aStr);
     iWaitDialog->open();
 }