summaryrefslogtreecommitdiffabout
path: root/libkdepim/kprefswidget.cpp
authorzautrix <zautrix>2004-11-01 14:15:56 (UTC)
committer zautrix <zautrix>2004-11-01 14:15:56 (UTC)
commit3320af5e47cdb4b54c4185c91d0332c013d90818 (patch) (side-by-side diff)
tree9d7db42d4350616d315c5f95e1ac0aed00ed1314 /libkdepim/kprefswidget.cpp
parent56845a3ee7013af8a2db26a89aa151ee482ef0ed (diff)
downloadkdepimpi-3320af5e47cdb4b54c4185c91d0332c013d90818.zip
kdepimpi-3320af5e47cdb4b54c4185c91d0332c013d90818.tar.gz
kdepimpi-3320af5e47cdb4b54c4185c91d0332c013d90818.tar.bz2
ompi fixes
Diffstat (limited to 'libkdepim/kprefswidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kprefswidget.cpp1
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
@@ -227,128 +227,129 @@ 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()