messagingapp/msgui/unifiedviewer/inc/unifiedviewer.h
changeset 70 a15d9966050f
parent 52 12db4185673b
equal deleted inserted replaced
61:8ba0afbb4637 70:a15d9966050f
    16  */
    16  */
    17 
    17 
    18 #ifndef UNIFIED_VIEWER_H
    18 #ifndef UNIFIED_VIEWER_H
    19 #define UNIFIED_VIEWER_H
    19 #define UNIFIED_VIEWER_H
    20 
    20 
    21 #ifdef BUILD_UNI_VIEWER_DLL
    21 #ifdef MSGUI_UNIT_TEST
    22 #define UNI_VIEWER_DLL Q_DECL_EXPORT
    22  #define UNI_VIEWER_DLL
    23 #else
    23 #else
    24 #define UNI_VIEWER_DLL Q_DECL_IMPORT
    24  #ifdef BUILD_UNI_VIEWER_DLL
       
    25   #define UNI_VIEWER_DLL Q_DECL_EXPORT
       
    26  #else
       
    27   #define UNI_VIEWER_DLL Q_DECL_IMPORT
       
    28  #endif
    25 #endif
    29 #endif
    26 
    30 
    27 #include <sqldb.h>
       
    28 #include "msgbaseview.h"
    31 #include "msgbaseview.h"
    29 
       
    30 #include "convergedmessage.h"
    32 #include "convergedmessage.h"
    31 
    33 
    32 class UniViewerFeeder;
    34 class UniViewerFeeder;
    33 class ConvergedMessage;
    35 class ConvergedMessage;
    34 class HbScrollArea;
    36 class HbScrollArea;
    56     ~UnifiedViewer();
    58     ~UnifiedViewer();
    57 
    59 
    58     /**
    60     /**
    59      * Populates the content on the widget
    61      * Populates the content on the widget
    60      */
    62      */
    61     void populateContent(const qint32 messageId, bool update, int msgCount);
    63     void populateContent(const qint32 messageId, bool update, int msgCount, qint64 conversationId = -1);
       
    64 
       
    65     /**
       
    66      * Event handler
       
    67      * @param key Key code
       
    68      * @return true if key event handled else false.
       
    69      * @see MsgBaseView
       
    70      */
       
    71     bool handleKeyEvent(int key);
       
    72 
       
    73 public slots:
       
    74 
       
    75     /**
       
    76      * Clears the content on the widget
       
    77      */
       
    78     void clearContent();
       
    79 
       
    80     // Used for internal testing will be removed
       
    81     void handleFwdAction();
       
    82 
       
    83     /**
       
    84      * Handle delete
       
    85      */
       
    86     void handleDeleteAction();
    62 
    87 
    63 protected:
    88 protected:
    64 
    89 
    65     /**
    90     /**
    66      * reimplemented from base class to provide proper geometry for scrolling.
    91      * reimplemented from base class to provide proper geometry for scrolling.
    85      * Launch Editor for forward, reply, replyall actions
   110      * Launch Editor for forward, reply, replyall actions
    86      * @param operation, Editor operation e.g. forward, reply etc
   111      * @param operation, Editor operation e.g. forward, reply etc
    87      */
   112      */
    88     void launchEditor(MsgBaseView::UniEditorOperation operation);
   113     void launchEditor(MsgBaseView::UniEditorOperation operation);
    89 
   114 
    90 public slots:
       
    91 
       
    92     /**
   115     /**
    93      * Clears the content on the widget
   116      * Launches the dialer interface.
       
   117      * @args number Number to be called.
    94      */
   118      */
    95     void clearContent();
   119     void call(const QString &number);
    96 
       
    97     // Used for internal testing will be removed
       
    98     void handleFwdAction();
       
    99     
       
   100     /**
       
   101      * Handle delete 
       
   102      */     
       
   103     void handleDeleteAction();
       
   104 
   120 
   105 private slots:
   121 private slots:
   106     /**
   122     /**
   107      * This slot is called when sendMessage signal is emitted for a highlighted
   123      * This slot is called when sendMessage signal is emitted for a highlighted
   108      * phone number, from body widget.
   124      * phone number, from body widget.
   144      * Owned
   160      * Owned
   145      */
   161      */
   146     UniContentsWidget* mContentsWidget;
   162     UniContentsWidget* mContentsWidget;
   147 
   163 
   148     /**
   164     /**
       
   165      * Conversation ID
       
   166      */
       
   167     qint64 mConversationID;
       
   168 
       
   169     /**
   149      * Contact id
   170      * Contact id
   150      */
   171      */
   151     qint32 mContactId;
   172     qint32 mContactId;
   152 
   173 
   153     /**
   174     /**
   154      * Message id
   175      * Message id
   155      */
   176      */
   156     qint32 mMessageId;
   177     qint32 mMessageId;
   157 	
   178 
   158     /**
   179     /**
   159      * Message count
   180      * Message count
   160      */
   181      */
   161     int mMsgCount;
   182     int mMsgCount;
       
   183 
       
   184 #ifdef MSGUI_UNIT_TEST
       
   185     /**
       
   186      * Unit Testing
       
   187      */
       
   188     friend class TestUnifiedViewer;
       
   189 #endif
   162 };
   190 };
   163 
   191 
   164 #endif
   192 #endif
   165 // EOF
   193 // EOF