diff --git a/sources/gui/netctl.profile b/sources/gui/netctl.profile index 1dc3a7e..fe378fd 100644 --- a/sources/gui/netctl.profile +++ b/sources/gui/netctl.profile @@ -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] Gateway6='1234:0:123::abcd' Routes6=('192.168.0.0/24 via 192.168.1.2') -DHCPClient=dhcpcd|dhclient -DHCPReleaseOnStop=yes - release the DHCP lease when the profile is stopped. -DhcpcdOptions=опции -DhclientOptions=опции -DhclientOptions6=опции +[IP=dhcp] DHCPClient=dhcpcd|dhclient +[IP=dhcp] DHCPReleaseOnStop=yes - release the DHCP lease when the profile is stopped. +[IP=dhcp][DHCPClient=dhcpcd] DhcpcdOptions=опции +[IP=dhcp][DHCPClient=dhclient] DhclientOptions=опции +[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 напрямую Hostname= DNS=('192.168.1.1') diff --git a/sources/gui/src/generalwidget.cpp b/sources/gui/src/generalwidget.cpp new file mode 100644 index 0000000..722b6fa --- /dev/null +++ b/sources/gui/src/generalwidget.cpp @@ -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; +} diff --git a/sources/gui/src/generalwidget.h b/sources/gui/src/generalwidget.h new file mode 100644 index 0000000..90fb01c --- /dev/null +++ b/sources/gui/src/generalwidget.h @@ -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 + + +namespace Ui { +class GeneralWidget; +} + +class GeneralWidget : public QWidget +{ + Q_OBJECT + +public: + explicit GeneralWidget(QWidget *parent = 0); + ~GeneralWidget(); + +private: + Ui::GeneralWidget *ui; +}; + + +#endif /* GENERALWIDGET_H */ diff --git a/sources/gui/src/generalwidget.ui b/sources/gui/src/generalwidget.ui new file mode 100644 index 0000000..3ab0846 --- /dev/null +++ b/sources/gui/src/generalwidget.ui @@ -0,0 +1,378 @@ + + + GeneralWidget + + + + 0 + 0 + 587 + 473 + + + + Form + + + + + + QDockWidget::NoDockWidgetFeatures + + + General + + + + + + + + + + 150 + 0 + + + + Description + + + + + + + <html><head/><body><p>A description of the profile</p></body></html> + + + + + + + + + + + + 150 + 0 + + + + Connection + + + + + + + The connection type used by the profile + + + + ethernet + + + + + wireless + + + + + bond + + + + + bridge + + + + + dummy + + + + + pppoe + + + + + mobile_ppp + + + + + tunnel + + + + + tuntap + + + + + vlan + + + + + + + + + + + + + 150 + 0 + + + + Interface + + + + + + + The name of the associated network interface + + + true + + + + + + + + + + + + + Binds to interfaces + + + + + + + + + + 150 + 0 + + + + true + + + + + + + Add + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + 16777215 + 100 + + + + An array of physical network interfaces that this profile needs before it can be started + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Show advanced + + + + + + + + + + + + + + + + After + + + + + + + + + + 150 + 0 + + + + true + + + + + + + Add + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + 16777215 + 100 + + + + An array of profile names that should be started before this profile is started + + + + + + + + + + + + 150 + 0 + + + + Command after starting + + + + + + + A command that is executed after a connection is established + + + + + + + + + + + + 150 + 0 + + + + Command before stoping + + + + + + + A command that is executed before a connection is brought down + + + + + + + + + Set to ‘yes’ to force connecting even if the interface is up + + + Force connect + + + + + + + + + + + + + + + diff --git a/sources/gui/src/ipwidget.cpp b/sources/gui/src/ipwidget.cpp new file mode 100644 index 0000000..58272f1 --- /dev/null +++ b/sources/gui/src/ipwidget.cpp @@ -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; +} diff --git a/sources/gui/src/ipwidget.h b/sources/gui/src/ipwidget.h new file mode 100644 index 0000000..2f150c3 --- /dev/null +++ b/sources/gui/src/ipwidget.h @@ -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 + + +namespace Ui { +class IpWidget; +} + +class IpWidget : public QWidget +{ + Q_OBJECT + +public: + explicit IpWidget(QWidget *parent = 0); + ~IpWidget(); + +private: + Ui::IpWidget *ui; +}; + + +#endif /* IPWIDGET_H */ diff --git a/sources/gui/src/ipwidget.ui b/sources/gui/src/ipwidget.ui new file mode 100644 index 0000000..278fa4b --- /dev/null +++ b/sources/gui/src/ipwidget.ui @@ -0,0 +1,864 @@ + + + IpWdiget + + + + 0 + 0 + 478 + 1254 + + + + Form + + + + + + QDockWidget::NoDockWidgetFeatures + + + IP options + + + + + + + + + + 150 + 0 + + + + IP + + + true + + + + + + + + static + + + + + dhcp + + + + + + + + + + + + + + + + + + 150 + 0 + + + + Address + + + + + + + + + + Add + + + + + + + + + + 16777215 + 50 + + + + An array of physical network interfaces that this profile needs before it can be started + + + + + + + + + + + + 150 + 0 + + + + Gateway + + + + + + + + + + + + + + + + + 150 + 0 + + + + Routes + + + + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 68 + 20 + + + + + + + + + 75 + 0 + + + + via + + + + + + + + + + Add + + + + + + + + + + 16777215 + 50 + + + + An array of physical network interfaces that this profile needs before it can be started + + + + + + + + + + + + + + + 150 + 0 + + + + IP6 + + + true + + + + + + + + static + + + + + dhcp + + + + + + + + + + + + + + + + + + 150 + 0 + + + + Address6 + + + + + + + + + + Add + + + + + + + + + + 16777215 + 50 + + + + An array of physical network interfaces that this profile needs before it can be started + + + + + + + + + + + + 150 + 0 + + + + Gateway6 + + + + + + + + + + + + + + + + + 150 + 0 + + + + Routes6 + + + + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 68 + 20 + + + + + + + + + 75 + 0 + + + + via + + + + + + + + + + Add + + + + + + + + + + 16777215 + 50 + + + + An array of physical network interfaces that this profile needs before it can be started + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Show advanced + + + + + + + + + + + + + + + + + 150 + 0 + + + + Custom + + + + + + + + + + Add + + + + + + + + + + 16777215 + 50 + + + + An array of physical network interfaces that this profile needs before it can be started + + + + + + + + + + + Hostname + + + + + + + + + + + + + + Timeout DAD + + + + + + + 1 + + + 999 + + + 3 + + + + + + + + + + + + + + + 150 + 0 + + + + DHCP client + + + + + + + + dhcpcd + + + + + dhclient + + + + + + + + DHCP release on stop + + + + + + + + + + + + 150 + 0 + + + + dhcpcd options + + + + + + + + + + + + + + + 150 + 0 + + + + dhclient options + + + + + + + + + + + + + + + 150 + 0 + + + + dhclient options (6) + + + + + + + + + + + + + + + 150 + 0 + + + + Timeout DHCP + + + + + + + 1 + + + 999 + + + 30 + + + + + + + + + + + + + + + + + + + + 150 + 0 + + + + DNS + + + + + + + + + + Add + + + + + + + + + + 16777215 + 50 + + + + An array of physical network interfaces that this profile needs before it can be started + + + + + + + + + + + + 150 + 0 + + + + DNS domain + + + + + + + + + + + + + + + 150 + 0 + + + + DNS search + + + + + + + + + + + + + + + + + 150 + 0 + + + + DNS options + + + + + + + + + + Add + + + + + + + + + + 16777215 + 50 + + + + An array of physical network interfaces that this profile needs before it can be started + + + + + + + + + + + + + + + + + label + comboBox_ip + spinBox + label_2 + spinBox_2 + spinBox_3 + label_3 + label_4 + spinBox_4 + pushButton_bindto + label_5 + spinBox_5 + label_15 + label_timeoutDhcp + spinBox_timeoutDhcp + dockWidget_ip + + + + + checkBox_ip + clicked(bool) + comboBox_ip + setEnabled(bool) + + + 23 + 19 + + + 225 + 24 + + + + + checkBox_ip + clicked(bool) + widget_ip + setShown(bool) + + + 23 + 24 + + + 19 + 46 + + + + + checkBox_ip6 + clicked(bool) + comboBox_ip6 + setEnabled(bool) + + + 117 + 291 + + + 264 + 302 + + + + + checkBox_ip6 + clicked(bool) + widget_ip6 + setShown(bool) + + + 96 + 291 + + + 47 + 315 + + + + + diff --git a/sources/gui/src/mainwindow.cpp b/sources/gui/src/mainwindow.cpp index 6c0bee4..b71c093 100644 --- a/sources/gui/src/mainwindow.cpp +++ b/sources/gui/src/mainwindow.cpp @@ -131,7 +131,7 @@ void MainWindow::updateTabs(const int tab) if (tab == 0) updateMainTab(); else if (tab == 1) - + updateProfileTab(); else if (tab == 2) updateWifiTab(); } @@ -351,7 +351,6 @@ void MainWindow::wifiTabSetEnabled(bool state) if (state) { ui->tableWidget_wifi->show(); ui->pushButton_wifiRefresh->setEnabled(true); - ui->pushButton_wifiStart->setEnabled(true); ui->label_wifi->hide(); } else { diff --git a/sources/gui/src/mainwindow.ui b/sources/gui/src/mainwindow.ui index 8f5af0b..df3ba88 100644 --- a/sources/gui/src/mainwindow.ui +++ b/sources/gui/src/mainwindow.ui @@ -6,16 +6,16 @@ 0 0 - 466 - 542 + 471 + 519 Netctl GUI - - + + 0 @@ -143,9 +143,41 @@ + + + 0 + 0 + + Create a new profile + + + + + true + + + + + 0 + 0 + 439 + 421 + + + + + 0 + 0 + + + + + + + @@ -258,8 +290,8 @@ 0 0 - 466 - 20 + 471 + 23