From 0af70ae5fee7b71aecf5ac742fdd65e31237eb5a Mon Sep 17 00:00:00 2001 From: ulf69 Date: Wed, 15 Sep 2004 17:48:36 +0000 Subject: small changes to accommodate pwManager --- (limited to 'microkde/kconfig.cpp') diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp index 4cbec94..ba41f6c 100644 --- a/microkde/kconfig.cpp +++ b/microkde/kconfig.cpp @@ -109,6 +109,25 @@ QString KConfig::readEntry( const QString &key, const QString &def ) return *it; } +QSize KConfig::readSizeEntry( const QString &key, QSize* def ) +{ + QValueList intlist = readIntListEntry(key); + + if (intlist.count() < 2) + { + if (def) + return *def; + else + return QSize(); + } + + QSize ret; + ret.setWidth(intlist[0]); + ret.setHeight(intlist[1]); + + return ret; +} + QStringList KConfig::readListEntry( const QString &key ) { QMap::ConstIterator it = mStringMap.find( mGroup + key ); @@ -222,6 +241,13 @@ void KConfig::writeEntry( const QString & e, const QColor & c ) writeEntry( e, l ); } +void KConfig::writeEntry( const QString & e, const QSize & s ) +{ + QValueList intlist; + intlist << s.width() << s.height(); + writeEntry( e, intlist ); +} + void KConfig::writeEntry( const QString & e , const QFont & f ) { QStringList font; -- cgit v0.9.0.2