diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt index b4cf83a52f..4c575d5a4d 100644 --- a/effects/CMakeLists.txt +++ b/effects/CMakeLists.txt @@ -59,46 +59,68 @@ macro( KWIN4_ADD_EFFECT name ) endmacro() -macro( KWIN4_ADD_EFFECT_CONFIG name ) - set( kwin4_effect_ui ) # Initially empty - set( kwin4_effect_src ) # Initially empty - - foreach( file ${ARGN} ) - if( file MATCHES \\.ui ) - set( kwin4_effect_ui ${kwin4_effect_ui} ${file} ) - else() - set( kwin4_effect_src ${kwin4_effect_src} ${file} ) - endif() - endforeach() - - kde4_add_ui_files( kwin4_effect_src ${kwin4_effect_ui} ) - add_library( kcm_kwin4_effect_${name} MODULE ${kwin4_effect_src} ) - if(OPENGLES_FOUND) - set_target_properties(kcm_kwin4_effect_${name} PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGLES") - endif() - target_link_libraries( kcm_kwin4_effect_${name} - kwineffects - Qt5::Widgets - Qt5::Quick - KF5::KIOWidgets # KUrlRequester - KF5::CoreAddons - KF5::Completion - KF5::ConfigWidgets - KF5::GlobalAccel - KF5::I18n - KF5::XmlGui - ) - install( TARGETS kcm_kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR} ) -endmacro() - # Install the KWin/Effect service type install( FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) # Create initial variables -set( kwin4_effect_builtins_sources logging.cpp effect_builtins.cpp) -set( kwin4_effect_builtins_config_sources configs_builtins.cpp ) set( kwin4_effect_include_directories ) +set( kwin4_effect_builtins_sources + logging.cpp + effect_builtins.cpp + blur/blur.cpp + blur/blurshader.cpp + cube/cube.cpp + cube/cube_proxy.cpp + cube/cubeslide.cpp + coverswitch/coverswitch.cpp + dashboard/dashboard.cpp + desktopgrid/desktopgrid.cpp + diminactive/diminactive.cpp + flipswitch/flipswitch.cpp + glide/glide.cpp + invert/invert.cpp + lookingglass/lookingglass.cpp + magiclamp/magiclamp.cpp + magnifier/magnifier.cpp + mouseclick/mouseclick.cpp + mousemark/mousemark.cpp + presentwindows/presentwindows.cpp + presentwindows/presentwindows_proxy.cpp + resize/resize.cpp + showfps/showfps.cpp + thumbnailaside/thumbnailaside.cpp + trackmouse/trackmouse.cpp + windowgeometry/windowgeometry.cpp + wobblywindows/wobblywindows.cpp + zoom/zoom.cpp + ) + +kconfig_add_kcfg_files(kwin4_effect_builtins_sources + blur/blurconfig.kcfgc + cube/cubeslideconfig.kcfgc + cube/cubeconfig.kcfgc + coverswitch/coverswitchconfig.kcfgc + dashboard/dashboardconfig.kcfgc + desktopgrid/desktopgridconfig.kcfgc + diminactive/diminactiveconfig.kcfgc + flipswitch/flipswitchconfig.kcfgc + glide/glideconfig.kcfgc + lookingglass/lookingglassconfig.kcfgc + magiclamp/magiclampconfig.kcfgc + magnifier/magnifierconfig.kcfgc + mouseclick/mouseclickconfig.kcfgc + mousemark/mousemarkconfig.kcfgc + presentwindows/presentwindowsconfig.kcfgc + resize/resizeconfig.kcfgc + showfps/showfpsconfig.kcfgc + thumbnailaside/thumbnailasideconfig.kcfgc + trackmouse/trackmouseconfig.kcfgc + windowgeometry/windowgeometryconfig.kcfgc + wobblywindows/wobblywindowsconfig.kcfgc + zoom/zoomconfig.kcfgc + ) + # scripted effects add_subdirectory( dialogparent ) add_subdirectory( fade ) @@ -112,49 +134,48 @@ add_subdirectory( translucency ) # Built-in effects go here # Common effects -include( dashboard/CMakeLists.txt ) -include( desktopgrid/CMakeLists.txt ) -include( diminactive/CMakeLists.txt ) +add_subdirectory( dashboard ) +add_subdirectory( desktopgrid ) +add_subdirectory( diminactive ) include( dimscreen/CMakeLists.txt ) include( fallapart/CMakeLists.txt ) include( highlightwindow/CMakeLists.txt ) include( kscreen/CMakeLists.txt ) -include( magiclamp/CMakeLists.txt ) +add_subdirectory( magiclamp ) include( minimizeanimation/CMakeLists.txt ) -include( presentwindows/CMakeLists.txt ) -include( resize/CMakeLists.txt ) +add_subdirectory( presentwindows ) +add_subdirectory( resize ) include( screenedge/CMakeLists.txt ) -include( showfps/CMakeLists.txt ) +add_subdirectory( showfps ) include( showpaint/CMakeLists.txt ) include( slide/CMakeLists.txt ) include( slideback/CMakeLists.txt ) include( slidingpopups/CMakeLists.txt ) -include( thumbnailaside/CMakeLists.txt ) -include( windowgeometry/CMakeLists.txt ) -include( zoom/CMakeLists.txt ) +add_subdirectory( thumbnailaside ) +add_subdirectory( windowgeometry ) +add_subdirectory( zoom ) include( logout/CMakeLists.txt ) # OpenGL-specific effects -include( blur/CMakeLists.txt ) +add_subdirectory( blur ) include( backgroundcontrast/CMakeLists.txt ) -include( coverswitch/CMakeLists.txt ) -include( cube/CMakeLists.txt ) -include( flipswitch/CMakeLists.txt ) -include( glide/CMakeLists.txt ) -include( invert/CMakeLists.txt ) -include( lookingglass/CMakeLists.txt ) -include( magnifier/CMakeLists.txt ) -include( mouseclick/CMakeLists.txt ) -include( mousemark/CMakeLists.txt ) +add_subdirectory( coverswitch ) +add_subdirectory( cube ) +add_subdirectory( flipswitch ) +add_subdirectory( glide ) +add_subdirectory( invert ) +add_subdirectory( lookingglass ) +add_subdirectory( magnifier ) +add_subdirectory( mouseclick ) +add_subdirectory( mousemark ) include( screenshot/CMakeLists.txt ) include( sheet/CMakeLists.txt ) include( snaphelper/CMakeLists.txt ) include( startupfeedback/CMakeLists.txt ) -include( trackmouse/CMakeLists.txt ) -include( wobblywindows/CMakeLists.txt ) +add_subdirectory( trackmouse ) +add_subdirectory( wobblywindows ) ############################################################################### # Add the builtins plugin kwin4_add_effect( builtins ${kwin4_effect_builtins_sources} ) -kwin4_add_effect_config( builtins ${kwin4_effect_builtins_config_sources} ) diff --git a/effects/blur/CMakeLists.txt b/effects/blur/CMakeLists.txt index c99f7ee091..71ddaf0689 100644 --- a/effects/blur/CMakeLists.txt +++ b/effects/blur/CMakeLists.txt @@ -1,30 +1,31 @@ ####################################### # Effect -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - blur/blur.cpp - blur/blurshader.cpp ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources blur/blurconfig.kcfgc) - # .desktop files install( FILES - blur/blur.desktop + blur.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_blur_config_SRCS blur_config.cpp) +qt5_wrap_ui(kwin_blur_config_SRCS blur_config.ui) +kconfig_add_kcfg_files(kwin_blur_config_SRCS blurconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - blur/blur_config.cpp - blur/blur_config.ui ) +add_library(kwin_blur_config MODULE ${kwin_blur_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources blur/blurconfig.kcfgc) +target_link_libraries(kwin_blur_config + kwineffects + KF5::ConfigWidgets + KF5::I18n + KF5::Service +) -# .desktop files -install( FILES - blur/blur_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_blur_config blur_config.desktop) +install( + TARGETS + kwin_blur_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/blur/blur_config.cpp b/effects/blur/blur_config.cpp index 51675492f7..82d58d34c9 100644 --- a/effects/blur/blur_config.cpp +++ b/effects/blur/blur_config.cpp @@ -24,11 +24,13 @@ #include #include +K_PLUGIN_FACTORY_WITH_JSON(BlurEffectConfigFactory, + "blur_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - BlurEffectConfig::BlurEffectConfig(QWidget *parent, const QVariantList &args) : KCModule(KAboutData::pluginData(QStringLiteral("blur")), parent, args) { @@ -51,4 +53,4 @@ void BlurEffectConfig::save() } // namespace KWin -#include "moc_blur_config.cpp" +#include "blur_config.moc" diff --git a/effects/blur/blur_config.desktop b/effects/blur/blur_config.desktop index 6961d8d9fd..dfbd1307da 100644 --- a/effects/blur/blur_config.desktop +++ b/effects/blur/blur_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_blur_config X-KDE-ParentComponents=kwin4_effect_blur -X-KDE-PluginKeyword=blur Name=Blur Name[af]=Blur diff --git a/effects/configs_builtins.cpp b/effects/configs_builtins.cpp deleted file mode 100644 index 5614f4aa55..0000000000 --- a/effects/configs_builtins.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2007 Bernhard Loos -Copyright (C) 2007 Christian Nitschkowski -Copyright (C) 2009 Lucas Murray - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ - -#include - -#include "dashboard/dashboard_config.h" -#include "desktopgrid/desktopgrid_config.h" -#include "diminactive/diminactive_config.h" -#include "magiclamp/magiclamp_config.h" -#include "presentwindows/presentwindows_config.h" -#include "resize/resize_config.h" -#include "showfps/showfps_config.h" -#include "thumbnailaside/thumbnailaside_config.h" -#include "windowgeometry/windowgeometry_config.h" -#include "zoom/zoom_config.h" - -#include "blur/blur_config.h" -#include "coverswitch/coverswitch_config.h" -#include "cube/cube_config.h" -#include "cube/cubeslide_config.h" -#include "flipswitch/flipswitch_config.h" -#include "glide/glide_config.h" -#include "invert/invert_config.h" -#include "lookingglass/lookingglass_config.h" -#include "magnifier/magnifier_config.h" -#include "mouseclick/mouseclick_config.h" -#include "mousemark/mousemark_config.h" -#include "trackmouse/trackmouse_config.h" -#include "wobblywindows/wobblywindows_config.h" - -#include - -#include - -namespace KWin -{ - -KWIN_EFFECT_CONFIG_MULTIPLE(builtins, - KWIN_EFFECT_CONFIG_SINGLE(dashboard, DashboardEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(desktopgrid, DesktopGridEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(diminactive, DimInactiveEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(magiclamp, MagicLampEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(presentwindows, PresentWindowsEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(resize, ResizeEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(showfps, ShowFpsEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(thumbnailaside, ThumbnailAsideEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(windowgeometry, WindowGeometryConfig) - KWIN_EFFECT_CONFIG_SINGLE(zoom, ZoomEffectConfig) - - KWIN_EFFECT_CONFIG_SINGLE(blur, BlurEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(coverswitch, CoverSwitchEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(cube, CubeEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(cubeslide, CubeSlideEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(flipswitch, FlipSwitchEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(glide, GlideEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(invert, InvertEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(lookingglass, LookingGlassEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(mouseclick, MouseClickEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(magnifier, MagnifierEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(mousemark, MouseMarkEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(trackmouse, TrackMouseEffectConfig) - KWIN_EFFECT_CONFIG_SINGLE(wobblywindows, WobblyWindowsEffectConfig) - ) - -} // namespace - -#include "configs_builtins.moc" diff --git a/effects/coverswitch/CMakeLists.txt b/effects/coverswitch/CMakeLists.txt index 79492287f5..4192e2e45f 100644 --- a/effects/coverswitch/CMakeLists.txt +++ b/effects/coverswitch/CMakeLists.txt @@ -1,37 +1,37 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - coverswitch/coverswitch.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources coverswitch/coverswitchconfig.kcfgc) - -# .desktop files install( FILES - coverswitch/coverswitch.desktop + coverswitch.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) install( FILES - coverswitch/shaders/1.10/coverswitch-reflection.glsl + shaders/1.10/coverswitch-reflection.glsl DESTINATION ${DATA_INSTALL_DIR}/kwin/shaders/1.10 ) install( FILES - coverswitch/shaders/1.40/coverswitch-reflection.glsl + shaders/1.40/coverswitch-reflection.glsl DESTINATION ${DATA_INSTALL_DIR}/kwin/shaders/1.40 ) ####################################### # Config +set(kwin_coverswitch_config_SRCS coverswitch_config.cpp) +qt5_wrap_ui(kwin_coverswitch_config_SRCS coverswitch_config.ui) +kconfig_add_kcfg_files(kwin_coverswitch_config_SRCS coverswitchconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - coverswitch/coverswitch_config.cpp - coverswitch/coverswitch_config.ui - ) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources coverswitch/coverswitchconfig.kcfgc) +add_library(kwin_coverswitch_config MODULE ${kwin_coverswitch_config_SRCS}) -# .desktop files -install( FILES - coverswitch/coverswitch_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +target_link_libraries(kwin_coverswitch_config + kwineffects + KF5::ConfigWidgets + KF5::I18n + KF5::Service +) + +kservice_desktop_to_json(kwin_coverswitch_config coverswitch_config.desktop) + +install( + TARGETS + kwin_coverswitch_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/coverswitch/coverswitch_config.cpp b/effects/coverswitch/coverswitch_config.cpp index d8ad4fde0f..60732523e0 100644 --- a/effects/coverswitch/coverswitch_config.cpp +++ b/effects/coverswitch/coverswitch_config.cpp @@ -26,11 +26,13 @@ along with this program. If not, see . #include +K_PLUGIN_FACTORY_WITH_JSON(CoverSwitchEffectConfigFactory, + "coverswitch_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - CoverSwitchEffectConfigForm::CoverSwitchEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -56,4 +58,4 @@ void CoverSwitchEffectConfig::save() } // namespace -#include "moc_coverswitch_config.cpp" +#include "coverswitch_config.moc" diff --git a/effects/coverswitch/coverswitch_config.desktop b/effects/coverswitch/coverswitch_config.desktop index fffeb3e36e..56cfb4159f 100644 --- a/effects/coverswitch/coverswitch_config.desktop +++ b/effects/coverswitch/coverswitch_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_coverswitch_config X-KDE-ParentComponents=kwin4_effect_coverswitch -X-KDE-PluginKeyword=coverswitch Name=Cover Switch Name[ar]=تبديل الأغلفة diff --git a/effects/cube/CMakeLists.txt b/effects/cube/CMakeLists.txt index 067ff4a073..f074e16733 100644 --- a/effects/cube/CMakeLists.txt +++ b/effects/cube/CMakeLists.txt @@ -1,63 +1,75 @@ ####################################### # Effect -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - cube/cube.cpp - cube/cube_proxy.cpp - cube/cubeslide.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources - cube/cubeslideconfig.kcfgc - cube/cubeconfig.kcfgc - ) - # .desktop files install( FILES - cube/cube.desktop - cube/cubeslide.desktop + cube.desktop + cubeslide.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) # Data files install( FILES - cube/data/cubecap.png + data/cubecap.png DESTINATION ${DATA_INSTALL_DIR}/kwin ) install( FILES - cube/data/1.10/cube-cap.glsl - cube/data/1.10/cube-reflection.glsl - cube/data/1.10/cylinder.vert - cube/data/1.10/sphere.vert + data/1.10/cube-cap.glsl + data/1.10/cube-reflection.glsl + data/1.10/cylinder.vert + data/1.10/sphere.vert DESTINATION ${DATA_INSTALL_DIR}/kwin/shaders/1.10 ) install( FILES - cube/data/1.40/cube-cap.glsl - cube/data/1.40/cube-reflection.glsl - cube/data/1.40/cylinder.vert - cube/data/1.40/sphere.vert + data/1.40/cube-cap.glsl + data/1.40/cube-reflection.glsl + data/1.40/cylinder.vert + data/1.40/sphere.vert DESTINATION ${DATA_INSTALL_DIR}/kwin/shaders/1.40 ) ####################################### # Config -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - cube/cube_config.cpp - cube/cube_config.ui - cube/cubeslide_config.cpp - cube/cubeslide_config.ui - ) +# cube +set(kwin_cube_config_SRCS cube_config.cpp) +qt5_wrap_ui(kwin_cube_config_SRCS cube_config.ui) +kconfig_add_kcfg_files(kwin_cube_config_SRCS cubeconfig.kcfgc) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources - cube/cubeslideconfig.kcfgc - cube/cubeconfig.kcfgc - ) +add_library(kwin_cube_config MODULE ${kwin_cube_config_SRCS}) -# .desktop files -install( FILES - cube/cube_config.desktop - cube/cubeslide_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +target_link_libraries(kwin_cube_config + kwineffects + KF5::ConfigWidgets + KF5::GlobalAccel + KF5::I18n + KF5::XmlGui + KF5::KIOWidgets + KF5::Service +) + +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) +kconfig_add_kcfg_files(kwin_cubeslide_config_SRCS cubeslideconfig.kcfgc) + +add_library(kwin_cubeslide_config MODULE ${kwin_cubeslide_config_SRCS}) + +target_link_libraries(kwin_cubeslide_config + kwineffects + KF5::ConfigWidgets + KF5::I18n + KF5::Service +) + +kservice_desktop_to_json(kwin_cubeslide_config cubeslide_config.desktop) + +install( + TARGETS + kwin_cube_config + kwin_cubeslide_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/cube/cube_config.cpp b/effects/cube/cube_config.cpp index 5bd98b051f..5e826ba496 100644 --- a/effects/cube/cube_config.cpp +++ b/effects/cube/cube_config.cpp @@ -29,15 +29,18 @@ along with this program. If not, see . #include #include #include +#include #include #include +K_PLUGIN_FACTORY_WITH_JSON(CubeEffectConfigFactory, + "cube_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - CubeEffectConfigForm::CubeEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -107,4 +110,4 @@ void CubeEffectConfig::capsSelectionChanged() } // namespace -#include "moc_cube_config.cpp" +#include "cube_config.moc" diff --git a/effects/cube/cube_config.desktop b/effects/cube/cube_config.desktop index ebb6496ee0..bc2bc707fd 100644 --- a/effects/cube/cube_config.desktop +++ b/effects/cube/cube_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_cube_config X-KDE-ParentComponents=kwin4_effect_cube -X-KDE-PluginKeyword=cube Name=Desktop Cube Name[ar]=مكعب سطح المكتب diff --git a/effects/cube/cubeslide_config.cpp b/effects/cube/cubeslide_config.cpp index 425d0e081c..aba6cab5e5 100644 --- a/effects/cube/cubeslide_config.cpp +++ b/effects/cube/cubeslide_config.cpp @@ -27,11 +27,13 @@ along with this program. If not, see . #include #include +K_PLUGIN_FACTORY_WITH_JSON(CubeSlideEffectConfigFactory, + "cubeslide_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - CubeSlideEffectConfigForm::CubeSlideEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -59,4 +61,4 @@ void CubeSlideEffectConfig::save() } // namespace -#include "moc_cubeslide_config.cpp" +#include "cubeslide_config.moc" diff --git a/effects/cube/cubeslide_config.desktop b/effects/cube/cubeslide_config.desktop index ae77f3f8a0..174ce5e8d4 100644 --- a/effects/cube/cubeslide_config.desktop +++ b/effects/cube/cubeslide_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_cubeslide_config X-KDE-ParentComponents=kwin4_effect_cubeslide -X-KDE-PluginKeyword=cubeslide Name=Desktop Cube Animation Name[ar]=تحريك مكعب سطح المكتب diff --git a/effects/dashboard/CMakeLists.txt b/effects/dashboard/CMakeLists.txt index 19153bafc7..fd5c15f407 100644 --- a/effects/dashboard/CMakeLists.txt +++ b/effects/dashboard/CMakeLists.txt @@ -1,28 +1,29 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - dashboard/dashboard.cpp - dashboard/dashboard.cpp ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources dashboard/dashboardconfig.kcfgc) - -# .desktop files install( FILES - dashboard/dashboard.desktop + dashboard.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_dashboard_config_SRCS dashboard_config.cpp) +qt5_wrap_ui(kwin_dashboard_config_SRCS dashboard_config.ui) +kconfig_add_kcfg_files(kwin_dashboard_config_SRCS dashboardconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - dashboard/dashboard_config.cpp - dashboard/dashboard_config.ui ) +add_library(kwin_dashboard_config MODULE ${kwin_dashboard_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources dashboard/dashboardconfig.kcfgc) +target_link_libraries(kwin_dashboard_config + kwineffects + KF5::ConfigWidgets + KF5::I18n + KF5::Service +) -install( FILES - dashboard/dashboard_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_dashboard_config dashboard_config.desktop) + +install( + TARGETS + kwin_dashboard_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/dashboard/dashboard_config.cpp b/effects/dashboard/dashboard_config.cpp index 046e08a84e..d53e235515 100644 --- a/effects/dashboard/dashboard_config.cpp +++ b/effects/dashboard/dashboard_config.cpp @@ -24,11 +24,13 @@ #include #include +K_PLUGIN_FACTORY_WITH_JSON(DashboardEffectConfigFactory, + "dashboard_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - DashboardEffectConfig::DashboardEffectConfig(QWidget *parent, const QVariantList &args) : KCModule(KAboutData::pluginData(QStringLiteral("dashboard")), parent, args) { @@ -52,3 +54,4 @@ void DashboardEffectConfig::save() } // namespace KWin +#include "dashboard_config.moc" diff --git a/effects/dashboard/dashboard_config.desktop b/effects/dashboard/dashboard_config.desktop index af533efb06..28688df4e8 100644 --- a/effects/dashboard/dashboard_config.desktop +++ b/effects/dashboard/dashboard_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_dashboard_config X-KDE-ParentComponents=kwin4_effect_dashboard -X-KDE-PluginKeyword=dashboard Name=Dashboard Name[ar]=لوحة الودجات diff --git a/effects/desktopgrid/CMakeLists.txt b/effects/desktopgrid/CMakeLists.txt index a7acf4a3ab..c7a9f2c880 100644 --- a/effects/desktopgrid/CMakeLists.txt +++ b/effects/desktopgrid/CMakeLists.txt @@ -1,34 +1,37 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - desktopgrid/desktopgrid.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources desktopgrid/desktopgridconfig.kcfgc) - -# .desktop files install( FILES - desktopgrid/desktopgrid.desktop + desktopgrid.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) install( FILES - desktopgrid/main.qml + main.qml DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/desktopgrid/ ) ####################################### # Config +set(kwin_desktopgrid_config_SRCS desktopgrid_config.cpp) +qt5_wrap_ui(kwin_desktopgrid_config_SRCS desktopgrid_config.ui) +kconfig_add_kcfg_files(kwin_desktopgrid_config_SRCS desktopgridconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - desktopgrid/desktopgrid_config.cpp - desktopgrid/desktopgrid_config.ui - ) +add_library(kwin_desktopgrid_config MODULE ${kwin_desktopgrid_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources desktopgrid/desktopgridconfig.kcfgc) +target_link_libraries(kwin_desktopgrid_config + kwineffects + Qt5::Quick + KF5::Completion + KF5::ConfigWidgets + KF5::GlobalAccel + KF5::I18n + KF5::Service + KF5::XmlGui +) -# .desktop files -install( FILES - desktopgrid/desktopgrid_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_desktopgrid_config desktopgrid_config.desktop) + +install( + TARGETS + kwin_desktopgrid_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/desktopgrid/desktopgrid_config.cpp b/effects/desktopgrid/desktopgrid_config.cpp index 3b8f145b20..59587a431b 100644 --- a/effects/desktopgrid/desktopgrid_config.cpp +++ b/effects/desktopgrid/desktopgrid_config.cpp @@ -30,14 +30,17 @@ along with this program. If not, see . #include #include #include +#include #include +K_PLUGIN_FACTORY_WITH_JSON(DesktopGridEffectConfigFactory, + "desktopgrid_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - DesktopGridEffectConfigForm::DesktopGridEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -131,4 +134,4 @@ void DesktopGridEffectConfig::defaults() } // namespace -#include "moc_desktopgrid_config.cpp" +#include "desktopgrid_config.moc" diff --git a/effects/desktopgrid/desktopgrid_config.desktop b/effects/desktopgrid/desktopgrid_config.desktop index 2bf94952d9..a00ae1ddbc 100644 --- a/effects/desktopgrid/desktopgrid_config.desktop +++ b/effects/desktopgrid/desktopgrid_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_desktopgrid_config X-KDE-ParentComponents=kwin4_effect_desktopgrid -X-KDE-PluginKeyword=desktopgrid Name=Desktop Grid Name[af]=Werkskerm rooster diff --git a/effects/diminactive/CMakeLists.txt b/effects/diminactive/CMakeLists.txt index 224d4dbb77..09e7d4d1a3 100644 --- a/effects/diminactive/CMakeLists.txt +++ b/effects/diminactive/CMakeLists.txt @@ -1,30 +1,29 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - diminactive/diminactive.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources diminactive/diminactiveconfig.kcfgc) - -# .desktop files install( FILES - diminactive/diminactive.desktop + diminactive.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_diminactive_config_SRCS diminactive_config.cpp) +qt5_wrap_ui(kwin_diminactive_config_SRCS diminactive_config.ui) +kconfig_add_kcfg_files(kwin_diminactive_config_SRCS diminactiveconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - diminactive/diminactive_config.cpp - diminactive/diminactive_config.ui - ) +add_library(kwin_diminactive_config MODULE ${kwin_diminactive_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources diminactive/diminactiveconfig.kcfgc) +target_link_libraries(kwin_diminactive_config + kwineffects + KF5::ConfigWidgets + KF5::I18n + KF5::Service +) -# .desktop files -install( FILES - diminactive/diminactive_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_diminactive_config diminactive_config.desktop) + +install( + TARGETS + kwin_diminactive_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/diminactive/diminactive_config.cpp b/effects/diminactive/diminactive_config.cpp index 84a9f32429..b2d80e31a0 100644 --- a/effects/diminactive/diminactive_config.cpp +++ b/effects/diminactive/diminactive_config.cpp @@ -31,11 +31,13 @@ along with this program. If not, see . #include #include +K_PLUGIN_FACTORY_WITH_JSON(DimInactiveEffectConfigFactory, + "diminactive_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - DimInactiveEffectConfigForm::DimInactiveEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -63,4 +65,4 @@ void DimInactiveEffectConfig::save() } // namespace -#include "moc_diminactive_config.cpp" +#include "diminactive_config.moc" diff --git a/effects/diminactive/diminactive_config.desktop b/effects/diminactive/diminactive_config.desktop index 2b1599a27b..e2cd988abe 100644 --- a/effects/diminactive/diminactive_config.desktop +++ b/effects/diminactive/diminactive_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_diminactive_config X-KDE-ParentComponents=kwin4_effect_diminactive -X-KDE-PluginKeyword=diminactive Name=Dim Inactive Name[af]=Verdof wanneer onaktief diff --git a/effects/flipswitch/CMakeLists.txt b/effects/flipswitch/CMakeLists.txt index c28b53a919..5ec12d1f07 100644 --- a/effects/flipswitch/CMakeLists.txt +++ b/effects/flipswitch/CMakeLists.txt @@ -1,30 +1,31 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - flipswitch/flipswitch.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources flipswitch/flipswitchconfig.kcfgc) - -# .desktop files install( FILES - flipswitch/flipswitch.desktop + flipswitch.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_flipswitch_config_SRCS flipswitch_config.cpp) +qt5_wrap_ui(kwin_flipswitch_config_SRCS flipswitch_config.ui) +kconfig_add_kcfg_files(kwin_flipswitch_config_SRCS flipswitchconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - flipswitch/flipswitch_config.cpp - flipswitch/flipswitch_config.ui - ) +add_library(kwin_flipswitch_config MODULE ${kwin_flipswitch_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources flipswitch/flipswitchconfig.kcfgc) +target_link_libraries(kwin_flipswitch_config + kwineffects + KF5::ConfigWidgets + KF5::GlobalAccel + KF5::I18n + KF5::Service + KF5::XmlGui +) -# .desktop files -install( FILES - flipswitch/flipswitch_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_flipswitch_config flipswitch_config.desktop) + +install( + TARGETS + kwin_flipswitch_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/flipswitch/flipswitch_config.cpp b/effects/flipswitch/flipswitch_config.cpp index 085b96dc73..0b25c83de3 100644 --- a/effects/flipswitch/flipswitch_config.cpp +++ b/effects/flipswitch/flipswitch_config.cpp @@ -28,14 +28,17 @@ along with this program. If not, see . #include #include #include +#include #include +K_PLUGIN_FACTORY_WITH_JSON(FlipSwitchEffectConfigFactory, + "flipswitch_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - FlipSwitchEffectConfigForm::FlipSwitchEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -84,4 +87,4 @@ void FlipSwitchEffectConfig::save() } // namespace -#include "moc_flipswitch_config.cpp" +#include "flipswitch_config.moc" diff --git a/effects/flipswitch/flipswitch_config.desktop b/effects/flipswitch/flipswitch_config.desktop index 9353ca8c98..ee38bc3910 100644 --- a/effects/flipswitch/flipswitch_config.desktop +++ b/effects/flipswitch/flipswitch_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_flipswitch_config X-KDE-ParentComponents=kwin4_effect_flipswitch -X-KDE-PluginKeyword=flipswitch Name=Flip Switch Name[af]=Wissel skakelaar diff --git a/effects/glide/CMakeLists.txt b/effects/glide/CMakeLists.txt index 31798ec7bb..9d96c0d879 100644 --- a/effects/glide/CMakeLists.txt +++ b/effects/glide/CMakeLists.txt @@ -1,30 +1,30 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - glide/glide.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources glide/glideconfig.kcfgc) - -# .desktop files install( FILES - glide/glide.desktop + glide.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_glide_config_SRCS glide_config.cpp) +qt5_wrap_ui(kwin_glide_config_SRCS glide_config.ui) +kconfig_add_kcfg_files(kwin_glide_config_SRCS glideconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - glide/glide_config.cpp - glide/glide_config.ui ) +add_library(kwin_glide_config MODULE ${kwin_glide_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources glide/glideconfig.kcfgc) +target_link_libraries(kwin_glide_config + kwineffects + KF5::ConfigWidgets + KF5::I18n + KF5::Service +) -# .desktop files -install( FILES - glide/glide_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_glide_config glide_config.desktop) + +install( + TARGETS + kwin_glide_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/glide/glide_config.cpp b/effects/glide/glide_config.cpp index c709706517..5b6324797f 100644 --- a/effects/glide/glide_config.cpp +++ b/effects/glide/glide_config.cpp @@ -25,11 +25,13 @@ #include #include +K_PLUGIN_FACTORY_WITH_JSON(GlideEffectConfigFactory, + "glide_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - GlideEffectConfig::GlideEffectConfig(QWidget *parent, const QVariantList &args) : KCModule(KAboutData::pluginData(QStringLiteral("glide")), parent, args) { @@ -48,4 +50,4 @@ void GlideEffectConfig::save() EffectsHandler::sendReloadMessage(QStringLiteral("glide")); } } // namespace KWin -#include "moc_glide_config.cpp" +#include "glide_config.moc" diff --git a/effects/glide/glide_config.desktop b/effects/glide/glide_config.desktop index 3d472caecd..38cf8847f4 100644 --- a/effects/glide/glide_config.desktop +++ b/effects/glide/glide_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_glide_config X-KDE-ParentComponents=kwin4_effect_glide -X-KDE-PluginKeyword=glide Name=Glide Name[ar]=الطيران diff --git a/effects/invert/CMakeLists.txt b/effects/invert/CMakeLists.txt index a7d9443413..90c53e5946 100644 --- a/effects/invert/CMakeLists.txt +++ b/effects/invert/CMakeLists.txt @@ -1,33 +1,39 @@ ####################################### # Effect -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - invert/invert.cpp - ) - # .desktop files install( FILES - invert/invert.desktop + invert.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) # Data files install( FILES - invert/data/1.10/invert.frag + data/1.10/invert.frag DESTINATION ${DATA_INSTALL_DIR}/kwin/shaders/1.10 ) install( FILES - invert/data/1.40/invert.frag + data/1.40/invert.frag DESTINATION ${DATA_INSTALL_DIR}/kwin/shaders/1.40 ) ####################################### # Config +set(kwin_invert_config_SRCS invert_config.cpp) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - invert/invert_config.cpp - ) +add_library(kwin_invert_config MODULE ${kwin_invert_config_SRCS}) -# .desktop files -install( FILES - invert/invert_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +target_link_libraries(kwin_invert_config + kwineffects + KF5::ConfigWidgets + KF5::GlobalAccel + KF5::I18n + KF5::Service + KF5::XmlGui +) + +kservice_desktop_to_json(kwin_invert_config invert_config.desktop) + +install( + TARGETS + kwin_invert_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/invert/invert_config.cpp b/effects/invert/invert_config.cpp index f069b20a37..d5deec1fa1 100644 --- a/effects/invert/invert_config.cpp +++ b/effects/invert/invert_config.cpp @@ -31,11 +31,13 @@ along with this program. If not, see . #include +K_PLUGIN_FACTORY_WITH_JSON(InvertEffectConfigFactory, + "invert_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - InvertEffectConfig::InvertEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(KAboutData::pluginData(QStringLiteral("invert")), parent, args) { @@ -97,4 +99,4 @@ void InvertEffectConfig::defaults() } // namespace -#include "moc_invert_config.cpp" +#include "invert_config.moc" diff --git a/effects/invert/invert_config.desktop b/effects/invert/invert_config.desktop index b01a29777d..2976d3fdae 100644 --- a/effects/invert/invert_config.desktop +++ b/effects/invert/invert_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_invert_config X-KDE-ParentComponents=kwin4_effect_invert -X-KDE-PluginKeyword=invert Name=Invert Name[af]=Keer om diff --git a/effects/lookingglass/CMakeLists.txt b/effects/lookingglass/CMakeLists.txt index 956e2f01da..d6df79692f 100644 --- a/effects/lookingglass/CMakeLists.txt +++ b/effects/lookingglass/CMakeLists.txt @@ -1,38 +1,41 @@ ####################################### # Effect -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - lookingglass/lookingglass.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources lookingglass/lookingglassconfig.kcfgc) - # .desktop files install( FILES - lookingglass/lookingglass.desktop + lookingglass.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) # Data files install( FILES - lookingglass/data/1.10/lookingglass.frag + data/1.10/lookingglass.frag DESTINATION ${DATA_INSTALL_DIR}/kwin/shaders/1.10 ) install( FILES - lookingglass/data/1.40/lookingglass.frag + data/1.40/lookingglass.frag DESTINATION ${DATA_INSTALL_DIR}/kwin/shaders/1.40 ) ####################################### # Config +set(kwin_lookingglass_config_SRCS lookingglass_config.cpp) +qt5_wrap_ui(kwin_lookingglass_config_SRCS lookingglass_config.ui) +kconfig_add_kcfg_files(kwin_lookingglass_config_SRCS lookingglassconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - lookingglass/lookingglass_config.cpp - lookingglass/lookingglass_config.ui - ) +add_library(kwin_lookingglass_config MODULE ${kwin_lookingglass_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources lookingglass/lookingglassconfig.kcfgc) +target_link_libraries(kwin_lookingglass_config + kwineffects + KF5::ConfigWidgets + KF5::GlobalAccel + KF5::I18n + KF5::Service + KF5::XmlGui +) -# .desktop files -install( FILES - lookingglass/lookingglass_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_lookingglass_config lookingglass_config.desktop) + +install( + TARGETS + kwin_lookingglass_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/lookingglass/lookingglass_config.cpp b/effects/lookingglass/lookingglass_config.cpp index 91cd411f78..1724898198 100644 --- a/effects/lookingglass/lookingglass_config.cpp +++ b/effects/lookingglass/lookingglass_config.cpp @@ -36,11 +36,13 @@ along with this program. If not, see . #include #include +K_PLUGIN_FACTORY_WITH_JSON(LookingGlassEffectConfigFactory, + "lookingglass_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - LookingGlassEffectConfigForm::LookingGlassEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -107,4 +109,4 @@ void LookingGlassEffectConfig::defaults() } // namespace -#include "moc_lookingglass_config.cpp" +#include "lookingglass_config.moc" diff --git a/effects/lookingglass/lookingglass_config.desktop b/effects/lookingglass/lookingglass_config.desktop index 19cb31c52d..0c21236706 100644 --- a/effects/lookingglass/lookingglass_config.desktop +++ b/effects/lookingglass/lookingglass_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_lookingglass_config X-KDE-ParentComponents=kwin4_effect_lookingglass -X-KDE-PluginKeyword=lookingglass Name=Looking Glass Name[af]=Vergrootglas diff --git a/effects/magiclamp/CMakeLists.txt b/effects/magiclamp/CMakeLists.txt index 7de61ba432..a395846a68 100644 --- a/effects/magiclamp/CMakeLists.txt +++ b/effects/magiclamp/CMakeLists.txt @@ -1,30 +1,29 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - magiclamp/magiclamp.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources magiclamp/magiclampconfig.kcfgc) - -# .desktop files install( FILES - magiclamp/magiclamp.desktop + magiclamp.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_magiclamp_config_SRCS magiclamp_config.cpp) +qt5_wrap_ui(kwin_magiclamp_config_SRCS magiclamp_config.ui) +kconfig_add_kcfg_files(kwin_magiclamp_config_SRCS magiclampconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - magiclamp/magiclamp_config.cpp - magiclamp/magiclamp_config.ui - ) +add_library(kwin_magiclamp_config MODULE ${kwin_magiclamp_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources magiclamp/magiclampconfig.kcfgc) +target_link_libraries(kwin_magiclamp_config + kwineffects + KF5::ConfigWidgets + KF5::I18n + KF5::Service +) -# .desktop files -install( FILES - magiclamp/magiclamp_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_magiclamp_config magiclamp_config.desktop) + +install( + TARGETS + kwin_magiclamp_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/magiclamp/magiclamp_config.cpp b/effects/magiclamp/magiclamp_config.cpp index a0088555e3..0558f56342 100644 --- a/effects/magiclamp/magiclamp_config.cpp +++ b/effects/magiclamp/magiclamp_config.cpp @@ -28,11 +28,13 @@ along with this program. If not, see . #include +K_PLUGIN_FACTORY_WITH_JSON(MagicLampEffectConfigFactory, + "magiclamp_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - MagicLampEffectConfigForm::MagicLampEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -60,4 +62,4 @@ void MagicLampEffectConfig::save() } // namespace -#include "moc_magiclamp_config.cpp" +#include "magiclamp_config.moc" diff --git a/effects/magiclamp/magiclamp_config.desktop b/effects/magiclamp/magiclamp_config.desktop index ce07e26ca1..717ccba574 100644 --- a/effects/magiclamp/magiclamp_config.desktop +++ b/effects/magiclamp/magiclamp_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_magiclamp_config X-KDE-ParentComponents=kwin4_effect_magiclamp -X-KDE-PluginKeyword=magiclamp Name=Magic Lamp Name[ar]=المصباح السحري diff --git a/effects/magnifier/CMakeLists.txt b/effects/magnifier/CMakeLists.txt index bf4c056e28..9fc90fc647 100644 --- a/effects/magnifier/CMakeLists.txt +++ b/effects/magnifier/CMakeLists.txt @@ -1,29 +1,31 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - magnifier/magnifier.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources magnifier/magnifierconfig.kcfgc) - -# .desktop files install( FILES - magnifier/magnifier.desktop + magnifier.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_magnifier_config_SRCS magnifier_config.cpp) +qt5_wrap_ui(kwin_magnifier_config_SRCS magnifier_config.ui) +kconfig_add_kcfg_files(kwin_magnifier_config_SRCS magnifierconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - magnifier/magnifier_config.cpp - magnifier/magnifier_config.ui - ) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources magnifier/magnifierconfig.kcfgc) +add_library(kwin_magnifier_config MODULE ${kwin_magnifier_config_SRCS}) -# .desktop files -install( FILES - magnifier/magnifier_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +target_link_libraries(kwin_magnifier_config + kwineffects + KF5::ConfigWidgets + KF5::GlobalAccel + KF5::I18n + KF5::Service + KF5::XmlGui +) + +kservice_desktop_to_json(kwin_magnifier_config magnifier_config.desktop) + +install( + TARGETS + kwin_magnifier_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/magnifier/magnifier_config.cpp b/effects/magnifier/magnifier_config.cpp index ffb3262ed6..f48f78a612 100644 --- a/effects/magnifier/magnifier_config.cpp +++ b/effects/magnifier/magnifier_config.cpp @@ -35,11 +35,13 @@ along with this program. If not, see . #include #include +K_PLUGIN_FACTORY_WITH_JSON(MagnifierEffectConfigFactory, + "magnifier_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - MagnifierEffectConfigForm::MagnifierEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -108,4 +110,4 @@ void MagnifierEffectConfig::defaults() } // namespace -#include "moc_magnifier_config.cpp" +#include "magnifier_config.moc" diff --git a/effects/magnifier/magnifier_config.desktop b/effects/magnifier/magnifier_config.desktop index bd00d3f456..5e11d47dca 100644 --- a/effects/magnifier/magnifier_config.desktop +++ b/effects/magnifier/magnifier_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_magnifier_config X-KDE-ParentComponents=kwin4_effect_magnifier -X-KDE-PluginKeyword=magnifier Name=Magnifier Name[af]=Vergroter diff --git a/effects/mouseclick/CMakeLists.txt b/effects/mouseclick/CMakeLists.txt index 76f3bc8f71..6e1f18dab1 100644 --- a/effects/mouseclick/CMakeLists.txt +++ b/effects/mouseclick/CMakeLists.txt @@ -1,30 +1,33 @@ ########################## ## mouse click effect ########################## - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - mouseclick/mouseclick.cpp - ) -kconfig_add_kcfg_files(kwin4_effect_builtins_sources mouseclick/mouseclickconfig.kcfgc) - -# .desktop files install( FILES - mouseclick/mouseclick.desktop + mouseclick.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ########################## ## configurtion dialog ########################## +set(kwin_mouseclick_config_SRCS mouseclick_config.cpp) +qt5_wrap_ui(kwin_mouseclick_config_SRCS mouseclick_config.ui) +kconfig_add_kcfg_files(kwin_mouseclick_config_SRCS mouseclickconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - mouseclick/mouseclick_config.cpp - mouseclick/mouseclick_config.ui - ) +add_library(kwin_mouseclick_config MODULE ${kwin_mouseclick_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources mouseclick/mouseclickconfig.kcfgc) +target_link_libraries(kwin_mouseclick_config + kwineffects + KF5::ConfigWidgets + KF5::GlobalAccel + KF5::I18n + KF5::Service + KF5::XmlGui +) -install( FILES - mouseclick/mouseclick_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_mouseclick_config mouseclick_config.desktop) + +install( + TARGETS + kwin_mouseclick_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/mouseclick/mouseclick_config.cpp b/effects/mouseclick/mouseclick_config.cpp index 83eb256794..2f4e07e619 100644 --- a/effects/mouseclick/mouseclick_config.cpp +++ b/effects/mouseclick/mouseclick_config.cpp @@ -28,14 +28,17 @@ along with this program. If not, see . #include #include #include +#include #include +K_PLUGIN_FACTORY_WITH_JSON(MouseClickEffectConfigFactory, + "mouseclick_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - MouseClickEffectConfigForm::MouseClickEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -81,4 +84,4 @@ void MouseClickEffectConfig::save() } // namespace -#include "moc_mouseclick_config.cpp" +#include "mouseclick_config.moc" diff --git a/effects/mouseclick/mouseclick_config.desktop b/effects/mouseclick/mouseclick_config.desktop index f5d3e8d3d4..addcc8537a 100644 --- a/effects/mouseclick/mouseclick_config.desktop +++ b/effects/mouseclick/mouseclick_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_mouseclick_config X-KDE-ParentComponents=kwin4_effect_mouseclick -X-KDE-PluginKeyword=mouseclick Name=Mouse Click Animation Name[bs]=Animacija klika mišem diff --git a/effects/mousemark/CMakeLists.txt b/effects/mousemark/CMakeLists.txt index 4bd7b713a3..78c2cd3450 100644 --- a/effects/mousemark/CMakeLists.txt +++ b/effects/mousemark/CMakeLists.txt @@ -1,30 +1,31 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - mousemark/mousemark.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources mousemark/mousemarkconfig.kcfgc) - -# .desktop files install( FILES - mousemark/mousemark.desktop + mousemark.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_mousemark_config_SRCS mousemark_config.cpp) +qt5_wrap_ui(kwin_mousemark_config_SRCS mousemark_config.ui) +kconfig_add_kcfg_files(kwin_mousemark_config_SRCS mousemarkconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - mousemark/mousemark_config.cpp - mousemark/mousemark_config.ui - ) +add_library(kwin_mousemark_config MODULE ${kwin_mousemark_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources mousemark/mousemarkconfig.kcfgc) +target_link_libraries(kwin_mousemark_config + kwineffects + KF5::ConfigWidgets + KF5::GlobalAccel + KF5::I18n + KF5::Service + KF5::XmlGui +) -# .desktop files -install( FILES - mousemark/mousemark_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_mousemark_config mousemark_config.desktop) + +install( + TARGETS + kwin_mousemark_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/mousemark/mousemark_config.cpp b/effects/mousemark/mousemark_config.cpp index 11fb6df10e..cedc655cac 100644 --- a/effects/mousemark/mousemark_config.cpp +++ b/effects/mousemark/mousemark_config.cpp @@ -34,11 +34,13 @@ along with this program. If not, see . #include #include +K_PLUGIN_FACTORY_WITH_JSON(MouseMarkEffectConfigFactory, + "mousemark_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - MouseMarkEffectConfigForm::MouseMarkEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -96,4 +98,4 @@ void MouseMarkEffectConfig::save() } // namespace -#include "moc_mousemark_config.cpp" +#include "mousemark_config.moc" diff --git a/effects/mousemark/mousemark_config.desktop b/effects/mousemark/mousemark_config.desktop index e29b56e809..b16e17fb82 100644 --- a/effects/mousemark/mousemark_config.desktop +++ b/effects/mousemark/mousemark_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_mousemark_config X-KDE-ParentComponents=kwin4_effect_mousemark -X-KDE-PluginKeyword=mousemark Name=Mouse Mark Name[af]=Muismerk diff --git a/effects/presentwindows/CMakeLists.txt b/effects/presentwindows/CMakeLists.txt index d4484dbf0d..8b6d7d0d40 100644 --- a/effects/presentwindows/CMakeLists.txt +++ b/effects/presentwindows/CMakeLists.txt @@ -1,35 +1,36 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - presentwindows/presentwindows.cpp - presentwindows/presentwindows_proxy.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources presentwindows/presentwindowsconfig.kcfgc) - -# .desktop files install( FILES - presentwindows/presentwindows.desktop + presentwindows.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) install( FILES - presentwindows/main.qml + main.qml DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/presentwindows/ ) ####################################### # Config +set(kwin_presentwindows_config_SRCS presentwindows_config.cpp) +qt5_wrap_ui(kwin_presentwindows_config_SRCS presentwindows_config.ui) +kconfig_add_kcfg_files(kwin_presentwindows_config_SRCS presentwindowsconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - presentwindows/presentwindows_config.cpp - presentwindows/presentwindows_config.ui - ) +add_library(kwin_presentwindows_config MODULE ${kwin_presentwindows_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources presentwindows/presentwindowsconfig.kcfgc) +target_link_libraries(kwin_presentwindows_config + kwineffects + KF5::Completion + KF5::ConfigWidgets + KF5::GlobalAccel + KF5::I18n + KF5::Service + KF5::XmlGui +) -# .desktop files -install( FILES - presentwindows/presentwindows_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_presentwindows_config presentwindows_config.desktop) + +install( + TARGETS + kwin_presentwindows_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/presentwindows/presentwindows_config.cpp b/effects/presentwindows/presentwindows_config.cpp index 228e0b54b7..3828cf3655 100644 --- a/effects/presentwindows/presentwindows_config.cpp +++ b/effects/presentwindows/presentwindows_config.cpp @@ -29,14 +29,17 @@ along with this program. If not, see . #include #include #include +#include #include +K_PLUGIN_FACTORY_WITH_JSON(PresentWindowsEffectConfigFactory, + "presentwindows_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - PresentWindowsEffectConfigForm::PresentWindowsEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -105,4 +108,4 @@ void PresentWindowsEffectConfig::defaults() } // namespace -#include "moc_presentwindows_config.cpp" +#include "presentwindows_config.moc" diff --git a/effects/presentwindows/presentwindows_config.desktop b/effects/presentwindows/presentwindows_config.desktop index 50a1aec791..7a806c56d3 100644 --- a/effects/presentwindows/presentwindows_config.desktop +++ b/effects/presentwindows/presentwindows_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_presentwindows_config X-KDE-ParentComponents=kwin4_effect_presentwindows -X-KDE-PluginKeyword=presentwindows Name=Present Windows Name[af]=Wys vensters diff --git a/effects/resize/CMakeLists.txt b/effects/resize/CMakeLists.txt index 83c4d66dc6..d0ee9c4996 100644 --- a/effects/resize/CMakeLists.txt +++ b/effects/resize/CMakeLists.txt @@ -1,29 +1,29 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - resize/resize.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources resize/resizeconfig.kcfgc) - -# .desktop files install( FILES - resize/resize.desktop + resize.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_resize_config_SRCS resize_config.cpp) +qt5_wrap_ui(kwin_resize_config_SRCS resize_config.ui) +kconfig_add_kcfg_files(kwin_resize_config_SRCS resizeconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - resize/resize_config.cpp - resize/resize_config.ui - ) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources resize/resizeconfig.kcfgc) +add_library(kwin_resize_config MODULE ${kwin_resize_config_SRCS}) -# .desktop files -install( FILES - resize/resize_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +target_link_libraries(kwin_resize_config + kwineffects + KF5::ConfigWidgets + KF5::I18n + KF5::Service +) + +kservice_desktop_to_json(kwin_resize_config resize_config.desktop) + +install( + TARGETS + kwin_resize_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/resize/resize_config.cpp b/effects/resize/resize_config.cpp index 997271db32..5a6a197e3a 100644 --- a/effects/resize/resize_config.cpp +++ b/effects/resize/resize_config.cpp @@ -28,11 +28,13 @@ along with this program. If not, see . #include +K_PLUGIN_FACTORY_WITH_JSON(ResizeEffectConfigFactory, + "resize_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - ResizeEffectConfigForm::ResizeEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -60,4 +62,4 @@ void ResizeEffectConfig::save() } // namespace -#include "moc_resize_config.cpp" +#include "resize_config.moc" diff --git a/effects/resize/resize_config.desktop b/effects/resize/resize_config.desktop index 89bafec464..f8945c009d 100644 --- a/effects/resize/resize_config.desktop +++ b/effects/resize/resize_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_resize_config X-KDE-ParentComponents=kwin4_effect_resize -X-KDE-PluginKeyword=resize Name=Resize Window Name[ar]=غير حجم النافذة diff --git a/effects/showfps/CMakeLists.txt b/effects/showfps/CMakeLists.txt index 0acfd9653b..b1e09272e5 100644 --- a/effects/showfps/CMakeLists.txt +++ b/effects/showfps/CMakeLists.txt @@ -1,30 +1,30 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - showfps/showfps.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources showfps/showfpsconfig.kcfgc) - -# .desktop files install( FILES - showfps/showfps.desktop + showfps.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_showfps_config_SRCS showfps_config.cpp) +qt5_wrap_ui(kwin_showfps_config_SRCS showfps_config.ui) +kconfig_add_kcfg_files(kwin_showfps_config_SRCS showfpsconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - showfps/showfps_config.cpp - showfps/showfps_config.ui - ) +add_library(kwin_showfps_config MODULE ${kwin_showfps_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources showfps/showfpsconfig.kcfgc) +target_link_libraries(kwin_showfps_config + kwineffects + KF5::Completion + KF5::ConfigWidgets + KF5::I18n + KF5::Service +) -# .desktop files -install( FILES - showfps/showfps_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_showfps_config showfps_config.desktop) + +install( + TARGETS + kwin_showfps_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/showfps/showfps_config.cpp b/effects/showfps/showfps_config.cpp index 64d45b7e18..bd186b65f1 100644 --- a/effects/showfps/showfps_config.cpp +++ b/effects/showfps/showfps_config.cpp @@ -30,11 +30,13 @@ along with this program. If not, see . #include #include +K_PLUGIN_FACTORY_WITH_JSON(ShowFpsEffectConfigFactory, + "showfps_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - ShowFpsEffectConfig::ShowFpsEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(KAboutData::pluginData(QStringLiteral("showfps")), parent, args) { @@ -59,4 +61,4 @@ void ShowFpsEffectConfig::save() } // namespace -#include "moc_showfps_config.cpp" +#include "showfps_config.moc" diff --git a/effects/showfps/showfps_config.desktop b/effects/showfps/showfps_config.desktop index ed03db285d..fa694b0bfe 100644 --- a/effects/showfps/showfps_config.desktop +++ b/effects/showfps/showfps_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_showfps_config X-KDE-ParentComponents=kwin4_effect_showfps -X-KDE-PluginKeyword=showfps Name=Show FPS Name[af]=Wys FPS diff --git a/effects/thumbnailaside/CMakeLists.txt b/effects/thumbnailaside/CMakeLists.txt index fd0f30d293..031a3276b8 100644 --- a/effects/thumbnailaside/CMakeLists.txt +++ b/effects/thumbnailaside/CMakeLists.txt @@ -1,30 +1,31 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - thumbnailaside/thumbnailaside.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources thumbnailaside/thumbnailasideconfig.kcfgc) - -# .desktop files install( FILES - thumbnailaside/thumbnailaside.desktop + thumbnailaside.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_thumbnailaside_config_SRCS thumbnailaside_config.cpp) +qt5_wrap_ui(kwin_thumbnailaside_config_SRCS thumbnailaside_config.ui) +kconfig_add_kcfg_files(kwin_thumbnailaside_config_SRCS thumbnailasideconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - thumbnailaside/thumbnailaside_config.cpp - thumbnailaside/thumbnailaside_config.ui - ) +add_library(kwin_thumbnailaside_config MODULE ${kwin_thumbnailaside_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources thumbnailaside/thumbnailasideconfig.kcfgc) +target_link_libraries(kwin_thumbnailaside_config + kwineffects + KF5::ConfigWidgets + KF5::GlobalAccel + KF5::I18n + KF5::Service + KF5::XmlGui +) -# .desktop files -install( FILES - thumbnailaside/thumbnailaside_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_thumbnailaside_config thumbnailaside_config.desktop) + +install( + TARGETS + kwin_thumbnailaside_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/thumbnailaside/thumbnailaside_config.cpp b/effects/thumbnailaside/thumbnailaside_config.cpp index 9ec763a718..45b236c4c9 100644 --- a/effects/thumbnailaside/thumbnailaside_config.cpp +++ b/effects/thumbnailaside/thumbnailaside_config.cpp @@ -34,11 +34,13 @@ along with this program. If not, see . #include #include +K_PLUGIN_FACTORY_WITH_JSON(ThumbnailAsideEffectConfigFactory, + "thumbnailaside_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - ThumbnailAsideEffectConfigForm::ThumbnailAsideEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -88,4 +90,4 @@ void ThumbnailAsideEffectConfig::save() } // namespace -#include "moc_thumbnailaside_config.cpp" +#include "thumbnailaside_config.moc" diff --git a/effects/thumbnailaside/thumbnailaside_config.desktop b/effects/thumbnailaside/thumbnailaside_config.desktop index 12c154e1fc..fbb1ba74d1 100644 --- a/effects/thumbnailaside/thumbnailaside_config.desktop +++ b/effects/thumbnailaside/thumbnailaside_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_thumbnailaside_config X-KDE-ParentComponents=kwin4_effect_thumbnailaside -X-KDE-PluginKeyword=thumbnailaside Name=Thumbnail Aside Name[af]=Duimnael langsaan diff --git a/effects/trackmouse/CMakeLists.txt b/effects/trackmouse/CMakeLists.txt index 0292c8d8b1..99970d5a2e 100644 --- a/effects/trackmouse/CMakeLists.txt +++ b/effects/trackmouse/CMakeLists.txt @@ -1,36 +1,39 @@ ####################################### # Effect -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - trackmouse/trackmouse.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources trackmouse/trackmouseconfig.kcfgc) - # .desktop files install( FILES - trackmouse/trackmouse.desktop + trackmouse.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) # Data files install( FILES - trackmouse/data/tm_inner.png - trackmouse/data/tm_outer.png + data/tm_inner.png + data/tm_outer.png DESTINATION ${DATA_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_trackmouse_config_SRCS trackmouse_config.cpp) +qt5_wrap_ui(kwin_trackmouse_config_SRCS trackmouse_config.ui) +kconfig_add_kcfg_files(kwin_trackmouse_config_SRCS trackmouseconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - trackmouse/trackmouse_config.cpp - trackmouse/trackmouse_config.ui - ) +add_library(kwin_trackmouse_config MODULE ${kwin_trackmouse_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources trackmouse/trackmouseconfig.kcfgc) +target_link_libraries(kwin_trackmouse_config + kwineffects + KF5::ConfigWidgets + KF5::GlobalAccel + KF5::I18n + KF5::Service + KF5::XmlGui +) -# .desktop files -install( FILES - trackmouse/trackmouse_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_trackmouse_config trackmouse_config.desktop) + +install( + TARGETS + kwin_trackmouse_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/trackmouse/trackmouse_config.cpp b/effects/trackmouse/trackmouse_config.cpp index 4f52fdf5c3..b98188b2b7 100644 --- a/effects/trackmouse/trackmouse_config.cpp +++ b/effects/trackmouse/trackmouse_config.cpp @@ -35,11 +35,13 @@ along with this program. If not, see . // KConfigSkeleton #include "trackmouseconfig.h" +K_PLUGIN_FACTORY_WITH_JSON(TrackMouseEffectConfigFactory, + "trackmouse_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - TrackMouseEffectConfigForm::TrackMouseEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -117,4 +119,4 @@ void TrackMouseEffectConfig::shortcutChanged(const QKeySequence &seq) } // namespace -#include "moc_trackmouse_config.cpp" +#include "trackmouse_config.moc" diff --git a/effects/trackmouse/trackmouse_config.desktop b/effects/trackmouse/trackmouse_config.desktop index b55aba09dc..e7f85ba8ce 100644 --- a/effects/trackmouse/trackmouse_config.desktop +++ b/effects/trackmouse/trackmouse_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_trackmouse_config X-KDE-ParentComponents=kwin4_effect_trackmouse -X-KDE-PluginKeyword=trackmouse Name=Track Mouse Name[af]=Volg die Muis diff --git a/effects/windowgeometry/CMakeLists.txt b/effects/windowgeometry/CMakeLists.txt index 97b05adc54..5e238e523e 100644 --- a/effects/windowgeometry/CMakeLists.txt +++ b/effects/windowgeometry/CMakeLists.txt @@ -1,30 +1,31 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - windowgeometry/windowgeometry.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources windowgeometry/windowgeometryconfig.kcfgc) - -# .desktop files install( FILES - windowgeometry/windowgeometry.desktop + windowgeometry.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_windowgeometry_config_SRCS windowgeometry_config.cpp) +qt5_wrap_ui(kwin_windowgeometry_config_SRCS windowgeometry_config.ui) +kconfig_add_kcfg_files(kwin_windowgeometry_config_SRCS windowgeometryconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - windowgeometry/windowgeometry_config.cpp - windowgeometry/windowgeometry_config.ui - ) +add_library(kwin_windowgeometry_config MODULE ${kwin_windowgeometry_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources windowgeometry/windowgeometryconfig.kcfgc) +target_link_libraries(kwin_windowgeometry_config + kwineffects + KF5::ConfigWidgets + KF5::GlobalAccel + KF5::I18n + KF5::Service + KF5::XmlGui +) -# .desktop files -install( FILES - windowgeometry/windowgeometry_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_windowgeometry_config windowgeometry_config.desktop) + +install( + TARGETS + kwin_windowgeometry_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/windowgeometry/windowgeometry_config.cpp b/effects/windowgeometry/windowgeometry_config.cpp index b90746cbdc..8a08b78e2b 100644 --- a/effects/windowgeometry/windowgeometry_config.cpp +++ b/effects/windowgeometry/windowgeometry_config.cpp @@ -30,9 +30,12 @@ along with this program. If not, see . #include #include +K_PLUGIN_FACTORY_WITH_JSON(WindowGeometryEffectConfigFactory, + "windowgeometry_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY WindowGeometryConfigForm::WindowGeometryConfigForm(QWidget* parent) : QWidget(parent) { @@ -82,4 +85,4 @@ void WindowGeometryConfig::defaults() } } //namespace -#include "moc_windowgeometry_config.cpp" +#include "windowgeometry_config.moc" diff --git a/effects/windowgeometry/windowgeometry_config.desktop b/effects/windowgeometry/windowgeometry_config.desktop index 8d9b7d5989..149eb27f8d 100644 --- a/effects/windowgeometry/windowgeometry_config.desktop +++ b/effects/windowgeometry/windowgeometry_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_windowgeometry_config X-KDE-ParentComponents=kwin4_effect_windowgeometry -X-KDE-PluginKeyword=windowgeometry Name=WindowGeometry Name[bg]=Геометрия на прозореца diff --git a/effects/wobblywindows/CMakeLists.txt b/effects/wobblywindows/CMakeLists.txt index ef6c010302..09a2b1e5d5 100644 --- a/effects/wobblywindows/CMakeLists.txt +++ b/effects/wobblywindows/CMakeLists.txt @@ -1,30 +1,29 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - wobblywindows/wobblywindows.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources wobblywindows/wobblywindowsconfig.kcfgc) - -# .desktop files install( FILES - wobblywindows/wobblywindows.desktop + wobblywindows.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_wobblywindows_config_SRCS wobblywindows_config.cpp) +qt5_wrap_ui(kwin_wobblywindows_config_SRCS wobblywindows_config.ui) +kconfig_add_kcfg_files(kwin_wobblywindows_config_SRCS wobblywindowsconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - wobblywindows/wobblywindows_config.cpp - wobblywindows/wobblywindows_config.ui - ) +add_library(kwin_wobblywindows_config MODULE ${kwin_wobblywindows_config_SRCS}) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources wobblywindows/wobblywindowsconfig.kcfgc) +target_link_libraries(kwin_wobblywindows_config + kwineffects + KF5::ConfigWidgets + KF5::I18n + KF5::Service +) -# .desktop files -install( FILES - wobblywindows/wobblywindows_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +kservice_desktop_to_json(kwin_wobblywindows_config wobblywindows_config.desktop) + +install( + TARGETS + kwin_wobblywindows_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/wobblywindows/wobblywindows_config.cpp b/effects/wobblywindows/wobblywindows_config.cpp index 83c4bc7670..1f4a6e65c1 100644 --- a/effects/wobblywindows/wobblywindows_config.cpp +++ b/effects/wobblywindows/wobblywindows_config.cpp @@ -29,11 +29,13 @@ along with this program. If not, see . #include #include +K_PLUGIN_FACTORY_WITH_JSON(WobblyWindowsEffectConfigFactory, + "wobblywindows_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - //----------------------------------------------------------------------------- // WARNING: This is (kinda) copied from wobblywindows.cpp @@ -110,4 +112,4 @@ void WobblyWindowsEffectConfig::wobblinessChanged() } // namespace -#include "moc_wobblywindows_config.cpp" +#include "wobblywindows_config.moc" diff --git a/effects/wobblywindows/wobblywindows_config.desktop b/effects/wobblywindows/wobblywindows_config.desktop index 698663d8e9..cad5872867 100644 --- a/effects/wobblywindows/wobblywindows_config.desktop +++ b/effects/wobblywindows/wobblywindows_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_wobblywindows_config X-KDE-ParentComponents=kwin4_effect_wobblywindows -X-KDE-PluginKeyword=wobblywindows Name=Wobbly Windows Name[af]=Wobbly Windows diff --git a/effects/zoom/CMakeLists.txt b/effects/zoom/CMakeLists.txt index 7db2b7b602..6fd9222c03 100644 --- a/effects/zoom/CMakeLists.txt +++ b/effects/zoom/CMakeLists.txt @@ -1,29 +1,31 @@ ####################################### # Effect - -# Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - zoom/zoom.cpp - ) - -kconfig_add_kcfg_files(kwin4_effect_builtins_sources zoom/zoomconfig.kcfgc) - -# .desktop files install( FILES - zoom/zoom.desktop + zoom.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) ####################################### # Config +set(kwin_zoom_config_SRCS zoom_config.cpp) +qt5_wrap_ui(kwin_zoom_config_SRCS zoom_config.ui) +kconfig_add_kcfg_files(kwin_zoom_config_SRCS zoomconfig.kcfgc) -# Source files -set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} - zoom/zoom_config.cpp - zoom/zoom_config.ui - ) -kconfig_add_kcfg_files(kwin4_effect_builtins_config_sources zoom/zoomconfig.kcfgc) +add_library(kwin_zoom_config MODULE ${kwin_zoom_config_SRCS}) -# .desktop files -install( FILES - zoom/zoom_config.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) +target_link_libraries(kwin_zoom_config + kwineffects + KF5::ConfigWidgets + KF5::GlobalAccel + KF5::I18n + KF5::Service + KF5::XmlGui +) + +kservice_desktop_to_json(kwin_zoom_config zoom_config.desktop) + +install( + TARGETS + kwin_zoom_config + DESTINATION + ${PLUGIN_INSTALL_DIR}/kwin/effects/configs +) diff --git a/effects/zoom/zoom_config.cpp b/effects/zoom/zoom_config.cpp index 8301239156..7a6ebb1d42 100644 --- a/effects/zoom/zoom_config.cpp +++ b/effects/zoom/zoom_config.cpp @@ -33,11 +33,13 @@ along with this program. If not, see . #include +K_PLUGIN_FACTORY_WITH_JSON(ZoomEffectConfigFactory, + "zoom_config.json", + registerPlugin();) + namespace KWin { -KWIN_EFFECT_CONFIG_FACTORY - ZoomEffectConfigForm::ZoomEffectConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); @@ -138,4 +140,4 @@ void ZoomEffectConfig::save() } // namespace -#include "moc_zoom_config.cpp" +#include "zoom_config.moc" diff --git a/effects/zoom/zoom_config.desktop b/effects/zoom/zoom_config.desktop index 5ddfb90447..913925bde3 100644 --- a/effects/zoom/zoom_config.desktop +++ b/effects/zoom/zoom_config.desktop @@ -2,9 +2,8 @@ Type=Service X-KDE-ServiceTypes=KCModule -X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-Library=kwin_zoom_config X-KDE-ParentComponents=kwin4_effect_zoom -X-KDE-PluginKeyword=zoom Name=Zoom Name[af]=Zoem diff --git a/libkwineffects/kwineffects.h b/libkwineffects/kwineffects.h index af66d602cc..3bd934f9b2 100644 --- a/libkwineffects/kwineffects.h +++ b/libkwineffects/kwineffects.h @@ -613,33 +613,6 @@ public Q_SLOTS: KWINEFFECTS_EXPORT bool effect_enabledbydefault_kwin4_effect_##name() { return function; } \ } -/** - * Defines the function used to retrieve an effect's config widget - * E.g. KWIN_EFFECT_CONFIG( flames, MyFlameEffectConfig ) - **/ -#define KWIN_EFFECT_CONFIG( name, classname ) \ - K_PLUGIN_FACTORY(EffectFactory, registerPlugin(#name);) - -/** - * Defines the function used to retrieve multiple effects' config widget - * E.g. KWIN_EFFECT_CONFIG_MULTIPLE( flames, - * KWIN_EFFECT_CONFIG_SINGLE( flames, MyFlameEffectConfig ) - * KWIN_EFFECT_CONFIG_SINGLE( fire, MyFireEffectConfig ) - * ) - **/ -#define KWIN_EFFECT_CONFIG_MULTIPLE( name, singles ) \ - K_PLUGIN_FACTORY(EffectFactory, singles) - -/** - * @see KWIN_EFFECT_CONFIG_MULTIPLE - */ -#define KWIN_EFFECT_CONFIG_SINGLE( name, classname ) \ - registerPlugin(QStringLiteral(#name)); -/** - * The declaration of the factory to export the effect - */ -#define KWIN_EFFECT_CONFIG_FACTORY K_PLUGIN_FACTORY_DECLARATION(EffectFactory) - /** * @short Manager class that handles all the effects.