Modified TagsDialog.
[situare] / src / ui / meetpeoplepanel.h
index ec616ae..8407d83 100644 (file)
@@ -28,7 +28,9 @@
 
 class QUrl;
 
+class ExtendedListItemDelegate;
 class GeoCoordinate;
+class HeaderListItemDelegate;
 class ImageButton;
 class PersonListView;
 class User;
@@ -39,6 +41,11 @@ class MeetPeoplePanel : public PanelBase
 
 public:
     /**
+    * @brief Unit test class
+    */
+    friend class TestMeetPeoplePanel;
+
+    /**
      * @brief Default constructor
      *
      * @param parent
@@ -67,6 +74,13 @@ private slots:
     void anyPanelClosed();
 
     /**
+    * @brief Handles list item selection.
+    *
+    * Sets item releated buttons enabled
+    */
+    void listItemSelectionHandler();
+
+    /**
     * @brief Called when message button is pressed.
     *
     * Calls requestMessageDialog with message receiver's ID and name
@@ -82,11 +96,25 @@ private slots:
     void setImage(const QString &id, const QPixmap &image);
 
     /**
+    * Shows selected friend in friend list
+    *
+    * Emits requestShowFriend with selected friend from list
+    */
+    void showFriend();
+
+    /**
     * @brief Populates interesting people list view.
     *
-    * @param interestingPeople list of interesting people
+    * @param friends list of friends
+    * @param others list of other people
+    */
+    void populateInterestingPeopleListView(QList<User> &friends, QList<User> &others);
+
+private:
+    /**
+    * @brief Inits item delegates for message list view.
     */
-    void populateInterestingPeopleListView(QList<User> &interestingPeople);
+    void initItemDelegates();
 
 signals:
     /**
@@ -110,13 +138,24 @@ signals:
 
     /**
     * @brief Requests message dialog.
+    *
     * @param receiver receiver facebook ID and name
     */
     void requestMessageDialog(const QPair<QString, QString> &receiver);
 
+    /**
+    * @brief Requests to show friend in friend list.
+    *
+    * @param userIDs list of friends' user IDs
+    */
+    void requestShowFriend(const QList<QString> &userIDs);
+
 private:
-    PersonListView *m_personListView;   ///< Interesting people list view
-    ImageButton *m_chatButton;          ///< Chat button
+    ExtendedListItemDelegate *m_personListItemDelegate;    ///< Person list item delegate
+    HeaderListItemDelegate *m_headerListItemDelegate;       ///< Header list item delegate
+    ImageButton *m_chatButton;                              ///< Chat button
+    ImageButton *m_friendListButton;                        ///< Friend list button
+    PersonListView *m_personListView;                       ///< Interesting people list view
 };
 
 #endif // MEETPEOPLEPANEL_H