10 #include <QtCore/QObject>
15 class RoomMemberEvent;
27 Q_PROPERTY(QString id READ id CONSTANT)
28 Q_PROPERTY(
bool isGuest READ isGuest CONSTANT)
29 Q_PROPERTY(QString name READ name NOTIFY defaultNameChanged)
30 Q_PROPERTY(QString displayName READ displayname NOTIFY defaultNameChanged STORED
false)
31 Q_PROPERTY(QString fullName READ fullName NOTIFY defaultNameChanged STORED
false)
32 Q_PROPERTY(QString avatarMediaId READ avatarMediaId NOTIFY defaultAvatarChanged STORED
false)
33 Q_PROPERTY(QUrl avatarUrl READ avatarUrl NOTIFY defaultAvatarChanged)
35 User(QString userId, Connection* connection);
37 Connection* connection()
const;
66 QString displayname()
const;
79 QString fullName()
const;
88 Avatar& avatarObject();
98 QString avatarMediaId()
const;
108 QUrl avatarUrl()
const;
110 QImage avatar(
int width,
int height, Avatar::get_callback_t callback);
112 QImage avatar(
int dimension, Avatar::get_callback_t callback);
115 Q_INVOKABLE
bool setAvatar(
const QString& fileName);
118 Q_INVOKABLE
bool setAvatar(QIODevice* source);
122 void rename(
const QString& newName);
125 void rename(
const QString& newName, Room* r);
128 void removeAvatar()
const;
134 void requestDirectChat();
140 void unmarkIgnore()
const;
143 bool isIgnored()
const;
153 void defaultNameChanged();
156 void defaultAvatarChanged();
162 void doSetAvatar(
const QUrl& contentUri);