radioapp/radiowidgets/src/radiomainview.cpp
changeset 39 ac7857bd5fdb
parent 38 f8c3d4e6102c
child 44 0a3ad94fc71c
equal deleted inserted replaced
38:f8c3d4e6102c 39:ac7857bd5fdb
    86     } else {
    86     } else {
    87         loadSection( DOCML::FILE_MAINVIEW, DOCML::MV_SECTION_NORMAL );
    87         loadSection( DOCML::FILE_MAINVIEW, DOCML::MV_SECTION_NORMAL );
    88         updateFavoriteButton();
    88         updateFavoriteButton();
    89         mFrequencyScanner.take();
    89         mFrequencyScanner.take();
    90 
    90 
    91 //        const bool firsTimeStart = mUiEngine->isFirstTimeStart();
    91         const bool firsTimeStart = mUiEngine->isFirstTimeStart();
    92         const bool firsTimeStart = false; // TODO! RadioServer terminates. Fix available in NCP 25 or 27.
       
    93         const int rowCount = mUiEngine->stationModel().rowCount();
    92         const int rowCount = mUiEngine->stationModel().rowCount();
    94         if ( firsTimeStart && rowCount != 0 ) {
    93         if ( firsTimeStart && rowCount != 0 ) {
    95             mUiEngine->setFirstTimeStartPerformed( true );
    94             mUiEngine->setFirstTimeStartPerformed( true );
    96         }
    95         }
    97     }
    96     }
   188     Radio::connect( backAction,     SIGNAL(triggered()),
   187     Radio::connect( backAction,     SIGNAL(triggered()),
   189                     mMainWindow,    SLOT(lower()) );
   188                     mMainWindow,    SLOT(lower()) );
   190 #endif // BUILD_WIN32
   189 #endif // BUILD_WIN32
   191     setNavigationAction( backAction );
   190     setNavigationAction( backAction );
   192 
   191 
   193 //    const bool firsTimeStart = mUiEngine->isFirstTimeStart();
   192     const bool firsTimeStart = mUiEngine->isFirstTimeStart();
   194     const bool firsTimeStart = false; // TODO! RadioServer terminates. Fix available in NCP 25 or 27.
       
   195     const int rowCount = mUiEngine->stationModel().rowCount();
   193     const int rowCount = mUiEngine->stationModel().rowCount();
   196     if ( firsTimeStart && rowCount == 0 ){
   194     if ( firsTimeStart && rowCount == 0 ){
   197         QTimer::singleShot( 100, this, SLOT(toggleScanning()) );
   195         QTimer::singleShot( 100, this, SLOT(toggleScanning()) );
   198     }
   196     }
   199 
   197 
   420 /*!
   418 /*!
   421  * Private slot
   419  * Private slot
   422  */
   420  */
   423 void RadioMainView::handleFavoriteChange( const RadioStation& station )
   421 void RadioMainView::handleFavoriteChange( const RadioStation& station )
   424 {
   422 {
   425     mFrequencyStrip->updateFavorite( station );
   423     mFrequencyStrip->updateFavorite( station.frequency() );
   426     updateFavoriteButton();
   424     updateFavoriteButton();
   427 }
   425 }
   428 
   426 
   429 /*!
   427 /*!
   430  * Private slot
   428  * Private slot