messagingapp/msgui/conversationview/src/msgconversationviewitem.cpp
changeset 76 60a8a215b0ec
parent 67 fc91263aee62
equal deleted inserted replaced
73:ecf6a73a9186 76:60a8a215b0ec
    26 #include <HbIconAnimationManager>
    26 #include <HbIconAnimationManager>
    27 #include <HbIconAnimator>
    27 #include <HbIconAnimator>
    28 #include <HbExtendedLocale>
    28 #include <HbExtendedLocale>
    29 #include <ccsdefs.h>
    29 #include <ccsdefs.h>
    30 #include <HbInstance>
    30 #include <HbInstance>
       
    31 #include <HbEffect.h>
    31 
    32 
    32 // USER INCLUDES
    33 // USER INCLUDES
    33 #include "msgconversationwidget.h"
    34 #include "msgconversationwidget.h"
    34 #include "msgviewdefines.h"
    35 #include "msgviewdefines.h"
    35 #include "msgviewutils.h"
    36 #include "msgviewutils.h"
   151         {
   152         {
   152         setIncoming(true);
   153         setIncoming(true);
   153         mConversation->setIncoming(true);
   154         mConversation->setIncoming(true);
   154 
   155 
   155         mIncomingMsgStateIconItem->setVisible(false);
   156         mIncomingMsgStateIconItem->setVisible(false);
       
   157         HbEffect::add(this,"chatincoming_appear", "appear");	
   156     }
   158     }
   157     else if (direction == ConvergedMessage::Outgoing)
   159     else if (direction == ConvergedMessage::Outgoing)
   158         {
   160         {
   159         setIncoming(false);
   161         setIncoming(false);
   160         mConversation->setIncoming(false);
   162         mConversation->setIncoming(false);
   161 
   163 
   162         int sendingState = index.data(SendingState).toInt();
   164         int sendingState = index.data(SendingState).toInt();
   163         mConversation->setSendingState(sendingState);
   165         mConversation->setSendingState(sendingState);
   164         setMessageStateIcon(sendingState);
   166         setMessageStateIcon(sendingState);
   165         }
   167         HbEffect::add(this,"chatoutgoing_appear", "appear");	
       
   168     }
   166 
   169 
   167     bool unreadStatus = index.data(UnReadStatus).toBool();
   170     bool unreadStatus = index.data(UnReadStatus).toBool();
   168     mConversation->setUnread(unreadStatus);
   171     mConversation->setUnread(unreadStatus);
   169 
   172 
   170     mConversation->drawBubbleFrame();
   173     mConversation->drawBubbleFrame();
   218             setNotificationStateIcon(notificationState);
   221             setNotificationStateIcon(notificationState);
   219             }
   222             }
   220         else
   223         else
   221             {
   224             {
   222             mIncomingMsgStateIconItem->setVisible(false);
   225             mIncomingMsgStateIconItem->setVisible(false);
   223             }
   226         }
   224         }
   227         HbEffect::add(this,"chatincoming_appear", "appear");	
       
   228     }
   225     else if (direction == ConvergedMessage::Outgoing)
   229     else if (direction == ConvergedMessage::Outgoing)
   226         {
   230         {
   227         setIncoming(false);
   231         setIncoming(false);
   228         mConversation->setIncoming(false);
   232         mConversation->setIncoming(false);
   229 
   233 
   230         int sendingState = index.data(SendingState).toInt();
   234         int sendingState = index.data(SendingState).toInt();
   231         mConversation->setSendingState(sendingState);
   235         mConversation->setSendingState(sendingState);
   232         setMessageStateIcon(sendingState);
   236         setMessageStateIcon(sendingState);
   233         }
   237         HbEffect::add(this,"chatoutgoing_appear", "appear");	
       
   238     }
   234 
   239 
   235     bool unreadStatus = index.data(UnReadStatus).toBool();
   240     bool unreadStatus = index.data(UnReadStatus).toBool();
   236     mConversation->setUnread(unreadStatus);
   241     mConversation->setUnread(unreadStatus);
   237 
   242 
   238     mConversation->drawBubbleFrame();
   243     mConversation->drawBubbleFrame();
   553         timeStampStr = locale.format(dateTime.date(), DATE_FORMAT);
   558         timeStampStr = locale.format(dateTime.date(), DATE_FORMAT);
   554     }
   559     }
   555 
   560 
   556     QString msgTimeStamp;
   561     QString msgTimeStamp;
   557     if (ConvergedMessage::Resend == index.data(SendingState).toInt()) {
   562     if (ConvergedMessage::Resend == index.data(SendingState).toInt()) {
   558         msgTimeStamp = LOC_RESEND_AT.arg(timeStampStr);
   563         msgTimeStamp = LOC_RESEND_AT;
       
   564 	msgTimeStamp.append(" "+timeStampStr);
   559     }
   565     }
   560     else {
   566     else {
   561         msgTimeStamp = timeStampStr;
   567         msgTimeStamp = timeStampStr;
   562     }
   568     }
   563     return msgTimeStamp;
   569     return msgTimeStamp;
   564 }
   570 }
   565 
   571 
       
   572 //---------------------------------------------------------------
       
   573 // MsgConversationViewItem::gestureEvent
       
   574 // @see header file
       
   575 //---------------------------------------------------------------
       
   576 void MsgConversationViewItem::gestureEvent(QGestureEvent *event)
       
   577 {
       
   578     HbListViewItem::gestureEvent(event);
       
   579 }
       
   580 
   566 // EOF
   581 // EOF