24 #include <tdeaction.h> 25 #include <tdeapplication.h> 27 #include <kiconloader.h> 28 #include <kinstance.h> 29 #include <tdelocale.h> 30 #include <tdeparts/genericfactory.h> 32 #include "mainwidget.h" 36 typedef KParts::GenericFactory< KitchenSyncPart > KitchenSyncFactory; 37 K_EXPORT_COMPONENT_FACTORY( libkitchensyncpart, KitchenSyncFactory ) 39 KitchenSyncPart::KitchenSyncPart( TQWidget *parentWidget, const char *widgetName, 40 TQObject *parent, const char *name, 42 : KParts::ReadOnlyPart( parent, name ) 44 setInstance( KitchenSyncFactory::instance() ); 46 TQVBox *canvas = new TQVBox( parentWidget, widgetName ); 49 new MainWidget( this, canvas ); 51 TDEGlobal::iconLoader()->addAppDir( "kitchensync" ); 53 setXMLFile( "kitchensync_part.rc" ); 56 KitchenSyncPart::~KitchenSyncPart() 61 TDEAboutData *KitchenSyncPart::createAboutData() 63 return MainWidget::aboutData(); 66 void KitchenSyncPart::exit() 71 bool KitchenSyncPart::openURL( const KURL &url ) 73 emit setWindowCaption( url.prettyURL() ); 78 bool KitchenSyncPart::openFile() 83 void KitchenSyncPart::guiActivateEvent( KParts::GUIActivateEvent *e ) 85 KParts::ReadOnlyPart::guiActivateEvent( e );
|