mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-25 07:57:20 +00:00
add support of hidden network (test)
This commit is contained in:
parent
4051d2f2c8
commit
cce4ef4811
@ -1,6 +1,7 @@
|
|||||||
Ver.1.1.1:
|
Ver.1.1.1:
|
||||||
+ [gui] added suppoort of macvlan
|
+ [gui] added suppoort of macvlan
|
||||||
+ [gui] added ability to remove profile
|
+ [gui] added ability to remove profile
|
||||||
|
+ [gui] added support of hidden wifi network
|
||||||
|
|
||||||
Ver.1.1.0 (netctl-1.7 update):
|
Ver.1.1.0 (netctl-1.7 update):
|
||||||
+ [gui] added frequency
|
+ [gui] added frequency
|
||||||
|
@ -851,6 +851,10 @@
|
|||||||
<source>Password</source>
|
<source>Password</source>
|
||||||
<translation>Password</translation>
|
<translation>Password</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ESSID</source>
|
||||||
|
<translation>ESSID</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>PppoeWidget</name>
|
<name>PppoeWidget</name>
|
||||||
|
@ -851,6 +851,10 @@
|
|||||||
<source>Password</source>
|
<source>Password</source>
|
||||||
<translation>Пароль</translation>
|
<translation>Пароль</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ESSID</source>
|
||||||
|
<translation>ESSID</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>PppoeWidget</name>
|
<name>PppoeWidget</name>
|
||||||
|
@ -948,6 +948,13 @@ void MainWindow::connectToUnknownEssid(const QString passwd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::setHiddenName(const QString name)
|
||||||
|
{
|
||||||
|
ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 0)->setText(name);
|
||||||
|
wifiTabStart();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::wifiTabStart()
|
void MainWindow::wifiTabStart()
|
||||||
{
|
{
|
||||||
if (!checkExternalApps(QString("wpasup"))) {
|
if (!checkExternalApps(QString("wpasup"))) {
|
||||||
@ -958,9 +965,15 @@ void MainWindow::wifiTabStart()
|
|||||||
if (ui->tableWidget_wifi->currentItem() == 0)
|
if (ui->tableWidget_wifi->currentItem() == 0)
|
||||||
return;
|
return;
|
||||||
if (ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 0)->text() == QString("<hidden>")) {
|
if (ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 0)->text() == QString("<hidden>")) {
|
||||||
ui->pushButton_wifiStart->setDisabled(true);
|
passwdWid = new PasswdWidget(this);
|
||||||
errorWin = new ErrorWindow(this, 2);
|
passwdWid->setPassword(false);
|
||||||
errorWin->show();
|
int widgetWidth = 270;
|
||||||
|
int widgetHeight = 86;
|
||||||
|
int x = (width() - widgetWidth) / 2;
|
||||||
|
int y = (height() - widgetHeight) / 2;
|
||||||
|
passwdWid->setGeometry(x, y, widgetWidth, widgetHeight);
|
||||||
|
passwdWid->show();
|
||||||
|
passwdWid->setFocusToLineEdit();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -991,6 +1004,7 @@ void MainWindow::wifiTabStart()
|
|||||||
return connectToUnknownEssid(QString(""));
|
return connectToUnknownEssid(QString(""));
|
||||||
else {
|
else {
|
||||||
passwdWid = new PasswdWidget(this);
|
passwdWid = new PasswdWidget(this);
|
||||||
|
passwdWid->setPassword(true);
|
||||||
int widgetWidth = 270;
|
int widgetWidth = 270;
|
||||||
int widgetHeight = 86;
|
int widgetHeight = 86;
|
||||||
int x = (width() - widgetWidth) / 2;
|
int x = (width() - widgetWidth) / 2;
|
||||||
|
@ -62,6 +62,7 @@ public slots:
|
|||||||
void updateTabs(const int tab);
|
void updateTabs(const int tab);
|
||||||
// wifi tab slots
|
// wifi tab slots
|
||||||
void connectToUnknownEssid(const QString passwd);
|
void connectToUnknownEssid(const QString passwd);
|
||||||
|
void setHiddenName(const QString name);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateMainTab();
|
void updateMainTab();
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
#include "passwdwidget.h"
|
#include "passwdwidget.h"
|
||||||
#include "ui_passwdwidget.h"
|
#include "ui_passwdwidget.h"
|
||||||
|
|
||||||
|
#include <QLineEdit>
|
||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
|
||||||
@ -59,6 +61,19 @@ void PasswdWidget::setFocusToLineEdit()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PasswdWidget::setPassword(const bool mode)
|
||||||
|
{
|
||||||
|
if (mode) {
|
||||||
|
ui->lineEdit->setEchoMode(QLineEdit::Password);
|
||||||
|
ui->label->setText(QApplication::translate("PasswdWidget", "Password"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ui->lineEdit->setEchoMode(QLineEdit::Normal);
|
||||||
|
ui->label->setText(QApplication::translate("PasswdWidget", "ESSID"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void PasswdWidget::cancel()
|
void PasswdWidget::cancel()
|
||||||
{
|
{
|
||||||
hide();
|
hide();
|
||||||
@ -70,5 +85,8 @@ void PasswdWidget::cancel()
|
|||||||
void PasswdWidget::passwdApply()
|
void PasswdWidget::passwdApply()
|
||||||
{
|
{
|
||||||
hide();
|
hide();
|
||||||
|
if (ui->lineEdit->echoMode() == QLineEdit::Normal)
|
||||||
|
return parent->setHiddenName(ui->lineEdit->text());
|
||||||
|
else
|
||||||
return parent->connectToUnknownEssid(ui->lineEdit->text());
|
return parent->connectToUnknownEssid(ui->lineEdit->text());
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,7 @@ public:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setFocusToLineEdit();
|
void setFocusToLineEdit();
|
||||||
|
void setPassword(const bool mode = true);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void cancel();
|
void cancel();
|
||||||
|
Loading…
Reference in New Issue
Block a user