author | tille <tille> | 2003-05-24 16:12:02 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-24 16:12:02 (UTC) |
commit | cc1aa3e178dff65854913bd5667579fc33ce707d (patch) (unidiff) | |
tree | d37d7fd8fb3b9832c0825b015af862f2cc62f473 /noncore/settings/networksettings/ppp/pppmodule.cpp | |
parent | 5667ded1d4583cfb79b2ddfd7aaae0e58ed6d552 (diff) | |
download | opie-cc1aa3e178dff65854913bd5667579fc33ce707d.zip opie-cc1aa3e178dff65854913bd5667579fc33ce707d.tar.gz opie-cc1aa3e178dff65854913bd5667579fc33ce707d.tar.bz2 |
saves config (still in the kppp way)
Diffstat (limited to 'noncore/settings/networksettings/ppp/pppmodule.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppmodule.cpp | 3 |
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 | */ |
11 | PPPModule::PPPModule() : Module() { | 11 | PPPModule::PPPModule() : Module() { |
12 | } | 12 | } |
13 | 13 | ||
14 | /** | 14 | /** |
15 | * Delete any interfaces that we own. | 15 | * Delete any interfaces that we own. |
16 | */ | 16 | */ |
17 | PPPModule::~PPPModule(){ | 17 | PPPModule::~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 | */ |
26 | void PPPModule::setProfile(const QString &newProfile){ | 26 | void 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 | */ |
81 | QList<Interface> PPPModule::getInterfaces(){ | 81 | QList<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 | */ |
92 | Interface *PPPModule::addNewInterface(const QString &newInterface){ | 92 | Interface *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 | */ |
109 | bool PPPModule::remove(Interface*){ | 110 | bool 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 | ||
114 | void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces) | 115 | void 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 | ||