|
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: Email Address Field Widget |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef NMRECIPIENTFIELD_H_ |
|
19 #define NMRECIPIENTFIELD_H_ |
|
20 |
|
21 #include <hbwidget.h> |
|
22 |
|
23 class QGraphicsLinearLayout; |
|
24 class HbLabel; |
|
25 class NmRecipientLineEdit; |
|
26 class HbPushButton; |
|
27 class HbIconItem; |
|
28 #ifdef Q_OS_SYMBIAN |
|
29 class XQServiceRequest; |
|
30 #endif |
|
31 |
|
32 class NmRecipientField : public HbWidget |
|
33 { |
|
34 Q_OBJECT |
|
35 public: |
|
36 NmRecipientField( |
|
37 HbLabel *label, |
|
38 NmRecipientLineEdit *edit, |
|
39 HbPushButton *button, |
|
40 QGraphicsItem *parent = 0); |
|
41 NmRecipientField(const QString &labelString = "", QGraphicsItem *parent = 0); |
|
42 virtual ~NmRecipientField(); |
|
43 qreal height(); |
|
44 void createConnections(); |
|
45 |
|
46 signals: |
|
47 void textChanged(const QString &text); |
|
48 void cursorPositionChanged(int oldPos, int newPos); |
|
49 void editingFinished(); |
|
50 void selectionChanged(); |
|
51 void launchContactsPickerButtonClicked(); |
|
52 |
|
53 public: |
|
54 NmRecipientLineEdit *editor() const; |
|
55 const QString text() const; |
|
56 |
|
57 public slots: |
|
58 void setText(const QString &text); |
|
59 #ifdef Q_OS_SYMBIAN |
|
60 void launchContactsPicker(); |
|
61 #endif |
|
62 |
|
63 private: |
|
64 QGraphicsLinearLayout *mLayoutHorizontal; |
|
65 HbLabel *mLabel; |
|
66 NmRecipientLineEdit *mRecipientsEditor; |
|
67 HbPushButton *mLaunchContactsPickerButton; |
|
68 HbIconItem *mAddButtonIcon; |
|
69 bool mOwned; |
|
70 |
|
71 #ifdef Q_OS_SYMBIAN |
|
72 XQServiceRequest *mLaunchContactsPickerRequest; |
|
73 #endif |
|
74 }; |
|
75 |
|
76 #endif // NMRECIPIENTFIELD_H_ |