kontact

kpilot_plugin.cpp

00001 /*
00002    This file is part of Kontact.
00003    Copyright (C) 2003 Tobias Koenig <tokoe@kde.org>
00004      Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019    Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #include "options.h"
00023 
00024 #include <tdeaboutdata.h>
00025 #include <kgenericfactory.h>
00026 #include <tdeparts/componentfactory.h>
00027 
00028 #include "core.h"
00029 #include "summarywidget.h"
00030 
00031 #include "kpilot_plugin.h"
00032 
00033 typedef KGenericFactory< KPilotPlugin, Kontact::Core > KPilotPluginFactory;
00034 K_EXPORT_COMPONENT_FACTORY( libkontact_kpilotplugin,
00035                             KPilotPluginFactory( "kontact_kpilotplugin" ) )
00036 
00037 KPilotPlugin::KPilotPlugin( Kontact::Core *core, const char *name, const TQStringList& )
00038   : Kontact::Plugin( core, TQT_TQOBJECT(core), "kpilot" ), mAboutData( 0 )
00039 {
00040   setInstance( KPilotPluginFactory::instance() );
00041     // TODO: Make sure kpilotDaemon is running!
00042 
00043 
00044 }
00045 
00046 KPilotPlugin::~KPilotPlugin()
00047 {
00048 }
00049 
00050 Kontact::Summary *KPilotPlugin::createSummaryWidget( TQWidget *parentWidget )
00051 {
00052   return new SummaryWidget( parentWidget );
00053 }
00054 
00055 const TDEAboutData *KPilotPlugin::aboutData()
00056 {
00057   if ( !mAboutData ) {
00058     mAboutData = new TDEAboutData("kpilotplugin", I18N_NOOP("KPilot Information"),
00059         KPILOT_VERSION,
00060         I18N_NOOP("KPilot - HotSync software for TDE\n\n"),
00061         TDEAboutData::License_GPL, "(c) 2004 Reinhold Kainhofer");
00062     mAboutData->addAuthor("Reinhold Kainhofer",
00063         I18N_NOOP("Plugin Developer"), "reinhold@kainhofer.com", "http://reinhold.kainhofer.com/Linux/");
00064     mAboutData->addAuthor("Dan Pilone",
00065         I18N_NOOP("Project Leader"),
00066         0, "http://www.kpilot.org/");
00067     mAboutData->addAuthor("Adriaan de Groot",
00068         I18N_NOOP("Maintainer"),
00069         "groot@kde.org", "http://people.fruitsalad.org/adridg/");
00070   }
00071 
00072   return mAboutData;
00073 }