------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=111560 ------- Additional Comments From caulier.gilles free fr 2006-09-27 16:21 ------- SVN commit 589056 by cgilles: kipi-plugins from trunk : GPSSync tool : remember the GPS position editor dialog settings between sessions. CCMAIL: gerhard kulzer net CCBUGS: 133359, 111560 M +34 -2 gpseditdialog.cpp M +10 -0 gpseditdialog.h --- trunk/extragear/libs/kipi-plugins/gpssync/gpseditdialog.cpp #589055:589056 @ -30,6 +30,7 @ // KDE includes. #include <klocale.h> +#include <kconfig.h> #include <kdebug.h> #include <kiconloader.h> #include <kapplication.h> @ -147,8 +148,7 @ connect(lonResetButton, SIGNAL(clicked()), d->longitudeInput, SLOT(clear())); - adjustSize(); - slotGPSLocator(d->gpsCombo->currentItem()); + readSettings(); } GPSEditDialog::~GPSEditDialog() @ -156,6 +156,38 @ delete d; } +void GPSEditDialog::closeEvent(QCloseEvent *e) +{ + if (!e) return; + saveSettings(); + e->accept(); +} + +void GPSEditDialog::slotClose() +{ + saveSettings(); + KDialogBase::slotClose(); +} + +void GPSEditDialog::readSettings() +{ + KConfig config("kipirc"); + config.setGroup("GPS Sync Settings"); + d->gpsCombo->setCurrentItem(config.readNumEntry("GPS Locator", + GPSEditDialogDialogPrivate::CapeLinks)); + resize(configDialogSize(config, QString("GPS Edit Dialog"))); + slotGPSLocator(d->gpsCombo->currentItem()); +} + +void GPSEditDialog::saveSettings() +{ + KConfig config("kipirc"); + config.setGroup("GPS Sync Settings"); + config.writeEntry("GPS Locator", d->gpsCombo->currentItem()); + saveDialogSize(config, QString("GPS Edit Dialog")); + config.sync(); +} + GPSDataContainer GPSEditDialog::getGPSInfo() { return GPSDataContainer(d->altitudeInput->text().toDouble(), --- trunk/extragear/libs/kipi-plugins/gpssync/gpseditdialog.h #589055:589056 @ -49,11 +49,21 @ protected slots: void slotOk(); + void slotClose(); void slotUser1(); void slotGPSLocator(int); +protected: + + void closeEvent(QCloseEvent *); + private: + void readSettings(); + void saveSettings(); + +private: + GPSEditDialogDialogPrivate * d; }; _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |