aboutsummaryrefslogtreecommitdiff
path: root/room.h
diff options
context:
space:
mode:
authorFelix Rohrbach <fxrh@gmx.de>2016-05-03 19:59:47 +0200
committerFelix Rohrbach <fxrh@gmx.de>2016-05-03 19:59:47 +0200
commitfc95edb7a63bcacb02418c55e15a1aa21ac080cd (patch)
tree737052a0675b5ecce7c3d2902f2278400f13885e /room.h
parent22a675a55ae2dac33a680531f4003fbfeb24ec39 (diff)
parent9a415111fefd0d21f8b4abbbe9af9066d78c971b (diff)
downloadlibquotient-fc95edb7a63bcacb02418c55e15a1aa21ac080cd.tar.gz
libquotient-fc95edb7a63bcacb02418c55e15a1aa21ac080cd.zip
Merge pull request #4 from KitsuneRal/user-room-names2
Render display names of users and rooms according to the spec - take 2
Diffstat (limited to 'room.h')
-rw-r--r--room.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/room.h b/room.h
index c4993f7a..831b5382 100644
--- a/room.h
+++ b/room.h
@@ -49,9 +49,16 @@ namespace QMatrixClient
Q_INVOKABLE QString topic() const;
Q_INVOKABLE JoinState joinState() const;
Q_INVOKABLE QList<User*> usersTyping() const;
+ QList<User*> membersLeft() const;
Q_INVOKABLE QList<User*> users() const;
+ /**
+ * @brief Produces a disambiguated name for a given user in
+ * the context of the room.
+ */
+ Q_INVOKABLE QString roomMembername(User* u) const;
+
Q_INVOKABLE void addMessage( Event* event );
Q_INVOKABLE void addInitialState( State* state );
Q_INVOKABLE void updateData( const SyncRoomData& data );
@@ -67,13 +74,21 @@ namespace QMatrixClient
public slots:
void getPreviousContent();
+ void userRenamed(User* user, QString oldName);
signals:
void newMessage(Event* event);
+ /**
+ * Triggered when the room name, canonical alias or other aliases
+ * change. Not triggered when displayname changes.
+ */
void namesChanged(Room* room);
+ /** Triggered only for changes in the room displayname. */
+ void displaynameChanged(Room* room);
void topicChanged();
void userAdded(User* user);
void userRemoved(User* user);
+ void memberRenamed(User* user);
void joinStateChanged(JoinState oldState, JoinState newState);
void typingChanged();
void highlightCountChanged(Room* room);