mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +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
|
minimumHeight: 420
|
||||||
palette: colors
|
palette: colors
|
||||||
color: colors.window
|
color: colors.window
|
||||||
title: roomSettings.roomName
|
|
||||||
modality: Qt.WindowModal
|
modality: Qt.WindowModal
|
||||||
flags: Qt.WindowStaysOnTopHint
|
flags: Qt.WindowStaysOnTopHint
|
||||||
|
|
||||||
|
@ -46,13 +45,13 @@ ApplicationWindow {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
MatrixText {
|
MatrixText {
|
||||||
text: "room name"
|
text: roomSettings.roomName
|
||||||
font.pixelSize: 24
|
font.pixelSize: 24
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
MatrixText {
|
MatrixText {
|
||||||
text: "1 member"
|
text: "%1 member(s)".arg(roomSettings.memberCount)
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -185,7 +184,7 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
MatrixText {
|
MatrixText {
|
||||||
text: "asdajdhasjkdhaskjdhasjdks"
|
text: roomSettings.roomId
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -200,7 +199,7 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
MatrixText {
|
MatrixText {
|
||||||
text: "6"
|
text: roomSettings.roomVersion
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,6 +72,24 @@ RoomSettings::roomName() const
|
||||||
return QString(info_.name.c_str());
|
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
|
void
|
||||||
RoomSettings::retrieveRoomInfo()
|
RoomSettings::retrieveRoomInfo()
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,6 +11,9 @@ class RoomSettings : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QString roomName READ roomName CONSTANT)
|
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 notifications READ notifications NOTIFY notificationsChanged)
|
||||||
Q_PROPERTY(int accessJoinRules READ accessJoinRules NOTIFY accessJoinRulesChanged)
|
Q_PROPERTY(int accessJoinRules READ accessJoinRules NOTIFY accessJoinRulesChanged)
|
||||||
Q_PROPERTY(bool canChangeJoinRules READ canChangeJoinRules CONSTANT)
|
Q_PROPERTY(bool canChangeJoinRules READ canChangeJoinRules CONSTANT)
|
||||||
|
@ -21,6 +24,9 @@ public:
|
||||||
RoomSettings(QString roomid, QObject *parent = nullptr);
|
RoomSettings(QString roomid, QObject *parent = nullptr);
|
||||||
|
|
||||||
QString roomName() const;
|
QString roomName() const;
|
||||||
|
QString roomId() const;
|
||||||
|
QString roomVersion() const;
|
||||||
|
int memberCount() const;
|
||||||
int notifications();
|
int notifications();
|
||||||
int accessJoinRules();
|
int accessJoinRules();
|
||||||
bool respondsToKeyRequests();
|
bool respondsToKeyRequests();
|
||||||
|
|
Loading…
Reference in a new issue