author | zautrix <zautrix> | 2005-04-20 10:43:07 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-20 10:43:07 (UTC) |
commit | f23afbb9c09b4ee0f00af8f04ee4458181792cd0 (patch) (side-by-side diff) | |
tree | 807bcaf329d257ec2a0c5c6e3a6afc7ab53a6078 /libkdepim/kprefsdialog.cpp | |
parent | 03f7f26ad34f50dd86f335c7c5a25a292d642793 (diff) | |
download | kdepimpi-f23afbb9c09b4ee0f00af8f04ee4458181792cd0.zip kdepimpi-f23afbb9c09b4ee0f00af8f04ee4458181792cd0.tar.gz kdepimpi-f23afbb9c09b4ee0f00af8f04ee4458181792cd0.tar.bz2 |
fixes
-rw-r--r-- | libkdepim/kprefsdialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp index dd9a602..b6ae775 100644 --- a/libkdepim/kprefsdialog.cpp +++ b/libkdepim/kprefsdialog.cpp @@ -187,193 +187,193 @@ KPrefsDialogWidTime::KPrefsDialogWidTime(const QString &text,int *reference, void KPrefsDialogWidTime::readConfig() { mSpin->setValue(*mReference); } void KPrefsDialogWidTime::writeConfig() { *mReference = mSpin->value(); } QLabel *KPrefsDialogWidTime::label() { return mLabel; } QSpinBox *KPrefsDialogWidTime::spinBox() { return mSpin; } KPrefsDialogWidRadios::KPrefsDialogWidRadios(const QString &text,int *reference, QWidget *parent) { mReference = reference; mBox = new QButtonGroup(1,Qt::Horizontal,text,parent); } KPrefsDialogWidRadios::~KPrefsDialogWidRadios() { } void KPrefsDialogWidRadios::addRadio(const QString &text) { new QRadioButton(text,mBox); } QButtonGroup *KPrefsDialogWidRadios::groupBox() { return mBox; } void KPrefsDialogWidRadios::readConfig() { mBox->setButton(*mReference); } void KPrefsDialogWidRadios::writeConfig() { *mReference = mBox->id(mBox->selected()); } KPrefsDialogWidString::KPrefsDialogWidString(const QString &text,QString *reference, QWidget *parent, QLineEdit::EchoMode echomode) { mReference = reference; mLabel = new QLabel(text,parent); mEdit = new QLineEdit(parent); mEdit->setEchoMode( echomode ); } KPrefsDialogWidString::~KPrefsDialogWidString() { } void KPrefsDialogWidString::readConfig() { mEdit->setText(*mReference); } void KPrefsDialogWidString::writeConfig() { *mReference = mEdit->text(); } QLabel *KPrefsDialogWidString::label() { return mLabel; } QLineEdit *KPrefsDialogWidString::lineEdit() { return mEdit; } KPrefsDialog::KPrefsDialog(KPrefs *prefs,QWidget *parent,char *name,bool modal) : KDialogBase(IconList,i18n("Preferences"),Ok|Cancel|Default,Ok,parent, name,modal,true) { mPrefs = prefs; // This seems to cause a crash on exit. Investigate later. -// mPrefsWids.setAutoDelete(true); + mPrefsWids.setAutoDelete(true); connect(this,SIGNAL(defaultClicked()),SLOT(slotDefault())); //connect(this,SIGNAL(cancelClicked()),SLOT(slotDefault())); //connect(this,SIGNAL(cancelClicked()),SLOT(reject())); } KPrefsDialog::~KPrefsDialog() { } void KPrefsDialog::addWid(KPrefsDialogWid *wid) { mPrefsWids.append(wid); } KPrefsDialogWidBool *KPrefsDialog::addWidBool(const QString &text,bool *reference,QWidget *parent) { KPrefsDialogWidBool *w = new KPrefsDialogWidBool(text,reference,parent); addWid(w); return w; } KPrefsDialogWidTime *KPrefsDialog::addWidTime(const QString &text,int *reference,QWidget *parent) { KPrefsDialogWidTime *w = new KPrefsDialogWidTime(text,reference,parent); addWid(w); return w; } KPrefsDialogWidColor *KPrefsDialog::addWidColor(const QString &text,QColor *reference,QWidget *parent) { KPrefsDialogWidColor *w = new KPrefsDialogWidColor(text,reference,parent); addWid(w); return w; } KPrefsDialogWidRadios *KPrefsDialog::addWidRadios(const QString &text,int *reference,QWidget *parent) { KPrefsDialogWidRadios *w = new KPrefsDialogWidRadios(text,reference,parent); addWid(w); return w; } KPrefsDialogWidString *KPrefsDialog::addWidString(const QString &text,QString *reference,QWidget *parent) { KPrefsDialogWidString *w = new KPrefsDialogWidString(text,reference,parent); addWid(w); return w; } KPrefsDialogWidString *KPrefsDialog::addWidPassword(const QString &text,QString *reference,QWidget *parent) { KPrefsDialogWidString *w = new KPrefsDialogWidString(text,reference,parent,QLineEdit::Password); addWid(w); return w; } KPrefsDialogWidFont *KPrefsDialog::addWidFont(const QString &sampleText,const QString &buttonText, QFont *reference,QWidget *parent) { KPrefsDialogWidFont *w = new KPrefsDialogWidFont(sampleText,buttonText,reference,parent); addWid(w); return w; } void KPrefsDialog::setDefaults() { mPrefs->setDefaults(); readConfig(); } void KPrefsDialog::readConfig() { // kdDebug(5300) << "KPrefsDialog::readConfig()" << endl; KPrefsDialogWid *wid; for(wid = mPrefsWids.first();wid;wid=mPrefsWids.next()) { wid->readConfig(); } usrReadConfig(); } void KPrefsDialog::writeConfig() { // kdDebug(5300) << "KPrefsDialog::writeConfig()" << endl; KPrefsDialogWid *wid; for(wid = mPrefsWids.first();wid;wid=mPrefsWids.next()) { wid->writeConfig(); } usrWriteConfig(); // kdDebug(5300) << "KPrefsDialog::writeConfig() now writing..." << endl; |