Copyright (C) 2010 Ixonos Plc. Authors:
Kaj Wallin - kaj.wallin@ixonos.com
+ Katri Kaikkonen - katri.kaikkonen@ixonos.com
+ Pekka Nissinen - pekka.nissinen@ixonos.com
Situare is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
USA.
*/
-
#ifndef USERPANEL_H
#define USERPANEL_H
-#include <QtGui>
-#include "../user/user.h"
-#include "sidepanel.h"
+#include "panelbase.h"
+#include "user/user.h"
class UserInfo;
/**
-* @brief Class for sliding user information panel
-*
-* @author Kaj Wallin - kaj.wallin (at) ixonos.com
-* @class UserInfoPanel userpanel.h "ui/userpanel.h"
-*/
-class UserInfoPanel : public SidePanel
+ * @brief Class for sliding user information panel
+ *
+ * @author Kaj Wallin - kaj.wallin (at) ixonos.com
+ * @author Katri Kaikkonen - katri.kaikkonen (at) ixonos.com
+ * @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
+ */
+class UserInfoPanel : public PanelBase
{
Q_OBJECT
public:
/**
- * @brief Default constructor
- *
- * @param parent
- */
+ * @brief Default constructor
+ *
+ * @param parent
+ */
UserInfoPanel(QWidget *parent = 0);
/*******************************************************************************
******************************************************************************/
public slots:
/**
- * @brief Slot to capture returning user data from situareService
+ * @brief Populates popular tags list
*
- * @param user
+ * @param popularTags list of popular tags
*/
+ void populatePopularTags(QHash<QString, QString> &popularTags);
+
+ /**
+ * @brief show / hide user information
+ *
+ * @param show true if userinfo should be shown
+ */
+ void showUserInfo(bool show);
+
+ /**
+ * @brief Slot to capture returning user data from situareService
+ *
+ * @param user
+ */
void userDataReceived(User *user);
-signals:
/**
- * @brief Signal for refreshing user data.
+ * @brief Slot to populate user tags
*
+ * @param userTags list of user tags
*/
- void refreshUserData();
+ void userTagsReceived(QHash<QString, QString> &userTags);
+private slots:
/**
- * @brief Signal for requesting reverseGeo from SituareEngine
+ * @brief Sets user's image.
*
+ * @param id image ID
+ * @param image image pixmap
*/
- void requestReverseGeo();
+ void setImage(const QString &id, const QPixmap &image);
+
+ void showTagsDialog();
+
+/*******************************************************************************
+ * SIGNALS
+ ******************************************************************************/
+signals:
/**
- * @brief Signals, when address data is ready
+ * @brief Signal for adding tags.
*
- * @param address Street address
+ * @param tags tags to add
*/
- void reverseGeoReady(const QString &address);
+ void addTags(const QStringList &tags);
/**
- * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class
+ * @brief Signal for collapse user info
+ */
+ void collapse();
+
+ /**
+ * @brief Signal for finding user.
+ *
+ * @param coordinates user geo coordinates
+ */
+ void findUser(const GeoCoordinate &coordinates);
+
+ /**
+ * @brief Signal that used to inform user that his message/location update tp Situare server
+ * was failed.
+ * This signal is originally sended from UserInfo
+ *
+ * @param message message for notification
+ * @param modal true if modal notification otherwice false
+ */
+ void notificateUpdateFailing(const QString &message, bool modal);
+
+ /**
+ * @brief Signal for refreshing user data.
+ */
+ void refreshUserData();
+
+ /**
+ * @brief Signal for removing tags.
*
- * @param status Status message
- * @param publish Publish on Facebook
+ * @param tags tags to add
*/
- void statusUpdate(const QString &status, const bool &publish);
+ void removeTags(const QStringList &tags);
+
+ /**
+ * @brief Signal for requesting popular tags
+ */
+ void requestPopularTags();
+
+ /**
+ * @brief Notify that update location message button was clicked
+ */
+ void updateLocationMessageButtonClicked();
/*******************************************************************************
* DATA MEMBERS