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
-*/
-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);
+private slots:
+ /**
+ * @brief Sets user's image.
+ *
+ * @param id image ID
+ * @param image image pixmap
+ */
+ void setImage(const QString &id, const QPixmap &image);
+
+ void showTagsDialog();
+
+
/*******************************************************************************
* SIGNALS
******************************************************************************/
signals:
/**
- * @brief Signal for finding user.
+ * @brief Signal for adding tags.
*
- * @param coordinates user geo coordinates
+ * @param tags tags to add
*/
- void findUser(const QPointF &coordinates);
+ void addTags(const QStringList &tags);
/**
- * @brief Signal that informs that user's message/location failed to update on Situare server
- * This signal is originally sended from SituareService with name error
- * Signal is renamed on MainWindow
- *
- * @param error Error code
- */
- void messageSendingFailed(const int error);
+ * @brief Signal for collapse user info
+ */
+ void collapse();
/**
- * @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
- */
+ * @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.
- *
- */
+ * @brief Signal for refreshing user data.
+ */
void refreshUserData();
/**
- * @brief Signal for requesting reverseGeo from SituareEngine
+ * @brief Signal for removing tags.
*
+ * @param tags tags to add
*/
- void requestReverseGeo();
+ void removeTags(const QStringList &tags);
/**
- * @brief Signals, when address data is ready
- *
- * @param address Street address
+ * @brief Signal for requesting popular tags
*/
+ void requestPopularTags();
+
+ /**
+ * @brief Signal for requesting reverseGeo from SituareEngine
+ */
+ void requestReverseGeo();
+
+ /**
+ * @brief Signals, when address data is ready
+ *
+ * @param address Street address
+ */
void reverseGeoReady(const QString &address);
/**
- * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class
- *
- * @param status Status message
- * @param publish Publish on Facebook
- */
+ * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class
+ *
+ * @param status Status message
+ * @param publish Publish on Facebook
+ */
void statusUpdate(const QString &status, const bool &publish);
/**
- * @brief Signals when updateLocationDialog's data must be cleared
- *
- */
+ * @brief Signals when updateLocationDialog's data must be cleared
+ */
void clearUpdateLocationDialogData();
+
+
/*******************************************************************************
* DATA MEMBERS
******************************************************************************/
private:
UserInfo *m_userInfo; ///< Instance of the user info view
-
};
#endif // USERPANEL_H