mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
added roomversion, roomid etc
This commit is contained in:
parent
7401bd13b2
commit
473b14ed0f
3 changed files with 28 additions and 5 deletions
|
@ -17,7 +17,6 @@ ApplicationWindow {
|
|||
minimumHeight: 420
|
||||
palette: colors
|
||||
color: colors.window
|
||||
title: roomSettings.roomName
|
||||
modality: Qt.WindowModal
|
||||
flags: Qt.WindowStaysOnTopHint
|
||||
|
||||
|
@ -46,13 +45,13 @@ ApplicationWindow {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
MatrixText {
|
||||
text: "room name"
|
||||
text: roomSettings.roomName
|
||||
font.pixelSize: 24
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
|
||||
MatrixText {
|
||||
text: "1 member"
|
||||
text: "%1 member(s)".arg(roomSettings.memberCount)
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +184,7 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
MatrixText {
|
||||
text: "asdajdhasjkdhaskjdhasjdks"
|
||||
text: roomSettings.roomId
|
||||
font.pixelSize: 12
|
||||
}
|
||||
}
|
||||
|
@ -200,7 +199,7 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
MatrixText {
|
||||
text: "6"
|
||||
text: roomSettings.roomVersion
|
||||
font.pixelSize: 12
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,6 +72,24 @@ RoomSettings::roomName() const
|
|||
return QString(info_.name.c_str());
|
||||
}
|
||||
|
||||
QString
|
||||
RoomSettings::roomId() const
|
||||
{
|
||||
return roomid_;
|
||||
}
|
||||
|
||||
QString
|
||||
RoomSettings::roomVersion() const
|
||||
{
|
||||
return QString::fromStdString(info_.version);
|
||||
}
|
||||
|
||||
int
|
||||
RoomSettings::memberCount() const
|
||||
{
|
||||
return info_.member_count;
|
||||
}
|
||||
|
||||
void
|
||||
RoomSettings::retrieveRoomInfo()
|
||||
{
|
||||
|
|
|
@ -11,6 +11,9 @@ class RoomSettings : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString roomName READ roomName CONSTANT)
|
||||
Q_PROPERTY(QString roomId READ roomId CONSTANT)
|
||||
Q_PROPERTY(QString roomVersion READ roomVersion CONSTANT)
|
||||
Q_PROPERTY(int memberCount READ memberCount CONSTANT)
|
||||
Q_PROPERTY(int notifications READ notifications NOTIFY notificationsChanged)
|
||||
Q_PROPERTY(int accessJoinRules READ accessJoinRules NOTIFY accessJoinRulesChanged)
|
||||
Q_PROPERTY(bool canChangeJoinRules READ canChangeJoinRules CONSTANT)
|
||||
|
@ -21,6 +24,9 @@ public:
|
|||
RoomSettings(QString roomid, QObject *parent = nullptr);
|
||||
|
||||
QString roomName() const;
|
||||
QString roomId() const;
|
||||
QString roomVersion() const;
|
||||
int memberCount() const;
|
||||
int notifications();
|
||||
int accessJoinRules();
|
||||
bool respondsToKeyRequests();
|
||||
|
|
Loading…
Reference in a new issue