00001
#include <kdialog.h>
00002
#include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
#include "calprintdayconfig_base.h"
00013
00014
#include <qvariant.h>
00015
#include <qpushbutton.h>
00016
#include <qcheckbox.h>
00017
#include <qgroupbox.h>
00018
#include <qlabel.h>
00019
#include <qdatetimeedit.h>
00020
#include <qlayout.h>
00021
#include <qtooltip.h>
00022
#include <qwhatsthis.h>
00023
#include "libkdepim/kdateedit.h"
00024
00025
00026
00027
00028
00029 CalPrintDayConfig_Base::CalPrintDayConfig_Base(
QWidget* parent,
const char* name, WFlags fl )
00030 :
QWidget( parent, name, fl )
00031 {
00032
if ( !name )
00033 setName(
"CalPrintDay_Base" );
00034 CalPrintDay_BaseLayout =
new QGridLayout(
this, 1, 1, 0, 6,
"CalPrintDay_BaseLayout");
00035
00036 mIncludeTodos =
new QCheckBox(
this,
"mIncludeTodos" );
00037 mIncludeTodos->setEnabled( FALSE );
00038
00039 CalPrintDay_BaseLayout->addWidget( mIncludeTodos, 1, 0 );
00040
00041 mDateRangeGroup =
new QGroupBox(
this,
"mDateRangeGroup" );
00042 mDateRangeGroup->setColumnLayout(0, Qt::Vertical );
00043 mDateRangeGroup->layout()->setSpacing( 6 );
00044 mDateRangeGroup->layout()->setMargin( 11 );
00045 mDateRangeGroupLayout =
new QGridLayout( mDateRangeGroup->layout() );
00046 mDateRangeGroupLayout->setAlignment( Qt::AlignTop );
00047 spacer1 =
new QSpacerItem( 121, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00048 mDateRangeGroupLayout->addItem( spacer1, 0, 4 );
00049 spacer2 =
new QSpacerItem( 121, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00050 mDateRangeGroupLayout->addItem( spacer2, 1, 4 );
00051
00052 mToDateLabel =
new QLabel( mDateRangeGroup,
"mToDateLabel" );
00053
00054 mDateRangeGroupLayout->addWidget( mToDateLabel, 0, 2 );
00055
00056 mFromDateLabel =
new QLabel( mDateRangeGroup,
"mFromDateLabel" );
00057
00058 mDateRangeGroupLayout->addWidget( mFromDateLabel, 0, 0 );
00059
00060 mFromTimeLabel =
new QLabel( mDateRangeGroup,
"mFromTimeLabel" );
00061
00062 mDateRangeGroupLayout->addWidget( mFromTimeLabel, 1, 0 );
00063
00064 mToTimeLabel =
new QLabel( mDateRangeGroup,
"mToTimeLabel" );
00065
00066 mDateRangeGroupLayout->addWidget( mToTimeLabel, 1, 2 );
00067
00068 mFromTime =
new QTimeEdit( mDateRangeGroup,
"mFromTime" );
00069 mFromTime->setTime(
QTime( 0, 8, 0 ) );
00070
00071 mDateRangeGroupLayout->addWidget( mFromTime, 1, 1 );
00072
00073 mToTime =
new QTimeEdit( mDateRangeGroup,
"mToTime" );
00074 mToTime->setTime(
QTime( 18, 0, 0 ) );
00075
00076 mDateRangeGroupLayout->addWidget( mToTime, 1, 3 );
00077
00078 mIncludeAllEvents =
new QCheckBox( mDateRangeGroup,
"mIncludeAllEvents" );
00079
00080 mDateRangeGroupLayout->addMultiCellWidget( mIncludeAllEvents, 2, 2, 0, 4 );
00081
00082 mToDate =
new KDateEdit( mDateRangeGroup,
"mToDate" );
00083 mToDate->setFocusPolicy( KDateEdit::StrongFocus );
00084
00085 mDateRangeGroupLayout->addWidget( mToDate, 0, 3 );
00086
00087 mFromDate =
new KDateEdit( mDateRangeGroup,
"mFromDate" );
00088 mFromDate->setFocusPolicy( KDateEdit::StrongFocus );
00089
00090 mDateRangeGroupLayout->addWidget( mFromDate, 0, 1 );
00091
00092 CalPrintDay_BaseLayout->addWidget( mDateRangeGroup, 0, 0 );
00093
00094 mColors =
new QCheckBox(
this,
"mColors" );
00095
00096 CalPrintDay_BaseLayout->addWidget( mColors, 2, 0 );
00097 spacer3 =
new QSpacerItem( 21, 201, QSizePolicy::Minimum, QSizePolicy::Expanding );
00098 CalPrintDay_BaseLayout->addItem( spacer3, 3, 0 );
00099 languageChange();
00100 resize(
QSize(505, 202).expandedTo(minimumSizeHint()) );
00101 clearWState( WState_Polished );
00102
00103
00104 mToDateLabel->setBuddy( mToDate );
00105 mFromDateLabel->setBuddy( mFromDate );
00106 mFromTimeLabel->setBuddy( mFromTime );
00107 mToTimeLabel->setBuddy( mToTime );
00108 }
00109
00110
00111
00112
00113 CalPrintDayConfig_Base::~CalPrintDayConfig_Base()
00114 {
00115
00116 }
00117
00118
00119
00120
00121
00122
void CalPrintDayConfig_Base::languageChange()
00123 {
00124 mIncludeTodos->setText( tr2i18n(
"Include to&dos that are due on the printed day(s)" ) );
00125 mDateRangeGroup->setTitle( tr2i18n(
"Date && Time Range" ) );
00126 mToDateLabel->setText( tr2i18n(
"&End date:" ) );
00127 mFromDateLabel->setText( tr2i18n(
"&Start date:" ) );
00128 mFromTimeLabel->setText( tr2i18n(
"Start &time:" ) );
00129 mToTimeLabel->setText( tr2i18n(
"End ti&me:" ) );
00130 mIncludeAllEvents->setText( tr2i18n(
"E&xtend time range to include all events" ) );
00131 mColors->setText( tr2i18n(
"&Use colors" ) );
00132 }
00133
00134
#include "calprintdayconfig_base.moc"