126 void NmViewerHeader::setMessage(NmMessage* message) |
127 void NmViewerHeader::setMessage(NmMessage* message) |
127 { |
128 { |
128 mMessage=message; |
129 mMessage=message; |
129 setHeaderData(); |
130 setHeaderData(); |
130 } |
131 } |
|
132 |
131 |
133 |
132 /*! |
134 /*! |
133 Function updates data in already created objects. New message pointer |
135 Function updates data in already created objects. New message pointer |
134 comes from viewer view, ownership is not transferred. |
136 comes from viewer view, ownership is not transferred. |
135 This function gets called when message body is fetched and |
137 This function gets called when message body is fetched and |
230 void NmViewerHeader::createExpandableHeader() |
232 void NmViewerHeader::createExpandableHeader() |
231 { |
233 { |
232 if (mHeaderBox) { // Initialize recipient box |
234 if (mHeaderBox) { // Initialize recipient box |
233 if (!mRecipientsBox){ |
235 if (!mRecipientsBox){ |
234 mRecipientsBox = new HbTextEdit(); |
236 mRecipientsBox = new HbTextEdit(); |
|
237 HbStyle::setItemName(mRecipientsBox, "recipients"); |
|
238 mRecipientsBox->setContextMenuFlags(0); |
235 mRecipientsBox->setReadOnly(true); |
239 mRecipientsBox->setReadOnly(true); |
236 mRecipientsBox->setFontSpec(HbFontSpec(HbFontSpec::Secondary)); |
240 mRecipientsBox->setFontSpec(HbFontSpec(HbFontSpec::Secondary)); |
|
241 // Set text wrapping for from/to/cc address fields using text document |
|
242 QTextOption textOption = mRecipientsBox->document()->defaultTextOption(); |
|
243 textOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); |
|
244 mRecipientsBox->document()->setDefaultTextOption(textOption); |
237 } |
245 } |
238 connect(mRecipientsBox, SIGNAL(cursorPositionChanged(int, int)), |
246 connect(mRecipientsBox, SIGNAL(cursorPositionChanged(int, int)), |
239 this, SLOT(cursorPositionChanged(int, int))); |
247 this, SLOT(cursorPositionChanged(int, int))); |
240 |
248 |
241 // Set recipients to text edit field as html |
249 // Set recipients to text edit field as html |