1
2/*
3* kcontrolmodule_example.h
4*
5* Copyright (C) 2010 David Hubner <hubnerd@ntlworld.com>
6*
7* This program is free software; you can redistribute it and/or modify
8* it under the terms of the GNU General Public License as published by
9* the Free Software Foundation; either version 2 of the License, or
10* (at your option) any later version.
11*
12* This program is distributed in the hope that it will be useful,
13* but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15* GNU General Public License for more details.
16*
17* You should have received a copy of the GNU General Public License
18* along with this program; if not, write to the Free Software
19* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20*
21*/
22
23#ifndef KCONTROLMODULEEXAMPLE
24#define KCONTROLMODULEEXAMPLE
25
26// Include to register and export your KCM plugin
27#include <KPluginFactory>
28#include <KPluginLoader>
29
30// Include KCModule, the class your need to inherit from
31#include <KCModule>
32
33// Include to set about data
34#include <KAboutData>
35#include <kdeversion.h>
36
37// Widgets and labels used for display
38#include <QWidget>
39#include <QLabel>
40#include <QVBoxLayout>
41
42/*
43Create the class, the KCM has to inherit KCModule
44Check http://api.kde.org/4.x-api/kdelibs/kdeui/classKCModule.html
45for reference.
46*/
47
48class KControlModuleExample : public KCModule
49{
50 Q_OBJECT
51
52 public:
53 KControlModuleExample(QWidget *, const QVariantList &);
54
55 private:
56 void createDisplay(QWidget *);
57 void exportInformation();
58
59 QLabel *m_exampleLabel;
60};
61
62#endif //KCONTROLMODULEEXAMPLE
63
64