emailuis/nmailui/inc/nmeditorview.h
changeset 27 9ba4404ef423
parent 23 2dc6caa42ec3
child 30 759dc5235cdb
equal deleted inserted replaced
23:2dc6caa42ec3 27:9ba4404ef423
    41 class NmOperation;
    41 class NmOperation;
    42 class NmMessageCreationOperation;
    42 class NmMessageCreationOperation;
    43 class NmAddAttachmentsOperation;
    43 class NmAddAttachmentsOperation;
    44 class NmCheckOutboxOperation;
    44 class NmCheckOutboxOperation;
    45 class NmAttachmentPicker;
    45 class NmAttachmentPicker;
    46 
    46 class HbMessageBox;
    47 
    47 
    48 class NmEditorView : public NmBaseView, public NmActionObserver
    48 class NmEditorView : public NmBaseView, public NmActionObserver
    49 {
    49 {
    50     Q_OBJECT
    50     Q_OBJECT
    51 
    51 
    61 public:
    61 public:
    62 
    62 
    63     void reloadViewContents(NmUiStartParam* startParam);
    63     void reloadViewContents(NmUiStartParam* startParam);
    64     NmUiViewId nmailViewId() const;
    64     NmUiViewId nmailViewId() const;
    65     HbWidget* scrollAreaContents();
    65     HbWidget* scrollAreaContents();
    66     bool okToExitView();
    66     void okToExitView();
    67     void aboutToExitView();
    67     void aboutToExitView();
    68     void viewReady();
    68     void viewReady();
    69 
    69 
    70 public slots:
    70 public slots:
    71 
    71 
    72     void orientationChanged(Qt::Orientation orientation);
    72     void orientationChanged(Qt::Orientation orientation);
    73     void createOptionsMenu();
    73     void createOptionsMenu();
    74     void setButtonsDimming(bool enabled);
    74     void setButtonsDimming(bool enabled);
    75     void attachmentLongPressed(NmId attachmentPartId, QPointF point);
    75     void attachmentLongPressed(NmId attachmentPartId, QPointF point);
    76 
    76     void invalidAddressQuery(HbAction* action);
       
    77     void okToExitQuery(HbAction* action);
    77 
    78 
    78 public: // From NmActionObserver
    79 public: // From NmActionObserver
    79 
    80 
    80     void handleActionCommand(NmActionResponse &menuResponse);
    81     void handleActionCommand(NmActionResponse &menuResponse);
    81 
    82 
    93     void outboxChecked(int result);
    94     void outboxChecked(int result);
    94     void removeAttachmentTriggered();
    95     void removeAttachmentTriggered();
    95     void handleSendOperationCompleted();
    96     void handleSendOperationCompleted();
    96     void openAttachmentTriggered();  
    97     void openAttachmentTriggered();  
    97     void onAttachmentReqCompleted(const QVariant &value);
    98     void onAttachmentReqCompleted(const QVariant &value);
       
    99     void switchCcBccFieldVisibility();
    98 
   100 
    99 private:
   101 private:
   100 
   102 
   101     void loadViewLayout();
   103     void loadViewLayout();
   102     void setMailboxName();
   104     void setMailboxName();
   103     void setMessageData();
   105     void setMessageData();
   104     void startMessageCreation(NmUiEditorStartMode startMode);
   106     void startMessageCreation(NmUiEditorStartMode startMode);
   105     void startSending();
   107     void startSending();
       
   108     void finalizeSending();
   106     void createToolBar();
   109     void createToolBar();
   107     QPointF viewCoordinateToEditCoordinate(QPointF orgPoint);
   110     QPointF viewCoordinateToEditCoordinate(QPointF orgPoint);
   108     void updateMessageWithEditorContents();
   111     void updateMessageWithEditorContents();
   109     void fillEditorWithMessageContents();
   112     void fillEditorWithMessageContents();
   110     void initializeVKB();
   113     void initializeVKB();
   120 
   123 
   121     void sendMousePressEventToScroll(QGraphicsSceneMouseEvent *event);
   124     void sendMousePressEventToScroll(QGraphicsSceneMouseEvent *event);
   122     void sendMouseReleaseEventToScroll(QGraphicsSceneMouseEvent *event);
   125     void sendMouseReleaseEventToScroll(QGraphicsSceneMouseEvent *event);
   123     void sendMouseMoveEventToScroll(QGraphicsSceneMouseEvent *event);
   126     void sendMouseMoveEventToScroll(QGraphicsSceneMouseEvent *event);
   124     void sendLongPressGesture(const QPointF &point);
   127     void sendLongPressGesture(const QPointF &point);
   125     void contextButton(NmActionResponse &result);
       
   126 
       
   127 
   128 
   128 private: // Data
   129 private: // Data
   129 
   130 
   130     NmApplication &mApplication;
   131     NmApplication &mApplication;
   131     NmUiEngine &mUiEngine;
   132     NmUiEngine &mUiEngine;
   134     NmBaseViewScrollArea *mScrollArea;  // Not owned
   135     NmBaseViewScrollArea *mScrollArea;  // Not owned
   135     HbWidget *mScrollAreaContents;      // Not owned
   136     HbWidget *mScrollAreaContents;      // Not owned
   136     NmEditorTextEdit *mEditWidget;      // Not owned
   137     NmEditorTextEdit *mEditWidget;      // Not owned
   137     NmEditorHeader *mHeaderWidget;      // Not owned
   138     NmEditorHeader *mHeaderWidget;      // Not owned
   138     NmMessage *mMessage;                // Owned
   139     NmMessage *mMessage;                // Owned
       
   140     QGraphicsLinearLayout *mLayout;
   139     NmEditorContent *mContentWidget;    // Owned
   141     NmEditorContent *mContentWidget;    // Owned
   140     HbMenu *mPrioritySubMenu;           // Owned
   142     HbMenu *mPrioritySubMenu;           // Owned
   141     HbMenu *mAttachmentListContextMenu; // Owned
   143     HbMenu *mAttachmentListContextMenu; // Owned
   142     NmId mSelectedAttachment;
   144     NmId mSelectedAttachment;
   143 
   145 
   144     QPointer<NmMessageCreationOperation> mMessageCreationOperation;  // Not owned
   146     QPointer<NmMessageCreationOperation> mMessageCreationOperation;  // Not owned
   145     QPointer<NmAddAttachmentsOperation> mAddAttachmentOperation;     // Not owned 
   147     QPointer<NmAddAttachmentsOperation> mAddAttachmentOperation;     // Not owned 
   146     QPointer<NmOperation> mRemoveAttachmentOperation;                // Not owned 
   148     QPointer<NmOperation> mRemoveAttachmentOperation;                // Not owned 
   147     QPointer<NmCheckOutboxOperation> mCheckOutboxOperation;          // Not owned 
   149     QPointer<NmCheckOutboxOperation> mCheckOutboxOperation;          // Not owned 
   148 
   150 
   149     HbProgressDialog *mWaitDialog; // Owned.
   151     HbProgressDialog *mWaitDialog;         // Owned.    
   150     
   152     HbMessageBox* mQueryDialog;            // Owned
   151     NmAttachmentPicker* mAttachmentPicker;    // Owned    
   153     NmAttachmentPicker* mAttachmentPicker; // Owned    
       
   154     bool mCcBccFieldVisible;
   152 };
   155 };
   153 
   156 
   154 
   157 
   155 #endif /* NMEDITORVIEW_H_ */
   158 #endif /* NMEDITORVIEW_H_ */