summary refs log tree commit diff
path: root/src/ui/UserProfile.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/UserProfile.h')
-rw-r--r--src/ui/UserProfile.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ui/UserProfile.h b/src/ui/UserProfile.h
index 19527310..11f588b6 100644
--- a/src/ui/UserProfile.h
+++ b/src/ui/UserProfile.h
@@ -79,10 +79,11 @@ private:
 class UserProfile : public QObject
 {
         Q_OBJECT
-        Q_PROPERTY(QString displayName READ displayName CONSTANT)
+        Q_PROPERTY(QString displayName READ displayName NOTIFY displayNameChanged)
         Q_PROPERTY(QString userid READ userid CONSTANT)
         Q_PROPERTY(QString avatarUrl READ avatarUrl CONSTANT)
         Q_PROPERTY(DeviceInfoModel *deviceList READ deviceList CONSTANT)
+        Q_PROPERTY(bool isGlobalUserProfile READ isGlobalUserProfile CONSTANT)
         Q_PROPERTY(bool isUserVerified READ getUserStatus NOTIFY userStatusChanged)
         Q_PROPERTY(
           bool userVerificationEnabled READ userVerificationEnabled NOTIFY userStatusChanged)
@@ -98,6 +99,7 @@ public:
         QString userid();
         QString displayName();
         QString avatarUrl();
+        bool isGlobalUserProfile() const;
         bool getUserStatus();
         bool userVerificationEnabled() const;
         bool isSelf() const;
@@ -109,12 +111,19 @@ public:
         // Q_INVOKABLE void ignoreUser();
         Q_INVOKABLE void kickUser();
         Q_INVOKABLE void startChat();
+        Q_INVOKABLE void changeUsername(QString username);
 
 signals:
         void userStatusChanged();
+        void displayNameChanged();
+        void globalUsernameRetrieved(const QString &globalUser);
+
+protected slots:
+        void setGlobalUsername(const QString &globalUser);
 
 private:
         QString roomid_, userid_;
+        QString globalUsername;
         DeviceInfoModel deviceList_;
         bool isUserVerified = false;
         bool hasMasterKey   = false;