23 #include <tqvbuttongroup.h>
24 #include <tqradiobutton.h>
26 #include <tdelocale.h>
27 #include <tdemessagebox.h>
28 #include <tdeapplication.h>
29 #include <tdeglobal.h>
30 #include <tdeconfig.h>
31 #include <kstandarddirs.h>
32 #include <ksimpleconfig.h>
34 #include "configdialog.h"
35 #include "configdialog.moc"
37 ConfigDialog::ConfigDialog(TQWidget *parent)
38 : KDialogBase(Plain,i18n( "Configure Day Numbers"),Ok|Cancel,Ok,parent)
40 TQFrame *topFrame = plainPage();
41 TQVBoxLayout *topLayout = new TQVBoxLayout(topFrame,0,spacingHint());
45 mDayNumGroup = new TQVButtonGroup( i18n( "Show Date Number"), topFrame );
46 topLayout->addWidget( mDayNumGroup );
48 new TQRadioButton( i18n( "Show day number"), mDayNumGroup );
49 new TQRadioButton( i18n( "Show days to end of year"), mDayNumGroup );
50 new TQRadioButton( i18n( "Show both"), mDayNumGroup );
55 ConfigDialog::~ConfigDialog()
59 void ConfigDialog::load()
61 TDEConfig config( "korganizerrc", true, false);
62 config.setGroup( "Calendar/DateNum Plugin");
63 int datenum = config.readNumEntry( "ShowDayNumbers", 0 );
64 mDayNumGroup->setButton( datenum );
67 void ConfigDialog::save()
69 TDEConfig config( "korganizerrc", false, false);
70 config.setGroup( "Calendar/DateNum Plugin");
71 config.writeEntry( "ShowDayNumbers", mDayNumGroup->selectedId() );
75 void ConfigDialog::slotOk()
|