Skip to content

Commit

Permalink
add eye to password textbox in broker properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Špirk committed Oct 7, 2024
1 parent 8b082b1 commit 7e04855
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 17 deletions.
2 changes: 1 addition & 1 deletion shvspy/src/appversion.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once

#define APP_VERSION "1.9.8"
#define APP_VERSION "1.9.9"

3 changes: 3 additions & 0 deletions shvspy/src/dlgbrokerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ DlgBrokerProperties::DlgBrokerProperties(QWidget *parent) :
connect(ui->lstSecurityType, &QComboBox::currentTextChanged, this,
[this] (const QString &security_type_text) { ui->chkPeerVerify->setDisabled(security_type_text == "none"); });

connect(ui->tbShowPassword, &QToolButton::toggled, this, [this](bool checked) {
ui->edPassword->setEchoMode(checked ? QLineEdit::EchoMode::Normal : QLineEdit::EchoMode::Password);
});
QSettings settings;
restoreGeometry(settings.value(QStringLiteral("ui/dlgServerProperties/geometry")).toByteArray());
}
Expand Down
48 changes: 32 additions & 16 deletions shvspy/src/dlgbrokerproperties.ui
Original file line number Diff line number Diff line change
Expand Up @@ -331,26 +331,23 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<item row="0" column="3">
<widget class="QCheckBox" name="cbLoginWithAzure">
<property name="text">
<string>&amp;User</string>
</property>
<property name="buddy">
<cstring>edUser</cstring>
<string>login with Azure</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="edUser"/>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="cbLoginWithAzure">
<item row="1" column="3">
<widget class="QCheckBox" name="cbPlainTextPassword">
<property name="text">
<string>login with Azure</string>
<string>plain text password</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="edUser"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
Expand All @@ -364,14 +361,31 @@
<item row="1" column="1">
<widget class="QLineEdit" name="edPassword">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
<enum>QLineEdit::EchoMode::Password</enum>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>&amp;User</string>
</property>
<property name="buddy">
<cstring>edUser</cstring>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="cbPlainTextPassword">
<widget class="QToolButton" name="tbShowPassword">
<property name="text">
<string>plain text password</string>
<string>...</string>
</property>
<property name="icon">
<iconset resource="../shvspy.qrc">
<normaloff>:/shvspy/images/show.svg</normaloff>:/shvspy/images/show.svg</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
Expand All @@ -397,7 +411,9 @@
<tabstop>device_mountPoint</tabstop>
<tabstop>chkMuteHeartBeats</tabstop>
</tabstops>
<resources/>
<resources>
<include location="../shvspy.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
Expand Down

0 comments on commit 7e04855

Please sign in to comment.