--- a/messagingapp/msgui/unifiededitor/inc/msgunieditorbody.h Mon May 03 12:29:07 2010 +0300
+++ b/messagingapp/msgui/unifiededitor/inc/msgunieditorbody.h Fri Jun 25 15:47:40 2010 +0530
@@ -15,27 +15,27 @@
*
*/
-#ifndef UNIFIED_EDITOR_BODY_H
-#define UNIFIED_EDITOR_BODY_H
+#ifndef MSG_UNIFIED_EDITOR_BODY_H
+#define MSG_UNIFIED_EDITOR_BODY_H
-#include <hbwidget.h>
+#include <msgunieditorbasewidget.h>
#include <f32file.h>
#include "msgunieditorprocessimageoperation.h"
class HbTextEdit;
class HbTextItem;
class HbFrameItem;
-class HbIconItem;
-class HbPushButton;
-class HbGestureSceneFilter;
class CMsgMediaResolver;
class CMsgImageInfo;
class MmsConformanceCheck;
class UniEditorPluginInterface;
class UniEditorPluginLoader;
+class MsgUnifiedEditorPixmapWidget;
+class MsgUniFiedEditorAudioWidget;
-class MsgUnifiedEditorBody : public HbWidget,public MUniEditorProcessImageOperationObserver
+class MsgUnifiedEditorBody : public MsgUnifiedEditorBaseWidget,
+ public MUniEditorProcessImageOperationObserver
{
Q_OBJECT
@@ -46,7 +46,7 @@
/**
* Constructor
*/
- MsgUnifiedEditorBody(const QString& pluginPath, QGraphicsItem *parent = 0);
+ MsgUnifiedEditorBody(QGraphicsItem *parent = 0);
/**
* Destructor
@@ -80,12 +80,44 @@
*/
void disableCharCounter();
+ /**
+ * To set focus on editable field.
+ */
+ void setFocus();
+
+ /**
+ * Get to find body already contains an image
+ * @return bool
+ */
+ bool hasImage();
+
+ /**
+ * Get to find body already contains an audio
+ * @return bool
+ */
+ bool hasAudio();
+
+ /**
+ * from MUniEditorProcessImageOperationObserver
+ * @see MUniEditorProcessImageOperationObserver
+ */
+ void EditorOperationEvent( TUniEditorProcessImageOperationEvent aEvent,
+ TFileName aFileName );
+ /**
+ * Function which tells whether the image resize process is in progress
+ */
+ bool isImageResizing()
+ {
+ return mIsImageResizing;
+ }
+
public slots:
/**
* Called to insert image content in editor.
* @param medialist list of absolute paths of media.
+ * @param draftMessage specifies draft message
*/
- void setImage(QString& imagefile);
+ void setImage(QString& imagefile, bool draftMessage = false);
/**
* Called to insert audio content in editor.
@@ -94,12 +126,6 @@
void setAudio(QString& audiofile);
/**
- * Called to insert video content in editor.
- * @param medialist list of absolute paths of media.
- */
- void setVideo(QString& videofile);
-
- /**
* Called to insert body text in editor.
* @param text body text.
*/
@@ -115,14 +141,14 @@
* Emitted when msg-body content changes
*/
void contentChanged();
+
+ /**
+ * Emitted when image is being processed.
+ * @param enable, true to enable/ false to disable.
+ */
+ void enableSendButton(bool enable) const;
-public: // from MUniEditorProcessImageOperationObserver
-
- /*
- * @see MUniEditorProcessImageOperationObserver
- */
- void EditorOperationEvent( TUniEditorProcessImageOperationEvent aEvent,
- TFileName aFileName );
+
protected: // from HbWidget
@@ -133,47 +159,18 @@
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const;
private slots:
- /**
- * called on long press on the media objects
- */
- void longPressed(QPointF position);
/**
* called from the media object's item specific menu
*/
void removeMedia();
-
- /**
- * called from the media object's item specific menu
- */
- void openMedia();
-
- /**
- * called from the media object's item specific menu
- */
- void viewDetails();
/**
* handle text changes in body field
*/
void onTextChanged();
- /**
- * Service launch complete.
- */
- void handleOk(const QVariant& result);
-
- /**
- * Service launch errors.
- */
- void handleError(int errorCode, const QString& errorMessage);
-
private:
- /**
- * Get to find body already contains an image
- * @return bool
- */
- bool hasImage();
/**
* Get to find body already contains an image
@@ -182,21 +179,9 @@
void setImage(bool image = false);
/**
- * Get to find body already contains an audio
- * @return bool
- */
- bool hasAudio();
-
- /**
* Set that body now contains an audio
*/
void setAudio(bool audio = false);
-
- /**
- * Get the region (image/audio/video) where longpress happened
- * @return region
- */
- QString getHitRegion(QPointF position);
/**
* size of the msg
@@ -237,24 +222,14 @@
HbTextEdit* mTextEdit;
/**
- * frame for editor.
- */
- HbFrameItem* mEditorFrame;
-
- /**
* icon item to preview images.
*/
- HbIconItem* mIconItem;
+ MsgUnifiedEditorPixmapWidget* mPixmapItem;
/**
* inline audio item
*/
- HbPushButton* mAudioItem;
-
- /**
- * string to hold plug in path.
- */
- QString mPluginPath;
+ MsgUniFiedEditorAudioWidget* mAudioItem;
/**
* Image file contained inside body
@@ -275,11 +250,6 @@
* Video file contained inside body
*/
QString mVideoFile;
-
- /**
- * To setup longpress gesture on media objects
- */
- HbGestureSceneFilter* mGestureFilter;
/**
* MMs conformance check utility class
@@ -302,11 +272,6 @@
int mVideoSize;
/**
- * Rfs object
- */
- RFs mfs;
-
- /**
* CUniEditorProcessImageOperation object
*/
CUniEditorProcessImageOperation *mProcessImageOperation;
@@ -363,6 +328,22 @@
* Maintains information if any unicode character has been entered or not
*/
bool mUnicode;
+
+ /**
+ * Content widget for processing animation.
+ */
+ HbWidget* mProcessingWidget;
+
+ /**
+ * boolean specifying a draft message
+ */
+ bool mDraftMessage ;
+
+ /*
+ * Flag to indicate the state of image resizing process.
+ * true - resize in progress. false - resize is not underway.
+ */
+ bool mIsImageResizing;
};
-#endif //UNIFIED_EDITOR_BODY_H
+#endif //MSG_UNIFIED_EDITOR_BODY_H