-rw-r--r-- | libkdepim/kprefswidget.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libkdepim/kprefswidget.cpp b/libkdepim/kprefswidget.cpp index be9ad30..f6a0b38 100644 --- a/libkdepim/kprefswidget.cpp +++ b/libkdepim/kprefswidget.cpp | |||
@@ -243,96 +243,97 @@ void KPrefsWidRadios::readConfig() | |||
243 | 243 | ||
244 | void KPrefsWidRadios::writeConfig() | 244 | void KPrefsWidRadios::writeConfig() |
245 | { | 245 | { |
246 | *mReference = mBox->id(mBox->selected()); | 246 | *mReference = mBox->id(mBox->selected()); |
247 | } | 247 | } |
248 | 248 | ||
249 | 249 | ||
250 | KPrefsWidString::KPrefsWidString(const QString &text,QString *reference, | 250 | KPrefsWidString::KPrefsWidString(const QString &text,QString *reference, |
251 | QWidget *parent, QLineEdit::EchoMode echomode) | 251 | QWidget *parent, QLineEdit::EchoMode echomode) |
252 | { | 252 | { |
253 | mReference = reference; | 253 | mReference = reference; |
254 | 254 | ||
255 | mLabel = new QLabel(text,parent); | 255 | mLabel = new QLabel(text,parent); |
256 | mEdit = new QLineEdit(parent); | 256 | mEdit = new QLineEdit(parent); |
257 | mEdit->setEchoMode( echomode ); | 257 | mEdit->setEchoMode( echomode ); |
258 | connect( mEdit, SIGNAL( textChanged(const QString&) ), SIGNAL( modified() ) ); | 258 | connect( mEdit, SIGNAL( textChanged(const QString&) ), SIGNAL( modified() ) ); |
259 | 259 | ||
260 | } | 260 | } |
261 | 261 | ||
262 | KPrefsWidString::~KPrefsWidString() | 262 | KPrefsWidString::~KPrefsWidString() |
263 | { | 263 | { |
264 | } | 264 | } |
265 | 265 | ||
266 | void KPrefsWidString::readConfig() | 266 | void KPrefsWidString::readConfig() |
267 | { | 267 | { |
268 | mEdit->setText(*mReference); | 268 | mEdit->setText(*mReference); |
269 | } | 269 | } |
270 | 270 | ||
271 | void KPrefsWidString::writeConfig() | 271 | void KPrefsWidString::writeConfig() |
272 | { | 272 | { |
273 | *mReference = mEdit->text(); | 273 | *mReference = mEdit->text(); |
274 | } | 274 | } |
275 | 275 | ||
276 | QLabel *KPrefsWidString::label() | 276 | QLabel *KPrefsWidString::label() |
277 | { | 277 | { |
278 | return mLabel; | 278 | return mLabel; |
279 | } | 279 | } |
280 | 280 | ||
281 | QLineEdit *KPrefsWidString::lineEdit() | 281 | QLineEdit *KPrefsWidString::lineEdit() |
282 | { | 282 | { |
283 | return mEdit; | 283 | return mEdit; |
284 | } | 284 | } |
285 | 285 | ||
286 | 286 | ||
287 | KPrefsWidget::KPrefsWidget(KPrefs *prefs,QWidget *parent,const char *name) : | 287 | KPrefsWidget::KPrefsWidget(KPrefs *prefs,QWidget *parent,const char *name) : |
288 | QWidget(parent, name ) | 288 | QWidget(parent, name ) |
289 | { | 289 | { |
290 | mPrefs = prefs; | 290 | mPrefs = prefs; |
291 | mPrefsWids.setAutoDelete( true ); | ||
291 | } | 292 | } |
292 | 293 | ||
293 | KPrefsWidget::~KPrefsWidget() | 294 | KPrefsWidget::~KPrefsWidget() |
294 | { | 295 | { |
295 | } | 296 | } |
296 | 297 | ||
297 | void KPrefsWidget::addWid(KPrefsWid *wid) | 298 | void KPrefsWidget::addWid(KPrefsWid *wid) |
298 | { | 299 | { |
299 | mPrefsWids.append(wid); | 300 | mPrefsWids.append(wid); |
300 | connect( wid, SIGNAL( modified() ), this, SLOT( modified() ) ); | 301 | connect( wid, SIGNAL( modified() ), this, SLOT( modified() ) ); |
301 | 302 | ||
302 | } | 303 | } |
303 | 304 | ||
304 | KPrefsWidBool *KPrefsWidget::addWidBool(const QString &text,bool *reference,QWidget *parent) | 305 | KPrefsWidBool *KPrefsWidget::addWidBool(const QString &text,bool *reference,QWidget *parent) |
305 | { | 306 | { |
306 | KPrefsWidBool *w = new KPrefsWidBool(text,reference,parent); | 307 | KPrefsWidBool *w = new KPrefsWidBool(text,reference,parent); |
307 | addWid(w); | 308 | addWid(w); |
308 | return w; | 309 | return w; |
309 | } | 310 | } |
310 | 311 | ||
311 | KPrefsWidTime *KPrefsWidget::addWidTime(const QString &text,int *reference,QWidget *parent) | 312 | KPrefsWidTime *KPrefsWidget::addWidTime(const QString &text,int *reference,QWidget *parent) |
312 | { | 313 | { |
313 | KPrefsWidTime *w = new KPrefsWidTime(text,reference,parent); | 314 | KPrefsWidTime *w = new KPrefsWidTime(text,reference,parent); |
314 | addWid(w); | 315 | addWid(w); |
315 | return w; | 316 | return w; |
316 | } | 317 | } |
317 | 318 | ||
318 | KPrefsWidColor *KPrefsWidget::addWidColor(const QString &text,QColor *reference,QWidget *parent) | 319 | KPrefsWidColor *KPrefsWidget::addWidColor(const QString &text,QColor *reference,QWidget *parent) |
319 | { | 320 | { |
320 | KPrefsWidColor *w = new KPrefsWidColor(text,reference,parent); | 321 | KPrefsWidColor *w = new KPrefsWidColor(text,reference,parent); |
321 | addWid(w); | 322 | addWid(w); |
322 | return w; | 323 | return w; |
323 | } | 324 | } |
324 | 325 | ||
325 | KPrefsWidRadios *KPrefsWidget::addWidRadios(const QString &text,int *reference,QWidget *parent) | 326 | KPrefsWidRadios *KPrefsWidget::addWidRadios(const QString &text,int *reference,QWidget *parent) |
326 | { | 327 | { |
327 | KPrefsWidRadios *w = new KPrefsWidRadios(text,reference,parent); | 328 | KPrefsWidRadios *w = new KPrefsWidRadios(text,reference,parent); |
328 | addWid(w); | 329 | addWid(w); |
329 | return w; | 330 | return w; |
330 | } | 331 | } |
331 | 332 | ||
332 | KPrefsWidString *KPrefsWidget::addWidString(const QString &text,QString *reference,QWidget *parent) | 333 | KPrefsWidString *KPrefsWidget::addWidString(const QString &text,QString *reference,QWidget *parent) |
333 | { | 334 | { |
334 | KPrefsWidString *w = new KPrefsWidString(text,reference,parent); | 335 | KPrefsWidString *w = new KPrefsWidString(text,reference,parent); |
335 | addWid(w); | 336 | addWid(w); |
336 | return w; | 337 | return w; |
337 | } | 338 | } |
338 | 339 | ||