Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
dec9a10e
Commit
dec9a10e
authored
Sep 28, 2020
by
Benjamin Port
Committed by
Benjamin Port
Oct 15, 2020
Browse files
KCM: Generate module data using cmake function
parent
808aaafc
Changes
22
Hide whitespace changes
Inline
Side-by-side
kcms/colors/CMakeLists.txt
View file @
dec9a10e
...
...
@@ -4,11 +4,18 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kcm_colors\")
set
(
kcm_colors_SRCS
../krdb/krdb.cpp
colors.cpp
colorsdata.cpp
colorsmodel.cpp
filterproxymodel.cpp
)
kcmutils_generate_module_data
(
kcm_colors_SRCS
MODULE_DATA_HEADER colorsdata.h
MODULE_DATA_CLASS_NAME ColorsData
SETTINGS_HEADERS colorssettings.h
SETTINGS_CLASSES ColorsSettings
)
# needed for krdb
kconfig_add_kcfg_files
(
kcm_colors_SRCS colorssettings.kcfgc GENERATE_MOC
)
...
...
kcms/colors/colorsdata.cpp
deleted
100644 → 0
View file @
808aaafc
/*
* Copyright (c) 2020 Benjamin Port <benjamin.port@enioka.com>
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include
"colorsdata.h"
#include
<QVariantList>
#include
"colorssettings.h"
ColorsData
::
ColorsData
(
QObject
*
parent
,
const
QVariantList
&
args
)
:
KCModuleData
(
parent
,
args
)
,
m_settings
(
new
ColorsSettings
(
this
))
{
autoRegisterSkeletons
();
}
ColorsSettings
*
ColorsData
::
settings
()
const
{
return
m_settings
;
}
kcms/colors/colorsdata.h
deleted
100644 → 0
View file @
808aaafc
/*
* Copyright (c) 2020 Benjamin Port <benjamin.port@enioka.com>
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef COLORSDATA_H
#define COLORSDATA_H
#include
<QObject>
#include
"kcmoduledata.h"
class
ColorsSettings
;
class
ColorsData
:
public
KCModuleData
{
Q_OBJECT
public:
explicit
ColorsData
(
QObject
*
parent
=
nullptr
,
const
QVariantList
&
args
=
QVariantList
());
ColorsSettings
*
settings
()
const
;
private:
ColorsSettings
*
m_settings
;
};
#endif
kcms/cursortheme/CMakeLists.txt
View file @
dec9a10e
...
...
@@ -15,7 +15,16 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/xcursor/ )
########### next target ###############
set
(
kcm_cursortheme_PART_SRCS kcmcursortheme.cpp cursorthemedata.cpp
${
libnoinst_SRCS
}
)
set
(
kcm_cursortheme_PART_SRCS kcmcursortheme.cpp
${
libnoinst_SRCS
}
)
kcmutils_generate_module_data
(
kcm_cursortheme_PART_SRCS
MODULE_DATA_HEADER cursorthemedata.h
MODULE_DATA_CLASS_NAME CursorThemeData
SETTINGS_HEADERS cursorthemesettings.h
SETTINGS_CLASSES CursorThemeSettings
)
kconfig_add_kcfg_files
(
kcm_cursortheme_PART_SRCS cursorthemesettings.kcfgc GENERATE_MOC
)
add_library
(
kcm_cursortheme MODULE
${
kcm_cursortheme_PART_SRCS
}
)
...
...
kcms/cursortheme/cursorthemedata.cpp
deleted
100644 → 0
View file @
808aaafc
/*
* Copyright (c) 2020 Benjamin Port <benjamin.port@enioka.com>
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include
"cursorthemedata.h"
#include
<QVariantList>
#include
"cursorthemesettings.h"
CursorThemeData
::
CursorThemeData
(
QObject
*
parent
,
const
QVariantList
&
args
)
:
KCModuleData
(
parent
,
args
)
,
m_settings
(
new
CursorThemeSettings
(
this
))
{
autoRegisterSkeletons
();
}
CursorThemeSettings
*
CursorThemeData
::
settings
()
const
{
return
m_settings
;
}
#include
"cursorthemedata.moc"
kcms/cursortheme/cursorthemedata.h
deleted
100644 → 0
View file @
808aaafc
/*
* Copyright (c) 2020 Benjamin Port <benjamin.port@enioka.com>
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef CURSORTHEMEDATA_H
#define CURSORTHEMEDATA_H
#include
<QObject>
#include
"kcmoduledata.h"
class
CursorThemeSettings
;
class
CursorThemeData
:
public
KCModuleData
{
Q_OBJECT
public:
explicit
CursorThemeData
(
QObject
*
parent
=
nullptr
,
const
QVariantList
&
args
=
QVariantList
());
CursorThemeSettings
*
settings
()
const
;
private:
CursorThemeSettings
*
m_settings
;
};
#endif
kcms/desktoptheme/CMakeLists.txt
View file @
dec9a10e
...
...
@@ -3,11 +3,18 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kcm_desktoptheme\")
set
(
kcm_desktoptheme_SRCS
kcm.cpp
desktopthemedata.cpp
themesmodel.cpp
filterproxymodel.cpp
)
kcmutils_generate_module_data
(
kcm_desktoptheme_SRCS
MODULE_DATA_HEADER desktopthemedata.h
MODULE_DATA_CLASS_NAME DesktopThemeData
SETTINGS_HEADERS desktopthemesettings.h
SETTINGS_CLASSES DesktopThemeSettings
)
kconfig_add_kcfg_files
(
kcm_desktoptheme_SRCS desktopthemesettings.kcfgc GENERATE_MOC
)
add_library
(
kcm_desktoptheme MODULE
${
kcm_desktoptheme_SRCS
}
)
...
...
kcms/desktoptheme/desktopthemedata.cpp
deleted
100644 → 0
View file @
808aaafc
/*
* Copyright (c) 2020 Benjamin Port <benjamin.port@enioka.com>
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include
"desktopthemedata.h"
#include
<QVariantList>
#include
"desktopthemesettings.h"
DesktopThemeData
::
DesktopThemeData
(
QObject
*
parent
,
const
QVariantList
&
args
)
:
KCModuleData
(
parent
,
args
)
,
m_settings
(
new
DesktopThemeSettings
(
this
))
{
autoRegisterSkeletons
();
}
DesktopThemeSettings
*
DesktopThemeData
::
settings
()
const
{
return
m_settings
;
}
#include
"desktopthemedata.moc"
kcms/desktoptheme/desktopthemedata.h
deleted
100644 → 0
View file @
808aaafc
/*
* Copyright (c) 2020 Benjamin Port <benjamin.port@enioka.com>
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef DESKTOPTHEMEDATA_H
#define DESKTOPTHEMEDATA_H
#include
<QObject>
#include
"kcmoduledata.h"
class
DesktopThemeSettings
;
class
DesktopThemeData
:
public
KCModuleData
{
Q_OBJECT
public:
explicit
DesktopThemeData
(
QObject
*
parent
=
nullptr
,
const
QVariantList
&
args
=
QVariantList
());
DesktopThemeSettings
*
settings
()
const
;
private:
DesktopThemeSettings
*
m_settings
;
};
#endif
kcms/fonts/CMakeLists.txt
View file @
dec9a10e
...
...
@@ -10,12 +10,20 @@ include_directories(${FREETYPE_INCLUDE_DIRS})
include_directories
(
../kfontinst/lib
)
set
(
kcm_fonts_PART_SRCS ../krdb/krdb.cpp previewrenderengine.cpp previewimageprovider.cpp fonts.cpp fontsaasettings.cpp
fontsdata.cpp
../kfontinst/lib/FcEngine.cpp
)
set
(
kcm_fonts_PART_SRCS ../krdb/krdb.cpp previewrenderengine.cpp previewimageprovider.cpp fonts.cpp fontsaasettings.cpp ../kfontinst/lib/FcEngine.cpp
)
if
(
X11_FOUND
)
set
(
kcm_fonts_PART_SRCS
${
kcm_fonts_PART_SRCS
}
${
libkxftconfig_SRCS
}
)
endif
()
kcmutils_generate_module_data
(
kcm_fonts_PART_SRCS
MODULE_DATA_HEADER fontsdata.h
MODULE_DATA_CLASS_NAME FontsData
SETTINGS_HEADERS fontssettings.h fontsaasettings.h
SETTINGS_CLASSES FontsSettings FontsAASettings
)
kconfig_add_kcfg_files
(
kcm_fonts_PART_SRCS fontssettings.kcfgc fontsaasettingsbase.kcfgc GENERATE_MOC
)
add_library
(
kcm_fonts MODULE
${
kcm_fonts_PART_SRCS
}
)
...
...
kcms/fonts/fonts.cpp
View file @
dec9a10e
...
...
@@ -93,12 +93,12 @@ KFonts::~KFonts()
FontsSettings
*
KFonts
::
fontsSettings
()
const
{
return
m_data
->
s
ettings
();
return
m_data
->
fontsS
ettings
();
}
FontsAASettings
*
KFonts
::
fontsAASettings
()
const
{
return
m_data
->
s
ettings
AA
();
return
m_data
->
fontsAAS
ettings
();
}
QAbstractItemModel
*
KFonts
::
subPixelOptionsModel
()
const
...
...
kcms/fonts/fontsdata.cpp
deleted
100644 → 0
View file @
808aaafc
/*
* Copyright (c) 2020 Benjamin Port <benjamin.port@enioka.com>
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include
"fontsdata.h"
#include
<QVariantList>
#include
"fontssettings.h"
#include
"fontsaasettings.h"
FontsData
::
FontsData
(
QObject
*
parent
,
const
QVariantList
&
args
)
:
KCModuleData
(
parent
,
args
)
,
m_settings
(
new
FontsSettings
(
this
))
,
m_settingsAA
(
new
FontsAASettings
(
this
))
{
autoRegisterSkeletons
();
}
FontsSettings
*
FontsData
::
settings
()
const
{
return
m_settings
;
}
FontsAASettings
*
FontsData
::
settingsAA
()
const
{
return
m_settingsAA
;
}
#include
"fontsdata.moc"
kcms/fonts/fontsdata.h
deleted
100644 → 0
View file @
808aaafc
/*
* Copyright (c) 2020 Benjamin Port <benjamin.port@enioka.com>
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef FONTSDATA_H
#define FONTSDATA_H
#include
<QObject>
#include
"kcmoduledata.h"
class
FontsSettings
;
class
FontsAASettings
;
class
FontsData
:
public
KCModuleData
{
Q_OBJECT
public:
explicit
FontsData
(
QObject
*
parent
=
nullptr
,
const
QVariantList
&
args
=
QVariantList
());
FontsSettings
*
settings
()
const
;
FontsAASettings
*
settingsAA
()
const
;
private:
FontsSettings
*
m_settings
;
FontsAASettings
*
m_settingsAA
;
};
#endif
kcms/icons/CMakeLists.txt
View file @
dec9a10e
...
...
@@ -2,7 +2,15 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kcm5_icons\")
########### next target ###############
set
(
kcm_icons_PART_SRCS main.cpp iconsmodel.cpp iconsizecategorymodel.cpp iconssettings.cpp iconsdata.cpp
)
set
(
kcm_icons_PART_SRCS main.cpp iconsmodel.cpp iconsizecategorymodel.cpp iconssettings.cpp
)
kcmutils_generate_module_data
(
kcm_icons_PART_SRCS
MODULE_DATA_HEADER iconsdata.h
MODULE_DATA_CLASS_NAME IconsData
SETTINGS_HEADERS iconssettings.h
SETTINGS_CLASSES IconsSettings
)
kconfig_add_kcfg_files
(
kcm_icons_PART_SRCS iconssettingsbase.kcfgc GENERATE_MOC
)
add_library
(
kcm_icons MODULE
${
kcm_icons_PART_SRCS
}
)
...
...
kcms/icons/iconsdata.cpp
deleted
100644 → 0
View file @
808aaafc
/*
* Copyright (c) 2020 Benjamin Port <benjamin.port@enioka.com>
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include
"iconsdata.h"
#include
<QVariantList>
#include
"iconssettings.h"
IconsData
::
IconsData
(
QObject
*
parent
,
const
QVariantList
&
args
)
:
KCModuleData
(
parent
,
args
)
,
m_settings
(
new
IconsSettings
(
this
))
{
autoRegisterSkeletons
();
}
IconsSettings
*
IconsData
::
settings
()
const
{
return
m_settings
;
}
#include
"iconsdata.moc"
kcms/icons/iconsdata.h
deleted
100644 → 0
View file @
808aaafc
/*
* Copyright (c) 2020 Benjamin Port <benjamin.port@enioka.com>
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef ICONSDATA_H
#define ICONSDATA_H
#include
<QObject>
#include
"kcmoduledata.h"
class
IconsSettings
;
class
IconsData
:
public
KCModuleData
{
Q_OBJECT
public:
explicit
IconsData
(
QObject
*
parent
=
nullptr
,
const
QVariantList
&
args
=
QVariantList
());
IconsSettings
*
settings
()
const
;
private:
IconsSettings
*
m_settings
;
};
#endif
kcms/lookandfeel/CMakeLists.txt
View file @
dec9a10e
...
...
@@ -9,7 +9,6 @@ configure_file (config-kcm.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kcm.h )
set
(
kcm_lookandfeel_SRCS
kcmmain.cpp
kcm.cpp
lookandfeeldata.cpp
../krdb/krdb.cpp
)
...
...
@@ -21,6 +20,14 @@ if (X11_Xcursor_FOUND)
)
endif
()
kcmutils_generate_module_data
(
kcm_lookandfeel_SRCS
MODULE_DATA_HEADER lookandfeeldata.h
MODULE_DATA_CLASS_NAME LookAndFeelData
SETTINGS_HEADERS lookandfeelsettings.h
SETTINGS_CLASSES LookAndFeelSettings
)
kconfig_add_kcfg_files
(
kcm_lookandfeel_SRCS lookandfeelsettings.kcfgc GENERATE_MOC
)
add_library
(
kcm_lookandfeel MODULE
${
kcm_lookandfeel_SRCS
}
)
...
...
kcms/lookandfeel/lookandfeeldata.cpp
deleted
100644 → 0
View file @
808aaafc
/*
* Copyright (c) 2020 Benjamin Port <benjamin.port@enioka.com>
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include
"lookandfeeldata.h"
#include
<QVariantList>
#include
"lookandfeelsettings.h"
LookAndFeelData
::
LookAndFeelData
(
QObject
*
parent
,
const
QVariantList
&
args
)
:
KCModuleData
(
parent
,
args
)
,
m_settings
(
new
LookAndFeelSettings
(
this
))
{
autoRegisterSkeletons
();
}
LookAndFeelSettings
*
LookAndFeelData
::
settings
()
const
{
return
m_settings
;
}
#include
"lookandfeeldata.moc"
kcms/lookandfeel/lookandfeeldata.h
deleted
100644 → 0
View file @
808aaafc
/*
* Copyright (c) 2020 Benjamin Port <benjamin.port@enioka.com>
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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 <http://www.gnu.org/licenses/>.