specialdates_plugin.cpp
1 /*
2  This file is part of Kontact.
3  Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
4  Copyright (c) 2004-2005 Allen Winter <winter@kde.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program 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
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 
25 #include <tdeaboutdata.h>
26 #include <kgenericfactory.h>
27 #include <kiconloader.h>
28 #include <tdelocale.h>
29 #include <tdeparts/componentfactory.h>
30 
31 #include "core.h"
32 #include "sdsummarywidget.h"
33 
34 #include "specialdates_plugin.h"
35 
36 typedef KGenericFactory< SpecialdatesPlugin, Kontact::Core > SpecialdatesPluginFactory;
37 K_EXPORT_COMPONENT_FACTORY( libkontact_specialdatesplugin,
38  SpecialdatesPluginFactory( "kontact_specialdatesplugin" ) )
39 
40 SpecialdatesPlugin::SpecialdatesPlugin( Kontact::Core *core, const char *name, const TQStringList& )
41  : Kontact::Plugin( core, core, name ),
42  mAboutData( 0 )
43 {
44  setInstance( SpecialdatesPluginFactory::instance() );
45  instance()->iconLoader()->addAppDir( "tdepim" );
46 }
47 
48 SpecialdatesPlugin::~SpecialdatesPlugin()
49 {
50 }
51 
52 Kontact::Summary *SpecialdatesPlugin::createSummaryWidget( TQWidget *parentWidget )
53 {
54  return new SDSummaryWidget( this, parentWidget );
55 }
56 
57 const TDEAboutData *SpecialdatesPlugin::aboutData()
58 {
59  if ( !mAboutData ) {
60  mAboutData = new TDEAboutData( "specialdates",
61  I18N_NOOP( "Special Dates Summary" ),
62  "1.0",
63  I18N_NOOP( "Kontact Special Dates Summary" ),
64  TDEAboutData::License_LGPL,
65  I18N_NOOP( "(c) 2004-2005 The KDE PIM Team" ) );
66  mAboutData->addAuthor( "Allen Winter", "Current Maintainer", "winter@kde.org" );
67  mAboutData->addAuthor( "Tobias Koenig", "", "tokoe@kde.org" );
68  mAboutData->setProductName( "kontact/specialdates" );
69  }
70 
71  return mAboutData;
72 }
Summary widget for display in the Summary View plugin.
Definition: summary.h:37