37 class NmRecipientLineEdit; |
37 class NmRecipientLineEdit; |
38 class QGraphicsLinearLayout; |
38 class QGraphicsLinearLayout; |
39 class NmRecipientField; |
39 class NmRecipientField; |
40 class NmAttachmentList; |
40 class NmAttachmentList; |
41 |
41 |
42 class NmEditorHeader : public HbWidget |
42 class NmEditorHeader : public QObject |
43 { |
43 { |
44 Q_OBJECT |
44 Q_OBJECT |
45 |
45 |
46 public: |
46 public: |
47 NmEditorHeader(HbDocumentLoader *documentLoader, QGraphicsItem *parent=0); |
47 NmEditorHeader(HbDocumentLoader *documentLoader); |
48 virtual ~NmEditorHeader(); |
48 virtual ~NmEditorHeader(); |
49 int headerHeight() const; |
49 qreal headerHeight() const; |
50 NmHtmlLineEdit* subjectEdit() const; |
50 NmHtmlLineEdit* subjectEdit() const; |
51 NmRecipientLineEdit* toEdit() const; |
51 NmRecipientLineEdit* toEdit() const; |
52 NmRecipientLineEdit* ccEdit() const; |
52 NmRecipientLineEdit* ccEdit() const; |
53 NmRecipientLineEdit* bccEdit() const; |
53 NmRecipientLineEdit* bccEdit() const; |
54 void setPriority(NmMessagePriority priority=NmMessagePriorityNormal); |
54 void setPriority(NmMessagePriority priority=NmMessagePriorityNormal); |
64 int result); |
64 int result); |
65 void setFieldVisibility(bool isVisible); |
65 void setFieldVisibility(bool isVisible); |
66 |
66 |
67 private: |
67 private: |
68 void loadWidgets(); |
68 void loadWidgets(); |
69 void rescaleHeader(); |
|
70 void createConnections(); |
69 void createConnections(); |
71 void adjustFieldSizeValues( NmRecipientLineEdit *widget, qreal height ); |
|
72 |
70 |
73 signals: |
71 signals: |
74 void headerHeightChanged(int); |
72 void headerHeightChanged(int); |
75 void recipientFieldsHaveContent(bool recipientFieldsHaveContent); |
73 void recipientFieldsHaveContent(bool recipientFieldsHaveContent); |
76 void attachmentLongPressed(NmId attachmentPartId, QPointF point); |
74 void attachmentLongPressed(NmId attachmentPartId, QPointF point); |
77 |
75 |
78 public slots: |
76 public slots: |
79 void fixHeaderFieldHeights(); |
77 void sendDelayedHeaderHeightChanged(); |
80 void sendHeaderHeightChanged(); |
78 void sendHeaderHeightChanged(); |
81 void editorContentChanged(); |
79 void editorContentChanged(); |
82 void attachmentActivated(int arrayIndex); |
80 void attachmentActivated(int arrayIndex); |
83 void attachmentLongPressed(int arrayIndex, QPointF point); |
81 void attachmentLongPressed(int arrayIndex, QPointF point); |
84 |
82 |
85 private: |
83 private: |
86 HbDocumentLoader* mDocumentLoader; // Not owned |
84 HbDocumentLoader* mDocumentLoader; // Not owned |
87 HbWidget *mHeader; // Not owned |
85 qreal mHeaderHeight; |
88 int mHeaderHeight; |
86 HbLabel *mPriorityIcon; // Not owned |
89 HbLabel *mSubjectLabel; |
87 HbLabel *mFollowUpIcon; // Not owned |
90 HbLabel *mPriorityIconLabel; |
|
91 bool mIconVisible; |
88 bool mIconVisible; |
92 NmRecipientLineEdit *mToEdit; |
89 NmRecipientLineEdit *mToEdit; // Not owned |
93 NmRecipientLineEdit *mCcEdit; |
90 NmRecipientLineEdit *mCcEdit; // Not owned |
94 NmRecipientLineEdit *mBccEdit; |
91 NmRecipientLineEdit *mBccEdit; // Not owned |
95 NmHtmlLineEdit *mSubjectEdit; |
92 NmHtmlLineEdit *mSubjectEdit; // Not owned |
96 bool mRecipientFieldsEmpty; |
93 bool mRecipientFieldsEmpty; |
97 QGraphicsLinearLayout *mLayout; |
94 QGraphicsLinearLayout *mLayout; // Not owned |
98 NmAttachmentList *mAttachmentList; |
95 NmAttachmentList *mAttachmentList; // Not owned |
99 NmRecipientField *mToField; // Owned |
96 NmRecipientField *mToField; // Not owned |
100 NmRecipientField *mCcField; // Owned |
97 NmRecipientField *mCcField; // Not owned |
101 NmRecipientField *mBccField; // Owned |
98 HbWidget *mCcWidget; // Not owned |
|
99 NmRecipientField *mBccField; // Not owned |
|
100 HbWidget *mBccWidget; // Not owned |
|
101 HbWidget *mSubjectWidget; // Not owned |
|
102 QGraphicsLinearLayout *mSubjectLayout; // Not owned |
102 bool mCcBccFieldVisible; |
103 bool mCcBccFieldVisible; |
103 }; |
104 }; |
104 |
105 |
105 #endif /* NMEDITORHEADER_H_ */ |
106 #endif /* NMEDITORHEADER_H_ */ |