Changeset View
Changeset View
Standalone View
Standalone View
effects/showfps/showfps_config.cpp
Show All 16 Lines | |||||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | 20 | | |||
21 | #include "showfps_config.h" | 21 | #include "showfps_config.h" | ||
22 | 22 | | |||
23 | // KConfigSkeleton | 23 | // KConfigSkeleton | ||
24 | #include "showfpsconfig.h" | 24 | #include "showfpsconfig.h" | ||
25 | #include <config-kwin.h> | ||||
25 | #include <kwineffects_interface.h> | 26 | #include <kwineffects_interface.h> | ||
26 | 27 | | |||
27 | #include <KLocalizedString> | 28 | #include <KLocalizedString> | ||
28 | #include <KAboutData> | 29 | #include <KAboutData> | ||
29 | #include <KPluginFactory> | 30 | #include <KPluginFactory> | ||
30 | 31 | | |||
31 | K_PLUGIN_FACTORY_WITH_JSON(ShowFpsEffectConfigFactory, | 32 | K_PLUGIN_FACTORY_WITH_JSON(ShowFpsEffectConfigFactory, | ||
32 | "showfps_config.json", | 33 | "showfps_config.json", | ||
33 | registerPlugin<KWin::ShowFpsEffectConfig>();) | 34 | registerPlugin<KWin::ShowFpsEffectConfig>();) | ||
34 | 35 | | |||
35 | namespace KWin | 36 | namespace KWin | ||
36 | { | 37 | { | ||
37 | 38 | | |||
38 | ShowFpsEffectConfig::ShowFpsEffectConfig(QWidget* parent, const QVariantList& args) : | 39 | ShowFpsEffectConfig::ShowFpsEffectConfig(QWidget* parent, const QVariantList& args) : | ||
39 | KCModule(KAboutData::pluginData(QStringLiteral("showfps")), parent, args) | 40 | KCModule(KAboutData::pluginData(QStringLiteral("showfps")), parent, args) | ||
40 | { | 41 | { | ||
41 | m_ui = new Ui::ShowFpsEffectConfigForm; | 42 | m_ui = new Ui::ShowFpsEffectConfigForm; | ||
42 | m_ui->setupUi(this); | 43 | m_ui->setupUi(this); | ||
43 | 44 | | |||
45 | ShowFpsConfig::instance(KWIN_CONFIG); | ||||
44 | addConfig(ShowFpsConfig::self(), this); | 46 | addConfig(ShowFpsConfig::self(), this); | ||
45 | 47 | | |||
46 | load(); | 48 | load(); | ||
47 | } | 49 | } | ||
48 | 50 | | |||
49 | ShowFpsEffectConfig::~ShowFpsEffectConfig() | 51 | ShowFpsEffectConfig::~ShowFpsEffectConfig() | ||
50 | { | 52 | { | ||
51 | delete m_ui; | 53 | delete m_ui; | ||
Show All 14 Lines |