messagingapp/msgui/conversationview/src/msgconversationviewitem.cpp
changeset 67 fc91263aee62
parent 56 f42d9a78f435
child 76 60a8a215b0ec
equal deleted inserted replaced
65:d8ac8e5e4721 67:fc91263aee62
   129 #ifdef _DEBUG_TRACES_
   129 #ifdef _DEBUG_TRACES_
   130     qCritical() << "END MsgConversationViewItem::updateChildItems: "
   130     qCritical() << "END MsgConversationViewItem::updateChildItems: "
   131             << index.data(ConvergedMsgId).toInt();
   131             << index.data(ConvergedMsgId).toInt();
   132 #endif
   132 #endif
   133 
   133 
   134     repolish();
       
   135     HbListViewItem::updateChildItems();
   134     HbListViewItem::updateChildItems();
   136     }
   135     }
   137 
   136 
   138 //---------------------------------------------------------------
   137 //---------------------------------------------------------------
   139 // MsgConversationViewItem::updateSmsTypeItem
   138 // MsgConversationViewItem::updateSmsTypeItem
   182         QString bodyText = index.data(BodyText).toString();
   181         QString bodyText = index.data(BodyText).toString();
   183         bodyText.replace(QChar::ParagraphSeparator, QChar::LineSeparator);
   182         bodyText.replace(QChar::ParagraphSeparator, QChar::LineSeparator);
   184         bodyText.replace('\r', QChar::LineSeparator);
   183         bodyText.replace('\r', QChar::LineSeparator);
   185         mConversation->setBodyText(bodyText);
   184         mConversation->setBodyText(bodyText);
   186         }
   185         }
   187     
       
   188     //repolish
       
   189     mConversation->repolishWidget();
       
   190     }
   186     }
   191 
   187 
   192 //---------------------------------------------------------------
   188 //---------------------------------------------------------------
   193 // MsgConversationViewItem::updateMmsTypeItem
   189 // MsgConversationViewItem::updateMmsTypeItem
   194 // @see header file
   190 // @see header file
   375         mConversation->setPriority(priority);
   371         mConversation->setPriority(priority);
   376         mConversation->setSubject(subject);
   372         mConversation->setSubject(subject);
   377         mConversation->setBodyText(bodyText);
   373         mConversation->setBodyText(bodyText);
   378         }
   374         }
   379     
   375     
   380     //repolish widget
       
   381     mConversation->repolishWidget();
       
   382     }
   376     }
   383 
   377 
   384 //---------------------------------------------------------------
   378 //---------------------------------------------------------------
   385 // MsgConversationViewItem::containsPoint
   379 // MsgConversationViewItem::containsPoint
   386 //
   380 //
   431 // @see header file
   425 // @see header file
   432 //---------------------------------------------------------------
   426 //---------------------------------------------------------------
   433 void MsgConversationViewItem::setMessageStateIcon(int messageState)
   427 void MsgConversationViewItem::setMessageStateIcon(int messageState)
   434 {
   428 {
   435     HbIconAnimator& iconAnimator = mOutgoingMsgStateIconItem->animator();
   429     HbIconAnimator& iconAnimator = mOutgoingMsgStateIconItem->animator();
       
   430 	// Register for animation progressed signal to update the pixmap cache 
       
   431 	connect (&iconAnimator, SIGNAL(animationProgressed()), this, SLOT(updatePixmapCache()));
   436 
   432 
   437     switch (messageState)
   433     switch (messageState)
   438     {
   434     {
   439         case ConvergedMessage::Waiting:
   435         case ConvergedMessage::Waiting:
   440         case ConvergedMessage::Scheduled:
   436         case ConvergedMessage::Scheduled:
   477 //---------------------------------------------------------------
   473 //---------------------------------------------------------------
   478 
   474 
   479 void MsgConversationViewItem::setNotificationStateIcon(int notificationState)
   475 void MsgConversationViewItem::setNotificationStateIcon(int notificationState)
   480 {
   476 {
   481     HbIconAnimator& iconAnimator = mIncomingMsgStateIconItem->animator();
   477     HbIconAnimator& iconAnimator = mIncomingMsgStateIconItem->animator();
       
   478 	// Register for animation progressed signal to update the pixmap cache 
       
   479 	connect (&iconAnimator, SIGNAL(animationProgressed()), this, SLOT(updatePixmapCache()));
   482     HbIconAnimationManager* iconAnimationManager =
   480     HbIconAnimationManager* iconAnimationManager =
   483             HbIconAnimationManager::global();
   481             HbIconAnimationManager::global();
   484     switch (notificationState)
   482     switch (notificationState)
   485     {
   483     {
   486         case ConvergedMessage::NotifRetrieving:
   484         case ConvergedMessage::NotifRetrieving:
   530     mOutgoingMsgStateIconItem = new HbIconItem(this);
   528     mOutgoingMsgStateIconItem = new HbIconItem(this);
   531     HbStyle::setItemName(mOutgoingMsgStateIconItem, "msgStateIconOutgoing");
   529     HbStyle::setItemName(mOutgoingMsgStateIconItem, "msgStateIconOutgoing");
   532 
   530 
   533     HbMainWindow *mainWindow = hbInstance->allMainWindows()[0];
   531     HbMainWindow *mainWindow = hbInstance->allMainWindows()[0];
   534 
   532 
   535     connect(mainWindow, SIGNAL(orientationChanged(Qt::Orientation)), this,
       
   536         SLOT(orientationchanged(Qt::Orientation)), Qt::UniqueConnection);
       
   537 
       
   538     // Force polish to get all the sub-item properties right.
   533     // Force polish to get all the sub-item properties right.
   539     polishEvent();
   534     polishEvent();
   540 }
   535 }
   541 
   536 
   542 //---------------------------------------------------------------
   537 //---------------------------------------------------------------
   566         msgTimeStamp = timeStampStr;
   561         msgTimeStamp = timeStampStr;
   567     }
   562     }
   568     return msgTimeStamp;
   563     return msgTimeStamp;
   569 }
   564 }
   570 
   565 
   571 //---------------------------------------------------------------
       
   572 // MsgConversationViewItem::orientationchanged
       
   573 // @see header file
       
   574 //---------------------------------------------------------------
       
   575 void MsgConversationViewItem::orientationchanged(Qt::Orientation orientation)
       
   576 {
       
   577     Q_UNUSED(orientation)
       
   578     QDEBUG_WRITE("MsgConversationViewItem:orientationchanged start.")
       
   579 
       
   580     repolish();
       
   581 
       
   582     QDEBUG_WRITE("MsgConversationViewItem:orientationchanged end.")
       
   583 }
       
   584 
       
   585 // EOF
   566 // EOF