emailuis/nmailui/src/nmviewerheader.cpp
changeset 53 bf7eb7911fc5
parent 30 759dc5235cdb
child 47 f83bd4ae1fe3
equal deleted inserted replaced
30:759dc5235cdb 53:bf7eb7911fc5
    39     mViewerView(NULL)
    39     mViewerView(NULL)
    40 {
    40 {
    41     NM_FUNCTION;
    41     NM_FUNCTION;
    42     
    42     
    43     loadWidgets();
    43     loadWidgets();
       
    44     setFlag(QGraphicsItem::ItemHasNoContents, false);
    44 }
    45 }
    45 
    46 
    46 /*!
    47 /*!
    47     Destructor
    48     Destructor
    48 */
    49 */
   115     NM_FUNCTION;
   116     NM_FUNCTION;
   116     
   117     
   117     Q_UNUSED(option);
   118     Q_UNUSED(option);
   118     Q_UNUSED(widget);
   119     Q_UNUSED(widget);
   119     if (painter) {
   120     if (painter) {
       
   121         painter->save();
   120         painter->setOpacity(nmHeaderLineOpacity);
   122         painter->setOpacity(nmHeaderLineOpacity);
   121         QLineF line1( rect().topLeft().x(), rect().bottomRight().y(),
   123         QLineF line1( rect().topLeft().x(), rect().bottomRight().y(),
   122                      rect().bottomRight().x(), rect().bottomRight().y());
   124                      rect().bottomRight().x(), rect().bottomRight().y());
   123         painter->drawLine(line1);
   125         painter->drawLine(line1);
   124         if (mHeaderBox){
   126         if (mHeaderBox){
   125             QRectF headerBoxGeometry = mHeaderBox->geometry();
   127             QRectF headerBoxGeometry = mHeaderBox->geometry();
   126             QLineF line2( headerBoxGeometry.topLeft().x(), headerBoxGeometry.bottomRight().y(),
   128             QLineF line2( headerBoxGeometry.topLeft().x(), headerBoxGeometry.bottomRight().y(),
   127                           headerBoxGeometry.bottomRight().x(), headerBoxGeometry.bottomRight().y());
   129                           headerBoxGeometry.bottomRight().x(), headerBoxGeometry.bottomRight().y());
   128             painter->drawLine(line2);        
   130             painter->drawLine(line2);        
   129         }       
   131         } 
       
   132         painter->restore();      
   130     }
   133     }
   131 }
   134 }
   132 
   135 
   133 /*!
   136 /*!
   134     Setter for message object
   137     Setter for message object
   196             }
   199             }
   197         mSubject->setTextColor(textColor);
   200         mSubject->setTextColor(textColor);
   198         }
   201         }
   199         if (mSent){
   202         if (mSent){
   200             HbExtendedLocale locale = HbExtendedLocale::system();
   203             HbExtendedLocale locale = HbExtendedLocale::system();
   201             QTime time = envelope.sentTime().toLocalTime().time();
   204             QDateTime localTime = envelope.sentTime().addSecs(locale.universalTimeOffset());
   202             QDate sentLocalDate = envelope.sentTime().toLocalTime().date();
   205             QTime time = localTime.time();
       
   206             QDate sentLocalDate = localTime.date();
   203             QString shortDateSpec = r_qtn_date_without_year;
   207             QString shortDateSpec = r_qtn_date_without_year;
   204             QString shortTimeSpec = r_qtn_time_usual;
   208             QString shortTimeSpec = r_qtn_time_usual;
   205             QString text = locale.format(sentLocalDate, shortDateSpec);
   209             QString text = locale.format(sentLocalDate, shortDateSpec);
   206             text += " ";
   210             text += " ";
   207             text += locale.format(time, shortTimeSpec);
   211             text += locale.format(time, shortTimeSpec);