radioapp/radiowidgets/src/radioutil.cpp
changeset 32 189d20c34778
parent 28 075425b8d9a4
child 54 a8ba0c289b44
equal deleted inserted replaced
28:075425b8d9a4 32:189d20c34778
    51 bool RadioUtil::addEffects( QEffectList list )
    51 bool RadioUtil::addEffects( QEffectList list )
    52 {
    52 {
    53     bool allAvailable = true;
    53     bool allAvailable = true;
    54     QEffectList added;
    54     QEffectList added;
    55     foreach ( EffectInfo info, list ) {
    55     foreach ( EffectInfo info, list ) {
    56 #ifdef USE_LAYOUT_FROM_E_DRIVE
       
    57         info.mPath.replace( QString( ":/" ), QString( "e:/radiotest/" ) );
       
    58 #endif
       
    59         if ( HbEffect::add( info.mItem, info.mPath, info.mEvent ) ) {
    56         if ( HbEffect::add( info.mItem, info.mPath, info.mEvent ) ) {
    60             added.append( info );
    57             added.append( info );
    61         } else {
    58         } else {
    62             allAvailable = false;
    59             allAvailable = false;
    63             break;
    60             break;
    77 /*!
    74 /*!
    78  *
    75  *
    79  */
    76  */
    80 RadioFrequencyStrip* RadioUtil::frequencyStrip()
    77 RadioFrequencyStrip* RadioUtil::frequencyStrip()
    81 {
    78 {
    82     return instance().mFrequencyStrip;
    79     return instance().mFrequencyStrip.data();
    83 }
    80 }
    84 
    81 
    85 /*!
    82 /*!
    86  *
    83  *
    87  */
    84  */
    88 RadioStationCarousel* RadioUtil::carousel()
    85 RadioStationCarousel* RadioUtil::carousel()
    89 {
    86 {
    90     return instance().mCarousel;
    87     return instance().mCarousel.data();
    91 }
    88 }
    92 
    89 
    93 /*!
    90 /*!
    94  *
    91  *
    95  */
    92  */
    96 bool RadioUtil::isScannerAlive()
    93 bool RadioUtil::isScannerAlive()
    97 {
    94 {
    98     RadioFrequencyScanner* scanner = instance().mScanner;
    95     RadioFrequencyScanner* scanner = instance().mScanner.data();
    99     if ( scanner ) {
    96     if ( scanner ) {
   100         return scanner->isAlive();
    97         return scanner->isAlive();
   101     }
    98     }
   102     return false;
    99     return false;
   103 }
   100 }
   174 {
   171 {
   175     RadioUtil& self = instance();
   172     RadioUtil& self = instance();
   176     if ( !self.mNotificationDialog ) {
   173     if ( !self.mNotificationDialog ) {
   177         self.mNotificationDialog = new HbNotificationDialog();
   174         self.mNotificationDialog = new HbNotificationDialog();
   178     }
   175     }
   179     self.mNotificationDialog->setAttribute( Qt::WA_DeleteOnClose );
   176     self.mNotificationDialog.data()->setAttribute( Qt::WA_DeleteOnClose );
   180     self.mNotificationDialog->setTitle( text );
   177     self.mNotificationDialog.data()->setTitle( text );
   181     self.mNotificationDialog->show();
   178     self.mNotificationDialog.data()->show();
   182 }
   179 }
   183 
   180 
   184 /*!
   181 /*!
   185  *
   182  *
   186  */
   183  */