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