00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "calprintmonthconfig_base.h"
00013
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qgroupbox.h>
00017 #include <qlabel.h>
00018 #include <qcheckbox.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 #include "libkdepim/kdateedit.h"
00023
00024
00025
00026
00027
00028 CalPrintMonthConfig_Base::CalPrintMonthConfig_Base( QWidget* parent, const char* name, WFlags fl )
00029 : QWidget( parent, name, fl )
00030 {
00031 if ( !name )
00032 setName( "CalPrintMonth_Base" );
00033 CalPrintMonth_BaseLayout = new QGridLayout( this, 1, 1, 0, 6, "CalPrintMonth_BaseLayout");
00034 spacer2 = new QSpacerItem( 21, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00035 CalPrintMonth_BaseLayout->addItem( spacer2, 5, 0 );
00036
00037 mDateRangeGroup = new QGroupBox( this, "mDateRangeGroup" );
00038 mDateRangeGroup->setColumnLayout(0, Qt::Vertical );
00039 mDateRangeGroup->layout()->setSpacing( 6 );
00040 mDateRangeGroup->layout()->setMargin( 11 );
00041 mDateRangeGroupLayout = new QGridLayout( mDateRangeGroup->layout() );
00042 mDateRangeGroupLayout->setAlignment( Qt::AlignTop );
00043 spacer1 = new QSpacerItem( 17, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00044 mDateRangeGroupLayout->addItem( spacer1, 0, 4 );
00045
00046 mToDateLabel = new QLabel( mDateRangeGroup, "mToDateLabel" );
00047
00048 mDateRangeGroupLayout->addWidget( mToDateLabel, 0, 2 );
00049
00050 mFromDateLabel = new QLabel( mDateRangeGroup, "mFromDateLabel" );
00051
00052 mDateRangeGroupLayout->addWidget( mFromDateLabel, 0, 0 );
00053
00054 mToDate = new KDateEdit( mDateRangeGroup, "mToDate" );
00055 mToDate->setMinimumSize( QSize( 50, 0 ) );
00056 mToDate->setFocusPolicy( KDateEdit::StrongFocus );
00057
00058 mDateRangeGroupLayout->addWidget( mToDate, 0, 3 );
00059
00060 mFromDate = new KDateEdit( mDateRangeGroup, "mFromDate" );
00061 mFromDate->setMinimumSize( QSize( 50, 0 ) );
00062 mFromDate->setFocusPolicy( KDateEdit::StrongFocus );
00063
00064 mDateRangeGroupLayout->addWidget( mFromDate, 0, 1 );
00065
00066 CalPrintMonth_BaseLayout->addWidget( mDateRangeGroup, 0, 0 );
00067
00068 mIncludeTodos = new QCheckBox( this, "mIncludeTodos" );
00069 mIncludeTodos->setEnabled( FALSE );
00070
00071 CalPrintMonth_BaseLayout->addWidget( mIncludeTodos, 4, 0 );
00072
00073 mWeekNumbers = new QCheckBox( this, "mWeekNumbers" );
00074
00075 CalPrintMonth_BaseLayout->addWidget( mWeekNumbers, 1, 0 );
00076
00077 mRecurDaily = new QCheckBox( this, "mRecurDaily" );
00078
00079 CalPrintMonth_BaseLayout->addWidget( mRecurDaily, 2, 0 );
00080
00081 mRecurWeekly = new QCheckBox( this, "mRecurWeekly" );
00082
00083 CalPrintMonth_BaseLayout->addWidget( mRecurWeekly, 3, 0 );
00084 languageChange();
00085 resize( QSize(401, 173).expandedTo(minimumSizeHint()) );
00086 clearWState( WState_Polished );
00087
00088
00089 setTabOrder( mFromDate, mToDate );
00090 setTabOrder( mToDate, mWeekNumbers );
00091 setTabOrder( mWeekNumbers, mRecurDaily );
00092 setTabOrder( mRecurDaily, mRecurWeekly );
00093 setTabOrder( mRecurWeekly, mIncludeTodos );
00094
00095
00096 mToDateLabel->setBuddy( mToDate );
00097 mFromDateLabel->setBuddy( mFromDate );
00098 }
00099
00100
00101
00102
00103 CalPrintMonthConfig_Base::~CalPrintMonthConfig_Base()
00104 {
00105
00106 }
00107
00108
00109
00110
00111
00112 void CalPrintMonthConfig_Base::languageChange()
00113 {
00114 mDateRangeGroup->setTitle( tr2i18n( "Date && Time Range" ) );
00115 mToDateLabel->setText( tr2i18n( "&End month:" ) );
00116 QWhatsThis::add( mToDateLabel, tr2i18n( "When you want to print more months at once, you can define a month range. This option defines the last month to be printed. Use the option <i>Start month</i> to define the first month in this range." ) );
00117 mFromDateLabel->setText( tr2i18n( "&Start month:" ) );
00118 QWhatsThis::add( mFromDateLabel, tr2i18n( "When you want to print more months at once, you can define a month range. This option defines the first month to be printed. Use the option <i>End month</i> to define the last month in this range." ) );
00119 QWhatsThis::add( mToDate, tr2i18n( "When you want to print more months at once, you can define a month range. This option defines the last month to be printed. Use the option <i>Start month</i> to define the first month in this range." ) );
00120 QWhatsThis::add( mFromDate, tr2i18n( "When you want to print more months at once, you can define a month range. This option defines the first month to be printed." ) );
00121 mIncludeTodos->setText( tr2i18n( "Include to-&dos that are due on the printed day(s)" ) );
00122 QWhatsThis::add( mIncludeTodos, tr2i18n( "Check this option if you want to have to-dos on the print, placed by their due date." ) );
00123 mWeekNumbers->setText( tr2i18n( "Print week &numbers" ) );
00124 QWhatsThis::add( mWeekNumbers, tr2i18n( "Enable this to print week numbers at the left of each row." ) );
00125 mRecurDaily->setText( tr2i18n( "Print daily re&curring to-dos and events" ) );
00126 QWhatsThis::add( mRecurDaily, tr2i18n( "With this option it is possible to leave out the daily recurring to-dos and events in the print. They take a lot of space and make the month view needlessly complicated." ) );
00127 mRecurWeekly->setText( tr2i18n( "Print weekl&y recurring to-dos and events" ) );
00128 QWhatsThis::add( mRecurWeekly, tr2i18n( "Similar to \"Print daily recurring to-dos and events\". Weekly to-dos and events will be omitted when making a print of the selected month." ) );
00129 }
00130
00131 #include "calprintmonthconfig_base.moc"