25 #ifndef KORG_NOPRINTER
27 #include "listprint.h"
29 #include "calprintpluginbase.h"
30 #include <libkcal/event.h>
31 #include <libkcal/todo.h>
33 #include <libtdepim/kdateedit.h>
34 #include <tdeconfig.h>
37 #include <tqbuttongroup.h>
39 #include "calprintlistconfig_base.h"
42 class ListPrintFactory :
public KOrg::PrintPluginFactory {
47 K_EXPORT_COMPONENT_FACTORY( libkorg_listprint, ListPrintFactory )
55 TQWidget *CalPrintList::createConfigWidget( TQWidget *w )
57 return new CalPrintListConfig_Base( w );
60 void CalPrintList::readSettingsWidget()
62 CalPrintListConfig_Base *cfg =
63 dynamic_cast<CalPrintListConfig_Base*
>( mConfigWidget );
65 mFromDate = cfg->mFromDate->date();
66 mToDate = cfg->mToDate->date();
67 mUseDateRange = (cfg->mDateRangeGroup->selectedId() == 1);
71 void CalPrintList::setSettingsWidget()
73 CalPrintListConfig_Base *cfg =
74 dynamic_cast<CalPrintListConfig_Base*
>( mConfigWidget );
76 cfg->mFromDate->setDate( mFromDate );
77 cfg->mToDate->setDate( mToDate );
79 cfg->mDateRangeGroup->setButton( (mUseDateRange)?1:0 );
83 void CalPrintList::loadConfig()
86 mUseDateRange = mConfig->readBoolEntry(
"ListsInRange",
false );
91 void CalPrintList::saveConfig()
93 kdDebug(5850) <<
"CalPrintList::saveConfig()" << endl;
97 mConfig->writeEntry(
"ListsInRange", mUseDateRange );
101 void CalPrintList::setDateRange(
const TQDate& from,
const TQDate& to )
104 CalPrintListConfig_Base *cfg =
105 dynamic_cast<CalPrintListConfig_Base*
>( mConfigWidget );
107 cfg->mFromDate->setDate( from );
108 cfg->mToDate->setDate( to );
112 void CalPrintList::print( TQPainter &p,
int width,
int height )
Base class for KOrganizer printing classes.
virtual void setDateRange(const TQDate &from, const TQDate &to)
Set date range which should be printed.