mpviewplugins/mpplaybackviewplugin/src/mpplaybackview.cpp
changeset 51 560ce2306a17
parent 45 612c4815aebe
child 55 f3930dda3342
--- a/mpviewplugins/mpplaybackviewplugin/src/mpplaybackview.cpp	Fri Aug 06 16:51:36 2010 -0500
+++ b/mpviewplugins/mpplaybackviewplugin/src/mpplaybackview.cpp	Tue Aug 24 03:36:14 2010 -0500
@@ -24,6 +24,7 @@
 #include <hbtoolbutton.h>
 #include <hbaction.h>
 #include <hbicon.h>
+#include <hbmessagebox.h>
 
 #include "mpplaybackview.h"
 #include "mpplaybackwidget.h"
@@ -102,6 +103,7 @@
     connect( mSoftKeyBack, SIGNAL( triggered() ), this, SLOT( back() ) );
 
     mMpEngine = MpEngineFactory::sharedEngine();
+    connect( mMpEngine, SIGNAL( corruptedStop() ), this, SLOT(showCorruptedNote() ));
     mPlaybackData = mMpEngine->playbackData();
     connect( mPlaybackData, SIGNAL( playbackStateChanged() ),
              this, SLOT( playbackStateChanged() ) );
@@ -563,6 +565,19 @@
 }
 
 /*!
+ Slot to be called to show corrupted message box.
+ */
+void MpPlaybackView::showCorruptedNote()
+{
+    mMpEngine->stop();
+    HbMessageBox *messageBox = new HbMessageBox( hbTrId( "txt_mus_info_unable_to_play_selection" ), HbMessageBox::MessageTypeWarning );
+    messageBox->setAttribute( Qt::WA_DeleteOnClose );
+    messageBox->setIcon( HbIcon( QString("qtg_small_fail") ) ); 
+    connect (messageBox, SIGNAL( aboutToClose() ), this, SLOT( back() ) );
+    messageBox->show();
+}
+
+/*!
  Slot to be called to activate equalizer dialog.
  */
 void MpPlaybackView::showEqualizerDialog()