korganizer

calprintdayconfig_base.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './calprintdayconfig_base.ui'
00005 **
00006 ** Created: Thu Mar 29 06:08:54 2007
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
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  *  Constructs a CalPrintDayConfig_Base as a child of 'parent', with the
00027  *  name 'name' and widget flags set to 'f'.
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     mFromDateLabel = new QLabel( mDateRangeGroup, "mFromDateLabel" );
00053 
00054     mDateRangeGroupLayout->addWidget( mFromDateLabel, 0, 0 );
00055 
00056     mToTimeLabel = new QLabel( mDateRangeGroup, "mToTimeLabel" );
00057 
00058     mDateRangeGroupLayout->addWidget( mToTimeLabel, 1, 2 );
00059 
00060     mToTime = new QTimeEdit( mDateRangeGroup, "mToTime" );
00061     mToTime->setTime( QTime( 18, 0, 0 ) );
00062     mToTime->setDisplay( int( QTimeEdit::Minutes | QTimeEdit::Hours ) );
00063 
00064     mDateRangeGroupLayout->addWidget( mToTime, 1, 3 );
00065 
00066     mIncludeAllEvents = new QCheckBox( mDateRangeGroup, "mIncludeAllEvents" );
00067 
00068     mDateRangeGroupLayout->addMultiCellWidget( mIncludeAllEvents, 2, 2, 0, 4 );
00069 
00070     mFromDate = new KDateEdit( mDateRangeGroup, "mFromDate" );
00071     mFromDate->setFocusPolicy( KDateEdit::StrongFocus );
00072 
00073     mDateRangeGroupLayout->addWidget( mFromDate, 0, 1 );
00074 
00075     mFromTime = new QTimeEdit( mDateRangeGroup, "mFromTime" );
00076     mFromTime->setTime( QTime( 8, 0, 0 ) );
00077     mFromTime->setDisplay( int( QTimeEdit::Minutes | QTimeEdit::Hours ) );
00078 
00079     mDateRangeGroupLayout->addWidget( mFromTime, 0, 3 );
00080 
00081     mFromTimeLabel = new QLabel( mDateRangeGroup, "mFromTimeLabel" );
00082 
00083     mDateRangeGroupLayout->addWidget( mFromTimeLabel, 0, 2 );
00084 
00085     mToDate = new KDateEdit( mDateRangeGroup, "mToDate" );
00086     mToDate->setFocusPolicy( KDateEdit::StrongFocus );
00087 
00088     mDateRangeGroupLayout->addWidget( mToDate, 1, 1 );
00089 
00090     mToDateLabel = new QLabel( mDateRangeGroup, "mToDateLabel" );
00091 
00092     mDateRangeGroupLayout->addWidget( mToDateLabel, 1, 0 );
00093 
00094     CalPrintDay_BaseLayout->addWidget( mDateRangeGroup, 0, 0 );
00095 
00096     mColors = new QCheckBox( this, "mColors" );
00097 
00098     CalPrintDay_BaseLayout->addWidget( mColors, 2, 0 );
00099     spacer3 = new QSpacerItem( 21, 201, QSizePolicy::Minimum, QSizePolicy::Expanding );
00100     CalPrintDay_BaseLayout->addItem( spacer3, 3, 0 );
00101     languageChange();
00102     resize( QSize(386, 202).expandedTo(minimumSizeHint()) );
00103     clearWState( WState_Polished );
00104 
00105     // tab order
00106     setTabOrder( mFromDate, mFromTime );
00107     setTabOrder( mFromTime, mToDate );
00108     setTabOrder( mToDate, mToTime );
00109     setTabOrder( mToTime, mIncludeAllEvents );
00110     setTabOrder( mIncludeAllEvents, mIncludeTodos );
00111     setTabOrder( mIncludeTodos, mColors );
00112 
00113     // buddies
00114     mFromDateLabel->setBuddy( mFromDate );
00115     mToTimeLabel->setBuddy( mToTime );
00116     mFromTimeLabel->setBuddy( mFromTime );
00117     mToDateLabel->setBuddy( mToDate );
00118 }
00119 
00120 /*
00121  *  Destroys the object and frees any allocated resources
00122  */
00123 CalPrintDayConfig_Base::~CalPrintDayConfig_Base()
00124 {
00125     // no need to delete child widgets, Qt does it all for us
00126 }
00127 
00128 /*
00129  *  Sets the strings of the subwidgets using the current
00130  *  language.
00131  */
00132 void CalPrintDayConfig_Base::languageChange()
00133 {
00134     mIncludeTodos->setText( tr2i18n( "Include to-&dos that are due on the printed day(s)" ) );
00135     QWhatsThis::add( mIncludeTodos, tr2i18n( "You should check this option if you want to print to-dos which are due on one of the dates which are in the supplied date range." ) );
00136     mDateRangeGroup->setTitle( tr2i18n( "Date && Time Range" ) );
00137     mFromDateLabel->setText( tr2i18n( "&Start date:" ) );
00138     QWhatsThis::add( mFromDateLabel, tr2i18n( "If you want to print more days at once, you can define a range of dates with this option and the <i>End date</i> option. This option is used to define the start date." ) );
00139     mToTimeLabel->setText( tr2i18n( "End ti&me:" ) );
00140     QWhatsThis::add( mToTimeLabel, tr2i18n( "It is possible to print only those events which are inside a given timerange. With this time selection box you can define the end of this time range. The start time should be defined with the <i>Start time</i> option. Note you can automatically modify these settings if you check <i>Extend time range to include all events</i>." ) );
00141     QWhatsThis::add( mToTime, tr2i18n( "It's possible to print only those events which are inside a given timerange. With this time selection box you can define the end of this time range. The start time should be defined with the <i>Start time</i> option. Note you can automatically modify these settings if you check <i>Extend time range to include all events</i>." ) );
00142     mIncludeAllEvents->setText( tr2i18n( "E&xtend time range to include all events" ) );
00143     QWhatsThis::add( mIncludeAllEvents, tr2i18n( "Check this option to automatically determine the required time range, so all events will be shown." ) );
00144     QWhatsThis::add( mFromDate, tr2i18n( "If you want to print more days at once, you can define a range of dates with this option and the <i>End date</i> option. This option is used to define the start date." ) );
00145     QWhatsThis::add( mFromTime, tr2i18n( "It's possible to print only those events which are inside a given timerange. With this time selection box you can define the start of this time range. The end time should be defined with the <i>End time</i> option. Note you can automatically modify these settings if you check <i>Extend time range to include all events</i>." ) );
00146     mFromTimeLabel->setText( tr2i18n( "Start &time:" ) );
00147     QWhatsThis::add( mFromTimeLabel, tr2i18n( "It is possible to print only those events which are inside a given timerange. With this time selection box you can define the start of this time range. The end time should be defined with the <i>End time</i> option. Note you can automatically modify these settings if you check <i>Extend time range to include all events</i>." ) );
00148     QWhatsThis::add( mToDate, tr2i18n( "If you want to print more days at once, you can define a range of dates with this option and the <i>Start date</i> option. This option is used to define the end date." ) );
00149     mToDateLabel->setText( tr2i18n( "&End date:" ) );
00150     QWhatsThis::add( mToDateLabel, tr2i18n( "If you want to print more days at once, you can define a range of dates with this option and the <i>Start date</i> option. This option is used to define the end date." ) );
00151     mColors->setText( tr2i18n( "&Use colors" ) );
00152     QWhatsThis::add( mColors, tr2i18n( "If you want to use colors to distinguish certain categories on the print, check this option." ) );
00153 }
00154 
00155 #include "calprintdayconfig_base.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys