starting work on new profile tab...

This commit is contained in:
arcan1s 2014-02-10 02:13:59 +04:00
parent 8d3a3d29d2
commit b81bd78327
9 changed files with 1432 additions and 13 deletions

View File

@ -24,11 +24,11 @@ Routes=('192.168.0.0/24 via 192.168.1.2')
[IP6=static]|[IP6=stateless] Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96') [IP6=static]|[IP6=stateless] Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
[IP6=static]|[IP6=stateless] Gateway6='1234:0:123::abcd' [IP6=static]|[IP6=stateless] Gateway6='1234:0:123::abcd'
Routes6=('192.168.0.0/24 via 192.168.1.2') Routes6=('192.168.0.0/24 via 192.168.1.2')
DHCPClient=dhcpcd|dhclient [IP=dhcp] DHCPClient=dhcpcd|dhclient
DHCPReleaseOnStop=yes - release the DHCP lease when the profile is stopped. [IP=dhcp] DHCPReleaseOnStop=yes - release the DHCP lease when the profile is stopped.
DhcpcdOptions=опции [IP=dhcp][DHCPClient=dhcpcd] DhcpcdOptions=опции
DhclientOptions=опции [IP=dhcp][DHCPClient=dhclient] DhclientOptions=опции
DhclientOptions6=опции [IP=dhcp][DHCPClient=dhclient] DhclientOptions6=опции
IPCustom=('addr add dev eth0 192.168.1.23/24 brd +' 'route add default via 192.168.1.1') - команда для ip напрямую IPCustom=('addr add dev eth0 192.168.1.23/24 brd +' 'route add default via 192.168.1.1') - команда для ip напрямую
Hostname= Hostname=
DNS=('192.168.1.1') DNS=('192.168.1.1')

View File

@ -0,0 +1,32 @@
/***************************************************************************
* 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 "generalwidget.h"
#include "ui_generalwidget.h"
GeneralWidget::GeneralWidget(QWidget *parent)
: QWidget(parent),
ui(new Ui::GeneralWidget)
{
ui->setupUi(this);
}
GeneralWidget::~GeneralWidget()
{
delete ui;
}

View 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 GENERALWIDGET_H
#define GENERALWIDGET_H
#include <QWidget>
namespace Ui {
class GeneralWidget;
}
class GeneralWidget : public QWidget
{
Q_OBJECT
public:
explicit GeneralWidget(QWidget *parent = 0);
~GeneralWidget();
private:
Ui::GeneralWidget *ui;
};
#endif /* GENERALWIDGET_H */

View File

@ -0,0 +1,378 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GeneralWidget</class>
<widget class="QWidget" name="GeneralWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>587</width>
<height>473</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QDockWidget" name="dockWidget_general">
<property name="features">
<set>QDockWidget::NoDockWidgetFeatures</set>
</property>
<property name="windowTitle">
<string>General</string>
</property>
<widget class="QWidget" name="dockWidgetContents_general">
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<layout class="QHBoxLayout" name="layout_description">
<item>
<widget class="QLabel" name="label_description">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Description</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_description">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A description of the profile&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_connection">
<item>
<widget class="QLabel" name="label_connection">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Connection</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_connection">
<property name="toolTip">
<string>The connection type used by the profile</string>
</property>
<item>
<property name="text">
<string notr="true">ethernet</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">wireless</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">bond</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">bridge</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">dummy</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">pppoe</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">mobile_ppp</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">tunnel</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">tuntap</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">vlan</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_interface">
<item>
<widget class="QLabel" name="label_interface">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Interface</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_interface">
<property name="toolTip">
<string>The name of the associated network interface</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_bindto">
<item>
<layout class="QVBoxLayout" name="layout_bindtoLabel">
<item>
<widget class="QLabel" name="label_bindto">
<property name="text">
<string>Binds to interfaces</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layout_bindtoButton">
<item>
<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>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget_bindto">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>100</height>
</size>
</property>
<property name="toolTip">
<string>An array of physical network interfaces that this profile needs before it can be started</string>
</property>
</widget>
</item>
</layout>
</item>
<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_generalAdvanced" native="true">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="layout_after">
<item>
<layout class="QVBoxLayout" name="layout_afterLabel">
<item>
<widget class="QLabel" name="label_after">
<property name="text">
<string>After</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layout_afterButton">
<item>
<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>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget_after">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>100</height>
</size>
</property>
<property name="toolTip">
<string>An array of profile names that should be started before this profile is started</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_execUpPost">
<item>
<widget class="QLabel" name="label_execUpPost">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Command after starting</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_execUpPost">
<property name="toolTip">
<string>A command that is executed after a connection is established</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_execDownPre">
<item>
<widget class="QLabel" name="label_execDownPre">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Command before stoping</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_execDownPre">
<property name="toolTip">
<string>A command that is executed before a connection is brought down</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="checkBox_forceConnect">
<property name="toolTip">
<string>Set to yes to force connecting even if the interface is up</string>
</property>
<property name="text">
<string>Force connect</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,32 @@
/***************************************************************************
* 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 "ipwidget.h"
#include "ui_ipwidget.h"
IpWidget::IpWidget(QWidget *parent)
: QWidget(parent),
ui(new Ui::IpWidget)
{
ui->setupUi(this);
}
IpWidget::~IpWidget()
{
delete ui;
}

View 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 IPWIDGET_H
#define IPWIDGET_H
#include <QWidget>
namespace Ui {
class IpWidget;
}
class IpWidget : public QWidget
{
Q_OBJECT
public:
explicit IpWidget(QWidget *parent = 0);
~IpWidget();
private:
Ui::IpWidget *ui;
};
#endif /* IPWIDGET_H */

