summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-04-22 17:32:45 (UTC)
committer zautrix <zautrix>2005-04-22 17:32:45 (UTC)
commite6feb1ca0c45397ba7b922198c87fe9b95b7d872 (patch) (side-by-side diff)
tree61b56d5a17f3eba87fef958d264e2da679496bda /kaddressbook
parent81158fa914f6d0f3aeb049d28d2ecfb5f5c0e261 (diff)
downloadkdepimpi-e6feb1ca0c45397ba7b922198c87fe9b95b7d872.zip
kdepimpi-e6feb1ca0c45397ba7b922198c87fe9b95b7d872.tar.gz
kdepimpi-e6feb1ca0c45397ba7b922198c87fe9b95b7d872.tar.bz2
fixxxx
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp36
1 files changed, 35 insertions, 1 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 9c40142..a4f3579 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -550,6 +550,22 @@ void KABCore::restoreSettings()
}
+#ifdef DESKTOP_VERSION
+ KConfig *config = KABPrefs::instance()->getConfig();
+ config->setGroup("WidgetLayout");
+ QStringList list;
+ list = config->readListEntry("MainLayout");
+ int x,y,w,h;
+ if ( ! list.isEmpty() ) {
+ x = list[0].toInt();
+ y = list[1].toInt();
+ w = list[2].toInt();
+ h = list[3].toInt();
+ KApplication::testCoords( &x,&y,&w,&h );
+ topLevelWidget()->setGeometry(x,y,w,h);
-
+ } else {
+ topLevelWidget()->setGeometry( 40 ,40 , 640, 440);
+ }
+#endif
}
@@ -570,4 +586,22 @@ void KABCore::saveSettings()
KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem();
+#ifdef DESKTOP_VERSION
+ KConfig *config = KABPrefs::instance()->getConfig();
+ config->setGroup("WidgetLayout");
+ QStringList list ;//= config->readListEntry("MainLayout");
+ int x,y,w,h;
+ QWidget* wid;
+ wid = topLevelWidget();
+ x = wid->geometry().x();
+ y = wid->geometry().y();
+ w = wid->width();
+ h = wid->height();
+ list.clear();
+ list << QString::number( x );
+ list << QString::number( y );
+ list << QString::number( w );
+ list << QString::number( h );
+ config->writeEntry("MainLayout",list );
+#endif
KABPrefs::instance()->writeConfig();
qDebug("KA: KABCore::saveSettings() ");