--- a/messagingapp/msgui/unifiededitor/src/msgunieditorbody.cpp Thu Sep 02 20:23:03 2010 +0300
+++ b/messagingapp/msgui/unifiededitor/src/msgunieditorbody.cpp Fri Sep 17 08:28:39 2010 +0300
@@ -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