Merge branch 'master' into situare_interact
[situare] / src / ui / userinfo.h
index 3dc23b9..2288ec2 100644 (file)
@@ -33,6 +33,7 @@
 class QLabel;
 
 class ImageButton;
+class TagsDialog;
 
 /**
  * @brief UserInfo shows user's data in expandable item.
@@ -108,6 +109,20 @@ public:
     void setProfileImage(const QPixmap &image);
 
     /**
+    * @brief Sets the user tags
+    *
+    * @param tags list of tags
+    */
+    void setTags(const QHash<QString, QString> &tags);
+
+    /**
+    * @brief Sets the popular tags
+    *
+    * @param tags list of tags
+    */
+    void setPopularTags(const QHash<QString, QString> &tags);
+
+    /**
      * @brief Sets the time of updated message
      *
      * @param time Reference to time when message was sent.
@@ -121,6 +136,11 @@ public:
      */
     void setUserName(const QString &name);
 
+    /**
+    * @brief Shows users tags dialog.
+    */
+    void showTagsDialog();
+
 public slots:
     /**
      * @brief Sets the message text
@@ -148,17 +168,43 @@ private slots:
      */
     void findButtonClicked();
 
+    /**
+    * @brief Slot to handle changes in tags dialog.
+    */
+    void tagsDialogFinished(int reason);
+
 /******************************************************************************
 * SIGNALS
 ******************************************************************************/
 signals:
     /**
+    * @brief Signal for adding tags.
+    *
+    * @param tags tags to add
+    */
+    void addTags(const QStringList &tags);
+
+    /**
      * @brief Signal for finding user.
      *
      * @param coordinates user geo coordinates
      */
     void findUser(const GeoCoordinate &coordinates);
 
+    /**
+    * @brief Signal for removing tags.
+    *
+    * @param tags tags to add
+    */
+    void removeTags(const QStringList &tags);
+
+    /**
+    * @brief Signals, when item selection changed
+    *
+    * @param address Street address
+    */
+    void itemSelectionChanged(bool selected);
+
 /******************************************************************************
 * DATA MEMBERS
 ******************************************************************************/
@@ -168,19 +214,26 @@ private:
     QLabel *m_locationLabel;                ///< Location label
     QLabel *m_nameLabel;                    ///< Name label
     QLabel *m_statusTextLabel;              ///< Status text label
+    QLabel *m_tagsTextLabel;                ///< Tags text label
     QLabel *m_updatedLabel;                 ///< Updated label
 
     QPixmap m_backgroundBottomImage;        ///< Bottom background image
     QPixmap m_backgroundMiddleImage;        ///< Middle background image
     QPixmap m_backgroundTopImage;           ///< Top background image
+    QPixmap m_backgroundBottomSelectedImage;   ///< Selected bottom background image
+    QPixmap m_backgroundMiddleSelectedImage;   ///< Selected middle background image
+    QPixmap m_backgroundTopSelectedImage;      ///< Selected top background image
 
     QPoint m_mousePosition;                 ///< Current mouse press position
 
     QString m_messageText;                  ///< User's message
     QString m_userName;                     ///< User's name
 
+    QHash<QString, QString> m_userTags;                 ///< User's tags
+
     GeoCoordinate m_coordinates;            ///< User current coordinates
     ImageButton *m_avatar;                  ///< User find button
+    TagsDialog *m_tagsDialog;               ///< Tags dialog
 };
 
 #endif // USERINFO_H