qtinternetradio/ui/src/irstationsview.cpp
changeset 8 3b03c28289e6
parent 5 0930554dc389
child 12 608f67c22514
equal deleted inserted replaced
5:0930554dc389 8:3b03c28289e6
    85     bool cache = false;
    85     bool cache = false;
    86     iIsdsClient->isdsChannelRequest(aIndex, cache);
    86     iIsdsClient->isdsChannelRequest(aIndex, cache);
    87     
    87     
    88     if (!cache)
    88     if (!cache)
    89     {
    89     {
    90         iApplication->createLoadingDialog(this, SLOT(cancelRequest()));
    90         iApplication->startLoadingAnimation(this, SLOT(cancelRequest()));
    91     }
    91     }
    92 }
    92 }
    93 
    93 
    94 void IRStationsView::storeCurrentItem()
    94 void IRStationsView::storeCurrentItem()
    95 {
    95 {
   176                 connect(iIsdsClient, SIGNAL(operationException(IRQError)),
   176                 connect(iIsdsClient, SIGNAL(operationException(IRQError)),
   177                         this, SLOT(operationException(IRQError)));
   177                         this, SLOT(operationException(IRQError)));
   178                 
   178                 
   179                 //once an item is selected, we show a dialog to prevent user from clicking the
   179                 //once an item is selected, we show a dialog to prevent user from clicking the
   180                 //item again
   180                 //item again
   181                 iApplication->createLoadingDialog(this, SLOT(cancelRequest()));
   181                 iApplication->startLoadingAnimation(this, SLOT(cancelRequest()));
   182                 
   182                 
   183                 if (iIsdsClient->isdsIsChannelBanner())
   183                 if (iIsdsClient->isdsIsChannelBanner())
   184                 {
   184                 {
   185                     iIsdsClient->isdsListenRequest(index + 1);
   185                     iIsdsClient->isdsListenRequest(index + 1);
   186                 }
   186                 }
   216             iIconIndexArray.append(i);
   216             iIconIndexArray.append(i);
   217         }
   217         }
   218     }
   218     }
   219 
   219 
   220     getViewManager()->activateView(this);
   220     getViewManager()->activateView(this);
   221     iApplication->closeLoadingDialog();
   221     iApplication->stopLoadingAnimation();
   222 }
   222 }
   223 
   223 
   224 /*
   224 /*
   225  * Description : the preset of the selected station is received from isds client.
   225  * Description : the preset of the selected station is received from isds client.
   226  *               application is responsible for deleting old preset.
   226  *               application is responsible for deleting old preset.
   246  * Description  : slot function for operation failure. The signal is emitted by isds client
   246  * Description  : slot function for operation failure. The signal is emitted by isds client
   247  * Parameters   : aError : see the definition of IRQError
   247  * Parameters   : aError : see the definition of IRQError
   248  */
   248  */
   249 void IRStationsView::operationException(IRQError aError)
   249 void IRStationsView::operationException(IRQError aError)
   250 {
   250 {
   251     iApplication->closeLoadingDialog();
   251     iApplication->stopLoadingAnimation();
   252 
   252 
   253     disconnectIsdsClient();
   253     disconnectIsdsClient();
   254     QString errorString = hbTrId("txt_irad_info_failed_to_connect");
   254     QString errorString = hbTrId("txt_irad_info_failed_to_connect");
   255     
   255     
   256     switch (aError)
   256     switch (aError)
   275     {
   275     {
   276         iConnectTimer->stop();
   276         iConnectTimer->stop();
   277     }    
   277     }    
   278     iIsdsClient->isdsCancelRequest();
   278     iIsdsClient->isdsCancelRequest();
   279     disconnectIsdsClient();
   279     disconnectIsdsClient();
   280     iApplication->closeLoadingDialog();
   280     iApplication->stopLoadingAnimation();
   281 }
   281 }
   282 
   282 
   283 void IRStationsView::startConvert(int aIndex)
   283 void IRStationsView::startConvert(int aIndex)
   284 {
   284 {
   285     QString url = iChannelModel->imageUrl(aIndex);
   285     QString url = iChannelModel->imageUrl(aIndex);