diff --git a/sources/gui/src/mainwindow.cpp b/sources/gui/src/mainwindow.cpp index 40ad3c9..b45cf3a 100644 --- a/sources/gui/src/mainwindow.cpp +++ b/sources/gui/src/mainwindow.cpp @@ -28,6 +28,7 @@ #include "netctlinteract.h" #include "netctlprofile.h" #include "passwdwidget.h" +#include "pppoewidget.h" #include "wpasupinteract.h" #include "wirelesswidget.h" #include @@ -52,7 +53,7 @@ MainWindow::MainWindow(QWidget *parent) wpaConfig.append(QString("/usr/bin/wpa_supplicant")); ifaceDir = QString("/sys/class/net/"); preferedInterface = QString(""); - // additional settings + //// additional settings wpaConfig.append(QString("/run/wpa_supplicant_netctl-gui.pid")); wpaConfig.append(QString("nl80211,wext")); wpaConfig.append(QString("/run/wpa_supplicant_netctl-gui")); @@ -67,6 +68,8 @@ MainWindow::MainWindow(QWidget *parent) ui->scrollAreaWidgetContents->layout()->addWidget(ethernetWid); wirelessWid = new WirelessWidget(this); ui->scrollAreaWidgetContents->layout()->addWidget(wirelessWid); + pppoeWid = new PppoeWidget(this); + ui->scrollAreaWidgetContents->layout()->addWidget(pppoeWid); // backend netctlCommand = new Netctl(this, netctlPath, profileDir, sudoPath); netctlProfile = new NetctlProfile(this, profileDir, sudoPath); @@ -84,6 +87,7 @@ MainWindow::~MainWindow() delete ipWid; delete netctlCommand; delete netctlProfile; + delete pppoeWid; delete ui; delete wpaCommand; delete wirelessWid; diff --git a/sources/gui/src/mainwindow.h b/sources/gui/src/mainwindow.h index b7feaac..c039800 100644 --- a/sources/gui/src/mainwindow.h +++ b/sources/gui/src/mainwindow.h @@ -31,6 +31,7 @@ class IpWidget; class Netctl; class NetctlProfile; class PasswdWidget; +class PppoeWidget; class WirelessWidget; class WpaSup; @@ -82,6 +83,7 @@ private: EthernetWidget *ethernetWid; GeneralWidget *generalWid; IpWidget *ipWid; + PppoeWidget *pppoeWid; WirelessWidget *wirelessWid; // backend ErrorWindow *errorWin; diff --git a/sources/gui/src/mainwindow.ui b/sources/gui/src/mainwindow.ui index e7f69e7..032b2f4 100644 --- a/sources/gui/src/mainwindow.ui +++ b/sources/gui/src/mainwindow.ui @@ -190,8 +190,8 @@ 0 0 - 439 - 357 + 429 + 348 @@ -349,7 +349,7 @@ 0 0 471 - 23 + 20 diff --git a/sources/gui/src/pppoewidget.cpp b/sources/gui/src/pppoewidget.cpp new file mode 100644 index 0000000..bbbc09c --- /dev/null +++ b/sources/gui/src/pppoewidget.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 "pppoewidget.h" +#include "ui_pppoewidget.h" + + +PppoeWidget::PppoeWidget(QWidget *parent) + : QWidget(parent), + ui(new Ui::PppoeWidget) +{ + ui->setupUi(this); +} + + +PppoeWidget::~PppoeWidget() +{ + delete ui; +} diff --git a/sources/gui/src/pppoewidget.h b/sources/gui/src/pppoewidget.h new file mode 100644 index 0000000..08dd35a --- /dev/null +++ b/sources/gui/src/pppoewidget.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 PPPOEWIDGET_H +#define PPPOEWIDGET_H + +#include + + +namespace Ui { +class PppoeWidget; +} + +class PppoeWidget : public QWidget +{ + Q_OBJECT + +public: + explicit PppoeWidget(QWidget *parent = 0); + ~PppoeWidget(); + +private: + Ui::PppoeWidget *ui; +}; + + +#endif /* PPPOEWIDGET_H */ diff --git a/sources/gui/src/pppoewidget.ui b/sources/gui/src/pppoewidget.ui new file mode 100644 index 0000000..ae9f3ce --- /dev/null +++ b/sources/gui/src/pppoewidget.ui @@ -0,0 +1,480 @@ + + + PppoeWidget + + + + 0 + 0 + 431 + 549 + + + + Form + + + + + + + 319 + 47 + + + + QDockWidget::NoDockWidgetFeatures + + + PPPoE settings + + + + + + + + + + 150 + 0 + + + + Username + + + + + + + The username and password to connect with + + + + + + + + + + + + 150 + 0 + + + + Password + + + + + + + The username and password to connect with + + + + + + + + + + + + 150 + 0 + + + + Connection mode + + + + + + + This option specifies how a connection should be established + + + + persist + + + + + demand + + + + + + + + + + + + + 150 + 0 + + + + Idle timeout + + + + + + + This option specifies the idle time (in seconds) after which ‘pppd’ should disconnect + + + 999 + + + 10 + + + 300 + + + + + + + + + + + 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 + + + + PPP unit + + + + + + + Set the ppp unit number in the interface name (ppp0, ppp1, etc.) + + + + + + + + + + + + 150 + 0 + + + + LCP echo interval + + + + + + + These options override default LCP parameters from ‘/etc/ppp/options’ + + + 1 + + + 499 + + + 30 + + + + + + + + + + + + 150 + 0 + + + + LCP echo failure + + + + + + + These options override default LCP parameters from ‘/etc/ppp/options’ + + + 1 + + + 4 + + + + + + + + + + + + 150 + 0 + + + + Options file + + + + + + + A file to read additional pppd options from + + + + + + + Browse + + + + + + + + + + + + 150 + 0 + + + + PPPoE service + + + + + + + This option specifies the PPPoE service name + + + + + + + + + + + + 150 + 0 + + + + PPPoE AC + + + + + + + This option specifies the PPPoE access concentrator name + + + + + + + + + + + + 150 + 0 + + + + PPPoE session + + + + + + + This option specifies an existing session to attach to, session ID + + + + + + + : + + + + + + + This option specifies an existing session to attach to, MAC address + + + + + + + + + + + + 150 + 0 + + + + PPPoE MAC + + + + + + + Only connect to specified MAC address + + + + + + + + + Enable IPv6 support + + + PPPoE IPv6 + + + + + + + + + + + + + + +