messagingapp/msgui/unifiededitor/inc/msgunieditorview.h
changeset 27 e4592d119491
parent 25 84d9eb65b26f
child 47 5b14749788d7
equal deleted inserted replaced
25:84d9eb65b26f 27:e4592d119491
    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
    25 #endif
    25 #endif
    26 
    26 
    27 #include <qmobilityglobal.h>
       
    28 #include "msgbaseview.h"
    27 #include "msgbaseview.h"
    29 #include "convergedmessage.h"
    28 #include "convergedmessage.h"
    30 #include "convergedmessageid.h"
    29 #include "convergedmessageid.h"
    31 
       
    32 QTM_BEGIN_NAMESPACE
       
    33 QTM_END_NAMESPACE
       
    34 QTM_USE_NAMESPACE
       
    35 
    30 
    36 class HbWidget;
    31 class HbWidget;
    37 class HbAction;
    32 class HbAction;
    38 class HbGroupBox;
    33 class HbGroupBox;
    39 class QGraphicsLinearLayout;
    34 class QGraphicsLinearLayout;
    42 class MsgUnifiedEditorBody;
    37 class MsgUnifiedEditorBody;
    43 class MsgMonitor;
    38 class MsgMonitor;
    44 class MsgAttachmentContainer;
    39 class MsgAttachmentContainer;
    45 class UniEditorPluginLoader;
    40 class UniEditorPluginLoader;
    46 class HbListWidgetItem;
    41 class HbListWidgetItem;
       
    42 class HbAbstractVkbHost;
       
    43 class MsgUnifiedEditorBaseWidget;
       
    44 class HbListWidget;
    47 
    45 
    48 class UNIFIEDEDITOR_EXPORT MsgUnifiedEditorView : public MsgBaseView
    46 class UNIFIEDEDITOR_EXPORT MsgUnifiedEditorView : public MsgBaseView
    49     {
    47     {
    50     Q_OBJECT
    48     Q_OBJECT
    51 
    49 
    96      * helper method to add tool bar.
    94      * helper method to add tool bar.
    97      */
    95      */
    98     void addToolBar();
    96     void addToolBar();
    99 
    97 
   100     /**
    98     /**
   101      * helper method to get style plugin path.
       
   102      */
       
   103     QString pluginPath();
       
   104 
       
   105     /**
       
   106      * Packs the content inside editor into converged message
    99      * Packs the content inside editor into converged message
   107      */
   100      * @param [OUT]msg, converged message to hold editor data
   108     void packMessage(ConvergedMessage &msg);
   101      * @param isSave, flag to indicate that msg needs to be packed
       
   102      * for saving to draft or not
       
   103      */
       
   104     void packMessage(ConvergedMessage &msg, bool isSave=false);
   109 
   105 
   110     /**
   106     /**
   111      * Populate editor with prepopulated msg content
   107      * Populate editor with prepopulated msg content
   112      */
   108      */
   113     void populateContentIntoEditor(
   109     void populateContentIntoEditor(
   138      * Fetch images 
   134      * Fetch images 
   139      */
   135      */
   140     void fetchImages();
   136     void fetchImages();
   141 
   137 
   142     /**
   138     /**
   143      * Fectch conatcts
   139      * Fetch contacts
   144      */
   140      */
   145     void fetchContacts();
   141     void fetchContacts();
   146 
   142 
   147     /**
   143     /**
   148      * Fectch audio
   144      * Fetch audio
   149      */
   145      */
   150     void fetchAudio();
   146     void fetchAudio();
       
   147 
       
   148     /**
       
   149      * To hide/show chrome.
       
   150      */
       
   151     void hideChrome(bool hide);
       
   152     
       
   153     /**
       
   154      * To initialize view.
       
   155      */
       
   156     void initView();
       
   157     
       
   158     /**
       
   159      * Creates temp folder for editor.
       
   160      */
       
   161     bool createTempFolder();
       
   162     
       
   163     /**
       
   164      * Removes editors temp folder.
       
   165      */
       
   166     void removeTempFolder();
       
   167 
       
   168     /**
       
   169      * Attachment options in TBE
       
   170      * Row number of the TBE actions
       
   171      */
       
   172     enum TBE_AttachOption
       
   173     {
       
   174         TBE_PHOTO = 0x00, TBE_SOUND = 0x01, TBE_VCARD = 0x02
       
   175     };
       
   176 
       
   177     /**
       
   178      * Enable/Disable attachment options for slide-conformance
       
   179      * @param opt, row number of action in TBE
       
   180      * @param isEnabled, true/false
       
   181      */
       
   182     void setAttachOptionEnabled(MsgUnifiedEditorView::TBE_AttachOption opt,
       
   183             bool enable);
   151 
   184 
   152 private slots:
   185 private slots:
   153 
   186 
   154     /**
   187     /**
   155      * slot to add subject field.
   188      * slot to add subject field.
   237 
   270 
   238     /**
   271     /**
   239      * Deactivate Input Blocker
   272      * Deactivate Input Blocker
   240      */
   273      */
   241     void deactivateInputBlocker();
   274     void deactivateInputBlocker();
   242 
   275     
       
   276     /**
       
   277      * Resizes the view when VKB is opened.
       
   278      * This slot is triggered when vkb is opened.
       
   279      */
       
   280     void vkbOpened();
       
   281 
       
   282     /**
       
   283      * Resizes the view when VKB is closed.
       
   284      * This slot is triggered when VKB focus is lost.
       
   285      */
       
   286     void vkbClosed();
       
   287     
       
   288     /**
       
   289      * Slot to do delayed construction.
       
   290      */
       
   291     void doDelayedConstruction();
       
   292     
       
   293     /**
       
   294      * Sets focus to item.
       
   295      */
       
   296     void setFocus(MsgUnifiedEditorBaseWidget* item);
       
   297     
       
   298     /**
       
   299      * Listens to contentChanged signal of various fields.
       
   300      */
       
   301     void onContentChanged();
       
   302 
       
   303 	/**
       
   304      * This slot is called when delete message dialog is launched.
       
   305      * @param action selected action (yes or no).
       
   306      */
       
   307     void onDialogDeleteMsg(HbAction* action);
       
   308 
       
   309 	/**
       
   310      * This slot is called when define sms settings dialog is launched.
       
   311      * @param action selected action (yes or no).
       
   312      */
       
   313     void onDialogSmsSettings(HbAction* action);
       
   314     
       
   315     /**
       
   316      * This slot is called when define mms settings dialog is launched.
       
   317      * @param action selected action (yes or no).
       
   318      */
       
   319     void onDialogMmsSettings(HbAction* action);    
       
   320     
   243 private:
   321 private:
   244     HbAction* mSubjectAction;
   322     HbAction* mSubjectAction;
   245     HbAction* mCcBccAction;
   323     HbAction* mCcBccAction;
   246     QGraphicsLinearLayout* mMainLayout;
   324     QGraphicsLinearLayout* mMainLayout;
   247     MsgUnifiedEditorSubject* mSubjectField;
   325     MsgUnifiedEditorSubject* mSubjectField;
   249     MsgUnifiedEditorAddress* mCcField;
   327     MsgUnifiedEditorAddress* mCcField;
   250     MsgUnifiedEditorAddress* mBccField;
   328     MsgUnifiedEditorAddress* mBccField;
   251     MsgUnifiedEditorBody*   mBody;
   329     MsgUnifiedEditorBody*   mBody;
   252 
   330 
   253     HbWidget* mContentWidget;
   331     HbWidget* mContentWidget;
   254     QString mPluginPath;
       
   255 
   332 
   256     MsgMonitor* mMsgMonitor;
   333     MsgMonitor* mMsgMonitor;
   257     MsgAttachmentContainer* mAttachmentContainer;
   334     MsgAttachmentContainer* mAttachmentContainer;
   258     UniEditorPluginLoader* mPluginLoader;
   335     UniEditorPluginLoader* mPluginLoader;
   259     ConvergedMessageId mOpenedMessageId;
   336     ConvergedMessageId mOpenedMessageId;
   260     ConvergedMessage::MessageType mmOpenedMessageType;
   337     ConvergedMessage::MessageType mmOpenedMessageType;
   261 	bool mCanSaveToDrafts;
   338 	bool mCanSaveToDrafts;
       
   339 
       
   340 	/**
       
   341 	 * TBE's content widget
       
   342 	 */
       
   343 	HbListWidget* mTBExtnContentWidget;
       
   344 	
       
   345     /**
       
   346      * Instance of VKB host
       
   347      */
       
   348 	HbAbstractVkbHost* mVkbHost;
       
   349 	
   262 	friend class MsgMonitor;
   350 	friend class MsgMonitor;
   263     };
   351     };
   264 
   352 
   265 #endif //UNIFIED_EDITOR_VIEW_H
   353 #endif //UNIFIED_EDITOR_VIEW_H