kapptemplate
Go to the documentation of this file.
23 #include "ui_prefs_base.h"
25 #include <QtGui/QDropEvent>
27 #include <KConfigDialog>
31 #include <KActionCollection>
32 #include <KStandardAction>
66 KStandardAction::openNew(
this, SLOT(fileNew()), actionCollection());
67 KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollection());
69 KStandardAction::preferences(
this, SLOT(optionsPreferences()), actionCollection());
72 KAction *custom =
new KAction(KIcon(
"colorize"), i18n(
"Swi&tch Colors"),
this);
73 actionCollection()->addAction(
QLatin1String(
"switch_action"), custom );
74 connect(custom, SIGNAL(triggered(
bool)),
m_view, SLOT(switchColors()));
87 void %{
APPNAME}::optionsPreferences()
94 if ( KConfigDialog::showDialog(
"settings" ) ) {
97 KConfigDialog *dialog =
new KConfigDialog(
this,
"settings",
Settings::self());
100 dialog->addPage(generalSettingsDlg, i18n(
"General"),
"package_setting");
101 connect(dialog, SIGNAL(settingsChanged(
QString)),
m_view, SLOT(settingsChanged()));
102 dialog->setAttribute( Qt::WA_DeleteOnClose );
106 #include "%{APPNAMELC}.moc"
Ui::prefs_base ui_prefs_base
class @6 QWidget
This is the main view class for %{APPNAME}.
class SettingsHelper View
m_view(new%{APPNAME}View(this))
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:39:44 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.