Skip to content

Commit

Permalink
ui(qchat): set qchat groupbox enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
gounux committed Oct 13, 2024
1 parent a27167d commit 7d3f88f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions qtribu/gui/dck_qchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def __init__(self, iface: QgisInterface, parent: QWidget = None):
)

# list users signal listener
self.bltn_list_users.pressed.connect(self.on_list_users_button_clicked)
self.bltn_list_users.setIcon(
self.btn_list_users.pressed.connect(self.on_list_users_button_clicked)
self.btn_list_users.setIcon(
QIcon(QgsApplication.iconPath("processingResult.svg"))
)

Expand Down Expand Up @@ -293,7 +293,7 @@ def on_ws_connected(self, room: str) -> None:
self.btn_connect.setText(self.tr("Disconnect"))
self.lbl_status.setText("Connected")
self.grb_room.setTitle(self.tr("Room: {room}").format(room=room))
self.grb_qchat.setEnabled(True)
self.btn_list_users.setEnabled(True)
self.grb_user.setEnabled(True)
self.current_room = room
self.connected = True
Expand Down Expand Up @@ -325,7 +325,7 @@ def disconnect_from_room(self, log: bool = True, close_ws: bool = True) -> None:
self.lbl_status.setText("Disconnected")
self.grb_room.setTitle(self.tr("Room"))
self.grb_qchat.setTitle(self.tr("QChat"))
self.grb_qchat.setEnabled(False)
self.btn_list_users.setEnabled(False)
self.grb_user.setEnabled(False)
self.connected = False
if close_ws:
Expand Down
7 changes: 5 additions & 2 deletions qtribu/gui/dck_qchat.ui
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
<item>
<widget class="QgsCollapsibleGroupBox" name="grb_qchat">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
Expand Down Expand Up @@ -220,7 +220,10 @@
<item>
<layout class="QHBoxLayout" name="hly_qchat_buttons">
<item>
<widget class="QPushButton" name="bltn_list_users">
<widget class="QPushButton" name="btn_list_users">
<property name="enabled">
<bool>false</bool>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
Expand Down

0 comments on commit 7d3f88f

Please sign in to comment.