Correct the logic for incorrect passwords. Looks like spaghetti. 🍝
This commit is contained in:
parent
c6b13dd919
commit
a757d52244
@ -12,7 +12,6 @@
|
|||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QUuid>
|
#include <QUuid>
|
||||||
#include <QLineEdit>
|
|
||||||
#include <QDBusPendingReply>
|
#include <QDBusPendingReply>
|
||||||
#include "installerprompt.h"
|
#include "installerprompt.h"
|
||||||
#include "./ui_installerprompt.h"
|
#include "./ui_installerprompt.h"
|
||||||
@ -22,6 +21,9 @@ InstallerPrompt::InstallerPrompt(QWidget *parent)
|
|||||||
, ui(new Ui::InstallerPrompt) {
|
, ui(new Ui::InstallerPrompt) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
// Hide the Incorrect Password text
|
||||||
|
ui->incorrectPassword->setVisible(false);
|
||||||
|
|
||||||
// Set the background image and scale it
|
// Set the background image and scale it
|
||||||
QPixmap bg(":/background");
|
QPixmap bg(":/background");
|
||||||
if (bg.isNull()) {
|
if (bg.isNull()) {
|
||||||
@ -78,6 +80,8 @@ void InstallerPrompt::updateConnectionStatus() {
|
|||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case NetworkManager::Status::Disconnected:
|
case NetworkManager::Status::Disconnected:
|
||||||
|
case NetworkManager::ConnectedLinkLocal:
|
||||||
|
case NetworkManager::Asleep:
|
||||||
statusText = tr("Not Connected");
|
statusText = tr("Not Connected");
|
||||||
statusIndicator = "<span style=\"color: red;\">❌</span> " + statusText;
|
statusIndicator = "<span style=\"color: red;\">❌</span> " + statusText;
|
||||||
break;
|
break;
|
||||||
@ -95,6 +99,7 @@ void InstallerPrompt::updateConnectionStatus() {
|
|||||||
statusIndicator = "<span style=\"color: yellow;\">🟡</span> " + statusText;
|
statusIndicator = "<span style=\"color: yellow;\">🟡</span> " + statusText;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
qDebug() << "Unknown status:" << status;
|
||||||
statusText = tr("Unknown Status");
|
statusText = tr("Unknown Status");
|
||||||
statusIndicator = "<span style=\"color: grey;\">⚪</span> " + statusText;
|
statusIndicator = "<span style=\"color: grey;\">⚪</span> " + statusText;
|
||||||
}
|
}
|
||||||
@ -120,162 +125,154 @@ void InstallerPrompt::updateConnectionStatus() {
|
|||||||
|
|
||||||
void InstallerPrompt::handleWiFiConnectionChange(NetworkManager::Device::State newstate, NetworkManager::Device::State oldstate, NetworkManager::Device::StateChangeReason reason)
|
void InstallerPrompt::handleWiFiConnectionChange(NetworkManager::Device::State newstate, NetworkManager::Device::State oldstate, NetworkManager::Device::StateChangeReason reason)
|
||||||
{
|
{
|
||||||
if (reason == NetworkManager::Device::NoSecretsReason) {
|
QMutexLocker locker(&wifiChangeMutex);
|
||||||
|
if (reason == NetworkManager::Device::NoSecretsReason && !wifiWrongHandling) {
|
||||||
|
wifiWrongHandling = true;
|
||||||
|
qDebug() << wifiSSID;
|
||||||
|
|
||||||
foreach (const NetworkManager::Connection::Ptr &connection, NetworkManager::listConnections()) {
|
foreach (const NetworkManager::Connection::Ptr &connection, NetworkManager::listConnections()) {
|
||||||
if (connection->settings()->connectionType() == NetworkManager::ConnectionSettings::Wireless) {
|
if (connection->settings()->connectionType() == NetworkManager::ConnectionSettings::Wireless) {
|
||||||
auto wirelessSetting = connection->settings()->setting(NetworkManager::Setting::Wireless).dynamicCast<NetworkManager::WirelessSetting>();
|
auto wirelessSetting = connection->settings()->setting(NetworkManager::Setting::Wireless).dynamicCast<NetworkManager::WirelessSetting>();
|
||||||
if (wirelessSetting && wirelessSetting->ssid() == ui->networkComboBox->currentText()) {
|
if (wirelessSetting && wirelessSetting->ssid() == wifiSSID) {
|
||||||
qDebug() << "Wiping connection with wrong password: " << ui->networkComboBox->currentText();
|
qDebug() << "Wiping connection with wrong password: " << wifiSSID;
|
||||||
|
// Show the Incorrect Password text
|
||||||
|
ui->incorrectPassword->setVisible(true);
|
||||||
QDBusPendingReply removeReply = connection->remove();
|
QDBusPendingReply removeReply = connection->remove();
|
||||||
removeReply.waitForFinished();
|
removeReply.waitForFinished();
|
||||||
handleWifiConnection(ui->networkComboBox->currentText(), true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
wifiWrongHandling = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NetworkManager::Connection::Ptr InstallerPrompt::findConnectionBySsid(const QString &ssid) {
|
||||||
|
foreach (const NetworkManager::Connection::Ptr &connection, NetworkManager::listConnections()) {
|
||||||
|
if (connection->settings()->connectionType() == NetworkManager::ConnectionSettings::Wireless) {
|
||||||
|
auto wirelessSetting = connection->settings()->setting(NetworkManager::Setting::Wireless).dynamicCast<NetworkManager::WirelessSetting>();
|
||||||
|
if (wirelessSetting && wirelessSetting->ssid() == ssid) {
|
||||||
|
return connection;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NetworkManager::Connection::Ptr(); // Return null pointer if not found
|
||||||
|
}
|
||||||
|
|
||||||
|
QString InstallerPrompt::promptForWifiPassword(const QString &ssid, bool isWrongPassword) {
|
||||||
|
QDialog passwordDialog(this);
|
||||||
|
passwordDialog.setModal(true);
|
||||||
|
passwordDialog.setWindowTitle(tr("Wi-Fi Password Required"));
|
||||||
|
passwordDialog.setWindowIcon(QIcon::fromTheme("network-wireless"));
|
||||||
|
passwordDialog.setStyleSheet("QLabel { color: black; } ");
|
||||||
|
passwordDialog.setMinimumWidth(250);
|
||||||
|
passwordDialog.setMinimumHeight(120);
|
||||||
|
passwordDialog.setMaximumWidth(5000);
|
||||||
|
passwordDialog.setMaximumHeight(500);
|
||||||
|
|
||||||
|
QVBoxLayout layout;
|
||||||
|
QLabel passwordLabel(tr("Enter password for \"%1\":").arg(ssid), &passwordDialog);
|
||||||
|
QLineEdit passwordLineEdit(&passwordDialog);
|
||||||
|
QPushButton passwordButton(tr("Connect"), &passwordDialog);
|
||||||
|
|
||||||
|
passwordLineEdit.setEchoMode(QLineEdit::Password);
|
||||||
|
layout.addWidget(&passwordLabel);
|
||||||
|
layout.addWidget(&passwordLineEdit);
|
||||||
|
layout.addWidget(&passwordButton);
|
||||||
|
|
||||||
|
passwordDialog.setLayout(&layout);
|
||||||
|
|
||||||
|
// Connect with a lambda function for inline validation
|
||||||
|
connect(&passwordLineEdit, &QLineEdit::textChanged, this, [&passwordLineEdit](const QString &text) {
|
||||||
|
int minLength = 8;
|
||||||
|
int maxLength = 64;
|
||||||
|
bool isValid = text.length() >= minLength && text.length() <= maxLength;
|
||||||
|
passwordLineEdit.setStyleSheet(isValid ? "" : "border: 1px solid red;");
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(&passwordButton, &QPushButton::clicked, &passwordDialog, &QDialog::accept);
|
||||||
|
|
||||||
|
if (passwordDialog.exec() == QDialog::Accepted) {
|
||||||
|
return passwordLineEdit.text();
|
||||||
|
}
|
||||||
|
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
void InstallerPrompt::handleWifiConnection(const QString &ssid, bool recoverFromWrongPassword) {
|
void InstallerPrompt::handleWifiConnection(const QString &ssid, bool recoverFromWrongPassword) {
|
||||||
|
ui->incorrectPassword->setVisible(false);
|
||||||
ui->networkComboBox->setEnabled(false);
|
ui->networkComboBox->setEnabled(false);
|
||||||
|
wifiSSID = ssid;
|
||||||
qDebug() << "Attempting to find connection for SSID:" << ssid;
|
qDebug() << "Attempting to find connection for SSID:" << ssid;
|
||||||
if (!recoverFromWrongPassword) {
|
|
||||||
foreach (const NetworkManager::Connection::Ptr &connection, NetworkManager::listConnections()) {
|
// Check for existing connection
|
||||||
if (connection->settings()->connectionType() == NetworkManager::ConnectionSettings::Wireless) {
|
NetworkManager::Connection::Ptr connection = findConnectionBySsid(ssid);
|
||||||
auto wirelessSetting = connection->settings()->setting(NetworkManager::Setting::Wireless).dynamicCast<NetworkManager::WirelessSetting>();
|
if (connection && !recoverFromWrongPassword) {
|
||||||
if (wirelessSetting && wirelessSetting->ssid() == ssid) {
|
qDebug() << "Using existing connection for:" << ssid;
|
||||||
qDebug() << "Attempting to use existing connection:" << ssid;
|
NetworkManager::activateConnection(connection->path(), wifiDevice->uni(), QString());
|
||||||
NetworkManager::activateConnection(connection->path(), wifiDevice->uni(), QString());
|
ui->networkComboBox->setEnabled(true);
|
||||||
qDebug() << "Successfully connected:" << ssid;
|
return;
|
||||||
ui->networkComboBox->setEnabled(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QMap<QString, QVariant> fullSettings = createSettingsBySSID(ssid);
|
// Prompt for Wi-Fi password
|
||||||
NMVariantMapMap nmMap;
|
QString password = promptForWifiPassword(ssid);
|
||||||
|
if (password.isEmpty()) {
|
||||||
for (const auto &key : fullSettings.keys()) {
|
ui->networkComboBox->setEnabled(true);
|
||||||
nmMap[key] = fullSettings[key].toMap();
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NetworkManager::ConnectionSettings::Ptr newConnectionSettings(new NetworkManager::ConnectionSettings(NetworkManager::ConnectionSettings::Wireless));
|
// Create new Wi-Fi connection
|
||||||
newConnectionSettings->fromMap(nmMap);
|
NMVariantMapMap settings = createSettingsBySSID(ssid);
|
||||||
QVariantMap wirelessSecurity = fullSettings.value("802-11-wireless-security").toMap();
|
if (settings.isEmpty()) {
|
||||||
|
QMessageBox::warning(this, tr("Error"), tr("Failed to create Wi-Fi settings."));
|
||||||
//bool isOpenNetwork = wirelessSecurity.isEmpty() || wirelessSecurity.value("key-mgmt").toString().isEmpty();
|
ui->networkComboBox->setEnabled(true);
|
||||||
//if (isOpenNetwork && wifiDevice && wifiDevice->isValid() && connection) {
|
return;
|
||||||
// qDebug() << "Attempting to connect to open network: " << ssid;
|
|
||||||
// NetworkManager::activateConnection(connection->path(), wifiDevice->uni(), QString());
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
|
|
||||||
// If the network is secured, display the password dialog
|
|
||||||
QDialog passwordDialog(this);
|
|
||||||
QVBoxLayout layout(&passwordDialog);
|
|
||||||
QLabel label(&passwordDialog);
|
|
||||||
if (!recoverFromWrongPassword) {
|
|
||||||
label.setText(tr("Enter Wi-Fi Password for %1:").arg(ssid));
|
|
||||||
label.setStyleSheet("color: black");
|
|
||||||
} else {
|
|
||||||
label.setText(tr("Wrong Wi-Fi password for %1. Try again:").arg(ssid));
|
|
||||||
label.setStyleSheet("color: red");
|
|
||||||
}
|
}
|
||||||
QLineEdit lineEdit(&passwordDialog);
|
|
||||||
QPushButton button(tr("Connect"), &passwordDialog);
|
|
||||||
|
|
||||||
lineEdit.setEchoMode(QLineEdit::Password);
|
// Update the wireless security settings
|
||||||
layout.addWidget(&label);
|
QVariantMap wirelessSecurity;
|
||||||
layout.addWidget(&lineEdit);
|
wirelessSecurity["key-mgmt"] = "wpa-psk";
|
||||||
layout.addWidget(&button);
|
wirelessSecurity["psk"] = password;
|
||||||
|
settings["802-11-wireless-security"] = wirelessSecurity;
|
||||||
|
|
||||||
connect(&button, &QPushButton::clicked, &passwordDialog, &QDialog::accept);
|
// Add the new connection
|
||||||
|
QDBusPendingReply<QDBusObjectPath> reply = NetworkManager::addConnection(settings);
|
||||||
for (int attempts = 0; attempts < 3; ++attempts) {
|
reply.waitForFinished();
|
||||||
if (passwordDialog.exec() == QDialog::Rejected) {
|
if (reply.isError()) {
|
||||||
ui->networkComboBox->setEnabled(true);
|
QMessageBox::warning(this, tr("Error"), tr("Failed to add Wi-Fi connection."));
|
||||||
return;
|
ui->networkComboBox->setEnabled(true);
|
||||||
}
|
return;
|
||||||
QString password = lineEdit.text();
|
|
||||||
if (wifiDevice && wifiDevice->isValid()) {
|
|
||||||
// Update the wireless security settings in the map
|
|
||||||
wirelessSecurity["key-mgmt"] = "wpa-psk";
|
|
||||||
wirelessSecurity["psk"] = password;
|
|
||||||
fullSettings["802-11-wireless-security"] = wirelessSecurity;
|
|
||||||
|
|
||||||
// Convert QMap<QString, QVariant> to NMVariantMapMap
|
|
||||||
NMVariantMapMap nmMap;
|
|
||||||
for (const auto &key : fullSettings.keys()) {
|
|
||||||
nmMap[key] = fullSettings[key].toMap();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update the connection settings
|
|
||||||
qDebug() << "Saving the connection...";
|
|
||||||
QDBusObjectPath path;
|
|
||||||
NetworkManager::ConnectionSettings::Ptr newConnectionSettings(new NetworkManager::ConnectionSettings(NetworkManager::ConnectionSettings::Wireless));
|
|
||||||
newConnectionSettings->fromMap(nmMap);
|
|
||||||
QDBusPendingReply<QDBusObjectPath> addreply = NetworkManager::addConnection(nmMap);
|
|
||||||
addreply.waitForFinished();
|
|
||||||
if (addreply.isError()) {
|
|
||||||
qDebug() << nmMap;
|
|
||||||
qDebug() << "Unable to save the connection:" << addreply.error().message();
|
|
||||||
} else {
|
|
||||||
path = addreply.value();
|
|
||||||
qDebug() << "Added connection path:" << path.path();
|
|
||||||
}
|
|
||||||
|
|
||||||
NetworkManager::Connection::Ptr connection = NetworkManager::findConnection(path.path());
|
|
||||||
if (!connection) {
|
|
||||||
qDebug() << "Unable to retrieve the connection after saving:" << addreply.error().message();
|
|
||||||
}
|
|
||||||
|
|
||||||
QDBusPendingReply<QDBusObjectPath> reply = NetworkManager::activateConnection(connection->path(), wifiDevice->uni(), QString());
|
|
||||||
reply.waitForFinished();
|
|
||||||
if (reply.isError()) {
|
|
||||||
qDebug() << "Unable to activate the connection:" << addreply.error().message();
|
|
||||||
QMessageBox::warning(this, tr("Connection Failed"), tr("Unable to connect to the network."));
|
|
||||||
ui->networkComboBox->setEnabled(true);
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
NetworkManager::reloadConnections();
|
|
||||||
qDebug() << "Successfully connected:" << ssid;
|
|
||||||
// ui->networkComboBox->setEnabled(true); !!! We don't run this here since we actually *want* the box to remain locked right now
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Activate the new connection
|
||||||
|
QDBusObjectPath path = reply.value();
|
||||||
|
NetworkManager::activateConnection(path.path(), wifiDevice->uni(), QString());
|
||||||
|
ui->networkComboBox->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
QMap<QString, QVariant> InstallerPrompt::createSettingsBySSID(const QString &ssid) {
|
NMVariantMapMap InstallerPrompt::createSettingsBySSID(const QString &ssid) {
|
||||||
// Create new connection settings
|
NMVariantMapMap convertedSettings;
|
||||||
|
|
||||||
|
if (!wifiDevice) {
|
||||||
|
qWarning() << "Wi-Fi device not found. Unable to set interface name.";
|
||||||
|
return convertedSettings;
|
||||||
|
}
|
||||||
|
|
||||||
NetworkManager::ConnectionSettings::Ptr newConnectionSettings(new NetworkManager::ConnectionSettings(NetworkManager::ConnectionSettings::Wireless));
|
NetworkManager::ConnectionSettings::Ptr newConnectionSettings(new NetworkManager::ConnectionSettings(NetworkManager::ConnectionSettings::Wireless));
|
||||||
newConnectionSettings->setId(ssid);
|
newConnectionSettings->setId(ssid);
|
||||||
newConnectionSettings->setUuid(NetworkManager::ConnectionSettings::createNewUuid());
|
newConnectionSettings->setUuid(NetworkManager::ConnectionSettings::createNewUuid());
|
||||||
|
newConnectionSettings->setInterfaceName(wifiDevice->interfaceName());
|
||||||
// Set interface name from wifiDevice
|
|
||||||
if (wifiDevice) {
|
|
||||||
newConnectionSettings->setInterfaceName(wifiDevice->interfaceName());
|
|
||||||
} else {
|
|
||||||
qWarning() << "Wi-Fi device not found. Unable to set interface name.";
|
|
||||||
return QMap<QString, QVariant>();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Configure wireless settings
|
// Configure wireless settings
|
||||||
QVariantMap wirelessSetting;
|
QVariantMap wirelessSetting;
|
||||||
wirelessSetting.insert("ssid", ssid.toUtf8());
|
wirelessSetting.insert("ssid", ssid.toUtf8());
|
||||||
|
convertedSettings.insert("802-11-wireless", wirelessSetting);
|
||||||
|
|
||||||
// Configure wireless security settings
|
// Convert other settings
|
||||||
NetworkManager::WirelessSecuritySetting::Ptr wirelessSecuritySetting = newConnectionSettings->setting(NetworkManager::Setting::WirelessSecurity).staticCast<NetworkManager::WirelessSecuritySetting>();
|
|
||||||
wirelessSecuritySetting->setKeyMgmt(NetworkManager::WirelessSecuritySetting::WpaPsk);
|
|
||||||
|
|
||||||
// Convert settings to QVariantMap
|
|
||||||
QMap<QString, QVariant> convertedSettings;
|
|
||||||
const auto settingsMap = newConnectionSettings->toMap();
|
const auto settingsMap = newConnectionSettings->toMap();
|
||||||
for (const auto &key : settingsMap.keys()) {
|
for (const auto &key : settingsMap.keys()) {
|
||||||
convertedSettings[key] = QVariant::fromValue(settingsMap[key]);
|
QVariant value = settingsMap.value(key);
|
||||||
|
convertedSettings.insert(key, value.toMap());
|
||||||
}
|
}
|
||||||
convertedSettings.insert("802-11-wireless", wirelessSetting);
|
|
||||||
|
|
||||||
return convertedSettings;
|
return convertedSettings;
|
||||||
}
|
}
|
||||||
@ -334,7 +331,6 @@ void InstallerPrompt::refreshNetworkList() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update the main map and combo box only after the new list is ready
|
// Update the main map and combo box only after the new list is ready
|
||||||
wifiNetworkMap.swap(tempWifiNetworkMap);
|
|
||||||
ui->networkComboBox->clear();
|
ui->networkComboBox->clear();
|
||||||
ui->networkComboBox->addItems(ssidList);
|
ui->networkComboBox->addItems(ssidList);
|
||||||
|
|
||||||
|
@ -7,16 +7,12 @@
|
|||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
#include <QMutex>
|
||||||
|
#include <QLineEdit>
|
||||||
#include <NetworkManagerQt/Device>
|
#include <NetworkManagerQt/Device>
|
||||||
#include <NetworkManagerQt/WirelessDevice>
|
#include <NetworkManagerQt/WirelessDevice>
|
||||||
#include <NetworkManagerQt/WirelessNetwork>
|
#include <NetworkManagerQt/WirelessNetwork>
|
||||||
|
|
||||||
namespace NetworkManager {
|
|
||||||
class Device;
|
|
||||||
class WirelessDevice;
|
|
||||||
class WirelessNetwork;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Ui { class InstallerPrompt; }
|
namespace Ui { class InstallerPrompt; }
|
||||||
|
|
||||||
class InstallerPrompt : public QMainWindow {
|
class InstallerPrompt : public QMainWindow {
|
||||||
@ -39,14 +35,19 @@ private:
|
|||||||
Ui::InstallerPrompt *ui;
|
Ui::InstallerPrompt *ui;
|
||||||
QProcess *process;
|
QProcess *process;
|
||||||
NetworkManager::WirelessDevice::Ptr wifiDevice;
|
NetworkManager::WirelessDevice::Ptr wifiDevice;
|
||||||
QMap<QString, NetworkManager::WirelessNetwork::Ptr> wifiNetworkMap;
|
QString wifiSSID;
|
||||||
|
QMutex wifiChangeMutex;
|
||||||
|
NetworkManager::Connection::Ptr findConnectionBySsid(const QString &ssid);
|
||||||
|
bool wifiWrongHandling = false;
|
||||||
|
QLineEdit *passwordLineEdit;
|
||||||
|
|
||||||
void handleWifiConnection(const QString &ssid, bool recoverFromWrongPassword = false);
|
void handleWifiConnection(const QString &ssid, bool recoverFromWrongPassword = false);
|
||||||
|
QString promptForWifiPassword(const QString &ssid, bool isWrongPassword = false);
|
||||||
|
void connectToWifi(const QString &ssid, const QString &password, bool recoverFromWrongPassword = false);
|
||||||
void initLanguageComboBox();
|
void initLanguageComboBox();
|
||||||
QStringList getAvailableLanguages() const;
|
QStringList getAvailableLanguages() const;
|
||||||
void showWifiOptions();
|
void showWifiOptions();
|
||||||
NetworkManager::Connection::Ptr findConnectionBySsid(const QString &ssid);
|
NMVariantMapMap createSettingsBySSID(const QString &ssid);
|
||||||
QMap<QString, QVariant> createSettingsBySSID(const QString &ssid);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INSTALLERPROMPT_H
|
#endif // INSTALLERPROMPT_H
|
||||||
|
@ -59,7 +59,10 @@ QLabel#logoLabel {
|
|||||||
image: url(:/logo);
|
image: url(:/logo);
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
</string>
|
|
||||||
|
QLabel#incorrectPassword {
|
||||||
|
color: red;
|
||||||
|
}</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -128,6 +131,7 @@ QLabel#logoLabel {
|
|||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Ubuntu</family>
|
<family>Ubuntu</family>
|
||||||
|
<weight>50</weight>
|
||||||
<italic>false</italic>
|
<italic>false</italic>
|
||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
@ -200,6 +204,7 @@ QLabel#logoLabel {
|
|||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>18</pointsize>
|
<pointsize>18</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
@ -258,9 +263,61 @@ QLabel#logoLabel {
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="WiFiLayout">
|
<layout class="QGridLayout" name="WiFiLayout">
|
||||||
<item>
|
<item row="1" column="3">
|
||||||
<spacer name="networkSpacer1">
|
<widget class="QPushButton" name="connectWiFiButton">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>65</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>65</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Connect</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QLabel" name="WiFiInfoLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>(For advanced network configuration, select "Try Lubuntu")</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="WiFiLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>18</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Select a Wi-Fi Network:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3">
|
||||||
|
<spacer name="advancedSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -272,65 +329,7 @@ QLabel#logoLabel {
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="4">
|
||||||
<widget class="QLabel" name="WiFiLabel">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>18</pointsize>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Select a Wi-Fi Network:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="networkComboBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>352</width>
|
|
||||||
<height>50</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>400</width>
|
|
||||||
<height>50</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>16</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="connectWiFiButton">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>65</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>65</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Connect</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="networkSpacer2">
|
<spacer name="networkSpacer2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -343,11 +342,20 @@ QLabel#logoLabel {
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="1" column="0">
|
||||||
</item>
|
<spacer name="networkSpacer1">
|
||||||
<item>
|
<property name="orientation">
|
||||||
<layout class="QHBoxLayout" name="WiFiLayout_2">
|
<enum>Qt::Horizontal</enum>
|
||||||
<item>
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
<spacer name="advancedSpacer">
|
<spacer name="advancedSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -360,31 +368,44 @@ QLabel#logoLabel {
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="2">
|
||||||
<widget class="QLabel" name="WiFiInfoLabel">
|
<widget class="QComboBox" name="networkComboBox">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>352</width>
|
||||||
|
<height>50</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>550</width>
|
||||||
|
<height>50</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
|
<pointsize>16</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="incorrectPassword">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>16</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>(For advanced network configuration, select "Try Lubuntu")</string>
|
<string>You entered an incorrect password. Please try again.</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="advancedSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -459,6 +480,7 @@ QLabel#logoLabel {
|
|||||||
<font>
|
<font>
|
||||||
<family>Ubuntu</family>
|
<family>Ubuntu</family>
|
||||||
<pointsize>24</pointsize>
|
<pointsize>24</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
@ -535,6 +557,7 @@ QToolTip {
|
|||||||
<font>
|
<font>
|
||||||
<family>Ubuntu</family>
|
<family>Ubuntu</family>
|
||||||
<pointsize>24</pointsize>
|
<pointsize>24</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
@ -677,6 +700,7 @@ QToolTip {
|
|||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>24</pointsize>
|
<pointsize>24</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user