|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "msgbodytextedit.h" |
|
19 #include "msgconversationviewitem.h" |
|
20 |
|
21 // SYSTEM INCLUDES |
|
22 |
|
23 //--------------------------------------------------------------- |
|
24 // MsgBodyTextEdit::MsgBodyTextEdit |
|
25 // @see header |
|
26 //--------------------------------------------------------------- |
|
27 MsgBodyTextEdit::MsgBodyTextEdit(MsgConversationViewItem* item, QGraphicsItem *parent): |
|
28 HbTextEdit(parent), mItem(item) |
|
29 { |
|
30 //set textedit properties |
|
31 setCursorVisibility(Hb::TextCursorHidden); |
|
32 setFlag(QGraphicsItem::ItemIsFocusable,false); |
|
33 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
34 setBackgroundItem(0); |
|
35 setSmileysEnabled(true); |
|
36 setReadOnly(true); |
|
37 setScrollable(false); |
|
38 |
|
39 // grab gestures |
|
40 grabGesture(Qt::TapGesture); |
|
41 } |
|
42 |
|
43 //--------------------------------------------------------------- |
|
44 // MsgBodyTextEdit::~MsgBodyTextEdit |
|
45 // @see header |
|
46 //--------------------------------------------------------------- |
|
47 MsgBodyTextEdit::~MsgBodyTextEdit() |
|
48 { |
|
49 |
|
50 } |
|
51 |
|
52 //--------------------------------------------------------------- |
|
53 // MsgBodyTextEdit::gestureEvent |
|
54 // @see header file |
|
55 //--------------------------------------------------------------- |
|
56 void MsgBodyTextEdit::gestureEvent(QGestureEvent *event) |
|
57 { |
|
58 mItem->gestureEvent(event); |
|
59 } |
|
60 |
|
61 // EOF |