qtinternetradio/ui/src/ircategoryview.cpp
changeset 8 3b03c28289e6
parent 5 0930554dc389
child 11 f683e24efca3
equal deleted inserted replaced
5:0930554dc389 8:3b03c28289e6
   202         break;
   202         break;
   203     }
   203     }
   204     
   204     
   205     if (!cache)
   205     if (!cache)
   206     {
   206     {
   207         iApplication->createLoadingDialog(this, SLOT(cancelRequest()));
   207         iApplication->startLoadingAnimation(this, SLOT(cancelRequest()));
   208     }
   208     }
   209 }
   209 }
   210 
   210 
   211 void IRCategoryView::storeCurrentItem()
   211 void IRCategoryView::storeCurrentItem()
   212 {
   212 {
   262             }
   262             }
   263 
   263 
   264             connectToIsdsClient();
   264             connectToIsdsClient();
   265             bool cache = false;
   265             bool cache = false;
   266             iIsdsClient->isdsCategoryRequest(request, cache);
   266             iIsdsClient->isdsCategoryRequest(request, cache);
   267             iApplication->createLoadingDialog(this, SLOT(cancelRequest()));
   267             iApplication->startLoadingAnimation(this, SLOT(cancelRequest()));
   268         }
   268         }
   269         //for there may be some cache, and when we click, we need to handle here        
   269         //for there may be some cache, and when we click, we need to handle here        
   270         else if ( EIR_UseNetwork_SelectItem == getUseNetworkReason())
   270         else if ( EIR_UseNetwork_SelectItem == getUseNetworkReason())
   271         {
   271         {
   272             handleItemSelected();               
   272             handleItemSelected();               
   350  * 
   350  * 
   351  */
   351  */
   352 void IRCategoryView::dataChanged()
   352 void IRCategoryView::dataChanged()
   353 {
   353 {
   354     disconnectIsdsClient();
   354     disconnectIsdsClient();
   355     iApplication->closeLoadingDialog();
   355     iApplication->stopLoadingAnimation();
   356 
   356 
   357     iListView->reset();
   357     iListView->reset();
   358     iListView->setCurrentIndex(iModel->index(iLastSelectItem));
   358     iListView->setCurrentIndex(iModel->index(iLastSelectItem));
   359     iListView->scrollTo(iModel->index(iLastSelectItem));
   359     iListView->scrollTo(iModel->index(iLastSelectItem));
   360     getViewManager()->activateView(this);
   360     getViewManager()->activateView(this);
   366  */
   366  */
   367 void IRCategoryView::cancelRequest()
   367 void IRCategoryView::cancelRequest()
   368 {
   368 {
   369     iIsdsClient->isdsCancelRequest();
   369     iIsdsClient->isdsCancelRequest();
   370     disconnectIsdsClient();
   370     disconnectIsdsClient();
   371     iApplication->closeLoadingDialog();
   371     iApplication->stopLoadingAnimation();
   372     
   372     
   373     //if this function is called and this view is current view, it indicates that this view is starting view and 
   373     //if this function is called and this view is current view, it indicates that this view is starting view and 
   374     //data has not been loaded yet, so we need to back to collections view
   374     //data has not been loaded yet, so we need to back to collections view
   375     if (getViewManager()->currentView() == this)
   375     if (getViewManager()->currentView() == this)
   376     {
   376     {
   383  * Parameters   : aError : see the definition of IRQError
   383  * Parameters   : aError : see the definition of IRQError
   384  */
   384  */
   385 void IRCategoryView::operationException(IRQError aError)
   385 void IRCategoryView::operationException(IRQError aError)
   386 {
   386 {
   387     Q_UNUSED(aError);
   387     Q_UNUSED(aError);
   388     iApplication->closeLoadingDialog();
   388     iApplication->stopLoadingAnimation();
   389 
   389 
   390     disconnectIsdsClient();
   390     disconnectIsdsClient();
   391     
   391     
   392     popupNote(hbTrId("txt_irad_info_failed_to_connect"), HbMessageBox::MessageTypeWarning);
   392     popupNote(hbTrId("txt_irad_info_failed_to_connect"), HbMessageBox::MessageTypeWarning);
   393     
   393