kpilot_plugin.cpp
1 /*
2  This file is part of Kontact.
3  Copyright (C) 2003 Tobias Koenig <tokoe@kde.org>
4  Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #include "options.h"
23 
24 #include <kaboutdata.h>
25 #include <kgenericfactory.h>
26 #include <kparts/componentfactory.h>
27 
28 #include "core.h"
29 #include "summarywidget.h"
30 
31 #include "kpilot_plugin.h"
32 
33 typedef KGenericFactory< KPilotPlugin, Kontact::Core > KPilotPluginFactory;
34 K_EXPORT_COMPONENT_FACTORY( libkontact_kpilotplugin,
35  KPilotPluginFactory( "kontact_kpilotplugin" ) )
36 
37 KPilotPlugin::KPilotPlugin( Kontact::Core *core, const char *name, const TQStringList& )
38  : Kontact::Plugin( core, TQT_TQOBJECT(core), "kpilot" ), mAboutData( 0 )
39 {
40  setInstance( KPilotPluginFactory::instance() );
41  // TODO: Make sure kpilotDaemon is running!
42 
43 
44 }
45 
46 Kontact::Summary *KPilotPlugin::createSummaryWidget( TQWidget *parentWidget )
47 {
48  return new SummaryWidget( parentWidget );
49 }
50 
51 const KAboutData *KPilotPlugin::aboutData()
52 {
53  if ( !mAboutData ) {
54  mAboutData = new KAboutData("kpilotplugin", I18N_NOOP("KPilot Information"),
55  KPILOT_VERSION,
56  I18N_NOOP("KPilot - HotSync software for KDE\n\n"),
57  KAboutData::License_GPL, "(c) 2004 Reinhold Kainhofer");
58  mAboutData->addAuthor("Reinhold Kainhofer",
59  I18N_NOOP("Plugin Developer"), "reinhold@kainhofer.com", "http://reinhold.kainhofer.com/Linux/");
60  mAboutData->addAuthor("Dan Pilone",
61  I18N_NOOP("Project Leader"),
62  0, "http://www.kpilot.org/");
63  mAboutData->addAuthor("Adriaan de Groot",
64  I18N_NOOP("Maintainer"),
65  "groot@kde.org", "http://people.fruitsalad.org/adridg/");
66  }
67 
68  return mAboutData;
69 }