messagingapp/msgui/conversationview/inc/msgconversationbaseview.h
changeset 23 238255e8b033
child 25 84d9eb65b26f
equal deleted inserted replaced
5:4697dfb2d7ad 23:238255e8b033
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     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  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MSG_CONVERSATION_VIEW_INTERFACE_H
       
    20 #define MSG_CONVERSATION_VIEW_INTERFACE_H
       
    21 
       
    22 #ifdef  CONVERSATIONVIEW_DLL
       
    23 #define CONVERSATION_VIEW_EXPORT Q_DECL_EXPORT
       
    24 #else
       
    25 #define CONVERSATION_VIEW_EXPORT Q_DECL_IMPORT
       
    26 #endif
       
    27 
       
    28 #include "msgbaseview.h"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class MsgConversationView;
       
    32 class HbListWidgetItem;
       
    33 
       
    34 class CONVERSATION_VIEW_EXPORT MsgConversationBaseView : public MsgBaseView
       
    35     {
       
    36     Q_OBJECT
       
    37 
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Constructor
       
    42      */
       
    43     MsgConversationBaseView(QGraphicsItem* parent=0);
       
    44 
       
    45     /**
       
    46      * Destructor
       
    47      */
       
    48     ~MsgConversationBaseView();
       
    49 
       
    50 public:
       
    51     /**
       
    52      * openConversationView
       
    53      * Launches conversation view
       
    54      * @param entryId, the conversation index to be open
       
    55      *
       
    56      */
       
    57     void openConversation(qint64 entryId);
       
    58 
       
    59     /**
       
    60      * clearContent
       
    61      * Clear conversation view content
       
    62      */
       
    63     void clearContent();
       
    64 
       
    65     /**
       
    66      * saveContentToDrafts
       
    67      * Saves the editors content in cv to drafts
       
    68      */
       
    69     bool saveContentToDrafts();
       
    70 
       
    71 public slots:   
       
    72     /**
       
    73      * Close the conversation view 
       
    74      * This slot is triggered when user presses back(seconday sofykey)
       
    75      */
       
    76     void closeConversationView();
       
    77     
       
    78     /**
       
    79      * Mark messages as read
       
    80      * Slot is triiggered when replying started
       
    81      */
       
    82     void markMessagesAsRead();
       
    83     
       
    84 private slots:
       
    85     
       
    86     /**
       
    87      * Open contact card
       
    88      * Slot is triiggered when clicking on CV header
       
    89      */
       
    90     void openContactDetails();
       
    91     
       
    92  
       
    93  signals:
       
    94      /**
       
    95       * Signal emitted when the conversation view is closed.
       
    96       */
       
    97     void conversationViewClosed(); 
       
    98     
       
    99 private :
       
   100     /**
       
   101      * Create and initialise the view
       
   102      */
       
   103     void initView();
       
   104     
       
   105 private:
       
   106    
       
   107     /**
       
   108      * MsgConversationView, main view class
       
   109      * Owned
       
   110      */
       
   111     MsgConversationView *mConversationView;
       
   112    
       
   113     /**
       
   114      * Conversation ID
       
   115      */
       
   116     qint64 mConversationId;
       
   117 
       
   118     };
       
   119 
       
   120 #endif // MSG_CONVERSATION_VIEW_INTERFACE_H
       
   121 
       
   122 // EOF