summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/pppmodule.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/pppmodule.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp
index d6ca88a..da17e26 100644
--- a/noncore/settings/networksettings/ppp/pppmodule.cpp
+++ b/noncore/settings/networksettings/ppp/pppmodule.cpp
@@ -1,27 +1,27 @@
1#include "pppconfig.h" 1#include "pppconfig.h"
2#include "pppmodule.h" 2#include "pppmodule.h"
3//#include "pppimp.h" 3#include "pppdata.h"
4#include "kpppwidget.h" 4#include "kpppwidget.h"
5#include "interfaceinformationimp.h" 5#include "interfaceinformationimp.h"
6//#include "devices.h" 6//#include "devices.h"
7 7
8/** 8/**
9 * Constructor, find all of the possible interfaces 9 * Constructor, find all of the possible interfaces
10 */ 10 */
11PPPModule::PPPModule() : Module() { 11PPPModule::PPPModule() : Module() {
12} 12}
13 13
14/** 14/**
15 * Delete any interfaces that we own. 15 * Delete any interfaces that we own.
16 */ 16 */
17PPPModule::~PPPModule(){ 17PPPModule::~PPPModule(){
18 Interface *i; 18 Interface *i;
19 for ( i=list.first(); i != 0; i=list.next() ) 19 for ( i=list.first(); i != 0; i=list.next() )
20 delete i; 20 delete i;
21} 21}
22 22
23/** 23/**
24 * Change the current profile 24 * Change the current profile
25 */ 25 */
26void PPPModule::setProfile(const QString &newProfile){ 26void PPPModule::setProfile(const QString &newProfile){
27 profile = newProfile; 27 profile = newProfile;
@@ -77,44 +77,45 @@ QWidget *PPPModule::information(Interface *i){
77 * Get all active (up or down) interfaces 77 * Get all active (up or down) interfaces
78 * @return QList<Interface> A list of interfaces that exsist that havn't 78 * @return QList<Interface> A list of interfaces that exsist that havn't
79 * been called by isOwner() 79 * been called by isOwner()
80 */ 80 */
81QList<Interface> PPPModule::getInterfaces(){ 81QList<Interface> PPPModule::getInterfaces(){
82 // List all of the files in the peer directory 82 // List all of the files in the peer directory
83 return list; 83 return list;
84} 84}
85 85
86/** 86/**
87 * Attempt to add a new interface as defined by name 87 * Attempt to add a new interface as defined by name
88 * @param name the name of the type of interface that should be created given 88 * @param name the name of the type of interface that should be created given
89 * by possibleNewInterfaces(); 89 * by possibleNewInterfaces();
90 * @return Interface* NULL if it was unable to be created. 90 * @return Interface* NULL if it was unable to be created.
91 */ 91 */
92Interface *PPPModule::addNewInterface(const QString &newInterface){ 92Interface *PPPModule::addNewInterface(const QString &newInterface){
93 93
94 qDebug("try to add iface %s",newInterface.latin1()); 94 qDebug("try to add iface %s",newInterface.latin1());
95 95
96 PPPConfigWidget imp(0, "PPPConfigImp", true); 96 PPPConfigWidget imp(0, "PPPConfigImp", true);
97 imp.showMaximized(); 97 imp.showMaximized();
98 if(imp.exec() == QDialog::Accepted ){ 98 if(imp.exec() == QDialog::Accepted ){
99 qDebug("ACCEPTED"); 99 qDebug("ACCEPTED");
100 return new Interface( 0, newInterface ); 100 return new Interface( 0, newInterface );
101 PPPData::data()->save();
101 } 102 }
102 return NULL; 103 return NULL;
103} 104}
104 105
105/** 106/**
106 * Attempts to remove the interface, doesn't delete i 107 * Attempts to remove the interface, doesn't delete i
107 * @return bool true if successfull, false otherwise. 108 * @return bool true if successfull, false otherwise.
108 */ 109 */
109bool PPPModule::remove(Interface*){ 110bool PPPModule::remove(Interface*){
110 // Can't remove a hardware device, you can stop it though. 111 // Can't remove a hardware device, you can stop it though.
111 return false; 112 return false;
112} 113}
113 114
114void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces) 115void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces)
115{ 116{
116 qDebug("here"); 117 qDebug("here");
117 newIfaces.insert(QObject::tr("PPP") ,QObject::tr("generic ppp device")); 118 newIfaces.insert(QObject::tr("PPP") ,QObject::tr("generic ppp device"));
118} 119}
119 120
120 121