messagingapp/msgui/unifiededitor/inc/msgunieditorbody.h
changeset 27 e4592d119491
parent 25 84d9eb65b26f
child 47 5b14749788d7
equal deleted inserted replaced
25:84d9eb65b26f 27:e4592d119491
    16  */
    16  */
    17 
    17 
    18 #ifndef UNIFIED_EDITOR_BODY_H
    18 #ifndef UNIFIED_EDITOR_BODY_H
    19 #define UNIFIED_EDITOR_BODY_H
    19 #define UNIFIED_EDITOR_BODY_H
    20 
    20 
    21 #include <hbwidget.h>
    21 #include <msgunifiededitorbasewidget.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 HbTextItem;
    27 class HbFrameItem;
    27 class HbFrameItem;
    28 class HbIconItem;
    28 class HbIconItem;
    29 class HbPushButton;
    29 class HbPushButton;
    30 class HbGestureSceneFilter;
    30 //class HbGestureSceneFilter;
    31 class CMsgMediaResolver;
    31 class CMsgMediaResolver;
    32 class CMsgImageInfo;
    32 class CMsgImageInfo;
    33 class MmsConformanceCheck;
    33 class MmsConformanceCheck;
    34 class UniEditorPluginInterface;
    34 class UniEditorPluginInterface;
    35 class UniEditorPluginLoader;
    35 class UniEditorPluginLoader;
    36 
    36 
    37 
    37 
    38 class MsgUnifiedEditorBody : public HbWidget,public MUniEditorProcessImageOperationObserver
    38 class MsgUnifiedEditorBody : public MsgUnifiedEditorBaseWidget,
       
    39                              public MUniEditorProcessImageOperationObserver
    39 {
    40 {
    40     Q_OBJECT
    41     Q_OBJECT
    41 
    42 
    42     Q_PROPERTY(bool hasImage READ hasImage WRITE setImage)
    43     Q_PROPERTY(bool hasImage READ hasImage WRITE setImage)
    43     Q_PROPERTY(bool hasAudio READ hasAudio WRITE setAudio)
    44     Q_PROPERTY(bool hasAudio READ hasAudio WRITE setAudio)
    44 public:
    45 public:
    45 
    46 
    46     /**
    47     /**
    47      * Constructor
    48      * Constructor
    48      */
    49      */
    49     MsgUnifiedEditorBody(const QString& pluginPath, QGraphicsItem *parent = 0);
    50     MsgUnifiedEditorBody(QGraphicsItem *parent = 0);
    50 
    51 
    51     /**
    52     /**
    52      * Destructor
    53      * Destructor
    53      */
    54      */
    54     ~MsgUnifiedEditorBody();
    55     ~MsgUnifiedEditorBody();
    78      /*
    79      /*
    79       * Disables char counter
    80       * Disables char counter
    80       */
    81       */
    81      void disableCharCounter();
    82      void disableCharCounter();
    82      
    83      
       
    84      /**
       
    85       * To set focus on editable field.
       
    86       */
       
    87      void setFocus();
       
    88 
       
    89      /**
       
    90       * Get to find body already contains an image
       
    91       * @return bool
       
    92       */
       
    93      bool hasImage();
       
    94 
       
    95      /**
       
    96       * Get to find body already contains an audio
       
    97       * @return bool
       
    98       */
       
    99      bool hasAudio();
       
   100 
    83 public slots:
   101 public slots:
    84     /**
   102     /**
    85      * Called to insert image content in editor.
   103      * Called to insert image content in editor.
    86      * @param medialist list of absolute paths of media.
   104      * @param medialist list of absolute paths of media.
    87      */
   105      */
    92      * @param medialist list of absolute paths of media.
   110      * @param medialist list of absolute paths of media.
    93      */
   111      */
    94     void setAudio(QString& audiofile);
   112     void setAudio(QString& audiofile);
    95 
   113 
    96     /**
   114     /**
    97      * Called to insert video content in editor.
       
    98      * @param medialist list of absolute paths of media.
       
    99      */
       
   100     void setVideo(QString& videofile);
       
   101 
       
   102     /**
       
   103      * Called to insert body text in editor.
   115      * Called to insert body text in editor.
   104      * @param text body text.
   116      * @param text body text.
   105      */
   117      */
   106     void setText(QString& text);
   118     void setText(QString& text);
   107 
   119 
   167      * Service launch errors.
   179      * Service launch errors.
   168      */
   180      */
   169     void handleError(int errorCode, const QString& errorMessage);
   181     void handleError(int errorCode, const QString& errorMessage);
   170 
   182 
   171 private:
   183 private:
       
   184 
   172     /**
   185     /**
   173      * Get to find body already contains an image
   186      * Get to find body already contains an image
   174      * @return bool
   187      * @return bool
   175      */
   188      */
   176     bool hasImage();
       
   177 
       
   178     /**
       
   179      * Get to find body already contains an image
       
   180      * @return bool
       
   181      */
       
   182     void setImage(bool image = false);
   189     void setImage(bool image = false);
   183 
       
   184     /**
       
   185      * Get to find body already contains an audio
       
   186      * @return bool
       
   187      */
       
   188     bool hasAudio();
       
   189 
   190 
   190     /**
   191     /**
   191      * Set that body now contains an audio
   192      * Set that body now contains an audio
   192      */
   193      */
   193 	void setAudio(bool audio = false);
   194 	void setAudio(bool audio = false);
   248 
   249 
   249     /**
   250     /**
   250      * inline audio item
   251      * inline audio item
   251      */
   252      */
   252     HbPushButton* mAudioItem;
   253     HbPushButton* mAudioItem;
   253 
       
   254     /**
       
   255      * string to hold plug in path.
       
   256      */
       
   257     QString mPluginPath;
       
   258 
   254 
   259 	/**
   255 	/**
   260 	 * Image file contained inside body
   256 	 * Image file contained inside body
   261 	 */
   257 	 */
   262     QString mImageFile;
   258     QString mImageFile;
   277     QString mVideoFile;
   273     QString mVideoFile;
   278 
   274 
   279     /**
   275     /**
   280      * To setup longpress gesture on media objects
   276      * To setup longpress gesture on media objects
   281      */
   277      */
   282     HbGestureSceneFilter* mGestureFilter;
   278     //HbGestureSceneFilter* mGestureFilter;
   283 	
   279 	
   284     /**
   280     /**
   285      * MMs conformance check utility class
   281      * MMs conformance check utility class
   286      */
   282      */
   287     MmsConformanceCheck* mMmsConformanceCheck;
   283     MmsConformanceCheck* mMmsConformanceCheck;
   298     
   294     
   299     /**
   295     /**
   300      * Size of video in body
   296      * Size of video in body
   301      */
   297      */
   302     int mVideoSize;
   298     int mVideoSize;
   303 
       
   304     /**
       
   305      * Rfs object
       
   306      */
       
   307     RFs mfs;
       
   308 
   299 
   309     /**
   300     /**
   310      * CUniEditorProcessImageOperation object
   301      * CUniEditorProcessImageOperation object
   311      */
   302      */
   312     CUniEditorProcessImageOperation *mProcessImageOperation;
   303     CUniEditorProcessImageOperation *mProcessImageOperation;
   361 
   352 
   362     /*
   353     /*
   363      * Maintains information if any unicode character has been entered or not
   354      * Maintains information if any unicode character has been entered or not
   364      */
   355      */
   365     bool mUnicode;
   356     bool mUnicode;
       
   357     
       
   358     /**
       
   359      * Content widget for processing animation.
       
   360      */
       
   361     HbWidget* mProcessingWidget;
   366 };
   362 };
   367 
   363 
   368 #endif //UNIFIED_EDITOR_BODY_H
   364 #endif //UNIFIED_EDITOR_BODY_H