messagingapp/msgui/conversationview/inc/msgeditorwidget.h
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
equal deleted inserted replaced
23:238255e8b033 25:84d9eb65b26f
    22 #include <HbWidget>
    22 #include <HbWidget>
    23 #include <HbLineEdit>
    23 #include <HbLineEdit>
    24 
    24 
    25 // FORWARD DECLARATIONS
    25 // FORWARD DECLARATIONS
    26 class HbPushButton;
    26 class HbPushButton;
       
    27 class HbFrameItem;
       
    28 class HbTextItem;
       
    29 class UniEditorPluginLoader;
       
    30 class UniEditorPluginInterface;
       
    31 class UniEditorGenUtils;
    27 
    32 
    28 /**
    33 /**
    29  * Custom editor class
    34  * Custom editor class
    30  */
    35  */
    31 class MsgEditor : public HbLineEdit
    36 class MsgEditor : public HbLineEdit
    91      * @param contentText content text to set.
    96      * @param contentText content text to set.
    92      */
    97      */
    93     void setContent(const QString &contentText);
    98     void setContent(const QString &contentText);
    94 
    99 
    95     /**
   100     /**
    96      * Getter method which returns the current service-id.
   101      * This function does initialisations needed for character counter
    97      * @return service-id
   102      */
    98      */
   103     void setEncodingSettings();
    99     const QString& serviceId();
   104    
   100 
       
   101 signals:
   105 signals:
   102 
   106 
   103     /**
   107     /**
   104      * Emitted when send button from virtual ITUT is pressed.
   108      * Emitted when send button from virtual ITUT is pressed.
   105      */
   109      */
   108     /**
   112     /**
   109      * Signal emitted when the focus in event comes
   113      * Signal emitted when the focus in event comes
   110      * i.e. when editor is tapped for reply
   114      * i.e. when editor is tapped for reply
   111      */ 
   115      */ 
   112     void replyStarted();
   116     void replyStarted();
       
   117 
       
   118     /**
       
   119      * Signal emitted when the sms char limit is reached
       
   120      */ 
       
   121     void smsCharLimitReached();
   113     
   122     
   114 public slots:
   123 public slots:
   115 
   124 
   116     /**
   125     /**
   117      * Clears the content.
   126      * Clears the content.
   128     /**
   137     /**
   129      * called when send button is clicked.
   138      * called when send button is clicked.
   130      */
   139      */
   131     void onClicked();
   140     void onClicked();
   132 
   141 
       
   142     /**
       
   143      * called the timer expires and handles the case when sms char limit is
       
   144      * reached
       
   145      */
       
   146 	 void handleSmsCharLimitReached();
       
   147 	 
       
   148 	 /**
       
   149      * called when send button is pressed/released.
       
   150      */  
       
   151     void onPressed();
       
   152     void onReleased();
       
   153 
   133 private:
   154 private:
   134 
   155 
   135     /**
   156     /**
   136      * Initialization function.
   157      * Initialization function.
   137      */
   158      */
   138     void init();
   159     void init();
       
   160     
       
   161 	/**
       
   162 	* To update back ground.
       
   163 	*/
       
   164     void updateButtonBackground(const QString& bg);
   139 
   165 
   140 private:
   166 private:
   141 
   167 
   142     /**
   168     /**
   143      * Current service-id
       
   144      */
       
   145     QString mServiceId;
       
   146 
       
   147     /**
       
   148      * Instance of message edit.
   169      * Instance of message edit.
   149      * Will be deleted automatically by parent.
   170      * Will be deleted automatically by parent.
   150      * Own.
   171      * Own.
   151      */
   172      */
   152     MsgEditor *mMsgEditor;
   173     MsgEditor *mMsgEditor;
   155      * Instance of push button.
   176      * Instance of push button.
   156      * Will be deleted automatically by parent.
   177      * Will be deleted automatically by parent.
   157      * Own.
   178      * Own.
   158      */
   179      */
   159     HbPushButton *mSendButton;
   180     HbPushButton *mSendButton;
       
   181 
       
   182     /**
       
   183      * Instance of HbTextItem
       
   184      * Will be deleted automatically by parent.
       
   185      * Own.
       
   186      */
       
   187     HbTextItem *mCharCounter;
       
   188 
       
   189     /**
       
   190      * Instance of HbFrameItem
       
   191      * Will be deleted automatically by parent.
       
   192      * Own.
       
   193      */
       
   194     HbFrameItem* mBackgroundItem;
       
   195     
       
   196     /**
       
   197      * Holds the previous buffer inside msgeditor
       
   198      */
       
   199     QString mPrevBuffer;
       
   200 
       
   201     /**
       
   202      * Holds char type supported
       
   203      */
       
   204     int mCharSupportType;
       
   205 
       
   206     /**
       
   207      * Instance of UniEditorPluginInterface
       
   208      * Will be deleted automatically by parent.
       
   209      * Own.
       
   210      */
       
   211     UniEditorPluginInterface* mPluginInterface;
       
   212 
       
   213     /**
       
   214      * Instance of UniEditorPluginLoader
       
   215      * Will be deleted when UniEditorPluginInterface object is deleted
       
   216      * Not Own.
       
   217      */
       
   218     UniEditorPluginLoader* mPluginLoader;
       
   219 
       
   220     /**
       
   221      * Instance of UniEditorGenUtils
       
   222      * Own.
       
   223      */
       
   224     UniEditorGenUtils* mEditorUtils;
       
   225 
       
   226     /**
       
   227      * Indication for sms char limt reached
       
   228      */
       
   229     bool mSmsCharLimitReached;
   160 };
   230 };
   161 
   231 
   162 #endif // MSGEDITORWIDGET_H
   232 #endif // MSGEDITORWIDGET_H
   163 // EOF
   233 // EOF