messagingapp/msgui/unifiededitor/inc/msgunieditorview.h
branchGCC_SURGE
changeset 47 5b14749788d7
parent 27 e4592d119491
parent 44 36f374c67aa8
equal deleted inserted replaced
35:a32b19fb291e 47:5b14749788d7
    13  *
    13  *
    14  * Description:uni editor view class.
    14  * Description:uni editor view class.
    15  *
    15  *
    16  */
    16  */
    17 
    17 
    18 #ifndef UNIFIED_EDITOR_VIEW_H
    18 #ifndef MSG_UNIFIED_EDITOR_VIEW_H
    19 #define UNIFIED_EDITOR_VIEW_H
    19 #define MSG_UNIFIED_EDITOR_VIEW_H
    20 
    20 
    21 #ifdef UNIFIEDEDITOR_DLL
    21 #ifdef UNIFIEDEDITOR_DLL
    22 #define UNIFIEDEDITOR_EXPORT Q_DECL_EXPORT
    22 #define UNIFIEDEDITOR_EXPORT Q_DECL_EXPORT
    23 #else
    23 #else
    24 #define UNIFIEDEDITOR_EXPORT Q_DECL_IMPORT
    24 #define UNIFIEDEDITOR_EXPORT Q_DECL_IMPORT
    33 class HbGroupBox;
    33 class HbGroupBox;
    34 class QGraphicsLinearLayout;
    34 class QGraphicsLinearLayout;
    35 class MsgUnifiedEditorSubject;
    35 class MsgUnifiedEditorSubject;
    36 class MsgUnifiedEditorAddress;
    36 class MsgUnifiedEditorAddress;
    37 class MsgUnifiedEditorBody;
    37 class MsgUnifiedEditorBody;
    38 class MsgMonitor;
    38 class MsgUnifiedEditorMonitor;
    39 class MsgAttachmentContainer;
    39 class MsgAttachmentContainer;
    40 class UniEditorPluginLoader;
    40 class UniEditorPluginLoader;
    41 class HbListWidgetItem;
    41 class HbListWidgetItem;
    42 class HbAbstractVkbHost;
    42 class HbAbstractVkbHost;
    43 class MsgUnifiedEditorBaseWidget;
    43 class MsgUnifiedEditorBaseWidget;
    73 
    73 
    74 
    74 
    75     /**
    75     /**
    76      * Saves the content inside editor to save
    76      * Saves the content inside editor to save
    77      */
    77      */
    78     void saveContentToDrafts();
    78     int saveContentToDrafts();
    79     
    79     
    80 protected:
    80 protected:
    81     /**
    81     /**
    82      * reimplemented from base class to provide proper geometry for scrolling.
    82      * reimplemented from base class to provide proper geometry for scrolling.
    83      */
    83      */
   103      */
   103      */
   104     void packMessage(ConvergedMessage &msg, bool isSave=false);
   104     void packMessage(ConvergedMessage &msg, bool isSave=false);
   105 
   105 
   106     /**
   106     /**
   107      * Populate editor with prepopulated msg content
   107      * Populate editor with prepopulated msg content
       
   108      * @param messageDetails message details
       
   109      * @param draftMessage boolean for specifying draft message
   108      */
   110      */
   109     void populateContentIntoEditor(
   111     void populateContentIntoEditor(
   110         const ConvergedMessage& messageDetails);
   112         const ConvergedMessage& messageDetails, bool draftMessage = false);
   111     
   113     
   112     /**
   114     /**
   113      * Populate the editor with the forwarded message's content
   115      * Populate the editor with the forwarded message's content
   114      */
   116      */
   115     void forwardMessage(ConvergedMessageId& messageId,
   117     void forwardMessage(ConvergedMessageId& messageId,
   180      * @param isEnabled, true/false
   182      * @param isEnabled, true/false
   181      */
   183      */
   182     void setAttachOptionEnabled(MsgUnifiedEditorView::TBE_AttachOption opt,
   184     void setAttachOptionEnabled(MsgUnifiedEditorView::TBE_AttachOption opt,
   183             bool enable);
   185             bool enable);
   184 
   186 
       
   187     /**
       
   188      * Addresses are all ok. Now parse not allowed chars away 
       
   189 	 * before giving it to MTM
       
   190 	 * @param addresses, list of ConvergedMessageAddress
       
   191      */
       
   192     void formatAddresses(ConvergedMessageAddressList& addresses);
       
   193     
   185 private slots:
   194 private slots:
   186 
   195 
   187     /**
   196     /**
   188      * slot to add subject field.
   197      * slot to add subject field.
   189      */
   198      */
   203      * slot to change priority.
   212      * slot to change priority.
   204      */
   213      */
   205     void changePriority();
   214     void changePriority();
   206 
   215 
   207     /**
   216     /**
   208      * slot for different sending options.
       
   209      */
       
   210     void sendingOptions();
       
   211 
       
   212     /**
       
   213      * slot to current delete message.
   217      * slot to current delete message.
   214      */
   218      */
   215     void deleteMessage();
   219     void deleteMessage();
   216 
   220 
   217     /**
   221     /**
   218      * slot to images fetched.
   222      * slot to images fetched.
   219      */
   223      */
   220     void imagesFetched(const QVariant& result );
   224     void imagesFetched(const QVariant& result );
   221 
   225 
   222     /**
       
   223      * slot to fetch audio files
       
   224      */
       
   225     void audiosFetched(const QVariant& result );
       
   226     
       
   227     /**
   226     /**
   228      * slot to receive fetched contacts
   227      * slot to receive fetched contacts
   229      */
   228      */
   230     void contactsFetched(const QVariant& value);
   229     void contactsFetched(const QVariant& value);
   231 
   230 
   315     /**
   314     /**
   316      * This slot is called when define mms settings dialog is launched.
   315      * This slot is called when define mms settings dialog is launched.
   317      * @param action selected action (yes or no).
   316      * @param action selected action (yes or no).
   318      */
   317      */
   319     void onDialogMmsSettings(HbAction* action);    
   318     void onDialogMmsSettings(HbAction* action);    
       
   319 	
       
   320 	/**
       
   321      * Enable/Disable send tool button.
       
   322      * @param true/false to enable/disable.
       
   323      */
       
   324      void enableSendButton(bool enable);
   320     
   325     
   321 private:
   326 private:
   322     HbAction* mSubjectAction;
   327     HbAction* mSubjectAction;
   323     HbAction* mCcBccAction;
   328     HbAction* mCcBccAction;
       
   329     HbAction* mSendAction;
   324     QGraphicsLinearLayout* mMainLayout;
   330     QGraphicsLinearLayout* mMainLayout;
   325     MsgUnifiedEditorSubject* mSubjectField;
   331     MsgUnifiedEditorSubject* mSubjectField;
   326     MsgUnifiedEditorAddress* mToField;
   332     MsgUnifiedEditorAddress* mToField;
   327     MsgUnifiedEditorAddress* mCcField;
   333     MsgUnifiedEditorAddress* mCcField;
   328     MsgUnifiedEditorAddress* mBccField;
   334     MsgUnifiedEditorAddress* mBccField;
   329     MsgUnifiedEditorBody*   mBody;
   335     MsgUnifiedEditorBody*   mBody;
   330 
   336 
   331     HbWidget* mContentWidget;
   337     HbWidget* mContentWidget;
   332 
   338 
   333     MsgMonitor* mMsgMonitor;
   339     MsgUnifiedEditorMonitor* mMsgMonitor;
   334     MsgAttachmentContainer* mAttachmentContainer;
   340     MsgAttachmentContainer* mAttachmentContainer;
   335     UniEditorPluginLoader* mPluginLoader;
   341     UniEditorPluginLoader* mPluginLoader;
   336     ConvergedMessageId mOpenedMessageId;
   342     ConvergedMessageId mOpenedMessageId;
   337     ConvergedMessage::MessageType mmOpenedMessageType;
   343     ConvergedMessage::MessageType mmOpenedMessageType;
   338 	bool mCanSaveToDrafts;
   344 	bool mCanSaveToDrafts;
   345     /**
   351     /**
   346      * Instance of VKB host
   352      * Instance of VKB host
   347      */
   353      */
   348 	HbAbstractVkbHost* mVkbHost;
   354 	HbAbstractVkbHost* mVkbHost;
   349 	
   355 	
   350 	friend class MsgMonitor;
   356 	friend class MsgUnifiedEditorMonitor;
   351     };
   357     };
   352 
   358 
   353 #endif //UNIFIED_EDITOR_VIEW_H
   359 #endif //MSG_UNIFIED_EDITOR_VIEW_H