messagingapp/msgui/msgapp/inc/msglistview.h
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
child 37 518b245aa84c
equal deleted inserted replaced
23:238255e8b033 25:84d9eb65b26f
    24 // FORWARD DECLARATIONS
    24 // FORWARD DECLARATIONS
    25 class HbListView;
    25 class HbListView;
    26 class HbAbstractViewItem;
    26 class HbAbstractViewItem;
    27 class HbListWidget;
    27 class HbListWidget;
    28 class HbListWidgetItem;
    28 class HbListWidgetItem;
    29 class QSortFilterProxyModel;
       
    30 
    29 
    31 /**
    30 /**
    32  * This class provides the message list view for the messaging application.
    31  * This class provides the message list view for the messaging application.
    33  * Data source for this view is the conversation list model.
    32  * Data source for this view is the conversation list model.
    34  */
    33  */
    45     /**
    44     /**
    46      * Destructor
    45      * Destructor
    47      */
    46      */
    48     virtual ~MsgListView();
    47     virtual ~MsgListView();
    49 
    48 
    50     /**
       
    51      * This function starts effect on ListView
       
    52      */
       
    53     void activateView();
       
    54 
       
    55 private slots:
    49 private slots:
    56     /*
    50     /*
    57      * Handler for long tap of a list item.
    51      * Handler for long tap of a list item.
    58      * @param viewItem  Lon tapped view item
    52      * @param viewItem  Lon tapped view item
    59      * @param point X and Y co-ordinates of long tap
    53      * @param point X and Y co-ordinates of long tap
    65      * Opens the conversation view.
    59      * Opens the conversation view.
    66      * @param index Model index of the list item tapped.
    60      * @param index Model index of the list item tapped.
    67      */
    61      */
    68     void openConversation(const QModelIndex& index);
    62     void openConversation(const QModelIndex& index);
    69 
    63 
    70     //----------------- View specific Menu Slots---------------------------//
       
    71 
       
    72     /**
       
    73      * Sorts conversation data model based on subject
       
    74      */
       
    75     void sortBySubject();
       
    76 
       
    77     /**
       
    78      * Sorts conversation data model based on timestamp
       
    79      */
       
    80     void sortByDate();
       
    81 
       
    82     /**
       
    83      * Sorts conversation data model based on sender
       
    84      */
       
    85     void sortBySender();
       
    86 
       
    87     /**
    64     /**
    88      * Handler for new message button trigger
    65      * Handler for new message button trigger
    89      */
    66      */
    90     void sendNewMessage();
    67     void sendNewMessage();
    91 
       
    92     /**
       
    93      * Handler for closing all the active chats
       
    94      */
       
    95     void closeActiveChats();
       
    96 
       
    97     /**
       
    98      * Deletes all the conversations
       
    99      */
       
   100     void deleteAll();
       
   101 
       
   102     /**
       
   103      * Lists all the Im Messages separately
       
   104      */
       
   105     void viewImMessagesSeparately();
       
   106 
    68 
   107     /**
    69     /**
   108      *Popup the message settings dialog
    70      *Popup the message settings dialog
   109      */
    71      */
   110     void settings();
    72     void settings();
   124     /**
    86     /**
   125      * Deletes the seleted item from the list of Conversations
    87      * Deletes the seleted item from the list of Conversations
   126      */
    88      */
   127     void deleteItem();
    89     void deleteItem();
   128 
    90 
   129     // ------------------------------- End ----------------------------- //
       
   130 
       
   131     /**
       
   132      * Connect Model to view
       
   133      */
       
   134     void populateListView();
       
   135 
       
   136     /**
    91     /**
   137      * Handles toolbar extension item clicks.
    92      * Handles toolbar extension item clicks.
   138      * @param item Activated toolbar extension item.
    93      * @param item Activated toolbar extension item.
   139      */
    94      */
   140     void handleViewExtnActivated(HbListWidgetItem *item);
    95     void handleViewExtnActivated(HbListWidgetItem *item);
       
    96     
       
    97     /**
       
    98      * Constructs view when viewReady is emitted.
       
    99      */
       
   100     void doDelayedConstruction();
       
   101     
       
   102     /**
       
   103      * Handles saving to contacts
       
   104      */
       
   105     void saveToContacts();
       
   106     
       
   107     /**
       
   108      * Opens contact card for resolved contact.
       
   109      */
       
   110     void contactInfo();
   141 
   111 
   142 private:
   112 private:
   143 
       
   144     /**
       
   145      * createView
       
   146      */
       
   147     void createView();
       
   148 
   113 
   149     /**
   114     /**
   150      * Initialize the list view inside the main view
   115      * Initialize the list view inside the main view
   151      */
   116      */
   152     void setupListView();
   117     void setupListView();
   167      * Own.
   132      * Own.
   168      */
   133      */
   169     HbListView* mMsgList;
   134     HbListView* mMsgList;
   170 
   135 
   171     /**
   136     /**
   172      * Proxy model for sorting and filtering.
       
   173      * Own.
       
   174      */
       
   175     QSortFilterProxyModel *mProxyModel;
       
   176 
       
   177     /**
       
   178      * Container widget of toolbar extension.
   137      * Container widget of toolbar extension.
   179      * ToolBar takes ownership.
   138      * ToolBar takes ownership.
   180      */
   139      */
   181     HbListWidget *mViewExtnList;
   140     HbListWidget *mViewExtnList;
   182 
   141