equal
deleted
inserted
replaced
774 //--------------------------------------------------------------- |
774 //--------------------------------------------------------------- |
775 void MsgUnifiedEditorBody::setFocus() |
775 void MsgUnifiedEditorBody::setFocus() |
776 { |
776 { |
777 mTextEdit->setFocus(Qt::MouseFocusReason); |
777 mTextEdit->setFocus(Qt::MouseFocusReason); |
778 } |
778 } |
|
779 |
|
780 //--------------------------------------------------------------- |
|
781 // MsgUnifiedEditorBody :: removeMediaContent |
|
782 // @see header file |
|
783 //--------------------------------------------------------------- |
|
784 void MsgUnifiedEditorBody::removeMediaContent(QString fileName) |
|
785 { |
|
786 if(!(mImageFile.compare(fileName))) //remove image |
|
787 { |
|
788 mImageFile.clear(); |
|
789 if(mPixmapItem) |
|
790 { |
|
791 mPixmapItem->setParent(NULL); |
|
792 delete mPixmapItem; |
|
793 mPixmapItem = NULL; |
|
794 } |
|
795 setImage(false); |
|
796 mImageSize = 0; |
|
797 } |
|
798 else if(!(mAudioFile.compare(fileName)))//remove audio item |
|
799 { |
|
800 mAudioFile.clear(); |
|
801 if(mAudioItem) |
|
802 { |
|
803 mAudioItem->setParent(NULL); |
|
804 delete mAudioItem; |
|
805 mAudioItem = NULL; |
|
806 } |
|
807 setAudio(false); |
|
808 mAudioSize = 0; |
|
809 } |
|
810 |
|
811 this->repolish(); |
|
812 |
|
813 emit contentChanged(); |
|
814 } |
779 // EOF |
815 // EOF |