messagingapp/msgui/unifiededitor/src/msgattachmentcontainer.cpp
changeset 27 e4592d119491
parent 25 84d9eb65b26f
equal deleted inserted replaced
25:84d9eb65b26f 27:e4592d119491
    32 
    32 
    33 //---------------------------------------------------------------
    33 //---------------------------------------------------------------
    34 // MsgAttachmentContainer::MsgAttachmentContainer
    34 // MsgAttachmentContainer::MsgAttachmentContainer
    35 // @see header file
    35 // @see header file
    36 //---------------------------------------------------------------
    36 //---------------------------------------------------------------
    37 MsgAttachmentContainer::MsgAttachmentContainer( const QString& pluginPath, QGraphicsItem *parent ) :
    37 MsgAttachmentContainer::MsgAttachmentContainer( QGraphicsItem *parent ) :
    38 HbWidget(parent),
    38 HbWidget(parent),
    39 mPluginPath(pluginPath),
       
    40 mIsMMContent(false)
    39 mIsMMContent(false)
    41 {
    40 {
    42     mLayout = new QGraphicsLinearLayout(Qt::Vertical, this);
    41     mLayout = new QGraphicsLinearLayout(Qt::Vertical, this);
    43     mLayout->setContentsMargins(0,0,0,0);
    42     mLayout->setContentsMargins(0,0,0,0);
    44     mLayout->setSpacing(0);
    43     mLayout->setSpacing(0);
    70     int fileSize = fileinfo.size() + KEstimatedMimeHeaderSize;
    69     int fileSize = fileinfo.size() + KEstimatedMimeHeaderSize;
    71     
    70     
    72     if( (fileSize + msgSize) <= MsgMonitor::maxMmsSize())
    71     if( (fileSize + msgSize) <= MsgMonitor::maxMmsSize())
    73     {
    72     {
    74         MsgUnifiedEditorAttachment* att = new MsgUnifiedEditorAttachment(
    73         MsgUnifiedEditorAttachment* att = new MsgUnifiedEditorAttachment(
    75             mPluginPath, filepath, fileSize, this);
    74             filepath, fileSize, this);
    76         if( ((mAttachmentList.count() == 0) && att->isMultimediaContent()) ||
    75         if( ((mAttachmentList.count() == 0) && att->isMultimediaContent()) ||
    77                 ((mAttachmentList.count() == 1) && !mIsMMContent) )
    76                 ((mAttachmentList.count() == 1) && !mIsMMContent) )
    78         {
    77         {
    79             mIsMMContent = true;
    78             mIsMMContent = true;
    80         }
    79         }