1
/***************************************************************************
2
* Copyright (C) 2009 Ben Cooksley <bcooksley@kde.org> *
4
* This program is free software; you can redistribute it and/or modify *
5
* it under the terms of the GNU General Public License as published by *
6
* the Free Software Foundation; either version 2 of the License, or *
7
* (at your option) any later version. *
9
* This program is distributed in the hope that it will be useful, *
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12
* GNU General Public License for more details. *
14
* You should have received a copy of the GNU General Public License *
15
* along with this program; if not, write to the *
16
* Free Software Foundation, Inc., *
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
18
***************************************************************************/
23
#include <QtCore/QObject>
24
#include "systemsettingsview_export.h"
31
* @brief Provides a interface sharing common data between modules in System Settings
33
* BaseData is a standard interface in System Settings to retrieve information that is shared between all modules.
34
* It is a singleton, and will be automatically cleaned up.
36
* @author Ben Cooksley <bcooksley@kde.org>
38
class SYSTEMSETTINGSVIEW_EXPORT BaseData : public QObject
41
Q_DISABLE_COPY(BaseData)
48
* Provides a pointer to access the shared BaseData instance in order to retrieve data.
50
* @returns Access to the shared instance of BaseData.
52
static BaseData* instance();
55
* Normal destructor that handles cleanup. Any objects created through BaseData must be assumed
56
* to be invalid afterwards.
61
* Provides the shared MenuItem which lists all categories and modules, for use with MenuModel.
63
* @returns the shared MenuItem.
65
MenuItem * menuItem();
68
* Sets the MenuItem which the Singleton will return.
69
* For internal use only.
71
* @param item A pointer to the MenuItem object
73
void setMenuItem( MenuItem * item );
76
* Returns the configuration group by the name provided in the current applications configuration file.
78
* @param pluginName the name of the group that is required.
79
* @returns The configuration group that is required.
81
KConfigGroup configGroup( const QString& pluginName );