mpviewplugins/mpplaybackviewplugin/src/mpplaybackview.cpp
changeset 51 560ce2306a17
parent 45 612c4815aebe
child 55 f3930dda3342
equal deleted inserted replaced
47:4cc1412daed0 51:560ce2306a17
    22 #include <hbinstance.h>
    22 #include <hbinstance.h>
    23 #include <hbtoolbar.h>
    23 #include <hbtoolbar.h>
    24 #include <hbtoolbutton.h>
    24 #include <hbtoolbutton.h>
    25 #include <hbaction.h>
    25 #include <hbaction.h>
    26 #include <hbicon.h>
    26 #include <hbicon.h>
       
    27 #include <hbmessagebox.h>
    27 
    28 
    28 #include "mpplaybackview.h"
    29 #include "mpplaybackview.h"
    29 #include "mpplaybackwidget.h"
    30 #include "mpplaybackwidget.h"
    30 #include "mpenginefactory.h"
    31 #include "mpenginefactory.h"
    31 #include "mpplaybackdata.h"
    32 #include "mpplaybackdata.h"
   100 
   101 
   101     mSoftKeyBack = new HbAction( Hb::BackNaviAction, this );
   102     mSoftKeyBack = new HbAction( Hb::BackNaviAction, this );
   102     connect( mSoftKeyBack, SIGNAL( triggered() ), this, SLOT( back() ) );
   103     connect( mSoftKeyBack, SIGNAL( triggered() ), this, SLOT( back() ) );
   103 
   104 
   104     mMpEngine = MpEngineFactory::sharedEngine();
   105     mMpEngine = MpEngineFactory::sharedEngine();
       
   106     connect( mMpEngine, SIGNAL( corruptedStop() ), this, SLOT(showCorruptedNote() ));
   105     mPlaybackData = mMpEngine->playbackData();
   107     mPlaybackData = mMpEngine->playbackData();
   106     connect( mPlaybackData, SIGNAL( playbackStateChanged() ),
   108     connect( mPlaybackData, SIGNAL( playbackStateChanged() ),
   107              this, SLOT( playbackStateChanged() ) );
   109              this, SLOT( playbackStateChanged() ) );
   108 
   110 
   109     mPlaybackWidget = new MpPlaybackWidget( mPlaybackData );
   111     mPlaybackWidget = new MpPlaybackWidget( mPlaybackData );
   561         }
   563         }
   562     }
   564     }
   563 }
   565 }
   564 
   566 
   565 /*!
   567 /*!
       
   568  Slot to be called to show corrupted message box.
       
   569  */
       
   570 void MpPlaybackView::showCorruptedNote()
       
   571 {
       
   572     mMpEngine->stop();
       
   573     HbMessageBox *messageBox = new HbMessageBox( hbTrId( "txt_mus_info_unable_to_play_selection" ), HbMessageBox::MessageTypeWarning );
       
   574     messageBox->setAttribute( Qt::WA_DeleteOnClose );
       
   575     messageBox->setIcon( HbIcon( QString("qtg_small_fail") ) ); 
       
   576     connect (messageBox, SIGNAL( aboutToClose() ), this, SLOT( back() ) );
       
   577     messageBox->show();
       
   578 }
       
   579 
       
   580 /*!
   566  Slot to be called to activate equalizer dialog.
   581  Slot to be called to activate equalizer dialog.
   567  */
   582  */
   568 void MpPlaybackView::showEqualizerDialog()
   583 void MpPlaybackView::showEqualizerDialog()
   569 {
   584 {
   570     TX_ENTRY
   585     TX_ENTRY