2
* Copyright (c) 2005 Stefan Nikolaus <stefan.nikolaus@kdemail.net>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
24
#include "positiontab_impl.h"
25
#include "kickerSettings.h"
28
#include "positionconfig.h"
29
#include "positionconfig.moc"
31
PositionConfig::PositionConfig(QWidget *parent, const char *name)
32
: KCModule(parent, name)
34
QVBoxLayout *layout = new QVBoxLayout(this);
35
m_widget = new PositionTab(this);
36
layout->addWidget(m_widget);
39
setQuickHelp(KickerConfig::self()->quickHelp());
40
setAboutData(KickerConfig::self()->aboutData());
42
//addConfig(KickerSettings::self(), m_widget);
44
connect(m_widget, SIGNAL(changed()),
45
this, SLOT(changed()));
46
connect(KickerConfig::self(), SIGNAL(aboutToNotifyKicker()),
47
this, SLOT(aboutToNotifyKicker()));
50
QTimer::singleShot(0, this, SLOT(notChanged()));
53
void PositionConfig::notChanged()
58
void PositionConfig::load()
64
void PositionConfig::aboutToNotifyKicker()
66
kDebug() << "PositionConfig::aboutToNotifyKicker()";
68
// This slot is triggered by the signal,
69
// which is send before Kicker is notified.
70
// See comment in save().
75
void PositionConfig::save()
77
// As we don't want to notify Kicker multiple times
78
// we do not save the settings here. Instead the
79
// KickerConfig object sends a signal before the
80
// notification. On this signal all existing modules,
81
// including this object, save their settings.
82
KickerConfig::self()->notifyKicker();
85
void PositionConfig::defaults()
90
// KConfigDialogManager may queue an changed(false) signal,
91
// so we make sure, that the module is labeled as changed,
92
// while we manage some of the widgets ourselves
93
QTimer::singleShot(0, this, SLOT(changed()));