messagingapp/msgui/unifiededitor/inc/msgunieditorview.h
changeset 70 a15d9966050f
parent 52 12db4185673b
equal deleted inserted replaced
61:8ba0afbb4637 70:a15d9966050f
    16  */
    16  */
    17 
    17 
    18 #ifndef MSG_UNIFIED_EDITOR_VIEW_H
    18 #ifndef MSG_UNIFIED_EDITOR_VIEW_H
    19 #define MSG_UNIFIED_EDITOR_VIEW_H
    19 #define MSG_UNIFIED_EDITOR_VIEW_H
    20 
    20 
    21 #ifdef UNIFIEDEDITOR_DLL
    21 #ifdef MSGUI_UNIT_TEST
    22 #define UNIFIEDEDITOR_EXPORT Q_DECL_EXPORT
    22  #define UNIFIEDEDITOR_EXPORT
    23 #else
    23 #else
    24 #define UNIFIEDEDITOR_EXPORT Q_DECL_IMPORT
    24  #ifdef UNIFIEDEDITOR_DLL
       
    25   #define UNIFIEDEDITOR_EXPORT Q_DECL_EXPORT
       
    26  #else
       
    27   #define UNIFIEDEDITOR_EXPORT Q_DECL_IMPORT
       
    28  #endif
    25 #endif
    29 #endif
    26 
    30 
    27 #include "msgbaseview.h"
    31 #include "msgbaseview.h"
    28 #include "convergedmessage.h"
    32 #include "convergedmessage.h"
    29 #include "convergedmessageid.h"
    33 #include "convergedmessageid.h"
    40 class UniEditorPluginLoader;
    44 class UniEditorPluginLoader;
    41 class HbListWidgetItem;
    45 class HbListWidgetItem;
    42 class HbAbstractVkbHost;
    46 class HbAbstractVkbHost;
    43 class MsgUnifiedEditorBaseWidget;
    47 class MsgUnifiedEditorBaseWidget;
    44 class HbListWidget;
    48 class HbListWidget;
       
    49 class MsgAudioFetcherDialog;
    45 
    50 
    46 class UNIFIEDEDITOR_EXPORT MsgUnifiedEditorView : public MsgBaseView
    51 class UNIFIEDEDITOR_EXPORT MsgUnifiedEditorView : public MsgBaseView
    47     {
    52     {
    48     Q_OBJECT
    53     Q_OBJECT
    49 
    54 
    75     /**
    80     /**
    76      * Saves the content inside editor to save
    81      * Saves the content inside editor to save
    77      */
    82      */
    78     int saveContentToDrafts();
    83     int saveContentToDrafts();
    79     
    84     
       
    85     /**
       
    86      * Event handler
       
    87      * @param key Key code
       
    88      * @return true if key event handled else false.
       
    89      * @see MsgBaseView
       
    90      */
       
    91     bool handleKeyEvent(int key);
       
    92 
    80 protected:
    93 protected:
    81     /**
    94     /**
    82      * reimplemented from base class to provide proper geometry for scrolling.
    95      * reimplemented from base class to provide proper geometry for scrolling.
    83      */
    96      */
    84     void resizeEvent( QGraphicsSceneResizeEvent * event );
    97     void resizeEvent( QGraphicsSceneResizeEvent * event );
    98     /**
   111     /**
    99      * Packs the content inside editor into converged message
   112      * Packs the content inside editor into converged message
   100      * @param [OUT]msg, converged message to hold editor data
   113      * @param [OUT]msg, converged message to hold editor data
   101      * @param isSave, flag to indicate that msg needs to be packed
   114      * @param isSave, flag to indicate that msg needs to be packed
   102      * for saving to draft or not
   115      * for saving to draft or not
   103      */
   116      * @return returns error if something fails
   104     void packMessage(ConvergedMessage &msg, bool isSave=false);
   117      */
       
   118     int packMessage(ConvergedMessage &msg, bool isSave=false);
   105 
   119 
   106     /**
   120     /**
   107      * Populate editor with prepopulated msg content
   121      * Populate editor with prepopulated msg content
   108      * @param messageDetails message details
   122      * @param messageDetails message details
   109      * @param draftMessage boolean for specifying draft message
   123      * @param draftMessage boolean for specifying draft message
   335      
   349      
   336      /**
   350      /**
   337       * This slot is triggered when vkb is about to be closed.
   351       * This slot is triggered when vkb is about to be closed.
   338       */
   352       */
   339      void vkbAboutToClose();
   353      void vkbAboutToClose();
       
   354      
       
   355      /** 
       
   356       * This slot is called after sound clip is 
       
   357       * selected from audio fetcher dialog    
       
   358       */
       
   359      void onAudioSelected(QString& filePath);
       
   360 	 
       
   361 	 /**
       
   362       * Check if the reply-path is broken
       
   363       * @return bool, true if reply-path constraints are broken
       
   364       */
       
   365      bool isReplyPathBroken();
   340     
   366     
   341 private:
   367 private:
       
   368      
   342     HbAction* mSubjectAction;
   369     HbAction* mSubjectAction;
   343     HbAction* mCcBccAction;
   370     HbAction* mCcBccAction;
   344     HbAction* mSendAction;
   371     HbAction* mSendAction;
   345     QGraphicsLinearLayout* mMainLayout;
   372     QGraphicsLinearLayout* mMainLayout;
   346     MsgUnifiedEditorSubject* mSubjectField;
   373     MsgUnifiedEditorSubject* mSubjectField;
   367     /**
   394     /**
   368      * Instance of VKB host
   395      * Instance of VKB host
   369      */
   396      */
   370 	HbAbstractVkbHost* mVkbHost;
   397 	HbAbstractVkbHost* mVkbHost;
   371 	
   398 	
       
   399 	/**
       
   400 	 * Instance of Audio Fetcher Dialog
       
   401 	 * Need to show when attachment audio selected
       
   402 	 */
       
   403 	MsgAudioFetcherDialog* mDialog;
       
   404 
       
   405     /**
       
   406      * Originating SC, 
       
   407      * to be used only when reply-path is available
       
   408      */
       
   409     QString mOriginatingSC;
       
   410 
       
   411     /**
       
   412      * Originating SME,
       
   413      * to be used only when reply-path is available
       
   414      */
       
   415     QString mOriginatingSME;
       
   416 
       
   417     /**
       
   418      * Flag to tell if reply-path is available
       
   419      */
       
   420     bool mReplyPath;	
       
   421 
   372 	friend class MsgUnifiedEditorMonitor;
   422 	friend class MsgUnifiedEditorMonitor;
   373     };
   423     };
   374 
   424 
   375 #endif //MSG_UNIFIED_EDITOR_VIEW_H
   425 #endif //MSG_UNIFIED_EDITOR_VIEW_H