mpviewplugins/mpdetailsviewplugin/src/mpdetailsview.cpp
changeset 51 560ce2306a17
parent 47 4cc1412daed0
equal deleted inserted replaced
47:4cc1412daed0 51:560ce2306a17
   174 
   174 
   175     mSoftKeyBack = new HbAction( Hb::BackNaviAction, this );
   175     mSoftKeyBack = new HbAction( Hb::BackNaviAction, this );
   176 
   176 
   177     mMpEngine = MpEngineFactory::sharedEngine();
   177     mMpEngine = MpEngineFactory::sharedEngine();
   178     mSongData = mMpEngine->songData();
   178     mSongData = mMpEngine->songData();
   179 
       
   180     // TODO: might need later
       
   181     setupMenu();
       
   182     mMpQueryManager = new MpQueryManager();
   179     mMpQueryManager = new MpQueryManager();
   183 
   180 
   184     connect( mSoftKeyBack, SIGNAL( triggered() ), this, SLOT( back() ) );
   181     connect( mSoftKeyBack, SIGNAL( triggered() ), this, SLOT( back() ) );
   185     connect( mSongData, SIGNAL( albumArtReady() ), this, SLOT( albumArtChanged() ) );
   182     connect( mSongData, SIGNAL( albumArtReady() ), this, SLOT( albumArtChanged() ) );
   186     connect( mSongData, SIGNAL( playbackInfoChanged() ), this, SLOT( handlePlaybackInfoChanged() ) );
   183     connect( mSongData, SIGNAL( playbackInfoChanged() ), this, SLOT( handlePlaybackInfoChanged() ) );
   189     connect( mSongDetailsGroupBox, SIGNAL( toggled( bool ) ), this, SLOT( handleDetailsGroupBoxToggled( bool ) ) );
   186     connect( mSongDetailsGroupBox, SIGNAL( toggled( bool ) ), this, SLOT( handleDetailsGroupBoxToggled( bool ) ) );
   190     connect( mInspireMeGroupBox, SIGNAL( toggled( bool ) ), this, SLOT( handleInspireMeGroupBoxToggled( bool ) ) );
   187     connect( mInspireMeGroupBox, SIGNAL( toggled( bool ) ), this, SLOT( handleInspireMeGroupBoxToggled( bool ) ) );
   191     connect( mMpQueryManager, SIGNAL(inspireMeItemsMetadataRetrieved()), this, SLOT(renderInspireMeMetadata()));
   188     connect( mMpQueryManager, SIGNAL(inspireMeItemsMetadataRetrieved()), this, SLOT(renderInspireMeMetadata()));
   192     connect( mMpQueryManager, SIGNAL(inspireMeItemAlbumArtReady()), this, SLOT(renderInspireMeAlbumArts()));    
   189     connect( mMpQueryManager, SIGNAL(inspireMeItemAlbumArtReady()), this, SLOT(renderInspireMeAlbumArts()));    
   193     connect( mMpQueryManager, SIGNAL(localMusicStoreRetrieved(bool)), this, SLOT(queryInspireMe(bool)), Qt::QueuedConnection);
   190     connect( mMpQueryManager, SIGNAL(localMusicStoreRetrieved(bool)), this, SLOT(queryInspireMe(bool)), Qt::QueuedConnection);
   194     connect( mMpQueryManager, SIGNAL(localMusicStoreRetrievalError()), this, SLOT(abortInspireMeProcess()));
   191 	connect( mMpQueryManager, SIGNAL(localMusicStoreRetrievalError()), this, SLOT(abortInspireMeProcess()));
   195     connect( mMpQueryManager, SIGNAL(inspireMeItemsRetrievalError()), this, SLOT(queryLocalMusicStore()), Qt::QueuedConnection);
   192     connect( mMpQueryManager, SIGNAL(inspireMeItemsRetrievalError()), this, SLOT(queryLocalMusicStore()), Qt::QueuedConnection);
   196 
   193 
   197     TX_EXIT
   194     TX_EXIT
   198 }
   195 }
   199 
   196 
   251     }
   248     }
   252     TX_EXIT      
   249     TX_EXIT      
   253 }
   250 }
   254  
   251  
   255 /*!
   252 /*!
   256  Setup the menu.
       
   257  */
       
   258 void MpDetailsView::setupMenu()
       
   259 {
       
   260     TX_ENTRY
       
   261 
       
   262     TX_EXIT
       
   263 }
       
   264 
       
   265 /*!
       
   266  Slot to handle back command from softkey.
   253  Slot to handle back command from softkey.
   267  */
   254  */
   268 void MpDetailsView::back()
   255 void MpDetailsView::back()
   269 {
   256 {
   270     TX_ENTRY
   257     TX_ENTRY
   285 }
   272 }
   286 
   273 
   287 /*!
   274 /*!
   288  Slot to handle network error.
   275  Slot to handle network error.
   289  */
   276  */
   290 void MpDetailsView::abortInspireMeProcess()
   277 void MpDetailsView::abortInspireMeProcess( )
   291 {
   278 {
   292     TX_ENTRY
   279     TX_ENTRY
   293     mInspireMeProgressBar->hide();    
   280     mInspireMeProgressBar->hide();    
   294     mInspireMeGroupBox->setCollapsed( true );    
   281     mInspireMeGroupBox->setCollapsed( true );    
   295     mInspireMeQueryOngoing = false;
   282     mInspireMeQueryOngoing = false;