mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 15:37:23 +00:00
added ethernet widget
This commit is contained in:
parent
b81bd78327
commit
ec27411b1d
33
sources/gui/src/ethernetwidget.cpp
Normal file
33
sources/gui/src/ethernetwidget.cpp
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* This file is part of netctl-plasmoid *
|
||||||
|
* *
|
||||||
|
* netctl-plasmoid 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-plasmoid 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-plasmoid. If not, see http://www.gnu.org/licenses/ *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#include "ethernetwidget.h"
|
||||||
|
#include "ui_ethernetwidget.h"
|
||||||
|
|
||||||
|
|
||||||
|
EthernetWidget::EthernetWidget(QWidget *parent)
|
||||||
|
: QWidget(parent),
|
||||||
|
ui(new Ui::EthernetWidget)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
EthernetWidget::~EthernetWidget()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
41
sources/gui/src/ethernetwidget.h
Normal file
41
sources/gui/src/ethernetwidget.h
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* This file is part of netctl-plasmoid *
|
||||||
|
* *
|
||||||
|
* netctl-plasmoid 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-plasmoid 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-plasmoid. If not, see http://www.gnu.org/licenses/ *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#ifndef ETHERNETWIDGET_H
|
||||||
|
#define ETHERNETWIDGET_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class EthernetWidget;
|
||||||
|
}
|
||||||
|
|
||||||
|
class EthernetWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit EthernetWidget(QWidget *parent = 0);
|
||||||
|
~EthernetWidget();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::EthernetWidget *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* ETHERNETWIDGET_H */
|
243
sources/gui/src/ethernetwidget.ui
Normal file
243
sources/gui/src/ethernetwidget.ui
Normal file
@ -0,0 +1,243 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>EthernetWidget</class>
|
||||||
|
<widget class="QWidget" name="EthernetWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>431</width>
|
||||||
|
<height>275</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QDockWidget" name="dockWidget">
|
||||||
|
<property name="features">
|
||||||
|
<set>QDockWidget::NoDockWidgetFeatures</set>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Ethernet options</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="dockWidgetContents">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="layout_advanced">
|
||||||
|
<item>
|
||||||
|
<spacer name="spacer_advanced">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_advanced">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show advanced</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget" native="true">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Whether or not the absence of a carrier is acceptable</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Skip no carrier</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_2">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Set to ‘yes’ to use 802.1x authentication</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>802.1x authentication</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget_2" native="true">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>WPA config file</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Path to a wpa_supplicant configuration file</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>WPA driver</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="comboBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>The wpa_supplicant driver to use for 802.1x authentication</string>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>wired</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>nl80211</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>wext</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Timeout carrier</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="spinBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Maximum time, in seconds, to wait for a carrier</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>999</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Timeout carrier</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="spinBox_2">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Maximum time, in seconds, to wait for 802.1x authentication to succeed</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>999</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>15</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>pushButton_advanced</tabstop>
|
||||||
|
<tabstop>checkBox</tabstop>
|
||||||
|
<tabstop>checkBox_2</tabstop>
|
||||||
|
<tabstop>lineEdit</tabstop>
|
||||||
|
<tabstop>comboBox</tabstop>
|
||||||
|
<tabstop>spinBox</tabstop>
|
||||||
|
<tabstop>spinBox_2</tabstop>
|
||||||
|
</tabstops>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>checkBox_2</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>widget_2</receiver>
|
||||||
|
<slot>setShown(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>70</x>
|
||||||
|
<y>112</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>125</x>
|
||||||
|
<y>130</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
@ -26,6 +26,7 @@ GeneralWidget::GeneralWidget(QWidget *parent)
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GeneralWidget::~GeneralWidget()
|
GeneralWidget::~GeneralWidget()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>587</width>
|
<width>431</width>
|
||||||
<height>473</height>
|
<height>498</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -150,9 +150,9 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="layout_bindto">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="layout_bindtoLabel">
|
<layout class="QHBoxLayout" name="layout_bindtoButton">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_bindto">
|
<widget class="QLabel" name="label_bindto">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -161,41 +161,24 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="layout_bindtoButton">
|
<widget class="QComboBox" name="comboBox_bindto">
|
||||||
<item>
|
<property name="minimumSize">
|
||||||
<widget class="QComboBox" name="comboBox_bindto">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>150</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="editable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_bindto">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="spacer_bindto">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>150</width>
|
||||||
<height>40</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
<property name="editable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_bindto">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -242,9 +225,9 @@
|
|||||||
<widget class="QWidget" name="widget_generalAdvanced" native="true">
|
<widget class="QWidget" name="widget_generalAdvanced" native="true">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="layout_after">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="layout_afterLabel">
|
<layout class="QHBoxLayout" name="layout_afterButton">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_after">
|
<widget class="QLabel" name="label_after">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -253,41 +236,24 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="layout_afterButton">
|
<widget class="QComboBox" name="comboBox_after">
|
||||||
<item>
|
<property name="minimumSize">
|
||||||
<widget class="QComboBox" name="comboBox_after">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>150</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="editable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_after">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="spacer_after">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>150</width>
|
||||||
<height>40</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
<property name="editable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_after">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
@ -26,6 +26,7 @@ IpWidget::IpWidget(QWidget *parent)
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IpWidget::~IpWidget()
|
IpWidget::~IpWidget()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>IpWdiget</class>
|
<class>IpWidget</class>
|
||||||
<widget class="QWidget" name="IpWdiget">
|
<widget class="QWidget" name="IpWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>478</width>
|
<width>431</width>
|
||||||
<height>1254</height>
|
<height>1287</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -99,7 +99,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>An array of physical network interfaces that this profile needs before it can be started</string>
|
<string>An array of IP addresses suffixed with ‘/<netmask>’</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -121,7 +121,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_gateway"/>
|
<widget class="QLineEdit" name="lineEdit_gateway">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>An IP routing gateway address</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -143,7 +147,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_ipRoutes"/>
|
<widget class="QLineEdit" name="lineEdit_ipRoutes">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>An array of custom routes</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -283,7 +291,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>An array of physical network interfaces that this profile needs before it can be started</string>
|
<string>An array of IPv6 addresses</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -305,7 +313,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_gateway6"/>
|
<widget class="QLineEdit" name="lineEdit_gateway6">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>An IPv6 routing gateway address</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -327,7 +339,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_ipRoutes6"/>
|
<widget class="QLineEdit" name="lineEdit_ipRoutes6">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>An array of custom routes</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -457,7 +473,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>An array of physical network interfaces that this profile needs before it can be started</string>
|
<string>An array of argument lines to pass to ip</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -473,7 +489,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_hostname"/>
|
<widget class="QLineEdit" name="lineEdit_hostname">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>A system hostname</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -481,6 +501,12 @@
|
|||||||
<layout class="QHBoxLayout" name="layout_timeoutDad">
|
<layout class="QHBoxLayout" name="layout_timeoutDad">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_timeoutDad">
|
<widget class="QLabel" name="label_timeoutDad">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Timeout DAD</string>
|
<string>Timeout DAD</string>
|
||||||
</property>
|
</property>
|
||||||
@ -488,6 +514,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="spinBox_timeoutDad">
|
<widget class="QSpinBox" name="spinBox_timeoutDad">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Set to ‘yes’ to release the DHCP lease when the profile is stopped</string>
|
||||||
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
@ -521,6 +550,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="comboBox_dhcp">
|
<widget class="QComboBox" name="comboBox_dhcp">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>The name of the preferred DHCP client</string>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>dhcpcd</string>
|
<string>dhcpcd</string>
|
||||||
@ -533,13 +565,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkBox_dhcp">
|
|
||||||
<property name="text">
|
|
||||||
<string>DHCP release on stop</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -558,7 +583,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_dhcpcdOpt"/>
|
<widget class="QLineEdit" name="lineEdit_dhcpcdOpt">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Additional options to be passed to the DHCP client</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -578,7 +607,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_dhclientOpt"/>
|
<widget class="QLineEdit" name="lineEdit_dhclientOpt">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Additional options to be passed to the DHCP client</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -598,7 +631,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_dhclientOpt6"/>
|
<widget class="QLineEdit" name="lineEdit_dhclientOpt6">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Additional options to be passed to the DHCP client</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -619,6 +656,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="spinBox_timeoutDhcp">
|
<widget class="QSpinBox" name="spinBox_timeoutDhcp">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Maximum time, in seconds, to wait for DHCP to be successful</string>
|
||||||
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
@ -632,6 +672,16 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_dhcp">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Set to ‘yes’ to release the DHCP lease when the profile is stopped</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>DHCP release on stop</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -676,7 +726,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>An array of physical network interfaces that this profile needs before it can be started</string>
|
<string>An array of DNS nameservers</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -698,7 +748,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_dnsDomain"/>
|
<widget class="QLineEdit" name="lineEdit_dnsDomain">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>A ‘domain’ line for /etc/resolv.conf</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -718,7 +772,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_dnsSearch_2"/>
|
<widget class="QLineEdit" name="lineEdit_dnsSearch_2">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>A ‘search’ line for /etc/resolv.conf</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -760,7 +818,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>An array of physical network interfaces that this profile needs before it can be started</string>
|
<string>An array of ‘options’ lines for /etc/resolv.conf</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -777,23 +835,49 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
<zorder>label</zorder>
|
|
||||||
<zorder>comboBox_ip</zorder>
|
|
||||||
<zorder>spinBox</zorder>
|
|
||||||
<zorder>label_2</zorder>
|
|
||||||
<zorder>spinBox_2</zorder>
|
|
||||||
<zorder>spinBox_3</zorder>
|
|
||||||
<zorder>label_3</zorder>
|
|
||||||
<zorder>label_4</zorder>
|
|
||||||
<zorder>spinBox_4</zorder>
|
|
||||||
<zorder>pushButton_bindto</zorder>
|
|
||||||
<zorder>label_5</zorder>
|
|
||||||
<zorder>spinBox_5</zorder>
|
|
||||||
<zorder>label_15</zorder>
|
|
||||||
<zorder>label_timeoutDhcp</zorder>
|
|
||||||
<zorder>spinBox_timeoutDhcp</zorder>
|
|
||||||
<zorder>dockWidget_ip</zorder>
|
|
||||||
</widget>
|
</widget>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>checkBox_ip</tabstop>
|
||||||
|
<tabstop>comboBox_ip</tabstop>
|
||||||
|
<tabstop>lineEdit_ipAddress</tabstop>
|
||||||
|
<tabstop>pushButton_ipAddress</tabstop>
|
||||||
|
<tabstop>listWidget_ipAddress</tabstop>
|
||||||
|
<tabstop>lineEdit_gateway</tabstop>
|
||||||
|
<tabstop>lineEdit_ipRoutes</tabstop>
|
||||||
|
<tabstop>lineEdit_ipRoutes2</tabstop>
|
||||||
|
<tabstop>pushButton_ipRoutes</tabstop>
|
||||||
|
<tabstop>listWidget_ipRoutes</tabstop>
|
||||||
|
<tabstop>checkBox_ip6</tabstop>
|
||||||
|
<tabstop>comboBox_ip6</tabstop>
|
||||||
|
<tabstop>lineEdit_ipAddress6</tabstop>
|
||||||
|
<tabstop>pushButton_ipAddress6</tabstop>
|
||||||
|
<tabstop>listWidget_ipAddress6</tabstop>
|
||||||
|
<tabstop>lineEdit_gateway6</tabstop>
|
||||||
|
<tabstop>lineEdit_ipRoutes6</tabstop>
|
||||||
|
<tabstop>lineEdit_ipRoutes62</tabstop>
|
||||||
|
<tabstop>pushButton_ipRoutes6</tabstop>
|
||||||
|
<tabstop>listWidget_ipRoutes6</tabstop>
|
||||||
|
<tabstop>pushButton_ipAdvanced</tabstop>
|
||||||
|
<tabstop>lineEdit_custom</tabstop>
|
||||||
|
<tabstop>pushButton_custom</tabstop>
|
||||||
|
<tabstop>listWidget_custom</tabstop>
|
||||||
|
<tabstop>lineEdit_hostname</tabstop>
|
||||||
|
<tabstop>spinBox_timeoutDad</tabstop>
|
||||||
|
<tabstop>comboBox_dhcp</tabstop>
|
||||||
|
<tabstop>lineEdit_dhcpcdOpt</tabstop>
|
||||||
|
<tabstop>lineEdit_dhclientOpt</tabstop>
|
||||||
|
<tabstop>lineEdit_dhclientOpt6</tabstop>
|
||||||
|
<tabstop>spinBox_timeoutDhcp</tabstop>
|
||||||
|
<tabstop>checkBox_dhcp</tabstop>
|
||||||
|
<tabstop>lineEdit_dns</tabstop>
|
||||||
|
<tabstop>pushButton_dns</tabstop>
|
||||||
|
<tabstop>listWidget_dns</tabstop>
|
||||||
|
<tabstop>lineEdit_dnsDomain</tabstop>
|
||||||
|
<tabstop>lineEdit_dnsSearch_2</tabstop>
|
||||||
|
<tabstop>lineEdit_dnsSearch</tabstop>
|
||||||
|
<tabstop>pushButton_dnsSearch</tabstop>
|
||||||
|
<tabstop>listWidget_dnsSearch</tabstop>
|
||||||
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
@ -803,12 +887,12 @@
|
|||||||
<slot>setEnabled(bool)</slot>
|
<slot>setEnabled(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>23</x>
|
<x>33</x>
|
||||||
<y>19</y>
|
<y>49</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>225</x>
|
<x>458</x>
|
||||||
<y>24</y>
|
<y>53</y>
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
@ -819,12 +903,12 @@
|
|||||||
<slot>setShown(bool)</slot>
|
<slot>setShown(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>23</x>
|
<x>33</x>
|
||||||
<y>24</y>
|
<y>54</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>19</x>
|
<x>28</x>
|
||||||
<y>46</y>
|
<y>101</y>
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
@ -835,12 +919,12 @@
|
|||||||
<slot>setEnabled(bool)</slot>
|
<slot>setEnabled(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>117</x>
|
<x>127</x>
|
||||||
<y>291</y>
|
<y>348</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>264</x>
|
<x>458</x>
|
||||||
<y>302</y>
|
<y>349</y>
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
@ -851,12 +935,12 @@
|
|||||||
<slot>setShown(bool)</slot>
|
<slot>setShown(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>96</x>
|
<x>106</x>
|
||||||
<y>291</y>
|
<y>348</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>47</x>
|
<x>56</x>
|
||||||
<y>315</y>
|
<y>608</y>
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
#include "errorwindow.h"
|
#include "errorwindow.h"
|
||||||
|
#include "ethernetwidget.h"
|
||||||
|
#include "generalwidget.h"
|
||||||
|
#include "ipwidget.h"
|
||||||
#include "netctlinteract.h"
|
#include "netctlinteract.h"
|
||||||
#include "netctlprofile.h"
|
#include "netctlprofile.h"
|
||||||
#include "passwdwidget.h"
|
#include "passwdwidget.h"
|
||||||
@ -54,6 +57,14 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
wpaConfig.append(QString("/run/wpa_supplicant_netctl-gui"));
|
wpaConfig.append(QString("/run/wpa_supplicant_netctl-gui"));
|
||||||
wpaConfig.append(QString("users"));
|
wpaConfig.append(QString("users"));
|
||||||
|
|
||||||
|
// gui
|
||||||
|
generalWid = new GeneralWidget(this);
|
||||||
|
ui->scrollAreaWidgetContents->layout()->addWidget(generalWid);
|
||||||
|
ipWid = new IpWidget(this);
|
||||||
|
ui->scrollAreaWidgetContents->layout()->addWidget(ipWid);
|
||||||
|
ethernetWid = new EthernetWidget(this);
|
||||||
|
ui->scrollAreaWidgetContents->layout()->addWidget(ethernetWid);
|
||||||
|
// backend
|
||||||
netctlCommand = new Netctl(this, netctlPath, profileDir, sudoPath);
|
netctlCommand = new Netctl(this, netctlPath, profileDir, sudoPath);
|
||||||
netctlProfile = new NetctlProfile(this, profileDir, sudoPath);
|
netctlProfile = new NetctlProfile(this, profileDir, sudoPath);
|
||||||
wpaCommand = new WpaSup(this, wpaConfig, sudoPath, ifaceDir, preferedInterface);
|
wpaCommand = new WpaSup(this, wpaConfig, sudoPath, ifaceDir, preferedInterface);
|
||||||
@ -65,6 +76,9 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
|
delete ethernetWid;
|
||||||
|
delete generalWid;
|
||||||
|
delete ipWid;
|
||||||
delete netctlCommand;
|
delete netctlCommand;
|
||||||
delete netctlProfile;
|
delete netctlProfile;
|
||||||
delete wpaCommand;
|
delete wpaCommand;
|
||||||
@ -140,8 +154,8 @@ void MainWindow::updateTabs(const int tab)
|
|||||||
void MainWindow::updateMainTab()
|
void MainWindow::updateMainTab()
|
||||||
{
|
{
|
||||||
if (!checkExternalApps(QString("netctl"))) {
|
if (!checkExternalApps(QString("netctl"))) {
|
||||||
errorwin = new ErrorWindow(this, 1);
|
errorWin = new ErrorWindow(this, 1);
|
||||||
errorwin->show();
|
errorWin->show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,8 +203,8 @@ void MainWindow::updateWifiTab()
|
|||||||
{
|
{
|
||||||
wifiTabSetEnabled(checkExternalApps(QString("wpasup")));
|
wifiTabSetEnabled(checkExternalApps(QString("wpasup")));
|
||||||
if (!checkExternalApps(QString("wpasup"))) {
|
if (!checkExternalApps(QString("wpasup"))) {
|
||||||
errorwin = new ErrorWindow(this, 1);
|
errorWin = new ErrorWindow(this, 1);
|
||||||
errorwin->show();
|
errorWin->show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,8 +249,8 @@ void MainWindow::updateWifiTab()
|
|||||||
void MainWindow::mainTabEnableProfile()
|
void MainWindow::mainTabEnableProfile()
|
||||||
{
|
{
|
||||||
if (!checkExternalApps(QString("netctl"))) {
|
if (!checkExternalApps(QString("netctl"))) {
|
||||||
errorwin = new ErrorWindow(this, 1);
|
errorWin = new ErrorWindow(this, 1);
|
||||||
errorwin->show();
|
errorWin->show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui->tableWidget_main->currentItem() == 0)
|
if (ui->tableWidget_main->currentItem() == 0)
|
||||||
@ -264,8 +278,8 @@ void MainWindow::mainTabEnableProfile()
|
|||||||
void MainWindow::mainTabRestartProfile()
|
void MainWindow::mainTabRestartProfile()
|
||||||
{
|
{
|
||||||
if (!checkExternalApps(QString("netctl"))) {
|
if (!checkExternalApps(QString("netctl"))) {
|
||||||
errorwin = new ErrorWindow(this, 1);
|
errorWin = new ErrorWindow(this, 1);
|
||||||
errorwin->show();
|
errorWin->show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui->tableWidget_main->currentItem() == 0)
|
if (ui->tableWidget_main->currentItem() == 0)
|
||||||
@ -285,8 +299,8 @@ void MainWindow::mainTabRestartProfile()
|
|||||||
void MainWindow::mainTabStartProfile()
|
void MainWindow::mainTabStartProfile()
|
||||||
{
|
{
|
||||||
if (!checkExternalApps(QString("netctl"))) {
|
if (!checkExternalApps(QString("netctl"))) {
|
||||||
errorwin = new ErrorWindow(this, 1);
|
errorWin = new ErrorWindow(this, 1);
|
||||||
errorwin->show();
|
errorWin->show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui->tableWidget_main->currentItem() == 0)
|
if (ui->tableWidget_main->currentItem() == 0)
|
||||||
@ -315,8 +329,8 @@ void MainWindow::mainTabRefreshButtons(QTableWidgetItem *current, QTableWidgetIt
|
|||||||
{
|
{
|
||||||
Q_UNUSED(previous);
|
Q_UNUSED(previous);
|
||||||
if (!checkExternalApps(QString("netctl"))) {
|
if (!checkExternalApps(QString("netctl"))) {
|
||||||
errorwin = new ErrorWindow(this, 1);
|
errorWin = new ErrorWindow(this, 1);
|
||||||
errorwin->show();
|
errorWin->show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (current == 0) {
|
if (current == 0) {
|
||||||
@ -365,7 +379,7 @@ void MainWindow::wifiTabSetEnabled(bool state)
|
|||||||
void MainWindow::connectToUnknownEssid(QString passwd)
|
void MainWindow::connectToUnknownEssid(QString passwd)
|
||||||
{
|
{
|
||||||
if (!passwd.isEmpty())
|
if (!passwd.isEmpty())
|
||||||
delete passwdwid;
|
delete passwdWid;
|
||||||
QStringList profileInfo;
|
QStringList profileInfo;
|
||||||
profileInfo.append(QString("Automatically generated profile by Netctl GUI"));
|
profileInfo.append(QString("Automatically generated profile by Netctl GUI"));
|
||||||
profileInfo.append(wpaCommand->getInterfaceList()[0]);
|
profileInfo.append(wpaCommand->getInterfaceList()[0]);
|
||||||
@ -390,16 +404,16 @@ void MainWindow::connectToUnknownEssid(QString passwd)
|
|||||||
void MainWindow::wifiTabStart()
|
void MainWindow::wifiTabStart()
|
||||||
{
|
{
|
||||||
if (!checkExternalApps(QString("wpasup"))) {
|
if (!checkExternalApps(QString("wpasup"))) {
|
||||||
errorwin = new ErrorWindow(this, 1);
|
errorWin = new ErrorWindow(this, 1);
|
||||||
errorwin->show();
|
errorWin->show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
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);
|
ui->pushButton_wifiStart->setDisabled(true);
|
||||||
errorwin = new ErrorWindow(this, 2);
|
errorWin = new ErrorWindow(this, 2);
|
||||||
errorwin->show();
|
errorWin->show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -427,14 +441,14 @@ void MainWindow::wifiTabStart()
|
|||||||
if (checkState(QString("none"), security))
|
if (checkState(QString("none"), security))
|
||||||
return connectToUnknownEssid(QString(""));
|
return connectToUnknownEssid(QString(""));
|
||||||
else {
|
else {
|
||||||
passwdwid = new PasswdWidget(this);
|
passwdWid = new PasswdWidget(this);
|
||||||
int widgetWidth = 270;
|
int widgetWidth = 270;
|
||||||
int widgetHeight = 86;
|
int widgetHeight = 86;
|
||||||
int x = (width() - widgetWidth) / 2;
|
int x = (width() - widgetWidth) / 2;
|
||||||
int y = (height() - widgetHeight) / 2;
|
int y = (height() - widgetHeight) / 2;
|
||||||
passwdwid->setGeometry(x, y, widgetWidth, widgetHeight);
|
passwdWid->setGeometry(x, y, widgetWidth, widgetHeight);
|
||||||
passwdwid->show();
|
passwdWid->show();
|
||||||
passwdwid->setFocusToLineEdit();
|
passwdWid->setFocusToLineEdit();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -446,8 +460,8 @@ void MainWindow::wifiTabRefreshButtons(QTableWidgetItem *current, QTableWidgetIt
|
|||||||
{
|
{
|
||||||
Q_UNUSED(previous);
|
Q_UNUSED(previous);
|
||||||
if (!checkExternalApps(QString("wpasup"))) {
|
if (!checkExternalApps(QString("wpasup"))) {
|
||||||
errorwin = new ErrorWindow(this, 1);
|
errorWin = new ErrorWindow(this, 1);
|
||||||
errorwin->show();
|
errorWin->show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (current == 0) {
|
if (current == 0) {
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
|
|
||||||
|
|
||||||
class ErrorWindow;
|
class ErrorWindow;
|
||||||
|
class EthernetWidget;
|
||||||
|
class GeneralWidget;
|
||||||
|
class IpWidget;
|
||||||
class Netctl;
|
class Netctl;
|
||||||
class NetctlProfile;
|
class NetctlProfile;
|
||||||
class PasswdWidget;
|
class PasswdWidget;
|
||||||
@ -73,9 +76,14 @@ private slots:
|
|||||||
void wifiTabRefreshButtons(QTableWidgetItem *current, QTableWidgetItem *previous);
|
void wifiTabRefreshButtons(QTableWidgetItem *current, QTableWidgetItem *previous);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
// ui
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
ErrorWindow *errorwin;
|
EthernetWidget *ethernetWid;
|
||||||
PasswdWidget *passwdwid;
|
GeneralWidget *generalWid;
|
||||||
|
IpWidget *ipWid;
|
||||||
|
// backend
|
||||||
|
ErrorWindow *errorWin;
|
||||||
|
PasswdWidget *passwdWid;
|
||||||
bool checkExternalApps(QString apps);
|
bool checkExternalApps(QString apps);
|
||||||
bool checkState(QString state, QString item);
|
bool checkState(QString state, QString item);
|
||||||
void createActions();
|
void createActions();
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_main">
|
<widget class="QWidget" name="tab_main">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -163,8 +163,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>439</width>
|
<width>429</width>
|
||||||
<height>421</height>
|
<height>410</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -173,7 +173,7 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7"/>
|
<layout class="QVBoxLayout" name="scrollArea_layout"/>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -291,7 +291,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>471</width>
|
<width>471</width>
|
||||||
<height>23</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuMenu">
|
<widget class="QMenu" name="menuMenu">
|
||||||
|
Loading…
Reference in New Issue
Block a user