summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-15 07:25:40 (UTC)
committer zautrix <zautrix>2004-09-15 07:25:40 (UTC)
commitdbd146e54cd7c48248c9c66b503b54280e09562a (patch) (side-by-side diff)
tree6e911db9d3ec30d4f39b1f8125395dbdf19f21f6
parent540bbf4ded9f06df9a56e74f48bb606fb43f05d7 (diff)
downloadkdepimpi-dbd146e54cd7c48248c9c66b503b54280e09562a.zip
kdepimpi-dbd146e54cd7c48248c9c66b503b54280e09562a.tar.gz
kdepimpi-dbd146e54cd7c48248c9c66b503b54280e09562a.tar.bz2
Fix of saving settings in KA/Pi
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--microkde/kutils/kcmultidialog.cpp7
-rw-r--r--microkde/kutils/kcmultidialog.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/microkde/kutils/kcmultidialog.cpp b/microkde/kutils/kcmultidialog.cpp
index 6c82e4f..e7aa9d1 100644
--- a/microkde/kutils/kcmultidialog.cpp
+++ b/microkde/kutils/kcmultidialog.cpp
@@ -60,71 +60,74 @@ KCMultiDialog::KCMultiDialog(const QString& baseGroup, QWidget *parent, const ch
}
KCMultiDialog::~KCMultiDialog()
{
//US moduleDict.setAutoDelete(true);
}
void KCMultiDialog::slotDefault()
{
int curPageIndex = mMainWidget->activePageIndex();
QPtrListIterator<KCModule> it(modules);
for (; it.current(); ++it)
{
if (pageIndex((QWidget *)(*it)->parent()) == curPageIndex)
{
(*it)->defaults();
clientChanged(true);
return;
}
}
}
-
+void KCMultiDialog::accept()
+{
+ slotOk();
+}
void KCMultiDialog::slotApply()
{
qDebug("KCMultiDialog::slotApply clicked");
QPtrListIterator<KCModule> it(modules);
for (; it.current(); ++it)
(*it)->save();
clientChanged(false);
emit applyClicked();
}
void KCMultiDialog::slotOk()
{
qDebug("KCMultiDialog::slotOk clicked");
QPtrListIterator<KCModule> it(modules);
for (; it.current(); ++it)
(*it)->save();
- accept();
+ QDialog::accept();
emit okClicked();
}
void KCMultiDialog::slotHelp()
{
/*US
KURL url( KURL("help:/"), _docPath );
if (url.protocol() == "help" || url.protocol() == "man" || url.protocol() == "info") {
KProcess process;
process << "khelpcenter"
<< url.url();
process.start(KProcess::DontCare);
process.detach();
} else {
new KRun(url);
}
*/
}
void KCMultiDialog::clientChanged(bool state)
{
enableButton(Apply, state);
diff --git a/microkde/kutils/kcmultidialog.h b/microkde/kutils/kcmultidialog.h
index 1aa66b2..768faea 100644
--- a/microkde/kutils/kcmultidialog.h
+++ b/microkde/kutils/kcmultidialog.h
@@ -91,48 +91,50 @@ protected slots:
/**
* This slot is called when the user presses the "Apply" Button
* You can reimplement it if needed
*
* @note Make sure you call the original implementation!
**/
virtual void slotApply();
/**
* This slot is called when the user presses the "OK" Button
* You can reimplement it if needed
*
* @note Make sure you call the original implementation!
**/
virtual void slotOk();
/**
* This slot is called when the user presses the "Help" Button
* You can reimplement it if needed
*
* @note Make sure you call the original implementation!
**/
virtual void slotHelp();
+ void accept();
+
private slots:
void slotAboutToShow(QWidget *);
void clientChanged(bool state);
private:
/*US
struct LoadInfo {
LoadInfo(const QString &_path, bool _withfallback)
: path(_path), withfallback(_withfallback)
{ }
QString path;
bool withfallback;
};
*/
QPtrList<KCModule> modules;
/*
QPtrDict<LoadInfo> moduleDict;
QString _docPath;
*/
QString _baseGroup;
//US