Diffstat (limited to 'noncore/settings/networksettings/ppp/pppdargs.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppdargs.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/settings/networksettings/ppp/pppdargs.cpp b/noncore/settings/networksettings/ppp/pppdargs.cpp index 4039939..d1143cf 100644 --- a/noncore/settings/networksettings/ppp/pppdargs.cpp +++ b/noncore/settings/networksettings/ppp/pppdargs.cpp | |||
@@ -25,26 +25,26 @@ | |||
25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <qlayout.h> | 28 | #include <qlayout.h> |
29 | #include <qbuttongroup.h> | 29 | #include <qbuttongroup.h> |
30 | //#include <kwin.h> | 30 | //#include <kwin.h> |
31 | #include <qapplication.h> | 31 | #include <qapplication.h> |
32 | #include "pppdargs.h" | 32 | #include "pppdargs.h" |
33 | #include "pppdata.h" | 33 | #include "pppdata.h" |
34 | //#include <klocale.h> | 34 | //#include <klocale.h> |
35 | #define i18n QObject::tr | 35 | #define i18n QObject::tr |
36 | 36 | ||
37 | PPPdArguments::PPPdArguments(QWidget *parent, const char *name) | 37 | PPPdArguments::PPPdArguments( PPPData *pd, QWidget *parent, const char *name) |
38 | : QDialog(parent, name, TRUE) | 38 | : QDialog(parent, name, TRUE), _pppdata(pd) |
39 | { | 39 | { |
40 | setCaption(i18n("Customize pppd Arguments")); | 40 | setCaption(i18n("Customize pppd Arguments")); |
41 | // KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); | 41 | // KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); |
42 | QVBoxLayout *l = new QVBoxLayout(this, 10, 10); | 42 | QVBoxLayout *l = new QVBoxLayout(this, 10, 10); |
43 | QHBoxLayout *tl = new QHBoxLayout(10); | 43 | QHBoxLayout *tl = new QHBoxLayout(10); |
44 | l->addLayout(tl); | 44 | l->addLayout(tl); |
45 | QVBoxLayout *l1 = new QVBoxLayout(); | 45 | QVBoxLayout *l1 = new QVBoxLayout(); |
46 | QVBoxLayout *l2 = new QVBoxLayout(); | 46 | QVBoxLayout *l2 = new QVBoxLayout(); |
47 | tl->addLayout(l1, 1); | 47 | tl->addLayout(l1, 1); |
48 | tl->addLayout(l2, 0); | 48 | tl->addLayout(l2, 0); |
49 | 49 | ||
50 | QHBoxLayout *l11 = new QHBoxLayout(10); | 50 | QHBoxLayout *l11 = new QHBoxLayout(10); |
@@ -112,50 +112,50 @@ void PPPdArguments::addbutton() { | |||
112 | } | 112 | } |
113 | 113 | ||
114 | 114 | ||
115 | void PPPdArguments::removebutton() { | 115 | void PPPdArguments::removebutton() { |
116 | if(arguments->currentItem() >= 0) | 116 | if(arguments->currentItem() >= 0) |
117 | arguments->removeItem(arguments->currentItem()); | 117 | arguments->removeItem(arguments->currentItem()); |
118 | } | 118 | } |
119 | 119 | ||
120 | 120 | ||
121 | void PPPdArguments::defaultsbutton() { | 121 | void PPPdArguments::defaultsbutton() { |
122 | // all of this is a hack | 122 | // all of this is a hack |
123 | // save current list | 123 | // save current list |
124 | QStringList arglist(PPPData::data()->pppdArgument()); | 124 | QStringList arglist(_pppdata->pppdArgument()); |
125 | 125 | ||
126 | // get defaults | 126 | // get defaults |
127 | PPPData::data()->setpppdArgumentDefaults(); | 127 | _pppdata->setpppdArgumentDefaults(); |
128 | init(); | 128 | init(); |
129 | 129 | ||
130 | // restore old list | 130 | // restore old list |
131 | PPPData::data()->setpppdArgument(arglist); | 131 | _pppdata->setpppdArgument(arglist); |
132 | } | 132 | } |
133 | 133 | ||
134 | 134 | ||
135 | void PPPdArguments::closebutton() { | 135 | void PPPdArguments::closebutton() { |
136 | QStringList arglist; | 136 | QStringList arglist; |
137 | for(uint i=0; i < arguments->count(); i++) | 137 | for(uint i=0; i < arguments->count(); i++) |
138 | arglist.append(arguments->text(i)); | 138 | arglist.append(arguments->text(i)); |
139 | PPPData::data()->setpppdArgument(arglist); | 139 | _pppdata->setpppdArgument(arglist); |
140 | 140 | ||
141 | done(0); | 141 | done(0); |
142 | } | 142 | } |
143 | 143 | ||
144 | 144 | ||
145 | void PPPdArguments::init() { | 145 | void PPPdArguments::init() { |
146 | while(arguments->count()) | 146 | while(arguments->count()) |
147 | arguments->removeItem(0); | 147 | arguments->removeItem(0); |
148 | 148 | ||
149 | QStringList &arglist = PPPData::data()->pppdArgument(); | 149 | QStringList &arglist = _pppdata->pppdArgument(); |
150 | for ( QStringList::Iterator it = arglist.begin(); | 150 | for ( QStringList::Iterator it = arglist.begin(); |
151 | it != arglist.end(); | 151 | it != arglist.end(); |
152 | ++it ) | 152 | ++it ) |
153 | arguments->insertItem(*it); | 153 | arguments->insertItem(*it); |
154 | } | 154 | } |
155 | 155 | ||
156 | 156 | ||
157 | void PPPdArguments::textChanged(const QString &s) { | 157 | void PPPdArguments::textChanged(const QString &s) { |
158 | add->setEnabled(s.length() > 0); | 158 | add->setEnabled(s.length() > 0); |
159 | } | 159 | } |
160 | 160 | ||
161 | 161 | ||