Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwinrules/kcm.cpp
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | 42 | { | |||
---|---|---|---|---|---|
46 | widget = new KCMRulesList(this); | 46 | widget = new KCMRulesList(this); | ||
47 | layout->addWidget(widget); | 47 | layout->addWidget(widget); | ||
48 | connect(widget, SIGNAL(changed(bool)), SLOT(moduleChanged(bool))); | 48 | connect(widget, SIGNAL(changed(bool)), SLOT(moduleChanged(bool))); | ||
49 | KAboutData *about = new KAboutData(QStringLiteral("kcmkwinrules"), | 49 | KAboutData *about = new KAboutData(QStringLiteral("kcmkwinrules"), | ||
50 | i18n("Window-Specific Settings Configuration Module"), | 50 | i18n("Window-Specific Settings Configuration Module"), | ||
51 | QString(), QString(), KAboutLicense::GPL, i18n("(c) 2004 KWin and KControl Authors")); | 51 | QString(), QString(), KAboutLicense::GPL, i18n("(c) 2004 KWin and KControl Authors")); | ||
52 | about->addAuthor(i18n("Lubos Lunak"), QString(), "l.lunak@kde.org"); | 52 | about->addAuthor(i18n("Lubos Lunak"), QString(), "l.lunak@kde.org"); | ||
53 | setAboutData(about); | 53 | setAboutData(about); | ||
54 | setButtons(KCModule::Help | KCModule::Apply); | ||||
54 | } | 55 | } | ||
55 | 56 | | |||
56 | void KCMRules::load() | 57 | void KCMRules::load() | ||
57 | { | 58 | { | ||
58 | widget->load(); | 59 | widget->load(); | ||
59 | emit KCModule::changed(false); | 60 | emit KCModule::changed(false); | ||
60 | } | 61 | } | ||
61 | 62 | | |||
62 | void KCMRules::save() | 63 | void KCMRules::save() | ||
63 | { | 64 | { | ||
64 | widget->save(); | 65 | widget->save(); | ||
65 | emit KCModule::changed(false); | 66 | emit KCModule::changed(false); | ||
66 | // Send signal to all kwin instances | 67 | // Send signal to all kwin instances | ||
67 | QDBusMessage message = | 68 | QDBusMessage message = | ||
68 | QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); | 69 | QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); | ||
69 | QDBusConnection::sessionBus().send(message); | 70 | QDBusConnection::sessionBus().send(message); | ||
70 | 71 | | |||
71 | } | 72 | } | ||
72 | 73 | | |||
73 | void KCMRules::defaults() | | |||
74 | { | | |||
75 | widget->defaults(); | | |||
76 | } | | |||
77 | | ||||
78 | QString KCMRules::quickHelp() const | 74 | QString KCMRules::quickHelp() const | ||
79 | { | 75 | { | ||
80 | return i18n("<p><h1>Window-specific Settings</h1> Here you can customize window settings specifically only" | 76 | return i18n("<p><h1>Window-specific Settings</h1> Here you can customize window settings specifically only" | ||
81 | " for some windows.</p>" | 77 | " for some windows.</p>" | ||
82 | " <p>Please note that this configuration will not take effect if you do not use" | 78 | " <p>Please note that this configuration will not take effect if you do not use" | ||
83 | " KWin as your window manager. If you do use a different window manager, please refer to its documentation" | 79 | " KWin as your window manager. If you do use a different window manager, please refer to its documentation" | ||
84 | " for how to customize window behavior.</p>"); | 80 | " for how to customize window behavior.</p>"); | ||
85 | } | 81 | } | ||
Show All 17 Lines |