--- a/messagingapp/msgui/unifiededitor/src/msgunieditorbody.cpp Wed Aug 18 00:46:12 2010 +0530
+++ b/messagingapp/msgui/unifiededitor/src/msgunieditorbody.cpp Tue Aug 31 18:53:38 2010 +0530
@@ -776,4 +776,40 @@
{
mTextEdit->setFocus(Qt::MouseFocusReason);
}
+
+//---------------------------------------------------------------
+// MsgUnifiedEditorBody :: removeMediaContent
+// @see header file
+//---------------------------------------------------------------
+void MsgUnifiedEditorBody::removeMediaContent(QString fileName)
+{
+ if(!(mImageFile.compare(fileName))) //remove image
+ {
+ mImageFile.clear();
+ if(mPixmapItem)
+ {
+ mPixmapItem->setParent(NULL);
+ delete mPixmapItem;
+ mPixmapItem = NULL;
+ }
+ setImage(false);
+ mImageSize = 0;
+ }
+ else if(!(mAudioFile.compare(fileName)))//remove audio item
+ {
+ mAudioFile.clear();
+ if(mAudioItem)
+ {
+ mAudioItem->setParent(NULL);
+ delete mAudioItem;
+ mAudioItem = NULL;
+ }
+ setAudio(false);
+ mAudioSize = 0;
+ }
+
+ this->repolish();
+
+ emit contentChanged();
+}
// EOF