[kwin/effects] Use generated dbus interface to reconfigure effects
Instead of using EffectsHandler::sendReloadMessage we generate the dbus interface in each plugin and call the reconfigure slot directly. That way it's more type safe and we don't need to link kwineffects from the configs. REVIEW: 116875
This commit is contained in:
parent
f9e0a8b597
commit
a2aab537d6
50 changed files with 172 additions and 93 deletions
|
@ -358,7 +358,7 @@ kconfig_add_kcfg_files(kwin_KDEINIT_SRCS settings.kcfgc)
|
|||
|
||||
qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface )
|
||||
qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.Compositing.xml composite.h KWin::Compositor )
|
||||
qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.Effects.xml effects.h KWin::EffectsHandlerImpl )
|
||||
qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl )
|
||||
|
||||
qt5_add_dbus_interface( kwin_KDEINIT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.ScreenSaver.xml screenlocker_interface)
|
||||
|
||||
|
|
|
@ -10,12 +10,13 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_blur_config_SRCS blur_config.cpp)
|
||||
qt5_wrap_ui(kwin_blur_config_SRCS blur_config.ui)
|
||||
qt5_add_dbus_interface(kwin_blur_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_blur_config_SRCS blurconfig.kcfgc)
|
||||
|
||||
add_library(kwin_blur_config MODULE ${kwin_blur_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_blur_config
|
||||
kwineffects
|
||||
Qt5::DBus
|
||||
KF5::ConfigWidgets
|
||||
KF5::I18n
|
||||
KF5::Service
|
||||
|
|
|
@ -21,8 +21,9 @@
|
|||
// KConfigSkeleton
|
||||
#include "blurconfig.h"
|
||||
|
||||
#include <kwineffects.h>
|
||||
#include <kwineffects_interface.h>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
K_PLUGIN_FACTORY_WITH_JSON(BlurEffectConfigFactory,
|
||||
"blur_config.json",
|
||||
|
@ -48,7 +49,10 @@ void BlurEffectConfig::save()
|
|||
{
|
||||
KCModule::save();
|
||||
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("blur"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_blur"));
|
||||
}
|
||||
|
||||
} // namespace KWin
|
||||
|
|
|
@ -16,12 +16,13 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_coverswitch_config_SRCS coverswitch_config.cpp)
|
||||
qt5_wrap_ui(kwin_coverswitch_config_SRCS coverswitch_config.ui)
|
||||
qt5_add_dbus_interface(kwin_coverswitch_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_coverswitch_config_SRCS coverswitchconfig.kcfgc)
|
||||
|
||||
add_library(kwin_coverswitch_config MODULE ${kwin_coverswitch_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_coverswitch_config
|
||||
kwineffects
|
||||
Qt5::DBus
|
||||
KF5::ConfigWidgets
|
||||
KF5::I18n
|
||||
KF5::Service
|
||||
|
|
|
@ -21,8 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// KConfigSkeleton
|
||||
#include "coverswitchconfig.h"
|
||||
|
||||
#include <kwineffects.h>
|
||||
#include <kwineffects_interface.h>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
@ -53,7 +54,10 @@ CoverSwitchEffectConfig::CoverSwitchEffectConfig(QWidget* parent, const QVariant
|
|||
void CoverSwitchEffectConfig::save()
|
||||
{
|
||||
KCModule::save();
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("coverswitch"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_coverswitch"));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -34,12 +34,12 @@ install( FILES
|
|||
# cube
|
||||
set(kwin_cube_config_SRCS cube_config.cpp)
|
||||
qt5_wrap_ui(kwin_cube_config_SRCS cube_config.ui)
|
||||
qt5_add_dbus_interface(kwin_cube_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_cube_config_SRCS cubeconfig.kcfgc)
|
||||
|
||||
add_library(kwin_cube_config MODULE ${kwin_cube_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_cube_config
|
||||
kwineffects
|
||||
KF5::ConfigWidgets
|
||||
KF5::GlobalAccel
|
||||
KF5::I18n
|
||||
|
@ -53,6 +53,7 @@ kservice_desktop_to_json(kwin_cube_config cube_config.desktop)
|
|||
# cube slide
|
||||
set(kwin_cubeslide_config_SRCS cubeslide_config.cpp)
|
||||
qt5_wrap_ui(kwin_cubeslide_config_SRCS cubeslide_config.ui)
|
||||
qt5_add_dbus_interface(kwin_cubeslide_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_cubeslide_config_SRCS cubeslideconfig.kcfgc)
|
||||
|
||||
add_library(kwin_cubeslide_config MODULE ${kwin_cubeslide_config_SRCS})
|
||||
|
|
|
@ -20,9 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "cube_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "cubeconfig.h"
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <kconfiggroup.h>
|
||||
#include <kcolorscheme.h>
|
||||
|
@ -30,6 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <KAboutData>
|
||||
#include <KGlobalAccel>
|
||||
#include <KLocalizedString>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QColor>
|
||||
|
@ -90,7 +91,10 @@ void CubeEffectConfig::save()
|
|||
{
|
||||
KCModule::save();
|
||||
m_ui->editor->save();
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("cube"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_cube"));
|
||||
}
|
||||
|
||||
void CubeEffectConfig::capsSelectionChanged()
|
||||
|
|
|
@ -20,11 +20,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "cubeslide_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "cubeslideconfig.h"
|
||||
|
||||
#include <kwineffects.h>
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <kconfiggroup.h>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
K_PLUGIN_FACTORY_WITH_JSON(CubeSlideEffectConfigFactory,
|
||||
|
@ -56,7 +56,10 @@ CubeSlideEffectConfig::CubeSlideEffectConfig(QWidget* parent, const QVariantList
|
|||
void CubeSlideEffectConfig::save()
|
||||
{
|
||||
KCModule::save();
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("cubeslide"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_cubeslide"));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -8,12 +8,13 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_dashboard_config_SRCS dashboard_config.cpp)
|
||||
qt5_wrap_ui(kwin_dashboard_config_SRCS dashboard_config.ui)
|
||||
qt5_add_dbus_interface(kwin_dashboard_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_dashboard_config_SRCS dashboardconfig.kcfgc)
|
||||
|
||||
add_library(kwin_dashboard_config MODULE ${kwin_dashboard_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_dashboard_config
|
||||
kwineffects
|
||||
Qt5::DBus
|
||||
KF5::ConfigWidgets
|
||||
KF5::I18n
|
||||
KF5::Service
|
||||
|
|
|
@ -21,8 +21,9 @@
|
|||
// KConfigSkeleton
|
||||
#include "dashboardconfig.h"
|
||||
|
||||
#include <kwineffects.h>
|
||||
#include <kwineffects_interface.h>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
K_PLUGIN_FACTORY_WITH_JSON(DashboardEffectConfigFactory,
|
||||
"dashboard_config.json",
|
||||
|
@ -49,7 +50,10 @@ void DashboardEffectConfig::save()
|
|||
{
|
||||
KCModule::save();
|
||||
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("dashboard"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_dashboard"));
|
||||
}
|
||||
|
||||
} // namespace KWin
|
||||
|
|
|
@ -12,6 +12,7 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_desktopgrid_config_SRCS desktopgrid_config.cpp)
|
||||
qt5_wrap_ui(kwin_desktopgrid_config_SRCS desktopgrid_config.ui)
|
||||
qt5_add_dbus_interface(kwin_desktopgrid_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_desktopgrid_config_SRCS desktopgridconfig.kcfgc)
|
||||
|
||||
add_library(kwin_desktopgrid_config MODULE ${kwin_desktopgrid_config_SRCS})
|
||||
|
|
|
@ -22,15 +22,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "desktopgrid_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "desktopgridconfig.h"
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <kconfiggroup.h>
|
||||
#include <KActionCollection>
|
||||
#include <KAboutData>
|
||||
#include <KGlobalAccel>
|
||||
#include <KLocalizedString>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
@ -106,7 +107,10 @@ void DesktopGridEffectConfig::save()
|
|||
conf.writeEntry("DesktopNameAlignment", DesktopGridConfig::desktopNameAlignment());
|
||||
conf.sync();
|
||||
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("desktopgrid"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_desktopgrid"));
|
||||
}
|
||||
|
||||
void DesktopGridEffectConfig::load()
|
||||
|
|
|
@ -8,12 +8,13 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_diminactive_config_SRCS diminactive_config.cpp)
|
||||
qt5_wrap_ui(kwin_diminactive_config_SRCS diminactive_config.ui)
|
||||
qt5_add_dbus_interface(kwin_diminactive_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_diminactive_config_SRCS diminactiveconfig.kcfgc)
|
||||
|
||||
add_library(kwin_diminactive_config MODULE ${kwin_diminactive_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_diminactive_config
|
||||
kwineffects
|
||||
Qt5::DBus
|
||||
KF5::ConfigWidgets
|
||||
KF5::I18n
|
||||
KF5::Service
|
||||
|
|
|
@ -22,11 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// KConfigSkeleton
|
||||
#include "diminactiveconfig.h"
|
||||
|
||||
#include <kwineffects.h>
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <KLocalizedString>
|
||||
#include <kconfiggroup.h>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QWidget>
|
||||
#include <QVBoxLayout>
|
||||
|
@ -60,7 +61,10 @@ DimInactiveEffectConfig::DimInactiveEffectConfig(QWidget* parent, const QVariant
|
|||
void DimInactiveEffectConfig::save()
|
||||
{
|
||||
KCModule::save();
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("diminactive"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_diminactive"));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -8,12 +8,12 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_flipswitch_config_SRCS flipswitch_config.cpp)
|
||||
qt5_wrap_ui(kwin_flipswitch_config_SRCS flipswitch_config.ui)
|
||||
qt5_add_dbus_interface(kwin_flipswitch_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_flipswitch_config_SRCS flipswitchconfig.kcfgc)
|
||||
|
||||
add_library(kwin_flipswitch_config MODULE ${kwin_flipswitch_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_flipswitch_config
|
||||
kwineffects
|
||||
KF5::ConfigWidgets
|
||||
KF5::GlobalAccel
|
||||
KF5::I18n
|
||||
|
|
|
@ -20,15 +20,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "flipswitch_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "flipswitchconfig.h"
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <kconfiggroup.h>
|
||||
#include <KActionCollection>
|
||||
#include <KAboutData>
|
||||
#include <KGlobalAccel>
|
||||
#include <KLocalizedString>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
@ -81,7 +82,10 @@ void FlipSwitchEffectConfig::save()
|
|||
KCModule::save();
|
||||
m_ui->shortcutEditor->save();
|
||||
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("flipswitch"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_flipswitch"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -8,12 +8,13 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_glide_config_SRCS glide_config.cpp)
|
||||
qt5_wrap_ui(kwin_glide_config_SRCS glide_config.ui)
|
||||
qt5_add_dbus_interface(kwin_glide_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_glide_config_SRCS glideconfig.kcfgc)
|
||||
|
||||
add_library(kwin_glide_config MODULE ${kwin_glide_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_glide_config
|
||||
kwineffects
|
||||
Qt5::DBus
|
||||
KF5::ConfigWidgets
|
||||
KF5::I18n
|
||||
KF5::Service
|
||||
|
|
|
@ -22,8 +22,9 @@
|
|||
// KConfigSkeleton
|
||||
#include "glideconfig.h"
|
||||
|
||||
#include <kwineffects.h>
|
||||
#include <kwineffects_interface.h>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
K_PLUGIN_FACTORY_WITH_JSON(GlideEffectConfigFactory,
|
||||
"glide_config.json",
|
||||
|
@ -47,7 +48,10 @@ GlideEffectConfig::~GlideEffectConfig()
|
|||
void GlideEffectConfig::save()
|
||||
{
|
||||
KCModule::save();
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("glide"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_glide"));
|
||||
}
|
||||
} // namespace KWin
|
||||
#include "glide_config.moc"
|
||||
|
|
|
@ -17,11 +17,11 @@ install( FILES
|
|||
#######################################
|
||||
# Config
|
||||
set(kwin_invert_config_SRCS invert_config.cpp)
|
||||
qt5_add_dbus_interface(kwin_invert_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
|
||||
add_library(kwin_invert_config MODULE ${kwin_invert_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_invert_config
|
||||
kwineffects
|
||||
KF5::ConfigWidgets
|
||||
KF5::GlobalAccel
|
||||
KF5::I18n
|
||||
|
|
|
@ -19,15 +19,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*********************************************************************/
|
||||
|
||||
#include "invert_config.h"
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KGlobalAccel>
|
||||
#include <KLocalizedString>
|
||||
#include <KActionCollection>
|
||||
#include <KShortcutsEditor>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
@ -86,7 +87,10 @@ void InvertEffectConfig::save()
|
|||
mShortcutEditor->save(); // undo() will restore to this state from now on
|
||||
|
||||
emit changed(false);
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("invert"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_invert"));
|
||||
}
|
||||
|
||||
void InvertEffectConfig::defaults()
|
||||
|
|
|
@ -18,12 +18,12 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_lookingglass_config_SRCS lookingglass_config.cpp)
|
||||
qt5_wrap_ui(kwin_lookingglass_config_SRCS lookingglass_config.ui)
|
||||
qt5_add_dbus_interface(kwin_lookingglass_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_lookingglass_config_SRCS lookingglassconfig.kcfgc)
|
||||
|
||||
add_library(kwin_lookingglass_config MODULE ${kwin_lookingglass_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_lookingglass_config
|
||||
kwineffects
|
||||
KF5::ConfigWidgets
|
||||
KF5::GlobalAccel
|
||||
KF5::I18n
|
||||
|
|
|
@ -22,15 +22,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
// KConfigSkeleton
|
||||
#include "lookingglassconfig.h"
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KGlobalAccel>
|
||||
#include <KLocalizedString>
|
||||
#include <kconfiggroup.h>
|
||||
#include <KActionCollection>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QWidget>
|
||||
|
@ -98,7 +99,10 @@ void LookingGlassEffectConfig::save()
|
|||
|
||||
m_ui->editor->save(); // undo() will restore to this state from now on
|
||||
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("lookingglass"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_lookingglass"));
|
||||
}
|
||||
|
||||
void LookingGlassEffectConfig::defaults()
|
||||
|
|
|
@ -8,12 +8,13 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_magiclamp_config_SRCS magiclamp_config.cpp)
|
||||
qt5_wrap_ui(kwin_magiclamp_config_SRCS magiclamp_config.ui)
|
||||
qt5_add_dbus_interface(kwin_magiclamp_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_magiclamp_config_SRCS magiclampconfig.kcfgc)
|
||||
|
||||
add_library(kwin_magiclamp_config MODULE ${kwin_magiclamp_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_magiclamp_config
|
||||
kwineffects
|
||||
Qt5::DBus
|
||||
KF5::ConfigWidgets
|
||||
KF5::I18n
|
||||
KF5::Service
|
||||
|
|
|
@ -21,10 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// KConfigSkeleton
|
||||
#include "magiclampconfig.h"
|
||||
|
||||
#include <kwineffects.h>
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <kconfiggroup.h>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
@ -57,7 +58,10 @@ MagicLampEffectConfig::MagicLampEffectConfig(QWidget* parent, const QVariantList
|
|||
void MagicLampEffectConfig::save()
|
||||
{
|
||||
KCModule::save();
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("magiclamp"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_magiclamp"));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -8,12 +8,12 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_magnifier_config_SRCS magnifier_config.cpp)
|
||||
qt5_wrap_ui(kwin_magnifier_config_SRCS magnifier_config.ui)
|
||||
qt5_add_dbus_interface(kwin_magnifier_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_magnifier_config_SRCS magnifierconfig.kcfgc)
|
||||
|
||||
add_library(kwin_magnifier_config MODULE ${kwin_magnifier_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_magnifier_config
|
||||
kwineffects
|
||||
KF5::ConfigWidgets
|
||||
KF5::GlobalAccel
|
||||
KF5::I18n
|
||||
|
|
|
@ -21,15 +21,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "magnifier_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "magnifierconfig.h"
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KGlobalAccel>
|
||||
#include <KLocalizedString>
|
||||
#include <kconfiggroup.h>
|
||||
#include <KActionCollection>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QWidget>
|
||||
|
@ -99,7 +100,10 @@ void MagnifierEffectConfig::save()
|
|||
|
||||
m_ui->editor->save(); // undo() will restore to this state from now on
|
||||
KCModule::save();
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("magnifier"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_magnifier"));
|
||||
}
|
||||
|
||||
void MagnifierEffectConfig::defaults()
|
||||
|
|
|
@ -10,12 +10,12 @@ install( FILES
|
|||
##########################
|
||||
set(kwin_mouseclick_config_SRCS mouseclick_config.cpp)
|
||||
qt5_wrap_ui(kwin_mouseclick_config_SRCS mouseclick_config.ui)
|
||||
qt5_add_dbus_interface(kwin_mouseclick_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_mouseclick_config_SRCS mouseclickconfig.kcfgc)
|
||||
|
||||
add_library(kwin_mouseclick_config MODULE ${kwin_mouseclick_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_mouseclick_config
|
||||
kwineffects
|
||||
KF5::ConfigWidgets
|
||||
KF5::GlobalAccel
|
||||
KF5::I18n
|
||||
|
|
|
@ -21,14 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "mouseclick_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "mouseclickconfig.h"
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KActionCollection>
|
||||
#include <KAboutData>
|
||||
#include <KGlobalAccel>
|
||||
#include <KLocalizedString>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
|
@ -79,7 +80,10 @@ void MouseClickEffectConfig::save()
|
|||
{
|
||||
KCModule::save();
|
||||
m_ui->editor->save(); // undo() will restore to this state from now on
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("mouseclick"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_mouseclick"));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -8,12 +8,12 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_mousemark_config_SRCS mousemark_config.cpp)
|
||||
qt5_wrap_ui(kwin_mousemark_config_SRCS mousemark_config.ui)
|
||||
qt5_add_dbus_interface(kwin_mousemark_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_mousemark_config_SRCS mousemarkconfig.kcfgc)
|
||||
|
||||
add_library(kwin_mousemark_config MODULE ${kwin_mousemark_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_mousemark_config
|
||||
kwineffects
|
||||
KF5::ConfigWidgets
|
||||
KF5::GlobalAccel
|
||||
KF5::I18n
|
||||
|
|
|
@ -22,14 +22,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
// KConfigSkeleton
|
||||
#include "mousemarkconfig.h"
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KLocalizedString>
|
||||
#include <KActionCollection>
|
||||
#include <KAboutData>
|
||||
#include <KGlobalAccel>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QWidget>
|
||||
|
@ -93,7 +94,10 @@ void MouseMarkEffectConfig::save()
|
|||
m_actionCollection->writeSettings();
|
||||
m_ui->editor->save(); // undo() will restore to this state from now on
|
||||
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("mousemark"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_mousemark"));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -12,12 +12,12 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_presentwindows_config_SRCS presentwindows_config.cpp)
|
||||
qt5_wrap_ui(kwin_presentwindows_config_SRCS presentwindows_config.ui)
|
||||
qt5_add_dbus_interface(kwin_presentwindows_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_presentwindows_config_SRCS presentwindowsconfig.kcfgc)
|
||||
|
||||
add_library(kwin_presentwindows_config MODULE ${kwin_presentwindows_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_presentwindows_config
|
||||
kwineffects
|
||||
KF5::Completion
|
||||
KF5::ConfigWidgets
|
||||
KF5::GlobalAccel
|
||||
|
|
|
@ -22,14 +22,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "presentwindows_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "presentwindowsconfig.h"
|
||||
#include <kwineffects_interface.h>
|
||||
#include <QAction>
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <kconfiggroup.h>
|
||||
#include <KActionCollection>
|
||||
#include <KAboutData>
|
||||
#include <KGlobalAccel>
|
||||
#include <KLocalizedString>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
@ -97,7 +98,10 @@ void PresentWindowsEffectConfig::save()
|
|||
{
|
||||
KCModule::save();
|
||||
m_ui->shortcutEditor->save();
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("presentwindows"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("presentwindows"));
|
||||
}
|
||||
|
||||
void PresentWindowsEffectConfig::defaults()
|
||||
|
|
|
@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <kcmodule.h>
|
||||
|
||||
#include "ui_presentwindows_config.h"
|
||||
#include "presentwindows.h"
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
|
|
@ -8,12 +8,13 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_resize_config_SRCS resize_config.cpp)
|
||||
qt5_wrap_ui(kwin_resize_config_SRCS resize_config.ui)
|
||||
qt5_add_dbus_interface(kwin_resize_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_resize_config_SRCS resizeconfig.kcfgc)
|
||||
|
||||
add_library(kwin_resize_config MODULE ${kwin_resize_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_resize_config
|
||||
kwineffects
|
||||
Qt5::DBus
|
||||
KF5::ConfigWidgets
|
||||
KF5::I18n
|
||||
KF5::Service
|
||||
|
|
|
@ -20,11 +20,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "resize_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "resizeconfig.h"
|
||||
|
||||
#include <kwineffects.h>
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <kconfiggroup.h>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
@ -57,7 +57,10 @@ ResizeEffectConfig::ResizeEffectConfig(QWidget* parent, const QVariantList& args
|
|||
void ResizeEffectConfig::save()
|
||||
{
|
||||
KCModule::save();
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("resize"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_resize"));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -8,12 +8,13 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_showfps_config_SRCS showfps_config.cpp)
|
||||
qt5_wrap_ui(kwin_showfps_config_SRCS showfps_config.ui)
|
||||
qt5_add_dbus_interface(kwin_showfps_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_showfps_config_SRCS showfpsconfig.kcfgc)
|
||||
|
||||
add_library(kwin_showfps_config MODULE ${kwin_showfps_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_showfps_config
|
||||
kwineffects
|
||||
Qt5::DBus
|
||||
KF5::Completion
|
||||
KF5::ConfigWidgets
|
||||
KF5::I18n
|
||||
|
|
|
@ -22,13 +22,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
// KConfigSkeleton
|
||||
#include "showfpsconfig.h"
|
||||
|
||||
#include "showfps.h"
|
||||
|
||||
#include <kwineffects.h>
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <KLocalizedString>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
K_PLUGIN_FACTORY_WITH_JSON(ShowFpsEffectConfigFactory,
|
||||
"showfps_config.json",
|
||||
|
@ -56,7 +54,10 @@ ShowFpsEffectConfig::~ShowFpsEffectConfig()
|
|||
void ShowFpsEffectConfig::save()
|
||||
{
|
||||
KCModule::save();
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("showfps"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_showfps"));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -8,12 +8,12 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_thumbnailaside_config_SRCS thumbnailaside_config.cpp)
|
||||
qt5_wrap_ui(kwin_thumbnailaside_config_SRCS thumbnailaside_config.ui)
|
||||
qt5_add_dbus_interface(kwin_thumbnailaside_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_thumbnailaside_config_SRCS thumbnailasideconfig.kcfgc)
|
||||
|
||||
add_library(kwin_thumbnailaside_config MODULE ${kwin_thumbnailaside_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_thumbnailaside_config
|
||||
kwineffects
|
||||
KF5::ConfigWidgets
|
||||
KF5::GlobalAccel
|
||||
KF5::I18n
|
||||
|
|
|
@ -21,15 +21,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "thumbnailaside_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "thumbnailasideconfig.h"
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KLocalizedString>
|
||||
#include <kconfiggroup.h>
|
||||
#include <KActionCollection>
|
||||
#include <KAboutData>
|
||||
#include <KGlobalAccel>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QWidget>
|
||||
#include <QVBoxLayout>
|
||||
|
@ -85,7 +86,10 @@ ThumbnailAsideEffectConfig::~ThumbnailAsideEffectConfig()
|
|||
void ThumbnailAsideEffectConfig::save()
|
||||
{
|
||||
KCModule::save();
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("thumbnailaside"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_thumbnailaside"));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -16,12 +16,12 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_trackmouse_config_SRCS trackmouse_config.cpp)
|
||||
qt5_wrap_ui(kwin_trackmouse_config_SRCS trackmouse_config.ui)
|
||||
qt5_add_dbus_interface(kwin_trackmouse_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_trackmouse_config_SRCS trackmouseconfig.kcfgc)
|
||||
|
||||
add_library(kwin_trackmouse_config MODULE ${kwin_trackmouse_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_trackmouse_config
|
||||
kwineffects
|
||||
KF5::ConfigWidgets
|
||||
KF5::GlobalAccel
|
||||
KF5::I18n
|
||||
|
|
|
@ -20,12 +20,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*********************************************************************/
|
||||
|
||||
#include <QAction>
|
||||
#include <kwineffects.h>
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <KLocalizedString>
|
||||
#include <KActionCollection>
|
||||
#include <KAboutData>
|
||||
#include <KGlobalAccel>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
|
@ -98,7 +99,10 @@ void TrackMouseEffectConfig::save()
|
|||
{
|
||||
KCModule::save();
|
||||
m_actionCollection->writeSettings();
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("trackmouse"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_trackmouse"));
|
||||
}
|
||||
|
||||
void TrackMouseEffectConfig::defaults()
|
||||
|
|
|
@ -8,12 +8,12 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_windowgeometry_config_SRCS windowgeometry_config.cpp)
|
||||
qt5_wrap_ui(kwin_windowgeometry_config_SRCS windowgeometry_config.ui)
|
||||
qt5_add_dbus_interface(kwin_windowgeometry_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_windowgeometry_config_SRCS windowgeometryconfig.kcfgc)
|
||||
|
||||
add_library(kwin_windowgeometry_config MODULE ${kwin_windowgeometry_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_windowgeometry_config
|
||||
kwineffects
|
||||
KF5::ConfigWidgets
|
||||
KF5::GlobalAccel
|
||||
KF5::I18n
|
||||
|
|
|
@ -21,14 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "windowgeometry_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "windowgeometryconfig.h"
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <kwineffects.h>
|
||||
#include <KActionCollection>
|
||||
#include <KGlobalAccel>
|
||||
#include <KLocalizedString>
|
||||
#include <kconfiggroup.h>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
K_PLUGIN_FACTORY_WITH_JSON(WindowGeometryEffectConfigFactory,
|
||||
"windowgeometry_config.json",
|
||||
|
@ -75,7 +76,10 @@ void WindowGeometryConfig::save()
|
|||
{
|
||||
KCModule::save();
|
||||
myUi->shortcuts->save(); // undo() will restore to this state from now on
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("windowgeometry"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_windowgeometry"));
|
||||
}
|
||||
|
||||
void WindowGeometryConfig::defaults()
|
||||
|
|
|
@ -8,12 +8,13 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_wobblywindows_config_SRCS wobblywindows_config.cpp)
|
||||
qt5_wrap_ui(kwin_wobblywindows_config_SRCS wobblywindows_config.ui)
|
||||
qt5_add_dbus_interface(kwin_wobblywindows_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_wobblywindows_config_SRCS wobblywindowsconfig.kcfgc)
|
||||
|
||||
add_library(kwin_wobblywindows_config MODULE ${kwin_wobblywindows_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_wobblywindows_config
|
||||
kwineffects
|
||||
Qt5::DBus
|
||||
KF5::ConfigWidgets
|
||||
KF5::I18n
|
||||
KF5::Service
|
||||
|
|
|
@ -22,12 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "wobblywindows_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "wobblywindowsconfig.h"
|
||||
|
||||
#include <kwineffects.h>
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <KLocalizedString>
|
||||
#include <KAboutData>
|
||||
#include <kconfiggroup.h>
|
||||
#include <KPluginFactory>
|
||||
|
||||
K_PLUGIN_FACTORY_WITH_JSON(WobblyWindowsEffectConfigFactory,
|
||||
"wobblywindows_config.json",
|
||||
|
@ -98,7 +98,10 @@ void WobblyWindowsEffectConfig::save()
|
|||
{
|
||||
KCModule::save();
|
||||
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("wobblywindows"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_wobblywindows"));
|
||||
}
|
||||
|
||||
void WobblyWindowsEffectConfig::wobblinessChanged()
|
||||
|
|
|
@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <kcmodule.h>
|
||||
|
||||
#include "ui_wobblywindows_config.h"
|
||||
#include "wobblywindows.h"
|
||||
|
||||
|
||||
namespace KWin
|
||||
|
|
|
@ -8,12 +8,12 @@ install( FILES
|
|||
# Config
|
||||
set(kwin_zoom_config_SRCS zoom_config.cpp)
|
||||
qt5_wrap_ui(kwin_zoom_config_SRCS zoom_config.ui)
|
||||
qt5_add_dbus_interface(kwin_zoom_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
kconfig_add_kcfg_files(kwin_zoom_config_SRCS zoomconfig.kcfgc)
|
||||
|
||||
add_library(kwin_zoom_config MODULE ${kwin_zoom_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_zoom_config
|
||||
kwineffects
|
||||
KF5::ConfigWidgets
|
||||
KF5::GlobalAccel
|
||||
KF5::I18n
|
||||
|
|
|
@ -22,14 +22,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "zoom_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "zoomconfig.h"
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KGlobalAccel>
|
||||
#include <KLocalizedString>
|
||||
#include <KActionCollection>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
@ -135,7 +136,10 @@ void ZoomEffectConfig::save()
|
|||
{
|
||||
m_ui->editor->save(); // undo() will restore to this state from now on
|
||||
KCModule::save();
|
||||
EffectsHandler::sendReloadMessage(QStringLiteral("zoom"));
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_zoom"));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "kwinxrenderutils.h"
|
||||
#include "config-kwin.h"
|
||||
|
||||
#include <QtDBus/QtDBus>
|
||||
#include <qmath.h>
|
||||
#include <QVariant>
|
||||
#include <QList>
|
||||
#include <QTimeLine>
|
||||
|
@ -629,16 +629,6 @@ bool EffectsHandler::isOpenGLCompositing() const
|
|||
return compositing_type & OpenGLCompositing;
|
||||
}
|
||||
|
||||
void EffectsHandler::sendReloadMessage(const QString& effectname)
|
||||
{
|
||||
QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kwin"),
|
||||
QStringLiteral("/KWin"),
|
||||
QStringLiteral("org.kde.KWin"),
|
||||
QStringLiteral("reconfigureEffect"));
|
||||
message << QString(QStringLiteral("kwin4_effect_") + effectname);
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
}
|
||||
|
||||
KConfigGroup EffectsHandler::effectConfig(const QString& effectname)
|
||||
{
|
||||
KSharedConfig::Ptr kwinconfig = KSharedConfig::openConfig(QStringLiteral(KWIN_CONFIG), KConfig::NoGlobals);
|
||||
|
|
|
@ -1023,12 +1023,6 @@ public:
|
|||
*/
|
||||
virtual void doneOpenGLContextCurrent() = 0;
|
||||
|
||||
/**
|
||||
* Sends message over DCOP to reload given effect.
|
||||
* @param effectname effect's name without "kwin4_effect_" prefix.
|
||||
* Can be called from effect's config module to apply config changes.
|
||||
**/
|
||||
static void sendReloadMessage(const QString& effectname);
|
||||
/**
|
||||
* @return @ref KConfigGroup which holds given effect's config options
|
||||
**/
|
||||
|
|
Loading…
Reference in a new issue