mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 19:02:51 +00:00
86 lines
2.6 KiB
C++
86 lines
2.6 KiB
C++
![]() |
/* This file is part of the KDE project
|
||
|
Copyright (C) 2023 Ivailo Monev <xakepa10@gmail.com>
|
||
|
|
||
|
This library is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU Library General Public
|
||
|
License version 2, as published by the Free Software Foundation.
|
||
|
|
||
|
This library is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
|
#include "knotificationconfig.h"
|
||
|
|
||
|
#include <kdebug.h>
|
||
|
#include <klocale.h>
|
||
|
#include <kaboutdata.h>
|
||
|
#include <kpluginfactory.h>
|
||
|
#include <kpluginloader.h>
|
||
|
|
||
|
K_PLUGIN_FACTORY(KCMNotificationFactory, registerPlugin<KCMNotification>();)
|
||
|
K_EXPORT_PLUGIN(KCMNotificationFactory("kcmknotificationconfig", "kcm_knotificationconfig"))
|
||
|
|
||
|
KCMNotification::KCMNotification(QWidget *parent, const QVariantList &args)
|
||
|
: KCModule(KCMNotificationFactory::componentData(), parent),
|
||
|
m_layout(nullptr),
|
||
|
m_notificationslabel(nullptr),
|
||
|
m_notificationsbox(nullptr),
|
||
|
m_notificationswidget(nullptr)
|
||
|
{
|
||
|
Q_UNUSED(args);
|
||
|
|
||
|
setButtons(KCModule::Default | KCModule::Apply);
|
||
|
setQuickHelp(i18n("<h1>Notifications Configuration</h1> This module allows you to change KDE notification options."));
|
||
|
|
||
|
KAboutData *about = new KAboutData(
|
||
|
I18N_NOOP("kcmkgreeter"), 0,
|
||
|
ki18n("KDE Notifications Configuration Module"),
|
||
|
0, KLocalizedString(), KAboutData::License_GPL,
|
||
|
ki18n("Copyright 2023, Ivailo Monev <email>xakepa10@gmail.com</email>")
|
||
|
);
|
||
|
about->addAuthor(ki18n("Ivailo Monev"), KLocalizedString(), "xakepa10@gmail.com");
|
||
|
setAboutData(about);
|
||
|
|
||
|
m_layout = new QGridLayout(this);
|
||
|
setLayout(m_layout);
|
||
|
|
||
|
m_notificationslabel = new QLabel(this);
|
||
|
m_notificationslabel->setText(i18n("Event source:"));
|
||
|
m_layout->addWidget(m_notificationslabel, 0, 0);
|
||
|
m_notificationsbox = new KComboBox(this);
|
||
|
m_layout->addWidget(m_notificationsbox, 0, 1);
|
||
|
|
||
|
m_notificationswidget = new KNotificationConfigWidget(QString(), this);
|
||
|
}
|
||
|
|
||
|
KCMNotification::~KCMNotification()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
void KCMNotification::load()
|
||
|
{
|
||
|
// TODO:
|
||
|
emit changed(false);
|
||
|
}
|
||
|
|
||
|
void KCMNotification::save()
|
||
|
{
|
||
|
// TODO:
|
||
|
emit changed(false);
|
||
|
}
|
||
|
|
||
|
void KCMNotification::defaults()
|
||
|
{
|
||
|
// TODO:
|
||
|
emit changed(true);
|
||
|
}
|
||
|
|
||
|
#include "moc_knotificationconfig.cpp"
|