864
sources/gui/src/ipwidget.ui Normal file
View File

@ -0,0 +1,864 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>IpWdiget</class>
<widget class="QWidget" name="IpWdiget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>478</width>
<height>1254</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QDockWidget" name="dockWidget_ip">
<property name="features">
<set>QDockWidget::NoDockWidgetFeatures</set>
</property>
<property name="windowTitle">
<string>IP options</string>
</property>
<widget class="QWidget" name="dockWidgetContents_ip">
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<layout class="QHBoxLayout" name="layout_ip">
<item>
<widget class="QCheckBox" name="checkBox_ip">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>IP</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_ip">
<item>
<property name="text">
<string>static</string>
</property>
</item>
<item>
<property name="text">
<string>dhcp</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QWidget" name="widget_ip" native="true">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="layout_ipAddress">
<item>
<layout class="QHBoxLayout" name="layout_ipAddressLine">
<item>
<widget class="QLabel" name="label_ipAddress">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Address</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_ipAddress"/>
</item>
<item>
<widget class="QPushButton" name="pushButton_ipAddress">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget_ipAddress">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="toolTip">
<string>An array of physical network interfaces that this profile needs before it can be started</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_gateway">
<item>
<widget class="QLabel" name="label_gateway">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Gateway</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_gateway"/>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="layout_ipRoutes">
<item>
<layout class="QHBoxLayout" name="layout_ipRoutesLine">
<item>
<widget class="QLabel" name="label_ipRoutes">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Routes</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_ipRoutes"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_ipRoutesLine2">
<item>
<spacer name="spacer_ipRoutes">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>68</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_ipRoutes2">
<property name="minimumSize">
<size>
<width>75</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>via</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_ipRoutes2"/>
</item>
<item>
<widget class="QPushButton" name="pushButton_ipRoutes">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget_ipRoutes">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="toolTip">
<string>An array of physical network interfaces that this profile needs before it can be started</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layout_ip6">
<item>
<widget class="QCheckBox" name="checkBox_ip6">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>IP6</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_ip6">
<item>
<property name="text">
<string>static</string>
</property>
</item>
<item>
<property name="text">
<string>dhcp</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QWidget" name="widget_ip6" native="true">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QVBoxLayout" name="layout_ipAddress6">
<item>
<layout class="QHBoxLayout" name="layout_ipAddress6Line">
<item>
<widget class="QLabel" name="label_ipAddress6">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Address6</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_ipAddress6"/>
</item>
<item>
<widget class="QPushButton" name="pushButton_ipAddress6">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget_ipAddress6">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="toolTip">
<string>An array of physical network interfaces that this profile needs before it can be started</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_gateway6">
<item>
<widget class="QLabel" name="label_gateway6">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Gateway6</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_gateway6"/>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="layout_ipRoutes6">
<item>
<layout class="QHBoxLayout" name="layout_ipRoutes6Line">
<item>
<widget class="QLabel" name="label_ipRoutes6">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Routes6</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_ipRoutes6"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_ipRoutes62">
<item>
<spacer name="spacer_ipRoutes6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>68</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_ipRoutes62">
<property name="minimumSize">
<size>
<width>75</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>via</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_ipRoutes62"/>
</item>
<item>
<widget class="QPushButton" name="pushButton_ipRoutes6">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget_ipRoutes6">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="toolTip">
<string>An array of physical network interfaces that this profile needs before it can be started</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layout_ipAdvanced">
<item>
<spacer name="spacer_ipAdvanced">
<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_ipAdvanced">
<property name="text">
<string>Show advanced</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QWidget" name="widget_ipAdvanced" native="true">
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<layout class="QVBoxLayout" name="layout_custom">
<item>
<layout class="QHBoxLayout" name="layout_customLine">
<item>
<widget class="QLabel" name="label_custom">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Custom</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_custom"/>
</item>
<item>
<widget class="QPushButton" name="pushButton_custom">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget_custom">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="toolTip">
<string>An array of physical network interfaces that this profile needs before it can be started</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_hostmane">
<item>
<widget class="QLabel" name="label_hostname">
<property name="text">
<string>Hostname</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_hostname"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_timeoutDad">
<item>
<widget class="QLabel" name="label_timeoutDad">
<property name="text">
<string>Timeout DAD</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_timeoutDad">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>999</number>
</property>
<property name="value">
<number>3</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QWidget" name="widget_dhcp" native="true">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="layout_dhcp">
<item>
<widget class="QLabel" name="label_dhcp">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>DHCP client</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_dhcp">
<item>
<property name="text">
<string>dhcpcd</string>
</property>
</item>
<item>
<property name="text">
<string>dhclient</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_dhcp">
<property name="text">
<string>DHCP release on stop</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_dhcpcdOpt">
<item>
<widget class="QLabel" name="label_dhcpcdOpt">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>dhcpcd options</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_dhcpcdOpt"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_dhclientOpt">
<item>
<widget class="QLabel" name="label_dhclientOpt">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>dhclient options</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_dhclientOpt"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_dhclientOpt6">
<item>
<widget class="QLabel" name="label_dhclientOpt6">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>dhclient options (6)</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_dhclientOpt6"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_timeoutDhcp">
<item>
<widget class="QLabel" name="label_timeoutDhcp">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Timeout DHCP</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_timeoutDhcp">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>999</number>
</property>
<property name="value">
<number>30</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="widget_dns" native="true">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QVBoxLayout" name="layout_dns">
<item>
<layout class="QHBoxLayout" name="layout_dnsLine">
<item>
<widget class="QLabel" name="label_dns">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>DNS</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_dns"/>
</item>
<item>
<widget class="QPushButton" name="pushButton_dns">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget_dns">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="toolTip">
<string>An array of physical network interfaces that this profile needs before it can be started</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_dnsDomain">
<item>
<widget class="QLabel" name="label_dnsDomain">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>DNS domain</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_dnsDomain"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_dnsSearch">
<item>
<widget class="QLabel" name="label_dnsSearch_2">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>DNS search</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_dnsSearch_2"/>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="layout_dnsOptions">
<item>
<layout class="QHBoxLayout" name="layout_dnsOptionsLine">
<item>
<widget class="QLabel" name="label_dnsSearch">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>DNS options</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_dnsSearch"/>
</item>
<item>
<widget class="QPushButton" name="pushButton_dnsSearch">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget_dnsSearch">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="toolTip">
<string>An array of physical network interfaces that this profile needs before it can be started</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</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>
<resources/>
<connections>
<connection>
<sender>checkBox_ip</sender>
<signal>clicked(bool)</signal>
<receiver>comboBox_ip</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>23</x>
<y>19</y>
</hint>
<hint type="destinationlabel">
<x>225</x>
<y>24</y>
</hint>
</hints>
</connection>
<connection>
<sender>checkBox_ip</sender>
<signal>clicked(bool)</signal>
<receiver>widget_ip</receiver>
<slot>setShown(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>23</x>
<y>24</y>
</hint>
<hint type="destinationlabel">
<x>19</x>
<y>46</y>
</hint>
</hints>
</connection>
<connection>
<sender>checkBox_ip6</sender>
<signal>clicked(bool)</signal>
<receiver>comboBox_ip6</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>117</x>
<y>291</y>
</hint>
<hint type="destinationlabel">
<x>264</x>
<y>302</y>
</hint>
</hints>
</connection>
<connection>
<sender>checkBox_ip6</sender>
<signal>clicked(bool)</signal>
<receiver>widget_ip6</receiver>
<slot>setShown(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>96</x>
<y>291</y>
</hint>
<hint type="destinationlabel">
<x>47</x>
<y>315</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -131,7 +131,7 @@ void MainWindow::updateTabs(const int tab)
if (tab == 0) if (tab == 0)
updateMainTab(); updateMainTab();
else if (tab == 1) else if (tab == 1)
updateProfileTab();
else if (tab == 2) else if (tab == 2)
updateWifiTab(); updateWifiTab();
} }
@ -351,7 +351,6 @@ void MainWindow::wifiTabSetEnabled(bool state)
if (state) { if (state) {
ui->tableWidget_wifi->show(); ui->tableWidget_wifi->show();
ui->pushButton_wifiRefresh->setEnabled(true); ui->pushButton_wifiRefresh->setEnabled(true);
ui->pushButton_wifiStart->setEnabled(true);
ui->label_wifi->hide(); ui->label_wifi->hide();
} }
else { else {

View File

@ -6,16 +6,16 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>466</width> <width>471</width>
<height>542</height> <height>519</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Netctl GUI</string> <string>Netctl GUI</string>
</property> </property>
<widget class="QWidget" name="centralWidget"> <widget class="QWidget" name="centralWidget">
<layout class="QGridLayout" name="gridLayout"> <layout class="QVBoxLayout" name="verticalLayout_4">
<item row="0" column="0"> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
@ -143,9 +143,41 @@
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_new"> <widget class="QWidget" name="tab_new">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<attribute name="title"> <attribute name="title">
<string>Create a new profile</string> <string>Create a new profile</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>439</width>
<height>421</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7"/>
</widget>
</widget>
</item>
</layout>
</widget> </widget>
<widget class="QWidget" name="tab_wifi"> <widget class="QWidget" name="tab_wifi">
<attribute name="title"> <attribute name="title">
@ -258,8 +290,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>466</width> <width>471</width>
<height>20</height> <height>23</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuMenu"> <widget class="QMenu" name="menuMenu">