1 | /* |
2 | Copyright (c) 2007 Volker Krause <vkrause@kde.org> |
3 | Copyright (c) 2008 Omat Holding B.V. <tomalbers@kde.nl> |
4 | |
5 | This library is free software; you can redistribute it and/or modify it |
6 | under the terms of the GNU Library General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or (at your |
8 | option) any later version. |
9 | |
10 | This library is distributed in the hope that it will be useful, but WITHOUT |
11 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
12 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public |
13 | License for more details. |
14 | |
15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to the |
17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
18 | 02110-1301, USA. |
19 | */ |
20 | |
21 | #include "configmodule.h" |
22 | #include "resourcesmanagementwidget.h" |
23 | |
24 | #include <klocale.h> |
25 | #include <kpluginfactory.h> |
26 | #include <kpluginloader.h> |
27 | #include <qboxlayout.h> |
28 | |
29 | K_PLUGIN_FACTORY( ResourcesConfigFactory, registerPlugin<ConfigModule>(); ) |
30 | K_EXPORT_PLUGIN( ResourcesConfigFactory( "imaplib" ) ) |
31 | |
32 | ConfigModule::ConfigModule( QWidget * parent, const QVariantList & args ) : |
33 | KCModule( ResourcesConfigFactory::componentData(), parent, args ) |
34 | { |
35 | KGlobal::locale()->insertCatalog( QLatin1String("kcm_akonadi" ) ); |
36 | KGlobal::locale()->insertCatalog( QLatin1String("libakonadi" ) ); |
37 | |
38 | setButtons( KCModule::Default | KCModule::Apply ); |
39 | QVBoxLayout *l = new QVBoxLayout( this ); |
40 | l->setMargin( 0 ); |
41 | |
42 | QStringList args2; |
43 | foreach ( const QVariant& item, args ) |
44 | args2 << item.toString(); |
45 | |
46 | ResourcesManagementWidget *tmw = new ResourcesManagementWidget( this, args2 ); |
47 | l->addWidget( tmw ); |
48 | } |
49 | |