messagingapp/msgui/conversationview/inc/msgconversationbaseview.h
branchGCC_SURGE
changeset 47 5b14749788d7
parent 27 e4592d119491
parent 44 36f374c67aa8
equal deleted inserted replaced
35:a32b19fb291e 47:5b14749788d7
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3  * All rights reserved.
     4 * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:Conversation Base view.
       
    15  *
     8  *
    16 */
     9  * Initial Contributors:
    17 
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:Conversation Base view.
       
    15  *
       
    16  */
    18 
    17 
    19 #ifndef MSG_CONVERSATION_VIEW_INTERFACE_H
    18 #ifndef MSG_CONVERSATION_VIEW_INTERFACE_H
    20 #define MSG_CONVERSATION_VIEW_INTERFACE_H
    19 #define MSG_CONVERSATION_VIEW_INTERFACE_H
    21 
    20 
    22 #ifdef  CONVERSATIONVIEW_DLL
    21 #ifdef  CONVERSATIONVIEW_DLL
    34 class MsgContactCardWidget;
    33 class MsgContactCardWidget;
    35 class QGraphicsLinearLayout;
    34 class QGraphicsLinearLayout;
    36 class XQSettingsManager;
    35 class XQSettingsManager;
    37 class XQPublishAndSubscribeUtils;
    36 class XQPublishAndSubscribeUtils;
    38 
    37 
    39 class CONVERSATION_VIEW_EXPORT MsgConversationBaseView : public MsgBaseView
    38 class CONVERSATION_VIEW_EXPORT MsgConversationBaseView: public MsgBaseView
    40     {
    39 {
    41     Q_OBJECT
    40 Q_OBJECT
    42 
    41 
    43 public:
    42 public:
    44 
    43 
    45     /**
    44     /**
    46      * Constructor
    45      * Constructor
    47      */
    46      */
    48     MsgConversationBaseView(QGraphicsItem* parent=0);
    47     MsgConversationBaseView(QGraphicsItem* parent = 0);
    49 
    48 
    50     /**
    49     /**
    51      * Destructor
    50      * Destructor
    52      */
    51      */
    53     ~MsgConversationBaseView();
    52     ~MsgConversationBaseView();
    68     void clearContent();
    67     void clearContent();
    69 
    68 
    70     /**
    69     /**
    71      * saveContentToDrafts
    70      * saveContentToDrafts
    72      * Saves the editors content in cv to drafts
    71      * Saves the editors content in cv to drafts
       
    72      * @return valid message id if save is success
       
    73      * else invalid message id ( i.e. -1 )
    73      */
    74      */
    74     void saveContentToDrafts();
    75     int saveContentToDrafts();
    75     
    76 
    76     /**
    77     /**
    77      * conversationId
    78      * conversationId
    78      * Get the conversationId
    79      * Get the conversationId
    79      */
    80      */
    80      qint64 conversationId();
    81     qint64 conversationId();
    81 
    82 
    82 public slots:   
    83 public slots:
    83     /**
    84     /**
    84      * Close the conversation view 
    85      * Close the conversation view 
    85      * This slot is triggered when user presses back(seconday sofykey)
    86      * This slot is triggered when user presses back(seconday sofykey)
    86      */
    87      */
    87     void closeConversationView();
    88     void closeConversationView();
    88     
    89 
    89     /**
    90     /**
    90      * Mark messages as read
    91      * Mark messages as read
    91      * Slot is triiggered when replying started
    92      * Slot is triiggered when replying started
    92      */
    93      */
    93     void markMessagesAsRead();
    94     void markMessagesAsRead();
    94     
    95 
    95     /**
    96     /**
    96      * Publish the conversation id based on the flag.
    97      * Publish the conversation id based on the flag.
    97      * @param setId if true previous conversation id 
    98      * @param setId if true previous conversation id 
    98      * will be published else -1 will be published.
    99      * will be published else -1 will be published.
    99      */
   100      */
   100     void setPSCVId(bool setId);
   101     void setPSCVId(bool setId);
   101 	   
   102 
   102 private slots:
   103 private slots:
   103    /**
   104     /**
   104    * Slot for delayed construction
   105      * Slot for delayed construction
   105    */
   106      */
   106     void doDelayedConstruction();
   107     void doDelayedConstruction();
   107     
   108 
   108 	/**
   109     /**
   109 	* Hides chrome when itu-t is up
   110      * Hides chrome when itu-t is up
   110 	*/
   111      */
   111     void hideChrome(bool hide);
   112     void hideChrome(bool hide);
   112 	
   113 
   113 	/**
   114     /**
   114      * Slot for handling valid returns from the framework.
   115      * Slot for handling valid returns from the framework.
   115      * 
   116      * 
   116      * @param result const QVariant&
   117      * @param result const QVariant&
   117      */
   118      */
   118     void handleOk(const QVariant& result);
   119     void handleOk(const QVariant& result);
   119     
   120 
   120     /**
   121     /**
   121      * Slot for handling errors. Error ids are provided as 
   122      * Slot for handling errors. Error ids are provided as 
   122      * 32-bit integers.
   123      * 32-bit integers.
   123      * @param errorCode qint32
   124      * @param errorCode qint32
   124      */
   125      */
   125     void handleError(int errorCode, const QString& errorMessage);
   126     void handleError(int errorCode, const QString& errorMessage);
   126 
   127 
   127     /**
   128     /**
   128      * Slot for handling the timer expiry event fired from view reay indication
   129      * Slot for handling the timer expiry event fired from view reay indication
   129      */    
   130      */
   130     void handleViewReady();
   131     void handleViewReady();
   131     
   132 
   132  signals:
   133     /**
   133      /**
   134      *
   134       * Signal emitted when the conversation view is closed.
   135      */
   135       */
   136     void handleConversationIdChange(qint64 convId);
   136     void conversationViewClosed(); 
   137 
   137     
   138 signals:
   138 private :
   139     /**
       
   140      * Signal emitted when the conversation view is closed.
       
   141      */
       
   142     void conversationViewClosed();
       
   143 
       
   144 private:
   139     /**
   145     /**
   140      * Create and initialise the view
   146      * Create and initialise the view
   141      */
   147      */
   142     void initView();
   148     void initView();
   143     
   149 
   144 private:
   150 private:
   145    
   151 
   146    /**
   152     /**
   147      * Conversation ID
   153      * Conversation ID
   148      */
   154      */
   149     qint64 mConversationId;
   155     qint64 mConversationId;
   150    
   156 
   151     /**
   157     /**
   152      * MsgConversationView, main view class
   158      * MsgConversationView, main view class
   153      * Owned
   159      * Owned
   154      */
   160      */
   155     MsgConversationView *mConversationView;  
   161     MsgConversationView *mConversationView;
   156     
   162 
   157     /**
   163     /**
   158      * Contact card widget.
   164      * Contact card widget.
   159      */
   165      */
   160     MsgContactCardWidget* mContactCard;
   166     MsgContactCardWidget* mContactCard;
   161     
   167 
   162     /**
   168     /**
   163      * Main layout.
   169      * Main layout.
   164      */
   170      */
   165     QGraphicsLinearLayout* mMainLayout;
   171     QGraphicsLinearLayout* mMainLayout;
   166     
   172 
   167 	/**
   173     /**
   168      * Object of XQSettingsKey. 
   174      * Object of XQSettingsKey. 
   169      */ 
   175      */
   170     XQSettingsKey mCVIdkey;
   176     XQSettingsKey mCVIdkey;
   171 
   177 
   172     /**
   178     /**
   173      * mSettingsManager
   179      * mSettingsManager
   174      * Instance of the XQSettingsManager
   180      * Instance of the XQSettingsManager
   175      * Own.
   181      * Own.
   176      */ 
   182      */
   177     XQSettingsManager* mSettingsManager;    
   183     XQSettingsManager* mSettingsManager;
   178     
   184 };
   179     };
       
   180 
   185 
   181 #endif // MSG_CONVERSATION_VIEW_INTERFACE_H
   186 #endif // MSG_CONVERSATION_VIEW_INTERFACE_H
   182 
       
   183 // EOF
   187 // EOF