22 #include <tdeaboutdata.h> 23 #include <tdeaction.h> 25 #include <kgenericfactory.h> 26 #include <kiconloader.h> 27 #include <kstatusbar.h> 30 #include "knotes_part.h" 31 #include "summarywidget.h" 33 #include "knotes_plugin.h" 36 typedef KGenericFactory< KNotesPlugin, Kontact::Core > KNotesPluginFactory; 37 K_EXPORT_COMPONENT_FACTORY( libkontact_knotesplugin, 38 KNotesPluginFactory( "kontact_knotesplugin" ) ) 41 KNotesPlugin::KNotesPlugin( Kontact::Core *core, const char *, const TQStringList & ) 42 : Kontact::Plugin( core, TQT_TQOBJECT(core), "knotes" ), 45 setInstance( KNotesPluginFactory::instance() ); 47 insertNewAction( new TDEAction( i18n( "New Note..." ), "knotes", CTRL+SHIFT+Key_N, 48 this, TQT_SLOT( slotNewNote() ), actionCollection(), "new_note" ) ); 49 insertSyncAction( new TDEAction( i18n( "Synchronize Notes" ), "reload", 0, 50 this, TQT_SLOT( slotSyncNotes() ), actionCollection(), "knotes_sync" ) ); 53 KNotesPlugin::~KNotesPlugin() 57 KParts::ReadOnlyPart* KNotesPlugin::createPart() 59 return new KNotesPart( this, "notes" ); 62 Kontact::Summary *KNotesPlugin::createSummaryWidget( TQWidget *parentWidget ) 64 return new KNotesSummaryWidget( this, parentWidget ); 67 const TDEAboutData *KNotesPlugin::aboutData() 70 mAboutData = new TDEAboutData( "knotes", I18N_NOOP( "Notes Management" ), 71 "0.5", I18N_NOOP( "Notes Management" ), 72 TDEAboutData::License_GPL_V2, 73 "(c) 2003-2004 The Kontact developers" ); 74 mAboutData->addAuthor( "Michael Brade", "Current Maintainer", "brade@kde.org" ); 75 mAboutData->addAuthor( "Tobias Koenig", "", "tokoe@kde.org" ); 84 void KNotesPlugin::slotNewNote() 87 static_cast<KNotesPart * >( part() )->newNote(); 90 void KNotesPlugin::slotSyncNotes() 92 DCOPRef ref( "kmail", "KMailICalIface" ); 93 ref.send( "triggerSync", TQString( "Note") ); 96 #include "knotes_plugin.moc"
Summary widget for display in the Summary View plugin.
|