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