Added unit test for TagsDialog.
[situare] / src / user / user.h
index f16c2d1..cfb45f1 100644 (file)
@@ -45,7 +45,7 @@ public:
     User(const QString &address, const GeoCoordinate &coordinates, const QString &name,
          const QString &note, const QUrl &imageUrl, const QString &timestamp,
          const bool &type, const QString &userId, const QString &units = 0,
-         const double &value = 0, const QStringList &tags = QStringList());
+         const double &value = 0);
 
     /**
     * @brief Default constructor, initializes member data as NULL/0
@@ -80,6 +80,13 @@ public:
     void setDistance(const double &value, const QString &units);
 
     /**
+    * @brief Set name
+    *
+    * @param name user name
+    */
+    void setName(const QString &name);
+
+    /**
     * @brief Set note
     *
     * @param note note/status message
@@ -105,7 +112,14 @@ public:
     *
     * @param tags user's tags
     */
-    void setTags(const QStringList &tags);
+    void setTags(const QHash<QString, QString> &tags);
+
+    /**
+    * @brief Sets user's tags.
+    *
+    * @param tags user's tags
+    */
+    void setTags(const QList<QVariant> &tags);
 
     /**
     * @brief Set timestamp for last status update, timestamp is in literal mode
@@ -115,6 +129,13 @@ public:
     void setTimestamp(const QString &timestamp);
 
     /**
+    * @brief Sets user's ID.
+    *
+    * @param userId user's ID
+    */
+    void setUserId(const QString &userId);
+
+    /**
     * @brief Get address
     *
     * @return QString address
@@ -169,7 +190,7 @@ public:
     *
     * @return QStringList list of tags
     */
-    const QStringList &tags() const;
+    const QHash<QString, QString> &tags() const;
 
     /**
     * @brief Get timestamp of last status update
@@ -202,7 +223,7 @@ private:
     QString m_name; ///< placeholder for name
     QString m_note; ///< placeholder for note
     QUrl m_profileImageUrl; ///< placeholder for image url
-    QStringList m_tags;     ///< placeholder for tags
+    QHash<QString, QString> m_tags;     ///< placeholder for tags
     QString m_timestamp; ///< placeholer for timestamp
     bool m_type; ///< placeholder for user type
     QString m_units; ///< placeholder for distance unit type