Commit 1e742884 authored by Cyril Rossi's avatar Cyril Rossi Committed by Benjamin Port
Browse files

KCM KWinEffects : add default settings indicator at module level

parent 2870fb74
......@@ -6,6 +6,7 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kcm_kwin_effects\")
set(kcm_kwin_effects_PART_SRCS
kcm.cpp
effectsfilterproxymodel.cpp
desktopeffectsdata.cpp
)
add_library(kcm_kwin_effects MODULE ${kcm_kwin_effects_PART_SRCS})
......@@ -13,6 +14,7 @@ add_library(kcm_kwin_effects MODULE ${kcm_kwin_effects_PART_SRCS})
target_link_libraries(kcm_kwin_effects
Qt::DBus
KF5::KCMUtils
KF5::I18n
KF5::KCMUtils
KF5::NewStuff
......
/*
SPDX-FileCopyrightText: 2021 Cyril Rossi <cyril.rossi@enioka.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "desktopeffectsdata.h"
#include "effectsmodel.h"
namespace KWin
{
DesktopEffectsData::DesktopEffectsData(QObject *parent, const QVariantList &args)
: KCModuleDataSignaling(parent, args)
, m_model(new EffectsModel(this))
{
connect(m_model, &EffectsModel::loaded, this, &KCModuleDataSignaling::loaded);
m_model->load();
}
DesktopEffectsData::~DesktopEffectsData()
{
}
bool DesktopEffectsData::isDefaults() const
{
return m_model->isDefaults();
}
}
/*
SPDX-FileCopyrightText: 2021 Cyril Rossi <cyril.rossi@enioka.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef DESKTOPEFFECTSDATA_H
#define DESKTOPEFFECTSDATA_H
#include <QObject>
#include <KCModuleData>
namespace KWin
{
class EffectsModel;
class DesktopEffectsData : public KCModuleDataSignaling
{
Q_OBJECT
public:
explicit DesktopEffectsData(QObject *parent = nullptr, const QVariantList &args = QVariantList());
~DesktopEffectsData() override;
bool isDefaults() const override;
private:
EffectsModel *m_model;
};
}
#endif // DESKTOPEFFECTSDATA_H
......@@ -7,6 +7,7 @@
#include "kcm.h"
#include "effectsfilterproxymodel.h"
#include "effectsmodel.h"
#include "desktopeffectsdata.h"
#include <KAboutData>
#include <KLocalizedString>
......@@ -17,7 +18,8 @@
K_PLUGIN_FACTORY_WITH_JSON(DesktopEffectsKCMFactory,
"kcm_kwin_effects.json",
registerPlugin<KWin::DesktopEffectsKCM>();)
registerPlugin<KWin::DesktopEffectsKCM>();
registerPlugin<KWin::DesktopEffectsData>();)
namespace KWin
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment