author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 06 Jul 2010 14:12:40 +0300 | |
changeset 44 | 36f374c67aa8 |
parent 34 | 84197e66a4bd |
child 47 | 5b14749788d7 |
child 70 | a15d9966050f |
permissions | -rw-r--r-- |
31 | 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 |
||
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
17 |
#ifndef MSG_UNIFIED_EDITOR_SUBJECT_H |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
18 |
#define MSG_UNIFIED_EDITOR_SUBJECT_H |
31 | 19 |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
20 |
#include <msgunieditorbasewidget.h> |
31 | 21 |
|
22 |
#include "convergedmessage.h" |
|
23 |
||
24 |
class HbIconItem; |
|
25 |
class UniEditorGenUtils; |
|
26 |
class MsgUnifiedEditorLineEdit; |
|
27 |
||
28 |
class MsgUnifiedEditorSubject : public MsgUnifiedEditorBaseWidget |
|
29 |
{ |
|
30 |
Q_OBJECT |
|
31 |
||
32 |
public: |
|
33 |
||
34 |
/** |
|
35 |
* Constructor |
|
36 |
*/ |
|
37 |
MsgUnifiedEditorSubject(QGraphicsItem *parent = 0); |
|
38 |
||
39 |
/** |
|
40 |
* Destructor |
|
41 |
*/ |
|
42 |
~MsgUnifiedEditorSubject(); |
|
43 |
||
44 |
/** |
|
45 |
* to set priority. |
|
46 |
* @param priority MsgPriority {High,Normal,Low} |
|
47 |
*/ |
|
48 |
void setPriority(ConvergedMessage::Priority priority); |
|
49 |
||
50 |
/** |
|
51 |
* returns content of subject field. |
|
52 |
*/ |
|
53 |
QString text(); |
|
54 |
||
55 |
/** |
|
56 |
* return the priority of this message |
|
57 |
*/ |
|
58 |
ConvergedMessage::Priority priority(); |
|
59 |
||
60 |
/** |
|
61 |
* get size of content in bytes |
|
62 |
*/ |
|
63 |
int subjectSize(); |
|
64 |
||
65 |
/** |
|
66 |
* set the text on the subject field |
|
67 |
* @param text |
|
68 |
*/ |
|
69 |
void setText(const QString& text); |
|
70 |
||
71 |
/** |
|
72 |
* To set focus on editable field. |
|
73 |
*/ |
|
74 |
void setFocus(); |
|
75 |
||
76 |
signals: |
|
77 |
/** |
|
78 |
* Emitted when subject/priority content is added or removed |
|
79 |
*/ |
|
80 |
void contentChanged(); |
|
81 |
||
82 |
private slots: |
|
83 |
/** |
|
84 |
* called when contentsChanged signal is emitted by the line edit |
|
85 |
*/ |
|
86 |
void onContentsChanged(const QString&); |
|
87 |
||
88 |
private: |
|
89 |
/** |
|
90 |
* Check if email over sms is supported. If yes, subject is a valid sms field |
|
91 |
* @return true, if email over sms is supported. |
|
92 |
*/ |
|
93 |
bool subjectOkInSms(); |
|
94 |
||
95 |
private: |
|
96 |
||
97 |
/** |
|
98 |
* line edit to input subject. |
|
99 |
*/ |
|
100 |
MsgUnifiedEditorLineEdit* mSubjectEdit; |
|
101 |
||
102 |
/** |
|
103 |
* icon item to display priority. |
|
104 |
*/ |
|
105 |
HbIconItem* mPriorityIcon; |
|
106 |
||
107 |
/** |
|
108 |
* priority of the message |
|
109 |
*/ |
|
110 |
ConvergedMessage::Priority mPriority; |
|
111 |
||
112 |
/** |
|
113 |
* general utilities |
|
114 |
*/ |
|
115 |
UniEditorGenUtils* mGenUtils; |
|
116 |
||
117 |
/** |
|
118 |
* Holds the previous buffer inside subject field |
|
119 |
*/ |
|
120 |
QString mPrevBuffer; |
|
121 |
}; |
|
122 |
||
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
123 |
#endif //MSG_UNIFIED_EDITOR_SUBJECT_H |