messagingapp/msgui/unifiededitor/inc/msgunieditorbody.h
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
child 37 518b245aa84c
equal deleted inserted replaced
23:238255e8b033 25:84d9eb65b26f
    21 #include <hbwidget.h>
    21 #include <hbwidget.h>
    22 #include <f32file.h>
    22 #include <f32file.h>
    23 #include "msgunieditorprocessimageoperation.h"
    23 #include "msgunieditorprocessimageoperation.h"
    24 
    24 
    25 class HbTextEdit;
    25 class HbTextEdit;
       
    26 class HbTextItem;
    26 class HbFrameItem;
    27 class HbFrameItem;
    27 class HbIconItem;
    28 class HbIconItem;
    28 class HbPushButton;
    29 class HbPushButton;
    29 class HbGestureSceneFilter;
    30 class HbGestureSceneFilter;
    30 class CMsgMediaResolver;
    31 class CMsgMediaResolver;
    31 class CMsgImageInfo;
    32 class CMsgImageInfo;
    32 class MmsInsertCheckOperation;
    33 class MmsConformanceCheck;
       
    34 class UniEditorPluginInterface;
       
    35 class UniEditorPluginLoader;
    33 
    36 
    34 
    37 
    35 class MsgUnifiedEditorBody : public HbWidget,public MUniEditorProcessImageOperationObserver
    38 class MsgUnifiedEditorBody : public HbWidget,public MUniEditorProcessImageOperationObserver
    36 {
    39 {
    37     Q_OBJECT
    40     Q_OBJECT
    57 
    60 
    58     /**
    61     /**
    59      * Seeker method to return back data to editor's view
    62      * Seeker method to return back data to editor's view
    60      */
    63      */
    61     const QStringList mediaContent();
    64     const QStringList mediaContent();
    62 
    65     
       
    66     /**
       
    67      * get size of body content for MMS size calculations
       
    68      * @return size of body content
       
    69      */
       
    70     int bodySize();
       
    71     
       
    72     /*
       
    73      * Returns value of mUnicode 
       
    74      * @return mUnicode   
       
    75      */
       
    76      bool isUnicode();
       
    77 
       
    78      /*
       
    79       * Disables char counter
       
    80       */
       
    81      void disableCharCounter();
       
    82      
    63 public slots:
    83 public slots:
    64     /**
    84     /**
    65      * Called to insert image content in editor.
    85      * Called to insert image content in editor.
    66      * @param medialist list of absolute paths of media.
    86      * @param medialist list of absolute paths of media.
    67      */
    87      */
    90      * Emitted when send button from virtual ITUT is pressed.
   110      * Emitted when send button from virtual ITUT is pressed.
    91      */
   111      */
    92     void sendMessage();
   112     void sendMessage();
    93 
   113 
    94     /**
   114     /**
    95      * Emitted when MMS content is added or removed
   115      * Emitted when msg-body content changes
    96      */
   116      */
    97     void mmContentAdded(bool isAdded);
   117     void contentChanged();
    98 
       
    99     /**
       
   100      * Emitted when msg body size changes
       
   101      */
       
   102     void sizeChanged(int aSize);
       
   103 
   118 
   104 public: // from MUniEditorProcessImageOperationObserver
   119 public: // from MUniEditorProcessImageOperationObserver
   105     
   120     
   106     /*
   121     /*
   107      * @see MUniEditorProcessImageOperationObserver
   122      * @see MUniEditorProcessImageOperationObserver
   141     /**
   156     /**
   142      * handle text changes in body field
   157      * handle text changes in body field
   143      */
   158      */
   144     void onTextChanged();
   159     void onTextChanged();
   145 
   160 
       
   161     /**
       
   162      * Service launch complete.
       
   163      */
       
   164     void handleOk(const QVariant& result);
       
   165 
       
   166     /**
       
   167      * Service launch errors.
       
   168      */
       
   169     void handleError(int errorCode, const QString& errorMessage);
       
   170 
   146 private:
   171 private:
   147     /**
   172     /**
   148      * Get to find body already contains an image
   173      * Get to find body already contains an image
   149      * @return bool
   174      * @return bool
   150      */
   175      */
   170     /**
   195     /**
   171      * Get the region (image/audio/video) where longpress happened
   196      * Get the region (image/audio/video) where longpress happened
   172      * @return region
   197      * @return region
   173      */
   198      */
   174     QString getHitRegion(QPointF position);
   199     QString getHitRegion(QPointF position);
   175 
       
   176     /**
       
   177      * get size of body content for MMS size calculations
       
   178      * @return size of body content
       
   179      */
       
   180     int bodySize();
       
   181 
   200 
   182     /**
   201     /**
   183      * size of the msg
   202      * size of the msg
   184      */
   203      */
   185     int messageSize();    
   204     int messageSize();    
   261      * To setup longpress gesture on media objects
   280      * To setup longpress gesture on media objects
   262      */
   281      */
   263     HbGestureSceneFilter* mGestureFilter;
   282     HbGestureSceneFilter* mGestureFilter;
   264 	
   283 	
   265     /**
   284     /**
   266      * MMs insert check utility class
   285      * MMs conformance check utility class
   267      */
   286      */
   268     MmsInsertCheckOperation* mMmsInsertCheckOp;
   287     MmsConformanceCheck* mMmsConformanceCheck;
   269 	
   288 	
   270     /**
   289     /**
   271      * Size of image in body 
   290      * Size of image in body 
   272      */
   291      */
   273     int mImageSize;
   292     int mImageSize;
   299     
   318     
   300     /**
   319     /**
   301      * CMsgImageInfo object
   320      * CMsgImageInfo object
   302      */
   321      */
   303     CMsgImageInfo *mImageInfo;    
   322     CMsgImageInfo *mImageInfo;    
       
   323     
       
   324     /**
       
   325      * Instance of HbTextItem
       
   326      * Will be deleted automatically by parent.
       
   327      * Own.
       
   328      */
       
   329     HbTextItem *mCharCounter;
       
   330 
       
   331     /**
       
   332      * Instance of HbFrameItem
       
   333      * Will be deleted automatically by parent.
       
   334      * Own.
       
   335      */
       
   336     HbFrameItem* mBackgroundItem;
       
   337     
       
   338     /**
       
   339      * Holds the previous buffer inside msgeditor
       
   340      */
       
   341     QString mPrevBuffer;
       
   342 
       
   343     /**
       
   344      * Holds char type supported
       
   345      */
       
   346     int mCharSupportType;
       
   347 
       
   348     /**
       
   349      * Instance of UniEditorPluginInterface
       
   350      * Will be deleted automatically by parent.
       
   351      * Own.
       
   352      */
       
   353     UniEditorPluginInterface* mPluginInterface;
       
   354 
       
   355     /**
       
   356      * Instance of UniEditorPluginLoader
       
   357      * Will be deleted when UniEditorPluginInterface object is deleted
       
   358      * Not Own.
       
   359      */
       
   360     UniEditorPluginLoader* mPluginLoader;
       
   361 
       
   362     /*
       
   363      * Maintains information if any unicode character has been entered or not
       
   364      */
       
   365     bool mUnicode;
   304 };
   366 };
   305 
   367 
   306 #endif //UNIFIED_EDITOR_BODY_H
   368 #endif //UNIFIED_EDITOR_BODY_H