21 #include "koglobals.h"
22 #include <tdeconfig.h>
23 #include <kstandarddirs.h>
25 #include "configdialog.h"
26 #include <kcalendarsystem.h>
28 class DatenumsFactory : public CalendarDecorationFactory {
33 K_EXPORT_COMPONENT_FACTORY( libkorg_datenums, DatenumsFactory )
38 TDEConfig config( "korganizerrc", true, false);
39 config.setGroup( "Calendar/DateNum Plugin");
40 mDateNum = config.readNumEntry( "ShowDayNumbers", 0 );
43 void Datenums::configure(TQWidget *parent)
51 TQString Datenums::shortText( const TQDate &date)
53 int doy = KOGlobals::self()->calendarSystem()->dayOfYear(date);
56 return TQString::number( KOGlobals::self()->calendarSystem()->daysInYear(date) - doy );
59 return i18n( "dayOfYear / daysTillEndOfYear", "%1 / %2").arg( doy )
60 .arg(KOGlobals::self()->calendarSystem()->daysInYear(date) - doy);
64 return TQString::number( doy );
66 return TQString::number( doy );
69 TQString Datenums::info()
71 return i18n( "This plugin provides numbers of days and weeks.");
This class provides the interface for a date dependent decoration.
|