author | zautrix <zautrix> | 2004-11-01 14:15:56 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-11-01 14:15:56 (UTC) |
commit | 3320af5e47cdb4b54c4185c91d0332c013d90818 (patch) (side-by-side diff) | |
tree | 9d7db42d4350616d315c5f95e1ac0aed00ed1314 /libkdepim | |
parent | 56845a3ee7013af8a2db26a89aa151ee482ef0ed (diff) | |
download | kdepimpi-3320af5e47cdb4b54c4185c91d0332c013d90818.zip kdepimpi-3320af5e47cdb4b54c4185c91d0332c013d90818.tar.gz kdepimpi-3320af5e47cdb4b54c4185c91d0332c013d90818.tar.bz2 |
ompi fixes
-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 @@ -195,192 +195,193 @@ KPrefsWidTime::KPrefsWidTime(const QString &text,int *reference, void KPrefsWidTime::readConfig() { mSpin->setValue(*mReference); } void KPrefsWidTime::writeConfig() { *mReference = mSpin->value(); } QLabel *KPrefsWidTime::label() { return mLabel; } QSpinBox *KPrefsWidTime::spinBox() { return mSpin; } KPrefsWidRadios::KPrefsWidRadios(const QString &text,int *reference, QWidget *parent) { mReference = reference; mBox = new QButtonGroup(1,Qt::Horizontal,text,parent); connect( mBox, SIGNAL( clicked(int)), SIGNAL( modified() ) ); } KPrefsWidRadios::~KPrefsWidRadios() { } void KPrefsWidRadios::addRadio(const QString &text) { new QRadioButton(text,mBox); } QButtonGroup *KPrefsWidRadios::groupBox() { return mBox; } void KPrefsWidRadios::readConfig() { mBox->setButton(*mReference); } void KPrefsWidRadios::writeConfig() { *mReference = mBox->id(mBox->selected()); } KPrefsWidString::KPrefsWidString(const QString &text,QString *reference, QWidget *parent, QLineEdit::EchoMode echomode) { mReference = reference; mLabel = new QLabel(text,parent); mEdit = new QLineEdit(parent); mEdit->setEchoMode( echomode ); connect( mEdit, SIGNAL( textChanged(const QString&) ), SIGNAL( modified() ) ); } KPrefsWidString::~KPrefsWidString() { } void KPrefsWidString::readConfig() { mEdit->setText(*mReference); } void KPrefsWidString::writeConfig() { *mReference = mEdit->text(); } QLabel *KPrefsWidString::label() { return mLabel; } QLineEdit *KPrefsWidString::lineEdit() { return mEdit; } KPrefsWidget::KPrefsWidget(KPrefs *prefs,QWidget *parent,const char *name) : QWidget(parent, name ) { mPrefs = prefs; + mPrefsWids.setAutoDelete( true ); } KPrefsWidget::~KPrefsWidget() { } void KPrefsWidget::addWid(KPrefsWid *wid) { mPrefsWids.append(wid); connect( wid, SIGNAL( modified() ), this, SLOT( modified() ) ); } KPrefsWidBool *KPrefsWidget::addWidBool(const QString &text,bool *reference,QWidget *parent) { KPrefsWidBool *w = new KPrefsWidBool(text,reference,parent); addWid(w); return w; } KPrefsWidTime *KPrefsWidget::addWidTime(const QString &text,int *reference,QWidget *parent) { KPrefsWidTime *w = new KPrefsWidTime(text,reference,parent); addWid(w); return w; } KPrefsWidColor *KPrefsWidget::addWidColor(const QString &text,QColor *reference,QWidget *parent) { KPrefsWidColor *w = new KPrefsWidColor(text,reference,parent); addWid(w); return w; } KPrefsWidRadios *KPrefsWidget::addWidRadios(const QString &text,int *reference,QWidget *parent) { KPrefsWidRadios *w = new KPrefsWidRadios(text,reference,parent); addWid(w); return w; } KPrefsWidString *KPrefsWidget::addWidString(const QString &text,QString *reference,QWidget *parent) { KPrefsWidString *w = new KPrefsWidString(text,reference,parent); addWid(w); return w; } KPrefsWidString *KPrefsWidget::addWidPassword(const QString &text,QString *reference,QWidget *parent) { KPrefsWidString *w = new KPrefsWidString(text,reference,parent,QLineEdit::Password); addWid(w); return w; } KPrefsWidFont *KPrefsWidget::addWidFont(const QString &sampleText,const QString &buttonText, QFont *reference,QWidget *parent) { KPrefsWidFont *w = new KPrefsWidFont(sampleText,buttonText,reference,parent); addWid(w); return w; } void KPrefsWidget::setDefaults() { mPrefs->setDefaults(); readConfig(); } void KPrefsWidget::readConfig() { // kdDebug(5300) << "KPrefsDialog::readConfig()" << endl; KPrefsWid *wid; for(wid = mPrefsWids.first();wid;wid=mPrefsWids.next()) { wid->readConfig(); } usrReadConfig(); emit changed( false ); } void KPrefsWidget::writeConfig() { // kdDebug(5300) << "KPrefsDialog::writeConfig()" << endl; KPrefsWid *wid; for(wid = mPrefsWids.first();wid;wid=mPrefsWids.next()) { wid->writeConfig(); } usrWriteConfig(); |