From 6b9f9beabcf7fd8dc36c59fca83202876495f7b6 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Mon, 17 Feb 2014 21:33:49 +0400 Subject: [PATCH] added all widgets --- sources/gui/src/mainwindow.cpp | 20 +- sources/gui/src/mainwindow.h | 8 + sources/gui/src/mobileppp.cpp | 33 ++++ sources/gui/src/mobileppp.h | 41 ++++ sources/gui/src/mobileppp.ui | 310 +++++++++++++++++++++++++++++++ sources/gui/src/tunnelwidget.cpp | 33 ++++ sources/gui/src/tunnelwidget.h | 41 ++++ sources/gui/src/tunnelwidget.ui | 152 +++++++++++++++ sources/gui/src/tuntapwidget.cpp | 33 ++++ sources/gui/src/tuntapwidget.h | 41 ++++ sources/gui/src/tuntapwidget.ui | 117 ++++++++++++ sources/gui/src/vlanwidget.cpp | 33 ++++ sources/gui/src/vlanwidget.h | 41 ++++ sources/gui/src/vlanwidget.ui | 65 +++++++ 14 files changed, 966 insertions(+), 2 deletions(-) create mode 100644 sources/gui/src/mobileppp.cpp create mode 100644 sources/gui/src/mobileppp.h create mode 100644 sources/gui/src/mobileppp.ui create mode 100644 sources/gui/src/tunnelwidget.cpp create mode 100644 sources/gui/src/tunnelwidget.h create mode 100644 sources/gui/src/tunnelwidget.ui create mode 100644 sources/gui/src/tuntapwidget.cpp create mode 100644 sources/gui/src/tuntapwidget.h create mode 100644 sources/gui/src/tuntapwidget.ui create mode 100644 sources/gui/src/vlanwidget.cpp create mode 100644 sources/gui/src/vlanwidget.h create mode 100644 sources/gui/src/vlanwidget.ui diff --git a/sources/gui/src/mainwindow.cpp b/sources/gui/src/mainwindow.cpp index b45cf3a..d49c61a 100644 --- a/sources/gui/src/mainwindow.cpp +++ b/sources/gui/src/mainwindow.cpp @@ -25,10 +25,14 @@ #include "ethernetwidget.h" #include "generalwidget.h" #include "ipwidget.h" +#include "mobileppp.h" #include "netctlinteract.h" #include "netctlprofile.h" #include "passwdwidget.h" #include "pppoewidget.h" +#include "tunnelwidget.h" +#include "tuntapwidget.h" +#include "vlanwidget.h" #include "wpasupinteract.h" #include "wirelesswidget.h" #include @@ -66,10 +70,18 @@ MainWindow::MainWindow(QWidget *parent) ui->scrollAreaWidgetContents->layout()->addWidget(ipWid); ethernetWid = new EthernetWidget(this); ui->scrollAreaWidgetContents->layout()->addWidget(ethernetWid); - wirelessWid = new WirelessWidget(this); - ui->scrollAreaWidgetContents->layout()->addWidget(wirelessWid); + mobileWid = new MobilePpp(this); + ui->scrollAreaWidgetContents->layout()->addWidget(mobileWid); pppoeWid = new PppoeWidget(this); ui->scrollAreaWidgetContents->layout()->addWidget(pppoeWid); + tunnelWid = new TunnelWidget(this); + ui->scrollAreaWidgetContents->layout()->addWidget(tunnelWid); + tuntapWid = new TuntapWidget(this); + ui->scrollAreaWidgetContents->layout()->addWidget(tuntapWid); + vlanWid = new VlanWidget(this); + ui->scrollAreaWidgetContents->layout()->addWidget(vlanWid); + wirelessWid = new WirelessWidget(this); + ui->scrollAreaWidgetContents->layout()->addWidget(wirelessWid); // backend netctlCommand = new Netctl(this, netctlPath, profileDir, sudoPath); netctlProfile = new NetctlProfile(this, profileDir, sudoPath); @@ -85,10 +97,14 @@ MainWindow::~MainWindow() delete ethernetWid; delete generalWid; delete ipWid; + delete mobileWid; delete netctlCommand; delete netctlProfile; delete pppoeWid; + delete tunnelWid; + delete tuntapWid; delete ui; + delete vlanWid; delete wpaCommand; delete wirelessWid; } diff --git a/sources/gui/src/mainwindow.h b/sources/gui/src/mainwindow.h index c039800..f1bb0d9 100644 --- a/sources/gui/src/mainwindow.h +++ b/sources/gui/src/mainwindow.h @@ -28,10 +28,14 @@ class ErrorWindow; class EthernetWidget; class GeneralWidget; class IpWidget; +class MobilePpp; class Netctl; class NetctlProfile; class PasswdWidget; class PppoeWidget; +class TunnelWidget; +class TuntapWidget; +class VlanWidget; class WirelessWidget; class WpaSup; @@ -83,7 +87,11 @@ private: EthernetWidget *ethernetWid; GeneralWidget *generalWid; IpWidget *ipWid; + MobilePpp *mobileWid; PppoeWidget *pppoeWid; + TunnelWidget *tunnelWid; + TuntapWidget *tuntapWid; + VlanWidget *vlanWid; WirelessWidget *wirelessWid; // backend ErrorWindow *errorWin; diff --git a/sources/gui/src/mobileppp.cpp b/sources/gui/src/mobileppp.cpp new file mode 100644 index 0000000..21a46cd --- /dev/null +++ b/sources/gui/src/mobileppp.cpp @@ -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 "mobileppp.h" +#include "ui_mobileppp.h" + + +MobilePpp::MobilePpp(QWidget *parent) + : QWidget(parent), + ui(new Ui::MobilePpp) +{ + ui->setupUi(this); +} + + +MobilePpp::~MobilePpp() +{ + delete ui; +} diff --git a/sources/gui/src/mobileppp.h b/sources/gui/src/mobileppp.h new file mode 100644 index 0000000..03d3884 --- /dev/null +++ b/sources/gui/src/mobileppp.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 MOBILEPPP_H +#define MOBILEPPP_H + +#include + + +namespace Ui { +class MobilePpp; +} + +class MobilePpp : public QWidget +{ + Q_OBJECT + +public: + explicit MobilePpp(QWidget *parent = 0); + ~MobilePpp(); + +private: + Ui::MobilePpp *ui; +}; + + +#endif /* MOBILEPPP_H */ diff --git a/sources/gui/src/mobileppp.ui b/sources/gui/src/mobileppp.ui new file mode 100644 index 0000000..a9641fe --- /dev/null +++ b/sources/gui/src/mobileppp.ui @@ -0,0 +1,310 @@ + + + MobilePpp + + + + 0 + 0 + 445 + 367 + + + + Form + + + + + + QDockWidget::NoDockWidgetFeatures + + + Mobile PPP settings + + + + + + + + + + 150 + 0 + + + + Username + + + + + + + The username and password to connect with + + + + + + + + + + + + 150 + 0 + + + + Password + + + + + + + The username and password to connect with + + + + + + + + + + + + 150 + 0 + + + + Access point name + + + + + + + The access point (apn) to connect on + + + + + + + + + + + + 150 + 0 + + + + PIN + + + + + + + If your modem requires a PIN to unlock, use this option + + + + + + + + + + + + 150 + 0 + + + + Mode + + + + + + + This option is used to specify the connection mode + + + + None + + + + + 3Gpref + + + + + 3Gonly + + + + + GPRSpref + + + + + GPRSonly + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Show advanced + + + + + + + + + + + + + + + 150 + 0 + + + + Max fail + + + + + + + The number of consecutive failed connection attempts to tolerate + + + 1 + + + 5 + + + + + + + + + Use the default route provided by the peer + + + Default route + + + true + + + + + + + Use the DNS provided by the peer + + + Use peer DNS + + + true + + + + + + + + + + 150 + 0 + + + + Options file + + + + + + + A file to read additional pppd options from + + + + + + + Browse + + + + + + + + + + + + + + + + lineEdit_username + lineEdit_password + lineEdit_apn + lineEdit_pin + comboBox_mode + pushButton_mobileAdvanced + spinBox_fail + checkBox_route + checkBox_dns + lineEdit_options + pushButton_options + + + + diff --git a/sources/gui/src/tunnelwidget.cpp b/sources/gui/src/tunnelwidget.cpp new file mode 100644 index 0000000..c303e57 --- /dev/null +++ b/sources/gui/src/tunnelwidget.cpp @@ -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 "tunnelwidget.h" +#include "ui_tunnelwidget.h" + + +TunnelWidget::TunnelWidget(QWidget *parent) + : QWidget(parent), + ui(new Ui::TunnelWidget) +{ + ui->setupUi(this); +} + + +TunnelWidget::~TunnelWidget() +{ + delete ui; +} diff --git a/sources/gui/src/tunnelwidget.h b/sources/gui/src/tunnelwidget.h new file mode 100644 index 0000000..3b6977c --- /dev/null +++ b/sources/gui/src/tunnelwidget.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 TUNNELWIDGET_H +#define TUNNELWIDGET_H + +#include + + +namespace Ui { +class TunnelWidget; +} + +class TunnelWidget : public QWidget +{ + Q_OBJECT + +public: + explicit TunnelWidget(QWidget *parent = 0); + ~TunnelWidget(); + +private: + Ui::TunnelWidget *ui; +}; + + +#endif /* TUNNELWIDGET_H */ diff --git a/sources/gui/src/tunnelwidget.ui b/sources/gui/src/tunnelwidget.ui new file mode 100644 index 0000000..c6b6962 --- /dev/null +++ b/sources/gui/src/tunnelwidget.ui @@ -0,0 +1,152 @@ + + + TunnelWidget + + + + 0 + 0 + 411 + 146 + + + + Form + + + + + + QDockWidget::NoDockWidgetFeatures + + + Tunnel settings + + + + + + + + + + 150 + 0 + + + + Mode + + + + + + + The tunnel type + + + + ipip + + + + + gre + + + + + sit + + + + + isatap + + + + + ip6ip6 + + + + + ipip6 + + + + + ip6gre + + + + + any + + + + + + + + + + + + + 150 + 0 + + + + Local + + + + + + + The address of the local end of the tunnel + + + + + + + + + + + + 150 + 0 + + + + Remote + + + + + + + The address of the remote end of the tunnel + + + + + + + + + + + + + comboBox_mode + lineEdit_local + lineEdit_remote + + + + diff --git a/sources/gui/src/tuntapwidget.cpp b/sources/gui/src/tuntapwidget.cpp new file mode 100644 index 0000000..3ad3ffd --- /dev/null +++ b/sources/gui/src/tuntapwidget.cpp @@ -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 "tuntapwidget.h" +#include "ui_tuntapwidget.h" + + +TuntapWidget::TuntapWidget(QWidget *parent) + : QWidget(parent), + ui(new Ui::TuntapWidget) +{ + ui->setupUi(this); +} + + +TuntapWidget::~TuntapWidget() +{ + delete ui; +} diff --git a/sources/gui/src/tuntapwidget.h b/sources/gui/src/tuntapwidget.h new file mode 100644 index 0000000..d0ee18f --- /dev/null +++ b/sources/gui/src/tuntapwidget.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 TUNTAPWIDGET_H +#define TUNTAPWIDGET_H + +#include + + +namespace Ui { +class TuntapWidget; +} + +class TuntapWidget : public QWidget +{ + Q_OBJECT + +public: + explicit TuntapWidget(QWidget *parent = 0); + ~TuntapWidget(); + +private: + Ui::TuntapWidget *ui; +}; + + +#endif /* TUNTAPWIDGET_H */ diff --git a/sources/gui/src/tuntapwidget.ui b/sources/gui/src/tuntapwidget.ui new file mode 100644 index 0000000..03f5f02 --- /dev/null +++ b/sources/gui/src/tuntapwidget.ui @@ -0,0 +1,117 @@ + + + TuntapWidget + + + + 0 + 0 + 424 + 146 + + + + Form + + + + + + QDockWidget::NoDockWidgetFeatures + + + Tunnel settings + + + + + + + + + + 150 + 0 + + + + Mode + + + + + + + Either ‘tun’, or ‘tap’ + + + + tun + + + + + tap + + + + + + + + + + + + + 150 + 0 + + + + User + + + + + + + The owning user of the tun/tap interface + + + + + + + + + + + + 150 + 0 + + + + Group + + + + + + + The owning group of the tun/tap interface + + + + + + + + + + + + + + diff --git a/sources/gui/src/vlanwidget.cpp b/sources/gui/src/vlanwidget.cpp new file mode 100644 index 0000000..c5a922d --- /dev/null +++ b/sources/gui/src/vlanwidget.cpp @@ -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 "vlanwidget.h" +#include "ui_vlanwidget.h" + + +VlanWidget::VlanWidget(QWidget *parent) + : QWidget(parent), + ui(new Ui::VlanWidget) +{ + ui->setupUi(this); +} + + +VlanWidget::~VlanWidget() +{ + delete ui; +} diff --git a/sources/gui/src/vlanwidget.h b/sources/gui/src/vlanwidget.h new file mode 100644 index 0000000..2ccf995 --- /dev/null +++ b/sources/gui/src/vlanwidget.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 VLANWIDGET_H +#define VLANWIDGET_H + +#include + + +namespace Ui { +class VlanWidget; +} + +class VlanWidget : public QWidget +{ + Q_OBJECT + +public: + explicit VlanWidget(QWidget *parent = 0); + ~VlanWidget(); + +private: + Ui::VlanWidget *ui; +}; + + +#endif /* VLANWIDGET_H */ diff --git a/sources/gui/src/vlanwidget.ui b/sources/gui/src/vlanwidget.ui new file mode 100644 index 0000000..2000cbc --- /dev/null +++ b/sources/gui/src/vlanwidget.ui @@ -0,0 +1,65 @@ + + + VlanWidget + + + + 0 + 0 + 393 + 81 + + + + Form + + + + + + QDockWidget::NoDockWidgetFeatures + + + vlan settings + + + + + + + + + + 150 + 0 + + + + vlan ID + + + + + + + vlan identifier + + + 999 + + + 55 + + + + + + + + + + + + + +