434 int imageSize=0; |
434 int imageSize=0; |
435 QString mimeType; |
435 QString mimeType; |
436 TMsgMediaType mediaType = EMsgMediaUnknown; |
436 TMsgMediaType mediaType = EMsgMediaUnknown; |
437 QString filePath = messageDetails->attachments().at(i)->filePath(); |
437 QString filePath = messageDetails->attachments().at(i)->filePath(); |
438 |
438 |
439 UniEditorGenUtils* genUtils = NULL; |
439 |
440 QT_TRAP_THROWING(genUtils = new UniEditorGenUtils); |
440 UniEditorGenUtils* genUtils = q_check_ptr(new UniEditorGenUtils); |
441 |
441 |
442 TRAP_IGNORE(genUtils->getFileInfoL(filePath,imageSize, |
442 TRAP_IGNORE(genUtils->getFileInfoL(filePath,imageSize, |
443 mimeType,mediaType)); |
443 mimeType,mediaType)); |
444 delete genUtils; |
444 delete genUtils; |
445 switch(mediaType) |
445 switch(mediaType) |
514 mBody->setText(bodyTxt); |
514 mBody->setText(bodyTxt); |
515 |
515 |
516 ConvergedMessageAttachmentList attachmentList = |
516 ConvergedMessageAttachmentList attachmentList = |
517 messageDetails.attachments(); |
517 messageDetails.attachments(); |
518 int attachmentCount = attachmentList.count(); |
518 int attachmentCount = attachmentList.count(); |
519 |
519 |
520 UniEditorGenUtils* genUtils = NULL; |
520 UniEditorGenUtils* genUtils = q_check_ptr(new UniEditorGenUtils); |
521 QT_TRAP_THROWING(genUtils = new UniEditorGenUtils); |
|
522 |
521 |
523 QStringList pendingAttList; |
522 QStringList pendingAttList; |
524 for( int i=0; i < attachmentCount; i++ ) |
523 for( int i=0; i < attachmentCount; i++ ) |
525 { |
524 { |
526 QString filePath = messageDetails.attachments().at(i)->filePath(); |
525 QString filePath = messageDetails.attachments().at(i)->filePath(); |
573 HbToolBar *toolBar = new HbToolBar(); |
572 HbToolBar *toolBar = new HbToolBar(); |
574 toolBar->setOrientation(Qt::Horizontal); |
573 toolBar->setOrientation(Qt::Horizontal); |
575 |
574 |
576 //tool bar extension for attach action. |
575 //tool bar extension for attach action. |
577 HbToolBarExtension* attachExtension = new HbToolBarExtension(); |
576 HbToolBarExtension* attachExtension = new HbToolBarExtension(); |
578 HbAction *attachAction = toolBar->addExtension(attachExtension); |
577 mAttachAction = toolBar->addExtension(attachExtension); |
579 attachAction->setIcon(HbIcon(ATTACH_ICON)); |
578 mAttachAction->setIcon(HbIcon(ATTACH_ICON)); |
580 |
579 |
581 mTBExtnContentWidget = new HbListWidget(); |
580 mTBExtnContentWidget = new HbListWidget(); |
582 mTBExtnContentWidget->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Fixed); |
581 mTBExtnContentWidget->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Fixed); |
583 mTBExtnContentWidget->addItem(LOC_PHOTO); |
582 mTBExtnContentWidget->addItem(LOC_PHOTO); |
584 mTBExtnContentWidget->addItem(LOC_SOUND); |
583 mTBExtnContentWidget->addItem(LOC_SOUND); |
671 style()->parameter("hb-param-margin-gene-middle-vertical",vItemSpacing); |
670 style()->parameter("hb-param-margin-gene-middle-vertical",vItemSpacing); |
672 ccBccLayout->setSpacing(vItemSpacing); |
671 ccBccLayout->setSpacing(vItemSpacing); |
673 ccBccLayout->addItem(mCcField); |
672 ccBccLayout->addItem(mCcField); |
674 ccBccLayout->addItem(mBccField); |
673 ccBccLayout->addItem(mBccField); |
675 |
674 |
676 HbGroupBox* groupBox = new HbGroupBox(0); |
675 HbGroupBox* groupBox = new HbGroupBox(0); |
677 groupBox->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Preferred); |
676 groupBox->setObjectName("groupBox"); |
678 |
677 |
679 groupBox->setContentWidget(groupWidget); |
678 groupBox->setContentWidget(groupWidget); |
680 groupBox->setHeading(LOC_OTHER_RECIPIENTS_EXPAND); |
679 groupBox->setHeading(LOC_OTHER_RECIPIENTS_EXPAND); |
681 mMainLayout->insertItem(1,groupBox); |
680 mMainLayout->insertItem(1,groupBox); |
682 connect(groupBox, SIGNAL(toggled(bool)), this, SLOT(updateOtherRecipientCount(bool))); |
681 connect(groupBox, SIGNAL(toggled(bool)), this, SLOT(updateOtherRecipientCount(bool))); |
1527 |
1526 |
1528 connect(mVkbHost,SIGNAL(keypadOpened()),this,SLOT(vkbOpened())); |
1527 connect(mVkbHost,SIGNAL(keypadOpened()),this,SLOT(vkbOpened())); |
1529 } |
1528 } |
1530 |
1529 |
1531 //--------------------------------------------------------------- |
1530 //--------------------------------------------------------------- |
|
1531 // MsgUnifiedEditorView::vkbAboutToOpen |
|
1532 // @see header file |
|
1533 //--------------------------------------------------------------- |
|
1534 void MsgUnifiedEditorView::vkbAboutToOpen() |
|
1535 { |
|
1536 //This is done to avoid user action on attachment |
|
1537 //toolbar button when vkb is opening |
|
1538 mAttachAction->setDisabled(true); |
|
1539 disconnect(mVkbHost,SIGNAL(aboutToOpen()), |
|
1540 this,SLOT(vkbAboutToOpen())); |
|
1541 } |
|
1542 |
|
1543 //--------------------------------------------------------------- |
|
1544 // MsgUnifiedEditorView::vkbAboutToClose |
|
1545 // @see header file |
|
1546 //--------------------------------------------------------------- |
|
1547 void MsgUnifiedEditorView::vkbAboutToClose() |
|
1548 { |
|
1549 mAttachAction->setDisabled(false); |
|
1550 connect(mVkbHost,SIGNAL(aboutToOpen()), |
|
1551 this,SLOT(vkbAboutToOpen())); |
|
1552 } |
|
1553 //--------------------------------------------------------------- |
1532 // MsgUnifiedEditorView::hideChrome |
1554 // MsgUnifiedEditorView::hideChrome |
1533 // |
1555 // |
1534 //--------------------------------------------------------------- |
1556 //--------------------------------------------------------------- |
1535 void MsgUnifiedEditorView::hideChrome(bool hide) |
1557 void MsgUnifiedEditorView::hideChrome(bool hide) |
1536 { |
1558 { |
1557 |
1579 |
1558 //Create VKB instance and listen to VKB open and close signals. |
1580 //Create VKB instance and listen to VKB open and close signals. |
1559 mVkbHost = new HbAbstractVkbHost(this); |
1581 mVkbHost = new HbAbstractVkbHost(this); |
1560 connect(mVkbHost, SIGNAL(keypadOpened()), this, SLOT(vkbOpened())); |
1582 connect(mVkbHost, SIGNAL(keypadOpened()), this, SLOT(vkbOpened())); |
1561 connect(mVkbHost, SIGNAL(keypadClosed()), this, SLOT(vkbClosed())); |
1583 connect(mVkbHost, SIGNAL(keypadClosed()), this, SLOT(vkbClosed())); |
|
1584 connect(mVkbHost,SIGNAL(aboutToOpen()),this,SLOT(vkbAboutToOpen())); |
|
1585 connect(mVkbHost,SIGNAL(aboutToClose()),this,SLOT(vkbAboutToClose())); |
1562 |
1586 |
1563 disconnect(this->mainWindow(),SIGNAL(viewReady()),this,SLOT(doDelayedConstruction())); |
1587 disconnect(this->mainWindow(),SIGNAL(viewReady()),this,SLOT(doDelayedConstruction())); |
1564 |
1588 |
1565 } |
1589 } |
1566 |
1590 |