mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 15:37:23 +00:00
+ add ja to available langs
+ add signals to lineEdits * rewrite errorwindow class to static methods * replace mask in ip lineedits to validators (fix #34) * fix advanced lines * move AdHoc and Hidden options to advanced (#28) * fix default wpa_supplicant conf path (#28) * update toolbars to #2 * replace General settings section to Common (see http://doc.qt.io/qt-5/qsettings.html#Format-enum)
This commit is contained in:
parent
b46ce1620b
commit
53ff63b792
@ -8,7 +8,7 @@ ProjectRootRelative=./
|
||||
|
||||
[CMake][CMake Build Directory 0]
|
||||
Build Directory Path=file:///home/arcanis/Documents/github/netctl-gui/build
|
||||
Build Type=Release
|
||||
Build Type=Debug
|
||||
CMake Binary=file:///usr/bin/cmake
|
||||
Environment Profile=
|
||||
Extra Arguments=
|
||||
|
2
sources/3rdparty/language-config.h
vendored
2
sources/3rdparty/language-config.h
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
// put your languages here comma separated
|
||||
// the first language is default language
|
||||
#define LANGUAGES "en,ru"
|
||||
#define LANGUAGES "en,ja,ru"
|
||||
// language key in the configuration file
|
||||
#define LANGUAGE_KEY "LANGUAGE"
|
||||
|
||||
|
@ -37,11 +37,10 @@ ErrorWindow::~ErrorWindow()
|
||||
}
|
||||
|
||||
|
||||
QStringList ErrorWindow::getMessage(const int mess, const QString custom)
|
||||
QStringList ErrorWindow::getMessage(const int mess)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Message" << mess;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Custom message" << custom;
|
||||
|
||||
QString message, title;
|
||||
switch(mess) {
|
||||
@ -121,13 +120,15 @@ QStringList ErrorWindow::getMessage(const int mess, const QString custom)
|
||||
title = QApplication::translate("ErrorWindow", "Error!");
|
||||
message = QApplication::translate("ErrorWindow", "Could not run helper");
|
||||
break;
|
||||
case 20:
|
||||
title = QApplication::translate("ErrorWindow", "Error!");
|
||||
message = QApplication::translate("ErrorWindow", "IP address does not match the standard");
|
||||
break;
|
||||
default:
|
||||
title = QApplication::translate("ErrorWindow", "Error!");
|
||||
message = QApplication::translate("ErrorWindow", "Unknown error");
|
||||
break;
|
||||
}
|
||||
if (!custom.isEmpty())
|
||||
message = custom;
|
||||
|
||||
QStringList fullMessage;
|
||||
fullMessage.append(title);
|
||||
@ -162,6 +163,7 @@ QMessageBox::Icon ErrorWindow::getIcon(const int mess)
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
case 20:
|
||||
icon = QMessageBox::Critical;
|
||||
break;
|
||||
default:
|
||||
@ -173,21 +175,21 @@ QMessageBox::Icon ErrorWindow::getIcon(const int mess)
|
||||
}
|
||||
|
||||
|
||||
void ErrorWindow::showWindow(const int mess, const QString sender, const QString custom)
|
||||
void ErrorWindow::showWindow(const int mess, const QString sender, const bool debugCmd)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Message" << mess;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Sender" << sender;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Custom message" << custom;
|
||||
if (debugCmd) qDebug() << PDEBUG;
|
||||
if (debugCmd) qDebug() << PDEBUG << ":" << "Message" << mess;
|
||||
if (debugCmd) qDebug() << PDEBUG << ":" << "Sender" << sender;
|
||||
|
||||
QStringList message = getMessage(mess, custom);
|
||||
ErrorWindow *errorWin = new ErrorWindow(0, debugCmd);
|
||||
QStringList message = errorWin->getMessage(mess);
|
||||
QMessageBox messageBox;
|
||||
messageBox.setText(message[0]);
|
||||
messageBox.setInformativeText(message[1]);
|
||||
if (debug)
|
||||
if (debugCmd)
|
||||
messageBox.setDetailedText(QApplication::translate("ErrorWindow", "Sender : %1").
|
||||
arg(sender));
|
||||
messageBox.setIcon(getIcon(mess));
|
||||
messageBox.setIcon(errorWin->getIcon(mess));
|
||||
messageBox.setStandardButtons(QMessageBox::Ok);
|
||||
messageBox.setDefaultButton(QMessageBox::Ok);
|
||||
|
||||
@ -196,4 +198,5 @@ void ErrorWindow::showWindow(const int mess, const QString sender, const QString
|
||||
layout->addItem(horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount());
|
||||
|
||||
messageBox.exec();
|
||||
delete errorWin;
|
||||
}
|
||||
|
@ -32,13 +32,13 @@ public:
|
||||
~ErrorWindow();
|
||||
|
||||
public slots:
|
||||
void showWindow(const int mess = 0,
|
||||
static void showWindow(const int mess = 0,
|
||||
const QString sender = QString(),
|
||||
const QString custom = QString());
|
||||
const bool debugCmd = false);
|
||||
|
||||
private:
|
||||
bool debug;
|
||||
QStringList getMessage(const int mess, const QString custom = QString());
|
||||
QStringList getMessage(const int mess);
|
||||
QMessageBox::Icon getIcon(const int mess);
|
||||
};
|
||||
|
||||
|
@ -87,10 +87,10 @@ void EthernetWidget::showAdvanced()
|
||||
{
|
||||
if (ui->pushButton_ethernetAdvanced->isChecked()) {
|
||||
ui->widget_ethernetAdvanced->setHidden(false);
|
||||
ui->pushButton_ethernetAdvanced->setText(QApplication::translate("EthernetWidget", "Hide advanced"));
|
||||
ui->pushButton_ethernetAdvanced->setArrowType(Qt::UpArrow);
|
||||
} else {
|
||||
ui->widget_ethernetAdvanced->setHidden(true);
|
||||
ui->pushButton_ethernetAdvanced->setText(QApplication::translate("EthernetWidget", "Show advanced"));
|
||||
ui->pushButton_ethernetAdvanced->setArrowType(Qt::DownArrow);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,9 @@ void GeneralWidget::createActions()
|
||||
{
|
||||
connect(ui->pushButton_generalAdvanced, SIGNAL(clicked(bool)), this, SLOT(showAdvanced()));
|
||||
connect(ui->pushButton_after, SIGNAL(clicked(bool)), this, SLOT(addAfter()));
|
||||
connect(ui->comboBox_after->lineEdit(), SIGNAL(returnPressed()), this, SLOT(addAfter()));
|
||||
connect(ui->pushButton_bindto, SIGNAL(clicked(bool)), this, SLOT(addBindTo()));
|
||||
connect(ui->comboBox_bindto->lineEdit(), SIGNAL(returnPressed()), this, SLOT(addBindTo()));
|
||||
}
|
||||
|
||||
|
||||
|
83
sources/gui/src/ipregexp.cpp
Normal file
83
sources/gui/src/ipregexp.cpp
Normal file
@ -0,0 +1,83 @@
|
||||
/***************************************************************************
|
||||
* This file is part of netctl-gui *
|
||||
* *
|
||||
* netctl-gui is free software: you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License as *
|
||||
* published by the Free Software Foundation, either version 3 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* netctl-gui is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with netctl-gui. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
#include "ipregexp.h"
|
||||
|
||||
|
||||
IpRegExp::IpRegExp(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
IpRegExp::~IpRegExp()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
QRegExp IpRegExp::ip4Regex()
|
||||
{
|
||||
return QRegExp(QString("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"));
|
||||
}
|
||||
|
||||
|
||||
QRegExp IpRegExp::ip4CidrRegex()
|
||||
{
|
||||
return QRegExp(QString("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(/([0-9]|[1-2][0-9]|3[0-2]))$"));
|
||||
}
|
||||
|
||||
|
||||
QRegExp IpRegExp::ip6Regex()
|
||||
{
|
||||
return QRegExp(QString("^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*"));
|
||||
}
|
||||
|
||||
|
||||
QRegExp IpRegExp::ip6CidrRegex()
|
||||
{
|
||||
return QRegExp(QString("^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(/(d|dd|1[0-1]d|12[0-8]))$"));
|
||||
}
|
||||
|
||||
|
||||
QRegExpValidator *IpRegExp::ipv4Validator()
|
||||
{
|
||||
return new QRegExpValidator(IpRegExp::ip4Regex());
|
||||
}
|
||||
|
||||
|
||||
QRegExpValidator *IpRegExp::ipv4CidrValidator()
|
||||
{
|
||||
return new QRegExpValidator(IpRegExp::ip4CidrRegex());
|
||||
}
|
||||
|
||||
|
||||
QRegExpValidator *IpRegExp::ipv6Validator()
|
||||
{
|
||||
return new QRegExpValidator(IpRegExp::ip6Regex());
|
||||
}
|
||||
|
||||
|
||||
QRegExpValidator *IpRegExp::ipv6CidrValidator()
|
||||
{
|
||||
return new QRegExpValidator(IpRegExp::ip6CidrRegex());
|
||||
}
|
||||
|
||||
|
||||
bool IpRegExp::checkString(const QString input, const QRegExp regexp)
|
||||
{
|
||||
return regexp.exactMatch(input);
|
||||
}
|
49
sources/gui/src/ipregexp.h
Normal file
49
sources/gui/src/ipregexp.h
Normal file
@ -0,0 +1,49 @@
|
||||
/***************************************************************************
|
||||
* This file is part of netctl-gui *
|
||||
* *
|
||||
* netctl-gui is free software: you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License as *
|
||||
* published by the Free Software Foundation, either version 3 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* netctl-gui is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with netctl-gui. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IPREGEXP_H
|
||||
#define IPREGEXP_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QRegExp>
|
||||
#include <QRegExpValidator>
|
||||
|
||||
|
||||
class IpRegExp : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit IpRegExp(QObject *parent = 0);
|
||||
~IpRegExp();
|
||||
|
||||
// ipv4
|
||||
static QRegExp ip4Regex();
|
||||
static QRegExp ip4CidrRegex();
|
||||
// ipv6
|
||||
static QRegExp ip6Regex();
|
||||
static QRegExp ip6CidrRegex();
|
||||
// validators
|
||||
static QRegExpValidator *ipv4Validator();
|
||||
static QRegExpValidator *ipv4CidrValidator();
|
||||
static QRegExpValidator *ipv6Validator();
|
||||
static QRegExpValidator *ipv6CidrValidator();
|
||||
// check
|
||||
static bool checkString(const QString input, const QRegExp regexp);
|
||||
};
|
||||
|
||||
|
||||
#endif /* IPREGEXP_H */
|
@ -20,6 +20,9 @@
|
||||
|
||||
#include <QKeyEvent>
|
||||
|
||||
#include "errorwindow.h"
|
||||
#include "ipregexp.h"
|
||||
|
||||
|
||||
IpWidget::IpWidget(QWidget *parent)
|
||||
: QWidget(parent),
|
||||
@ -111,32 +114,36 @@ void IpWidget::createActions()
|
||||
connect(ui->comboBox_dhcp, SIGNAL(currentIndexChanged(QString)), this, SLOT(changeDhcpClient(QString)));
|
||||
// buttons
|
||||
connect(ui->pushButton_ipAddress, SIGNAL(clicked(bool)), this, SLOT(addIp()));
|
||||
connect(ui->lineEdit_ipAddress, SIGNAL(returnPressed()), this, SLOT(addIp()));
|
||||
connect(ui->pushButton_ipRoutes, SIGNAL(clicked(bool)), this, SLOT(addIpRoutes()));
|
||||
connect(ui->pushButton_ipAddress6, SIGNAL(clicked(bool)), this, SLOT(addIp6()));
|
||||
connect(ui->lineEdit_ipAddress6, SIGNAL(returnPressed(bool)), this, SLOT(addIp6()));
|
||||
connect(ui->pushButton_ipRoutes6, SIGNAL(clicked(bool)), this, SLOT(addIpRoutes6()));
|
||||
connect(ui->pushButton_custom, SIGNAL(clicked(bool)), this, SLOT(addCustom()));
|
||||
connect(ui->lineEdit_custom, SIGNAL(returnPressed()), this, SLOT(addCustom()));
|
||||
connect(ui->pushButton_dns, SIGNAL(clicked(bool)), this, SLOT(addDns()));
|
||||
connect(ui->lineEdit_dns, SIGNAL(returnPressed()), this, SLOT(addDns()));
|
||||
connect(ui->pushButton_dnsOptions, SIGNAL(clicked(bool)), this, SLOT(addDnsOpt()));
|
||||
connect(ui->lineEdit_dnsOptions, SIGNAL(returnPressed()), this, SLOT(addDnsOpt()));
|
||||
}
|
||||
|
||||
|
||||
void IpWidget::createFilter()
|
||||
{
|
||||
// using input mask because validators is not comfortable
|
||||
// ipv4
|
||||
ui->lineEdit_ipAddress->setInputMask(QString("999.999.999.999/99"));
|
||||
ui->lineEdit_gateway->setInputMask(QString("999.999.999.999"));
|
||||
ui->lineEdit_ipRoutes->setInputMask(QString("999.999.999.999/99"));
|
||||
ui->lineEdit_ipRoutes2->setInputMask(QString("999.999.999.999"));
|
||||
ui->lineEdit_ipAddress->setValidator(IpRegExp::ipv4CidrValidator());
|
||||
ui->lineEdit_gateway->setValidator(IpRegExp::ipv4Validator());
|
||||
ui->lineEdit_ipRoutes->setValidator(IpRegExp::ipv4CidrValidator());
|
||||
ui->lineEdit_ipRoutes2->setValidator(IpRegExp::ipv4Validator());
|
||||
|
||||
// ipv6
|
||||
ui->lineEdit_ipAddress6->setInputMask(QString("<hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh/999"));
|
||||
ui->lineEdit_gateway6->setInputMask(QString("<hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh"));
|
||||
ui->lineEdit_ipRoutes6->setInputMask(QString("<hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh/999"));
|
||||
ui->lineEdit_ipRoutes62->setInputMask(QString("<hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh"));
|
||||
ui->lineEdit_ipAddress6->setValidator(IpRegExp::ipv6CidrValidator());
|
||||
ui->lineEdit_gateway6->setValidator(IpRegExp::ipv6Validator());
|
||||
ui->lineEdit_ipRoutes6->setValidator(IpRegExp::ipv6CidrValidator());
|
||||
ui->lineEdit_ipRoutes62->setValidator(IpRegExp::ipv6Validator());
|
||||
|
||||
// dns
|
||||
ui->lineEdit_dns->setInputMask(QString("999.999.999.999"));
|
||||
ui->lineEdit_dns->setValidator(IpRegExp::ipv4Validator());
|
||||
}
|
||||
|
||||
|
||||
@ -168,86 +175,23 @@ void IpWidget::keyPressEvent(QKeyEvent *pressedKey)
|
||||
}
|
||||
|
||||
|
||||
QString IpWidget::getIp(const QString rawIp)
|
||||
{
|
||||
QStringList ip = rawIp.split(QChar('.'));
|
||||
|
||||
// fix empty fields
|
||||
if (ip[0].isEmpty())
|
||||
ip[0] = QString("127");
|
||||
if (ip[1].isEmpty())
|
||||
ip[1] = QString("0");
|
||||
if (ip[2].isEmpty())
|
||||
ip[2] = QString("0");
|
||||
if (ip[3].isEmpty())
|
||||
ip[3] = QString("1");
|
||||
// fix numbers
|
||||
for (int i=0; i<4; i++)
|
||||
if (ip[i].toInt() > 255)
|
||||
ip[i] = QString("255");
|
||||
|
||||
return ip.join(QChar('.'));
|
||||
}
|
||||
|
||||
|
||||
QString IpWidget::getPrefix(const QString rawPrefix)
|
||||
{
|
||||
QString prefix;
|
||||
|
||||
if (rawPrefix.isEmpty())
|
||||
prefix = QString("24");
|
||||
else if (rawPrefix.toInt() > 32)
|
||||
prefix = QString("32");
|
||||
else
|
||||
prefix = rawPrefix;
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
QString IpWidget::getIp6(const QString rawIp)
|
||||
{
|
||||
QString ip = rawIp;
|
||||
|
||||
for (int i=0; i<5; i++)
|
||||
ip.replace(QString(":::"), QString("::"));
|
||||
|
||||
return ip;
|
||||
}
|
||||
|
||||
|
||||
QString IpWidget::getPrefix6(const QString rawPrefix)
|
||||
{
|
||||
QString prefix;
|
||||
|
||||
if (rawPrefix.isEmpty())
|
||||
prefix = QString("64");
|
||||
else if (rawPrefix.toInt() > 128)
|
||||
prefix = QString("128");
|
||||
else
|
||||
prefix = rawPrefix;
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
||||
void IpWidget::addIp()
|
||||
{
|
||||
QString ip = getIp(ui->lineEdit_ipAddress->text().remove(QChar(' ')).split(QChar('/'))[0]);
|
||||
QString prefix = getPrefix(ui->lineEdit_ipAddress->text().remove(QChar(' ')).split(QChar('/'))[1]);
|
||||
if (!IpRegExp::checkString(ui->lineEdit_ipAddress->text(), IpRegExp::ip4CidrRegex()))
|
||||
return ErrorWindow::showWindow(20, QString("[IpWidget::addIp]"));
|
||||
|
||||
ui->listWidget_ipAddress->addItem(ip + QString("/") + prefix);
|
||||
ui->listWidget_ipAddress->addItem(ui->lineEdit_ipAddress->text());
|
||||
ui->lineEdit_ipAddress->clear();
|
||||
}
|
||||
|
||||
|
||||
void IpWidget::addIpRoutes()
|
||||
{
|
||||
QString ip = getIp(ui->lineEdit_ipRoutes->text().remove(QChar(' ')).split(QChar('/'))[0]);
|
||||
QString prefix = getPrefix(ui->lineEdit_ipRoutes->text().remove(QChar(' ')).split(QChar('/'))[1]);
|
||||
QString ipVia = getIp(ui->lineEdit_ipRoutes2->text().remove(QChar(' ')));
|
||||
if ((!IpRegExp::checkString(ui->lineEdit_ipRoutes->text(), IpRegExp::ip4CidrRegex())) ||
|
||||
(!IpRegExp::checkString(ui->lineEdit_ipRoutes2->text(), IpRegExp::ip4Regex())))
|
||||
return ErrorWindow::showWindow(20, QString("[IpWidget::addIpRoutes]"));
|
||||
|
||||
ui->listWidget_ipRoutes->addItem(ip + QString("/") + prefix + QString(" via ") + ipVia);
|
||||
ui->listWidget_ipRoutes->addItem(ui->lineEdit_ipRoutes->text() + QString(" via ") + ui->lineEdit_ipRoutes2->text());
|
||||
ui->lineEdit_ipRoutes->clear();
|
||||
ui->lineEdit_ipRoutes2->clear();
|
||||
}
|
||||
@ -255,21 +199,21 @@ void IpWidget::addIpRoutes()
|
||||
|
||||
void IpWidget::addIp6()
|
||||
{
|
||||
QString ip = getIp6(ui->lineEdit_ipAddress6->text().remove(QChar(' ')).split(QChar('/'))[0]);
|
||||
QString prefix = getPrefix6(ui->lineEdit_ipAddress6->text().remove(QChar(' ')).split(QChar('/'))[1]);
|
||||
if (!IpRegExp::checkString(ui->lineEdit_ipAddress6->text(), IpRegExp::ip6CidrRegex()))
|
||||
return ErrorWindow::showWindow(20, QString("[IpWidget::addIp6]"));
|
||||
|
||||
ui->listWidget_ipAddress6->addItem(ip + QString("/") + prefix);
|
||||
ui->listWidget_ipAddress6->addItem(ui->lineEdit_ipAddress6->text());
|
||||
ui->lineEdit_ipAddress6->clear();
|
||||
}
|
||||
|
||||
|
||||
void IpWidget::addIpRoutes6()
|
||||
{
|
||||
QString ip = getIp6(ui->lineEdit_ipRoutes6->text().remove(QChar(' ')).split(QChar('/'))[0]);
|
||||
QString prefix = getPrefix6(ui->lineEdit_ipRoutes6->text().remove(QChar(' ')).split(QChar('/'))[1]);
|
||||
QString ipVia = getIp6(ui->lineEdit_ipRoutes62->text().remove(QChar(' ')));
|
||||
if ((!IpRegExp::checkString(ui->lineEdit_ipRoutes6->text(), IpRegExp::ip6CidrRegex())) ||
|
||||
(!IpRegExp::checkString(ui->lineEdit_ipRoutes62->text(), IpRegExp::ip6Regex())))
|
||||
return ErrorWindow::showWindow(20, QString("[IpWidget::addIp6Routes]"));
|
||||
|
||||
ui->listWidget_ipRoutes6->addItem(ip + QString("/") + prefix + QString(" via ") + ipVia);
|
||||
ui->listWidget_ipRoutes6->addItem(ui->lineEdit_ipRoutes6->text() + QString(" via ") + ui->lineEdit_ipRoutes62->text());
|
||||
ui->lineEdit_ipRoutes6->clear();
|
||||
ui->lineEdit_ipRoutes62->clear();
|
||||
}
|
||||
@ -285,9 +229,10 @@ void IpWidget::addCustom()
|
||||
|
||||
void IpWidget::addDns()
|
||||
{
|
||||
QString ip = getIp(ui->lineEdit_dns->text().remove(QChar(' ')));
|
||||
if (!IpRegExp::checkString(ui->lineEdit_dns->text(), IpRegExp::ip4Regex()))
|
||||
return ErrorWindow::showWindow(20, QString("[IpWidget::addDns]"));
|
||||
|
||||
ui->listWidget_dns->addItem(ip);
|
||||
ui->listWidget_dns->addItem(ui->lineEdit_dns->text());
|
||||
ui->lineEdit_dns->clear();
|
||||
}
|
||||
|
||||
@ -364,10 +309,10 @@ void IpWidget::showAdvanced()
|
||||
{
|
||||
if (ui->pushButton_ipAdvanced->isChecked()) {
|
||||
ui->widget_ipAdvanced->setHidden(false);
|
||||
ui->pushButton_ipAdvanced->setText(QApplication::translate("IpWidget", "Hide advanced"));
|
||||
ui->pushButton_ipAdvanced->setArrowType(Qt::UpArrow);
|
||||
} else {
|
||||
ui->widget_ipAdvanced->setHidden(true);
|
||||
ui->pushButton_ipAdvanced->setText(QApplication::translate("IpWidget", "Show advanced"));
|
||||
ui->pushButton_ipAdvanced->setArrowType(Qt::DownArrow);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,10 +64,6 @@ private:
|
||||
void createActions();
|
||||
void createFilter();
|
||||
void keyPressEvent(QKeyEvent *pressedKey);
|
||||
QString getIp(const QString rawIp);
|
||||
QString getPrefix(const QString rawPrefix);
|
||||
QString getIp6(const QString rawIp);
|
||||
QString getPrefix6(const QString rawPrefix);
|
||||
};
|
||||
|
||||
|
||||
|
@ -104,6 +104,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Should be in CIDR form according to standards</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string notr="true">127.0.0.1/32</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -163,7 +169,11 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>An IP routing gateway address</string>
|
||||
<string>An IP routing gateway address.
|
||||
Should be according to standards</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string notr="true">192.168.0.1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -256,6 +266,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Should be in CIDR form according to standards</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string notr="true">::1/128</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -315,7 +331,11 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>An IPv6 routing gateway address</string>
|
||||
<string>An IPv6 routing gateway address.
|
||||
Should be according to standards</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string notr="true">2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -380,6 +400,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Should be in CIDR form according to standards</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string notr="true">192.168.0.1/24</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -410,6 +436,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Should be according to standards</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string notr="true">192.168.0.1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -472,6 +504,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Should be in CIDR form according to standards</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string notr="true">2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d/64</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -502,6 +540,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Should be according to standards</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string notr="true">2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -929,6 +973,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Should be according to standards</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string notr="true">8.8.8.8</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -62,6 +62,7 @@ void MainWindow::setMenuActionsShown(const bool state)
|
||||
if (debug) qDebug() << PDEBUG << ":" << "State" << state;
|
||||
|
||||
// main
|
||||
toolBarActions[QString("netctlAuto")]->setVisible(state);
|
||||
toolBarActions[QString("mainRefresh")]->setVisible(state);
|
||||
toolBarActions[QString("mainStart")]->setVisible(state);
|
||||
toolBarActions[QString("mainSwitch")]->setVisible(state);
|
||||
@ -87,6 +88,7 @@ void MainWindow::updateMenuMain()
|
||||
setMenuActionsShown(false);
|
||||
actionMenu->setDefaultAction(toolBarActions[QString("mainStart")]);
|
||||
|
||||
toolBarActions[QString("netctlAuto")]->setVisible(true);
|
||||
toolBarActions[QString("mainRefresh")]->setVisible(true);
|
||||
if (ui->tableWidget_main->currentItem() == 0) return;
|
||||
if (!ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 2)->text().isEmpty()) {
|
||||
@ -160,34 +162,12 @@ void MainWindow::updateMenuWifi()
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::updateToolBars()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
if (sender() == ui->pushButton_menu) {
|
||||
mainToolBar->setHidden(false);
|
||||
actionToolBar->setHidden(true);
|
||||
helpToolBar->setHidden(true);
|
||||
} else if (sender() == ui->pushButton_action) {
|
||||
mainToolBar->setHidden(true);
|
||||
actionToolBar->setHidden(false);
|
||||
helpToolBar->setHidden(true);
|
||||
updateMenu();
|
||||
} else if (sender() == ui->pushButton_help) {
|
||||
mainToolBar->setHidden(true);
|
||||
actionToolBar->setHidden(true);
|
||||
helpToolBar->setHidden(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// tab update slots
|
||||
void MainWindow::updateMainTab()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (!checkExternalApps(QString("netctl"))) {
|
||||
errorWin->showWindow(1, QString(PDEBUG));
|
||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||
emit(needToBeConfigured());
|
||||
return;
|
||||
}
|
||||
@ -285,7 +265,7 @@ void MainWindow::updateWifiTab()
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
wifiTabSetEnabled(checkExternalApps(QString("wpasup")));
|
||||
if (!checkExternalApps(QString("wpasup"))) {
|
||||
errorWin->showWindow(1, QString(PDEBUG));
|
||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||
emit(needToBeConfigured());
|
||||
return;
|
||||
}
|
||||
@ -443,7 +423,7 @@ void MainWindow::mainTabEnableProfile()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (!checkExternalApps(QString("netctl"))) {
|
||||
errorWin->showWindow(1, QString(PDEBUG));
|
||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||
emit(needToBeConfigured());
|
||||
return;
|
||||
}
|
||||
@ -503,7 +483,7 @@ void MainWindow::mainTabRestartProfile()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (!checkExternalApps(QString("netctl"))) {
|
||||
errorWin->showWindow(1, QString(PDEBUG));
|
||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||
emit(needToBeConfigured());
|
||||
return;
|
||||
}
|
||||
@ -525,7 +505,7 @@ void MainWindow::mainTabStartProfile()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (!checkExternalApps(QString("netctl"))) {
|
||||
errorWin->showWindow(1, QString(PDEBUG));
|
||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||
emit(needToBeConfigured());
|
||||
return;
|
||||
}
|
||||
@ -548,7 +528,7 @@ void MainWindow::mainTabStopAllProfiles()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (!checkExternalApps(QString("netctl"))) {
|
||||
errorWin->showWindow(1, QString(PDEBUG));
|
||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||
emit(needToBeConfigured());
|
||||
return;
|
||||
}
|
||||
@ -574,7 +554,7 @@ void MainWindow::mainTabSwitchToProfile()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (!checkExternalApps(QString("netctl"))) {
|
||||
errorWin->showWindow(1, QString(PDEBUG));
|
||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||
emit(needToBeConfigured());
|
||||
return;
|
||||
}
|
||||
@ -763,11 +743,11 @@ void MainWindow::profileTabCreateProfile()
|
||||
|
||||
// error checking
|
||||
if (ui->comboBox_profile->currentText().isEmpty())
|
||||
return errorWin->showWindow(3, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(3, QString(PDEBUG), debug);
|
||||
if (generalWid->isOk() == 1)
|
||||
return errorWin->showWindow(4, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(4, QString(PDEBUG), debug);
|
||||
else if (generalWid->isOk() == 2)
|
||||
return errorWin->showWindow(5, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(5, QString(PDEBUG), debug);
|
||||
if ((generalWid->connectionType->currentText() == QString("ethernet")) ||
|
||||
(generalWid->connectionType->currentText() == QString("wireless")) ||
|
||||
(generalWid->connectionType->currentText() == QString("bond")) ||
|
||||
@ -779,55 +759,57 @@ void MainWindow::profileTabCreateProfile()
|
||||
(generalWid->connectionType->currentText() == QString("macvlan")) ||
|
||||
(generalWid->connectionType->currentText() == QString("openvswitch"))) {
|
||||
if (ipWid->isOk() == 1)
|
||||
return errorWin->showWindow(6, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(6, QString(PDEBUG), debug);
|
||||
else if (ipWid->isOk() == 2)
|
||||
return errorWin->showWindow(6, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(6, QString(PDEBUG), debug);
|
||||
}
|
||||
if (generalWid->connectionType->currentText() == QString("ethernet")) {
|
||||
if (ethernetWid->isOk() == 1)
|
||||
return errorWin->showWindow(7, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(7, QString(PDEBUG), debug);
|
||||
} else if (generalWid->connectionType->currentText() == QString("wireless")) {
|
||||
if (wirelessWid->isOk() == 1)
|
||||
return errorWin->showWindow(8, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(8, QString(PDEBUG), debug);
|
||||
else if (wirelessWid->isOk() == 2)
|
||||
return errorWin->showWindow(9, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(9, QString(PDEBUG), debug);
|
||||
else if (wirelessWid->isOk() == 3)
|
||||
return errorWin->showWindow(10, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(10, QString(PDEBUG), debug);
|
||||
else if (wirelessWid->isOk() == 4)
|
||||
return errorWin->showWindow(7, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(7, QString(PDEBUG), debug);
|
||||
else if (wirelessWid->isOk() == 5)
|
||||
return errorWin->showWindow(11, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(11, QString(PDEBUG), debug);
|
||||
} else if (generalWid->connectionType->currentText() == QString("bridge")) {
|
||||
} else if (generalWid->connectionType->currentText() == QString("pppoe")) {
|
||||
if (pppoeWid->isOk() == 1)
|
||||
return errorWin->showWindow(7, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(7, QString(PDEBUG), debug);
|
||||
else if (pppoeWid->isOk() == 2)
|
||||
return errorWin->showWindow(12, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(12, QString(PDEBUG), debug);
|
||||
else if (pppoeWid->isOk() == 3)
|
||||
return errorWin->showWindow(13, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(13, QString(PDEBUG), debug);
|
||||
else if (pppoeWid->isOk() == 4)
|
||||
return errorWin->showWindow(12, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(12, QString(PDEBUG), debug);
|
||||
} else if (generalWid->connectionType->currentText() == QString("mobile_ppp")) {
|
||||
if (mobileWid->isOk() == 1)
|
||||
return errorWin->showWindow(15, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(15, QString(PDEBUG), debug);
|
||||
if (mobileWid->isOk() == 2)
|
||||
return errorWin->showWindow(7, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(7, QString(PDEBUG), debug);
|
||||
}
|
||||
else if (generalWid->connectionType->currentText() == QString("tunnel")) {
|
||||
if (tunnelWid->isOk() == 1)
|
||||
return ErrorWindow::showWindow(20, QString(PDEBUG), debug);
|
||||
}
|
||||
else if (generalWid->connectionType->currentText() == QString("tuntap")) {
|
||||
if (tuntapWid->isOk() == 1)
|
||||
return errorWin->showWindow(15, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(15, QString(PDEBUG), debug);
|
||||
if (tuntapWid->isOk() == 2)
|
||||
return errorWin->showWindow(15, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(15, QString(PDEBUG), debug);
|
||||
}
|
||||
else if (generalWid->connectionType->currentText() == QString("vlan")) {
|
||||
if (ethernetWid->isOk() == 1)
|
||||
return errorWin->showWindow(7, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(7, QString(PDEBUG), debug);
|
||||
}
|
||||
else if (generalWid->connectionType->currentText() == QString("macvlan")) {
|
||||
if (ethernetWid->isOk() == 1)
|
||||
return errorWin->showWindow(7, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(7, QString(PDEBUG), debug);
|
||||
}
|
||||
|
||||
ui->tabWidget->setDisabled(true);
|
||||
@ -954,10 +936,8 @@ void MainWindow::profileTabLoadProfile()
|
||||
} else
|
||||
settings = netctlProfile->getSettingsFromProfile(profile);
|
||||
|
||||
|
||||
|
||||
if (settings.isEmpty())
|
||||
return errorWin->showWindow(17, QString(PDEBUG));
|
||||
return ErrorWindow::showWindow(17, QString(PDEBUG), debug);
|
||||
|
||||
generalWid->setSettings(settings);
|
||||
if (generalWid->connectionType->currentText() == QString("ethernet")) {
|
||||
@ -1078,7 +1058,7 @@ void MainWindow::wifiTabStart()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (!checkExternalApps(QString("wpasup"))) {
|
||||
errorWin->showWindow(1, QString(PDEBUG));
|
||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||
emit(needToBeConfigured());
|
||||
return;
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ bool MainWindow::forceStartHelper()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (!checkExternalApps(QString("helper"))) {
|
||||
errorWin->showWindow(1, QString(PDEBUG));
|
||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||
emit(needToBeConfigured());
|
||||
return false;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ MainWindow::MainWindow(QWidget *parent,
|
||||
if (ui->tableWidget_wifi->item(i, 0)->text() == args[QString("essid")].toString())
|
||||
ui->tableWidget_wifi->setCurrentCell(i, 0);
|
||||
if (ui->tableWidget_wifi->currentItem() == 0)
|
||||
errorWin->showWindow(18, QString(PDEBUG));
|
||||
ErrorWindow::showWindow(18, QString(PDEBUG), debug);
|
||||
} else if (args[QString("open")].toString() != QString("PROFILE")) {
|
||||
ui->comboBox_profile->addItem(args[QString("open")].toString());
|
||||
ui->comboBox_profile->setCurrentIndex(ui->comboBox_profile->count()-1);
|
||||
@ -89,7 +89,7 @@ MainWindow::MainWindow(QWidget *parent,
|
||||
if (ui->tableWidget_main->item(i, 0)->text() == args[QString("select")].toString())
|
||||
ui->tableWidget_main->setCurrentCell(i, 0);
|
||||
if (ui->tableWidget_main->currentItem() == 0)
|
||||
errorWin->showWindow(17, QString(PDEBUG));
|
||||
ErrorWindow::showWindow(17, QString(PDEBUG), debug);
|
||||
}
|
||||
|
||||
// show windows
|
||||
@ -351,11 +351,17 @@ void MainWindow::createActions()
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
connect(ui->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updateTabs(int)));
|
||||
connect(ui->pushButton_menu, SIGNAL(clicked(bool)), this, SLOT(updateToolBars()));
|
||||
connect(ui->pushButton_action, SIGNAL(clicked(bool)), this, SLOT(updateToolBars()));
|
||||
connect(ui->pushButton_help, SIGNAL(clicked(bool)), this, SLOT(updateToolBars()));
|
||||
connect(this, SIGNAL(needToBeConfigured()), this, SLOT(showSettingsWindow()));
|
||||
|
||||
// menu
|
||||
connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(showSettingsWindow()));
|
||||
connect(ui->actionSecurity, SIGNAL(triggered()), this, SLOT(showSecurityNotes()));
|
||||
connect(ui->actionDBus_API, SIGNAL(triggered()), this, SLOT(showApi()));
|
||||
connect(ui->actionLibrary, SIGNAL(triggered()), this, SLOT(showLibrary()));
|
||||
connect(ui->actionReport_a_bug, SIGNAL(triggered()), this, SLOT(reportABug()));
|
||||
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAboutWindow()));
|
||||
connect(ui->actionQuit, SIGNAL(triggered()), this, SLOT(closeMainWindow()));
|
||||
|
||||
// main tab events
|
||||
connect(ui->pushButton_netctlAuto, SIGNAL(clicked(bool)), this, SLOT(showNetctlAutoWindow()));
|
||||
connect(ui->tableWidget_main, SIGNAL(itemActivated(QTableWidgetItem *)), this, SLOT(mainTabStartProfile()));
|
||||
@ -398,13 +404,11 @@ void MainWindow::createObjects()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
// error messages
|
||||
errorWin = new ErrorWindow(this, debug);
|
||||
// backend
|
||||
createDBusSession();
|
||||
if (useHelper)
|
||||
if (!forceStartHelper()) {
|
||||
errorWin->showWindow(19, QString(PDEBUG));
|
||||
ErrorWindow::showWindow(19, QString(PDEBUG), debug);
|
||||
useHelper = false;
|
||||
}
|
||||
checkHelperStatus();
|
||||
@ -454,25 +458,10 @@ void MainWindow::createToolBars()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
mainToolBar = new QToolBar(this);
|
||||
mainToolBar->setToolButtonStyle(Qt::ToolButtonFollowStyle);
|
||||
toolBarActions[QString("netctlAuto")] = mainToolBar->addAction(QApplication::translate("MainWindow", "netctl-auto"),
|
||||
this, SLOT(showNetctlAutoWindow()));
|
||||
toolBarActions[QString("settings")] = mainToolBar->addAction(QIcon::fromTheme(QString("configure")),
|
||||
QApplication::translate("MainWindow", "Settings"),
|
||||
this, SLOT(showSettingsWindow()));
|
||||
appShortcuts[QString("settingsShortcut")] = new QShortcut(QKeySequence(QApplication::translate("MainWindow", "Ctrl+S")),
|
||||
this, SLOT(showSettingsWindow()));
|
||||
toolBarActions[QString("quit")] = mainToolBar->addAction(QIcon::fromTheme(QString("exit")),
|
||||
QApplication::translate("MainWindow", "Quit"),
|
||||
this, SLOT(closeMainWindow()));
|
||||
appShortcuts[QString("quitShortcut")] = new QShortcut(QKeySequence(QApplication::translate("MainWindow", "Ctrl+Q")),
|
||||
this, SLOT(closeMainWindow()));
|
||||
ui->centralLayout->insertWidget(1, mainToolBar);
|
||||
mainToolBar->setHidden(true);
|
||||
|
||||
actionToolBar = new QToolBar(this);
|
||||
actionToolBar->setToolButtonStyle(Qt::ToolButtonFollowStyle);
|
||||
toolBarActions[QString("netctlAuto")] = actionToolBar->addAction(QApplication::translate("MainWindow", "netctl-auto"),
|
||||
this, SLOT(showNetctlAutoWindow()));
|
||||
toolBarActions[QString("mainRefresh")] = actionToolBar->addAction(QIcon::fromTheme(QString("stock-refresh")),
|
||||
QApplication::translate("MainWindow", "Refresh"),
|
||||
this, SLOT(updateMainTab()));
|
||||
@ -523,29 +512,7 @@ void MainWindow::createToolBars()
|
||||
toolBarActions[QString("profileRemove")] = actionToolBar->addAction(QIcon::fromTheme(QString("edit-delete")),
|
||||
QApplication::translate("MainWindow", "Remove"),
|
||||
this, SLOT(profileTabRemoveProfile()));
|
||||
ui->centralLayout->insertWidget(1, actionToolBar);
|
||||
actionToolBar->setHidden(true);
|
||||
|
||||
helpToolBar = new QToolBar(this);
|
||||
helpToolBar->setToolButtonStyle(Qt::ToolButtonFollowStyle);
|
||||
toolBarActions[QString("security")] = helpToolBar->addAction(QIcon::fromTheme(QString("security-medium")),
|
||||
QApplication::translate("MainWindow", "Security"),
|
||||
this, SLOT(showSecurityNotes()));
|
||||
toolBarActions[QString("api")] = helpToolBar->addAction(QApplication::translate("MainWindow", "DBus API"),
|
||||
this, SLOT(showApi()));
|
||||
toolBarActions[QString("library")] = helpToolBar->addAction(QApplication::translate("MainWindow", "Library"),
|
||||
this, SLOT(showLibrary()));
|
||||
helpToolBar->addSeparator();
|
||||
toolBarActions[QString("report")] = helpToolBar->addAction(QIcon::fromTheme(QString("tools-report-bug")),
|
||||
QApplication::translate("MainWindow", "Report a bug"),
|
||||
this, SLOT(reportABug()));
|
||||
toolBarActions[QString("about")] = helpToolBar->addAction(QIcon::fromTheme(QString("help-about")),
|
||||
QApplication::translate("MainWindow", "About"),
|
||||
this, SLOT(showAboutWindow()));
|
||||
ui->centralLayout->insertWidget(1, helpToolBar);
|
||||
helpToolBar->setHidden(true);
|
||||
|
||||
ui->pushButton_menu->click();
|
||||
ui->centralLayout->insertWidget(0, actionToolBar);
|
||||
}
|
||||
|
||||
|
||||
@ -572,7 +539,6 @@ void MainWindow::deleteObjects()
|
||||
if (wirelessWid != nullptr) delete wirelessWid;
|
||||
|
||||
if (aboutWin != nullptr) delete aboutWin;
|
||||
if (errorWin != nullptr) delete errorWin;
|
||||
if (netctlAutoWin != nullptr) delete netctlAutoWin;
|
||||
if (settingsWin != nullptr) delete settingsWin;
|
||||
if (actionMenu != nullptr) {
|
||||
@ -583,16 +549,6 @@ void MainWindow::deleteObjects()
|
||||
actionToolBar->clear();
|
||||
delete actionToolBar;
|
||||
}
|
||||
if (helpToolBar != nullptr) {
|
||||
helpToolBar->clear();
|
||||
delete helpToolBar;
|
||||
}
|
||||
if (mainToolBar != nullptr) {
|
||||
mainToolBar->clear();
|
||||
delete mainToolBar;
|
||||
delete appShortcuts[QString("settingsShortcut")];
|
||||
delete appShortcuts[QString("quitShortcut")];
|
||||
}
|
||||
if (trayIcon != nullptr) delete trayIcon;
|
||||
if (ui != nullptr) delete ui;
|
||||
}
|
||||
|
@ -30,7 +30,6 @@
|
||||
|
||||
class AboutWindow;
|
||||
class BridgeWidget;
|
||||
class ErrorWindow;
|
||||
class EthernetWidget;
|
||||
class GeneralWidget;
|
||||
class IpWidget;
|
||||
@ -109,7 +108,6 @@ private slots:
|
||||
void updateMenuMain();
|
||||
void updateMenuProfile();
|
||||
void updateMenuWifi();
|
||||
void updateToolBars();
|
||||
// tab update slots
|
||||
void updateMainTab();
|
||||
void updateProfileTab();
|
||||
@ -138,15 +136,11 @@ private slots:
|
||||
private:
|
||||
// ui
|
||||
TrayIcon *trayIcon = nullptr;
|
||||
QMap<QString, QShortcut *> appShortcuts;
|
||||
QMap<QString, QAction *> toolBarActions;
|
||||
QToolButton *actionMenu = nullptr;
|
||||
QToolBar *actionToolBar = nullptr;
|
||||
QToolBar *helpToolBar = nullptr;
|
||||
QToolBar *mainToolBar = nullptr;
|
||||
Ui::MainWindow *ui = nullptr;
|
||||
AboutWindow *aboutWin = nullptr;
|
||||
ErrorWindow *errorWin = nullptr;
|
||||
NetctlAutoWindow *netctlAutoWin = nullptr;
|
||||
PasswdWidget *passwdWid = nullptr;
|
||||
SettingsWindow *settingsWin = nullptr;
|
||||
|
@ -15,40 +15,6 @@
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<layout class="QVBoxLayout" name="centralLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_menus">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_menu">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border: none;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Menu</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_action">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border: none;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Actions</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_help">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border: none;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Help</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
@ -200,7 +166,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>518</width>
|
||||
<height>368</height>
|
||||
<height>369</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -295,6 +261,88 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>550</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuMenu">
|
||||
<property name="title">
|
||||
<string>Menu</string>
|
||||
</property>
|
||||
<addaction name="actionSettings"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionSecurity"/>
|
||||
<addaction name="actionDBus_API"/>
|
||||
<addaction name="actionLibrary"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionReport_a_bug"/>
|
||||
<addaction name="actionAbout"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionQuit"/>
|
||||
</widget>
|
||||
<addaction name="menuMenu"/>
|
||||
</widget>
|
||||
<action name="actionSecurity">
|
||||
<property name="icon">
|
||||
<iconset theme="security-medium"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Security</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDBus_API">
|
||||
<property name="text">
|
||||
<string>DBus API</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLibrary">
|
||||
<property name="text">
|
||||
<string>Library</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionReport_a_bug">
|
||||
<property name="icon">
|
||||
<iconset theme="tools-report-bug"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Report a bug</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAbout">
|
||||
<property name="icon">
|
||||
<iconset theme="help-about"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>About</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionQuit">
|
||||
<property name="icon">
|
||||
<iconset theme="application-exit"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Quit</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Q</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSettings">
|
||||
<property name="icon">
|
||||
<iconset theme="configure"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>tabWidget</tabstop>
|
||||
|
@ -88,10 +88,10 @@ void MobileWidget::showAdvanced()
|
||||
{
|
||||
if (ui->pushButton_mobileAdvanced->isChecked()) {
|
||||
ui->widget_mobileAdvanced->setHidden(false);
|
||||
ui->pushButton_mobileAdvanced->setText(QApplication::translate("MobileWidget", "Hide advanced"));
|
||||
ui->pushButton_mobileAdvanced->setArrowType(Qt::UpArrow);
|
||||
} else {
|
||||
ui->widget_mobileAdvanced->setHidden(true);
|
||||
ui->pushButton_mobileAdvanced->setText(QApplication::translate("MobileWidget", "Show advanced"));
|
||||
ui->pushButton_mobileAdvanced->setArrowType(Qt::DownArrow);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,10 +116,10 @@ void PppoeWidget::showAdvanced()
|
||||
{
|
||||
if (ui->pushButton_pppoeAdvanced->isChecked()) {
|
||||
ui->widget_pppoeAdvanced->setHidden(false);
|
||||
ui->pushButton_pppoeAdvanced->setText(QApplication::translate("PppoeWidget", "Hide advanced"));
|
||||
ui->pushButton_pppoeAdvanced->setArrowType(Qt::UpArrow);
|
||||
} else {
|
||||
ui->widget_pppoeAdvanced->setHidden(true);
|
||||
ui->pushButton_pppoeAdvanced->setText(QApplication::translate("PppoeWidget", "Show advanced"));
|
||||
ui->pushButton_pppoeAdvanced->setArrowType(Qt::DownArrow);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ void SettingsWindow::saveSettings()
|
||||
QMap<QString, QString> config = readSettings();
|
||||
QSettings settings(file, QSettings::IniFormat);
|
||||
|
||||
settings.beginGroup(QString("General"));
|
||||
settings.beginGroup(QString("Common"));
|
||||
settings.setValue(QString("LANGUAGE"), config[QString("LANGUAGE")]);
|
||||
settings.setValue(QString("SYSTRAY"), config[QString("SYSTRAY")]);
|
||||
settings.setValue(QString("CLOSETOTRAY"), config[QString("CLOSETOTRAY")]);
|
||||
@ -413,7 +413,7 @@ QMap<QString, QString> SettingsWindow::getSettings(QString fileName)
|
||||
QMap<QString, QString> config;
|
||||
QSettings settings(fileName, QSettings::IniFormat);
|
||||
|
||||
settings.beginGroup(QString("General"));
|
||||
settings.beginGroup(QString("Common"));
|
||||
config[QString("LANGUAGE")] = settings.value(QString("LANGUAGE"), QString("en")).toString();
|
||||
config[QString("SYSTRAY")] = settings.value(QString("SYSTRAY"), QString("true")).toString();
|
||||
config[QString("CLOSETOTRAY")] = settings.value(QString("CLOSETOTRAY"), QString("true")).toString();
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include "tunnelwidget.h"
|
||||
#include "ui_tunnelwidget.h"
|
||||
|
||||
#include "ipregexp.h"
|
||||
|
||||
|
||||
TunnelWidget::TunnelWidget(QWidget *parent)
|
||||
: QWidget(parent),
|
||||
@ -54,32 +56,8 @@ void TunnelWidget::setShown(const bool state)
|
||||
|
||||
void TunnelWidget::createFilter()
|
||||
{
|
||||
// using input mask because validators is not comfortable
|
||||
// ipv4
|
||||
ui->lineEdit_local->setInputMask(QString("999.999.999.999"));
|
||||
ui->lineEdit_remote->setInputMask(QString("999.999.999.999"));
|
||||
}
|
||||
|
||||
|
||||
QString TunnelWidget::getIp(const QString rawIp)
|
||||
{
|
||||
QStringList ip = rawIp.split(QChar('.'));
|
||||
|
||||
// fix empty fields
|
||||
if (ip[0].isEmpty())
|
||||
ip[0] = QString("127");
|
||||
if (ip[1].isEmpty())
|
||||
ip[1] = QString("0");
|
||||
if (ip[2].isEmpty())
|
||||
ip[2] = QString("0");
|
||||
if (ip[3].isEmpty())
|
||||
ip[3] = QString("1");
|
||||
// fix numbers
|
||||
for (int i=0; i<4; i++)
|
||||
if (ip[i].toInt() > 255)
|
||||
ip[i] = QString("255");
|
||||
|
||||
return ip.join(QChar('.'));
|
||||
ui->lineEdit_local->setValidator(IpRegExp::ipv4Validator());
|
||||
ui->lineEdit_remote->setValidator(IpRegExp::ipv4Validator());
|
||||
}
|
||||
|
||||
|
||||
@ -92,9 +70,9 @@ QMap<QString, QString> TunnelWidget::getSettings()
|
||||
|
||||
tunnelSettings[QString("Mode")] = QString("'") + ui->comboBox_mode->currentText() + QString("'");
|
||||
if (!ui->lineEdit_local->text().remove(QChar('.')).remove(QChar(' ')).isEmpty())
|
||||
tunnelSettings[QString("Local")] = QString("'") + getIp(ui->lineEdit_local->text().remove(QChar(' '))) + QString("'");
|
||||
tunnelSettings[QString("Local")] = QString("'") + ui->lineEdit_local->text() + QString("'");
|
||||
if (!ui->lineEdit_remote->text().remove(QChar('.')).remove(QChar(' ')).isEmpty())
|
||||
tunnelSettings[QString("Remote")] = QString("'") + getIp(ui->lineEdit_remote->text().remove(QChar(' '))) + QString("'");
|
||||
tunnelSettings[QString("Remote")] = QString("'") + ui->lineEdit_remote->text() + QString("'");
|
||||
|
||||
return tunnelSettings;
|
||||
}
|
||||
@ -102,6 +80,10 @@ QMap<QString, QString> TunnelWidget::getSettings()
|
||||
|
||||
int TunnelWidget::isOk()
|
||||
{
|
||||
// ip is not correct
|
||||
if ((!IpRegExp::checkString(ui->lineEdit_local->text(), IpRegExp::ip4Regex())) ||
|
||||
(!IpRegExp::checkString(ui->lineEdit_remote->text(), IpRegExp::ip4Regex())))
|
||||
return 1;
|
||||
// all fine
|
||||
return 0;
|
||||
}
|
||||
|
@ -43,7 +43,6 @@ public slots:
|
||||
private:
|
||||
Ui::TunnelWidget *ui;
|
||||
void createFilter();
|
||||
QString getIp(const QString rawIp);
|
||||
};
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@ void WirelessWidget::clear()
|
||||
ui->lineEdit_wpaConfigSection->clear();
|
||||
ui->listWidget_wpaConfigSection->setCurrentRow(-1);
|
||||
ui->listWidget_wpaConfigSection->clear();
|
||||
ui->lineEdit_wpaConfig->setText(QString("/etc/wpa_supplicant.conf"));
|
||||
ui->lineEdit_wpaConfig->setText(QString("/etc/wpa_supplicant/wpa_supplicant.conf"));
|
||||
ui->lineEdit_key->clear();
|
||||
ui->checkBox_hidden->setCheckState(Qt::Unchecked);
|
||||
ui->checkBox_adhoc->setCheckState(Qt::Unchecked);
|
||||
@ -99,7 +99,9 @@ void WirelessWidget::createActions()
|
||||
connect(ui->pushButton_wirelessAdvanced, SIGNAL(clicked(bool)), this, SLOT(showAdvanced()));
|
||||
connect(ui->pushButton_drivers, SIGNAL(clicked(bool)), this, SLOT(addDriver()));
|
||||
connect(ui->pushButton_freq, SIGNAL(clicked(bool)), this, SLOT(addFreq()));
|
||||
connect(ui->spinBox_freq, SIGNAL(editingFinished()), this, SLOT(addFreq()));
|
||||
connect(ui->pushButton_wpaConfigSection, SIGNAL(clicked(bool)), this, SLOT(addOption()));
|
||||
connect(ui->lineEdit_wpaConfigSection, SIGNAL(returnPressed()), this, SLOT(addOption()));
|
||||
connect(ui->pushButton_wpaConfig, SIGNAL(clicked(bool)), this, SLOT(selectWpaConfig()));
|
||||
connect(ui->comboBox_security, SIGNAL(currentIndexChanged(QString)), this, SLOT(changeSecurity(QString)));
|
||||
}
|
||||
@ -195,10 +197,10 @@ void WirelessWidget::showAdvanced()
|
||||
{
|
||||
if (ui->pushButton_wirelessAdvanced->isChecked()) {
|
||||
ui->widget_wirelessAdvanced->setHidden(false);
|
||||
ui->pushButton_wirelessAdvanced->setText(QApplication::translate("WirelessWidget", "Hide advanced"));
|
||||
ui->pushButton_wirelessAdvanced->setArrowType(Qt::UpArrow);
|
||||
} else {
|
||||
ui->widget_wirelessAdvanced->setHidden(true);
|
||||
ui->pushButton_wirelessAdvanced->setText(QApplication::translate("WirelessWidget", "Show advanced"));
|
||||
ui->pushButton_wirelessAdvanced->setArrowType(Qt::DownArrow);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# /etc/netctl-gui.conf - system-wide configuration
|
||||
# $HOME/.config/netctl-gui.conf - user configuration
|
||||
|
||||
[General]
|
||||
[Common]
|
||||
# application language
|
||||
LANGUAGE=en
|
||||
# create system tray icon.
|
||||
|
@ -134,7 +134,7 @@ QMap<QString, QString> NetctlHelper::getSettings(const QString file)
|
||||
QMap<QString, QString> config;
|
||||
QSettings settings(file, QSettings::IniFormat);
|
||||
|
||||
settings.beginGroup(QString("General"));
|
||||
settings.beginGroup(QString("Common"));
|
||||
config[QString("LANGUAGE")] = settings.value(QString("LANGUAGE"), QString("en")).toString();
|
||||
config[QString("SYSTRAY")] = settings.value(QString("SYSTRAY"), QString("true")).toString();
|
||||
config[QString("CLOSETOTRAY")] = settings.value(QString("CLOSETOTRAY"), QString("true")).toString();
|
||||
|
@ -218,7 +218,7 @@ void TestNetctlProfile::test_createProfile()
|
||||
profileSettings["Security"] = QString("none");
|
||||
profileSettings["User"] = QString("'example@yourprovider.com'");
|
||||
profileSettings["VLANID"] = QString("11");
|
||||
profileSettings["WPAConfigFile"] = QString("'/etc/wpa_supplicant.conf'");
|
||||
profileSettings["WPAConfigFile"] = QString("'/etc/wpa_supplicant/wpa_supplicant.conf'");
|
||||
profileSettings["WPAConfigSection"] = QString("\n\
|
||||
'ssid=\"University\"'\n\
|
||||
'key_mgmt=WPA-EAP'\n\
|
||||
@ -280,7 +280,7 @@ route add default via 192.168.1.1");
|
||||
original.append("Security==none");
|
||||
original.append("User==example@yourprovider.com");
|
||||
original.append("VLANID==11");
|
||||
original.append("WPAConfigFile==/etc/wpa_supplicant.conf");
|
||||
original.append("WPAConfigFile==/etc/wpa_supplicant/wpa_supplicant.conf");
|
||||
original.append("WPAConfigSection==ssid=\"University\"\n\
|
||||
key_mgmt=WPA-EAP\n\
|
||||
eap=TTLS\n\
|
||||
|
Loading…
Reference in New Issue
Block a user