Changed Notification class to Message.
[situare] / src / ui / meetpeoplepanel.h
index 5c4ead9..ec616ae 100644 (file)
@@ -1,15 +1,36 @@
+/*
+   Situare - A location system for Facebook
+   Copyright (C) 2010  Ixonos Plc. Authors:
+
+       Jussi Laitinen - jussi.laitinen@ixonos.com
+
+   Situare is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License
+   version 2 as published by the Free Software Foundation.
+
+   Situare is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with Situare; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
+   USA.
+*/
+
 #ifndef MEETPEOPLEPANEL_H
 #define MEETPEOPLEPANEL_H
 
 #include <QList>
 
-#include "situareservice/message.h"
-
 #include "panelbase.h"
 
-class FriendListView;
+class QUrl;
+
+class GeoCoordinate;
 class ImageButton;
-class MessageListView;
+class PersonListView;
 class User;
 
 class MeetPeoplePanel : public PanelBase
@@ -24,48 +45,78 @@ public:
      */
     MeetPeoplePanel(QWidget *parent = 0);
 
-private slots:
+/*******************************************************************************
+ * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
+ ******************************************************************************/
+protected:
     /**
-     * @brief Slot to update friend item's image
-     *
-     * @param user Friend
-     */
-    void friendImageReady(User *user);
+    * @brief Re-implemented from QWidget::hideEvent()
+    *
+    * Calls clear item selection to list.
+    *
+    * @param event
+    */
+    void hideEvent(QHideEvent *event);
 
+private slots:
     /**
-    * @brief Populates interesting people list view.
+    * @brief Called when any of the panel tabs is closed
     *
-    * @param interestingPeople list of interesting people
+    * Calls clear item selection to list.
     */
-    void populateInterestingPeopleListView(QList<User *> &interestingPeople);
+    void anyPanelClosed();
 
     /**
-    * @brief Populates message list view.
+    * @brief Called when message button is pressed.
     *
-    * @param messages list of user messages
+    * Calls requestMessageDialog with message receiver's ID and name
     */
-    void populateMessageListView(QList<Message> &messages);
+    void messageButtonPressed();
 
+    /**
+    * @brief Sets person's image.
+    *
+    * @param id image ID
+    * @param image image pixmap
+    */
+    void setImage(const QString &id, const QPixmap &image);
 
     /**
-    * @brief Sets chat button disabled.
+    * @brief Populates interesting people list view.
     *
-    * Disabled if there isn't any list item selected.
+    * @param interestingPeople list of interesting people
     */
-    void setChatButtonDisabled();
+    void populateInterestingPeopleListView(QList<User> &interestingPeople);
 
 signals:
     /**
+     * @brief Signal for person finding
+     *
+     * @param coordinates Target coordinate
+     */
+    void findPerson(const GeoCoordinate &coordinates);
+
+    /**
     * @brief Requests interesting people from current map viewport.
     *
     * Interesting people is defined by people with same tags as user has.
     */
     void requestInterestingPeople();
 
+    /**
+    * @brief Requests interesting people search.
+    */
+    void requestInterestingPeopleSearch();
+
+    /**
+    * @brief Requests message dialog.
+    * @param receiver receiver facebook ID and name
+    */
+    void requestMessageDialog(const QPair<QString, QString> &receiver);
+
 private:
-    FriendListView *m_interestingPeopleListView;///< Interesting people list view
-    MessageListView *m_messageListView;         ///< Message list view
-    ImageButton *m_chatButton;                  ///< Chat button
+    PersonListView *m_personListView;   ///< Interesting people list view
+    ImageButton *m_chatButton;          ///< Chat button
 };
 
 #endif // MEETPEOPLEPANEL_H