22 #include <tdeapplication.h> 23 #include <tdeconfig.h> 24 #include <kstandarddirs.h> 25 #include <tdelocale.h> 27 #include <tdeaction.h> 28 #include <tdeglobal.h> 30 #include "kotimespanview.h" 32 #include "timespanview.h" 34 #include "timespanview.moc" 36 class TimespanViewFactory : public KOrg::PartFactory { 40 return new TimespanView( parent, name ); 44 K_EXPORT_COMPONENT_FACTORY( libkorg_timespanview, TimespanViewFactory ) 47 TimespanView::TimespanView( KOrg:: MainWindow *parent, const char *name) : 48 KOrg::Part(parent,name), mView(0) 50 setInstance( new TDEInstance( "korganizer" ) ); 52 setXMLFile( "plugins/timespanviewui.rc" ); 54 new TDEAction( i18n( "&Timespan"), "timespan", 0, this, TQT_SLOT( showView() ), 55 actionCollection(), "view_timespan" ); 58 TimespanView::~TimespanView() 62 TQString TimespanView::info() 64 return i18n( "This plugin provides a Gantt-like Timespan view."); 67 TQString TimespanView::shortInfo() 69 return i18n( "Timespan View Plugin" ); 72 void TimespanView::showView() 75 mView = new KOTimeSpanView( mainWindow()-> view()->calendar(), 76 mainWindow()-> view() ); 77 mainWindow()->view()->addView( mView ); 79 mainWindow()->view()->showView( mView );
bool view(TQWidget *parent, Attachment *attachment)
interface for korganizer main window
|