class QLabel;
class ImageButton;
+class TagsDialog;
/**
* @brief UserInfo shows user's data in expandable item.
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.
*/
void setUserName(const QString &name);
+ /**
+ * @brief Shows users tags dialog.
+ */
+ void showTagsDialog();
+
public slots:
/**
* @brief Sets the message text
*/
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
******************************************************************************/
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