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: Fri Feb 3 16:06:41 2012
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "calprintdayconfig_base.h"
00012 
00013 #include <qvariant.h>
00014 #include <qpushbutton.h>
00015 #include <qcheckbox.h>
00016 #include <qgroupbox.h>
00017 #include <qlabel.h>
00018 #include <qdatetimeedit.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 
00023 /*
00024  *  Constructs a CalPrintDayConfig_Base as a child of 'parent', with the
00025  *  name 'name' and widget flags set to 'f'.
00026  */
00027 CalPrintDayConfig_Base::CalPrintDayConfig_Base( QWidget* parent, const char* name, WFlags fl )
00028     : QWidget( parent, name, fl )
00029 {
00030     if ( !name )
00031     setName( "CalPrintDay_Base" );
00032     CalPrintDay_BaseLayout = new QGridLayout( this, 1, 1, 0, 6, "CalPrintDay_BaseLayout"); 
00033 
00034     mIncludeTodos = new QCheckBox( this, "mIncludeTodos" );
00035     mIncludeTodos->setEnabled( FALSE );
00036 
00037     CalPrintDay_BaseLayout->addWidget( mIncludeTodos, 1, 0 );
00038 
00039     mDateRangeGroup = new QGroupBox( this, "mDateRangeGroup" );
00040     mDateRangeGroup->setColumnLayout(0, Qt::Vertical );
00041     mDateRangeGroup->layout()->setSpacing( 6 );
00042     mDateRangeGroup->layout()->setMargin( 11 );
00043     mDateRangeGroupLayout = new QGridLayout( mDateRangeGroup->layout() );
00044     mDateRangeGroupLayout->setAlignment( Qt::AlignTop );
00045     spacer1 = new QSpacerItem( 121, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00046     mDateRangeGroupLayout->addItem( spacer1, 0, 4 );
00047     spacer2 = new QSpacerItem( 121, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00048     mDateRangeGroupLayout->addItem( spacer2, 1, 4 );
00049 
00050     mFromDateLabel = new QLabel( mDateRangeGroup, "mFromDateLabel" );
00051 
00052     mDateRangeGroupLayout->addWidget( mFromDateLabel, 0, 0 );
00053 
00054     mToTimeLabel = new QLabel( mDateRangeGroup, "mToTimeLabel" );
00055 
00056     mDateRangeGroupLayout->addWidget( mToTimeLabel, 1, 2 );
00057 
00058     mToTime = new QTimeEdit( mDateRangeGroup, "mToTime" );
00059     mToTime->setTime( QTime( 18, 0, 0 ) );
00060     mToTime->setDisplay( int( QTimeEdit::Minutes | QTimeEdit::Hours ) );
00061 
00062     mDateRangeGroupLayout->addWidget( mToTime, 1, 3 );
00063 
00064     mIncludeAllEvents = new QCheckBox( mDateRangeGroup, "mIncludeAllEvents" );
00065 
00066     mDateRangeGroupLayout->addMultiCellWidget( mIncludeAllEvents, 2, 2, 0, 4 );
00067 
00068     mFromDate = new KDateEdit( mDateRangeGroup, "mFromDate" );
00069     mFromDate->setFocusPolicy( KDateEdit::StrongFocus );
00070 
00071     mDateRangeGroupLayout->addWidget( mFromDate, 0, 1 );
00072 
00073     mFromTime = new QTimeEdit( mDateRangeGroup, "mFromTime" );
00074     mFromTime->setTime( QTime( 8, 0, 0 ) );
00075     mFromTime->setDisplay( int( QTimeEdit::Minutes | QTimeEdit::Hours ) );
00076 
00077     mDateRangeGroupLayout->addWidget( mFromTime, 0, 3 );
00078 
00079     mFromTimeLabel = new QLabel( mDateRangeGroup, "mFromTimeLabel" );
00080 
00081     mDateRangeGroupLayout->addWidget( mFromTimeLabel, 0, 2 );
00082 
00083     mToDate = new KDateEdit( mDateRangeGroup, "mToDate" );
00084     mToDate->setFocusPolicy( KDateEdit::StrongFocus );
00085 
00086     mDateRangeGroupLayout->addWidget( mToDate, 1, 1 );
00087 
00088     mToDateLabel = new QLabel( mDateRangeGroup, "mToDateLabel" );
00089 
00090     mDateRangeGroupLayout->addWidget( mToDateLabel, 1, 0 );
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(386, 202).expandedTo(minimumSizeHint()) );
00101     clearWState( WState_Polished );
00102 
00103     // tab order
00104     setTabOrder( mFromDate, mFromTime );
00105     setTabOrder( mFromTime, mToDate );
00106     setTabOrder( mToDate, mToTime );
00107     setTabOrder( mToTime, mIncludeAllEvents );
00108     setTabOrder( mIncludeAllEvents, mIncludeTodos );
00109     setTabOrder( mIncludeTodos, mColors );
00110 
00111     // buddies
00112     mFromDateLabel->setBuddy( mFromDate );
00113     mToTimeLabel->setBuddy( mToTime );
00114     mFromTimeLabel->setBuddy( mFromTime );
00115     mToDateLabel->setBuddy( mToDate );
00116 }
00117 
00118 /*
00119  *  Destroys the object and frees any allocated resources
00120  */
00121 CalPrintDayConfig_Base::~CalPrintDayConfig_Base()
00122 {
00123     // no need to delete child widgets, Qt does it all for us
00124 }
00125 
00126 /*
00127  *  Sets the strings of the subwidgets using the current
00128  *  language.
00129  */
00130 void CalPrintDayConfig_Base::languageChange()
00131 {
00132     mIncludeTodos->setText( tr2i18n( "Include to-&dos that are due on the printed day(s)" ) );
00133     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." ) );
00134     mDateRangeGroup->setTitle( tr2i18n( "Date && Time Range" ) );
00135     mFromDateLabel->setText( tr2i18n( "&Start date:" ) );
00136     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." ) );
00137     mToTimeLabel->setText( tr2i18n( "End ti&me:" ) );
00138     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>." ) );
00139     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>." ) );
00140     mIncludeAllEvents->setText( tr2i18n( "E&xtend time range to include all events" ) );
00141     QWhatsThis::add( mIncludeAllEvents, tr2i18n( "Check this option to automatically determine the required time range, so all events will be shown." ) );
00142     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." ) );
00143     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>." ) );
00144     mFromTimeLabel->setText( tr2i18n( "Start &time:" ) );
00145     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>." ) );
00146     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." ) );
00147     mToDateLabel->setText( tr2i18n( "&End date:" ) );
00148     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." ) );
00149     mColors->setText( tr2i18n( "&Use colors" ) );
00150     QWhatsThis::add( mColors, tr2i18n( "If you want to use colors to distinguish certain categories on the print, check this option." ) );
00151 }
00152 
00153 #include "calprintdayconfig_base.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys