korganizer

calprintweekconfig_base.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './calprintweekconfig_base.ui'
00005 **
00006 ** Created: Tue Jan 19 16:46:35 2010
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "calprintweekconfig_base.h"
00012 
00013 #include <qvariant.h>
00014 #include <qpushbutton.h>
00015 #include <qgroupbox.h>
00016 #include <qlabel.h>
00017 #include <qdatetimeedit.h>
00018 #include <qcheckbox.h>
00019 #include <qbuttongroup.h>
00020 #include <qradiobutton.h>
00021 #include <qlayout.h>
00022 #include <qtooltip.h>
00023 #include <qwhatsthis.h>
00024 #include "libkdepim/kdateedit.h"
00025 
00026 /*
00027  *  Constructs a CalPrintWeekConfig_Base as a child of 'parent', with the
00028  *  name 'name' and widget flags set to 'f'.
00029  */
00030 CalPrintWeekConfig_Base::CalPrintWeekConfig_Base( QWidget* parent, const char* name, WFlags fl )
00031     : QWidget( parent, name, fl )
00032 {
00033     if ( !name )
00034     setName( "CalPrintWeek_Base" );
00035     CalPrintWeek_BaseLayout = new QGridLayout( this, 1, 1, 0, 6, "CalPrintWeek_BaseLayout"); 
00036     spacer3 = new QSpacerItem( 21, 27, QSizePolicy::Minimum, QSizePolicy::Expanding );
00037     CalPrintWeek_BaseLayout->addItem( spacer3, 4, 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( 16, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00046     mDateRangeGroupLayout->addItem( spacer1, 0, 4 );
00047 
00048     mFromDateLabel = new QLabel( mDateRangeGroup, "mFromDateLabel" );
00049 
00050     mDateRangeGroupLayout->addWidget( mFromDateLabel, 0, 0 );
00051 
00052     mFromDate = new KDateEdit( mDateRangeGroup, "mFromDate" );
00053     mFromDate->setFocusPolicy( KDateEdit::StrongFocus );
00054 
00055     mDateRangeGroupLayout->addWidget( mFromDate, 0, 1 );
00056 
00057     mToTimeLabel = new QLabel( mDateRangeGroup, "mToTimeLabel" );
00058 
00059     mDateRangeGroupLayout->addWidget( mToTimeLabel, 1, 2 );
00060     spacer4 = new QSpacerItem( 110, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00061     mDateRangeGroupLayout->addItem( spacer4, 1, 4 );
00062 
00063     mToTime = new QTimeEdit( mDateRangeGroup, "mToTime" );
00064     mToTime->setTime( QTime( 18, 0, 0 ) );
00065     mToTime->setDisplay( int( QTimeEdit::Minutes | QTimeEdit::Hours ) );
00066 
00067     mDateRangeGroupLayout->addWidget( mToTime, 1, 3 );
00068 
00069     mFromTimeLabel = new QLabel( mDateRangeGroup, "mFromTimeLabel" );
00070 
00071     mDateRangeGroupLayout->addWidget( mFromTimeLabel, 0, 2 );
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     mToDate = new KDateEdit( mDateRangeGroup, "mToDate" );
00080     mToDate->setFocusPolicy( KDateEdit::StrongFocus );
00081 
00082     mDateRangeGroupLayout->addWidget( mToDate, 1, 1 );
00083 
00084     mToDateLabel = new QLabel( mDateRangeGroup, "mToDateLabel" );
00085 
00086     mDateRangeGroupLayout->addWidget( mToDateLabel, 1, 0 );
00087 
00088     CalPrintWeek_BaseLayout->addWidget( mDateRangeGroup, 0, 0 );
00089 
00090     mColors = new QCheckBox( this, "mColors" );
00091 
00092     CalPrintWeek_BaseLayout->addWidget( mColors, 3, 0 );
00093 
00094     mPrintType = new QButtonGroup( this, "mPrintType" );
00095     mPrintType->setColumnLayout(0, Qt::Vertical );
00096     mPrintType->layout()->setSpacing( 6 );
00097     mPrintType->layout()->setMargin( 11 );
00098     mPrintTypeLayout = new QGridLayout( mPrintType->layout() );
00099     mPrintTypeLayout->setAlignment( Qt::AlignTop );
00100 
00101     mPrintTypeButton1 = new QRadioButton( mPrintType, "mPrintTypeButton1" );
00102     mPrintTypeButton1->setChecked( TRUE );
00103 
00104     mPrintTypeLayout->addMultiCellWidget( mPrintTypeButton1, 0, 0, 0, 4 );
00105 
00106     mPrintTypeButton2 = new QRadioButton( mPrintType, "mPrintTypeButton2" );
00107 
00108     mPrintTypeLayout->addMultiCellWidget( mPrintTypeButton2, 1, 1, 0, 4 );
00109 
00110     mPrintTypeButton3 = new QRadioButton( mPrintType, "mPrintTypeButton3" );
00111 
00112     mPrintTypeLayout->addMultiCellWidget( mPrintTypeButton3, 2, 2, 0, 2 );
00113 
00114     CalPrintWeek_BaseLayout->addWidget( mPrintType, 1, 0 );
00115 
00116     mIncludeTodos = new QCheckBox( this, "mIncludeTodos" );
00117     mIncludeTodos->setEnabled( FALSE );
00118 
00119     CalPrintWeek_BaseLayout->addWidget( mIncludeTodos, 2, 0 );
00120     languageChange();
00121     resize( QSize(386, 262).expandedTo(minimumSizeHint()) );
00122     clearWState( WState_Polished );
00123 
00124     // tab order
00125     setTabOrder( mFromDate, mFromTime );
00126     setTabOrder( mFromTime, mToDate );
00127     setTabOrder( mToDate, mToTime );
00128     setTabOrder( mToTime, mPrintTypeButton1 );
00129     setTabOrder( mPrintTypeButton1, mIncludeTodos );
00130     setTabOrder( mIncludeTodos, mColors );
00131 
00132     // buddies
00133     mFromDateLabel->setBuddy( mFromDate );
00134     mToTimeLabel->setBuddy( mToTime );
00135     mFromTimeLabel->setBuddy( mFromTime );
00136     mToDateLabel->setBuddy( mToDate );
00137 }
00138 
00139 /*
00140  *  Destroys the object and frees any allocated resources
00141  */
00142 CalPrintWeekConfig_Base::~CalPrintWeekConfig_Base()
00143 {
00144     // no need to delete child widgets, Qt does it all for us
00145 }
00146 
00147 /*
00148  *  Sets the strings of the subwidgets using the current
00149  *  language.
00150  */
00151 void CalPrintWeekConfig_Base::languageChange()
00152 {
00153     setCaption( tr2i18n( "CalPrintWeek_Base" ) );
00154     mDateRangeGroup->setTitle( tr2i18n( "Date && Time Range" ) );
00155     mFromDateLabel->setText( tr2i18n( "&Start date:" ) );
00156     QWhatsThis::add( mFromDateLabel, tr2i18n( "Here you can choose which events should be printed based on their date. This check enables you to enter the start date of the date range. Use the <i>End date</i> to enter the end date of the daterange." ) );
00157     QWhatsThis::add( mFromDate, tr2i18n( "Here you can choose which events should be printed based on their date. This check enables you to enter the start date of the date range. Use the <i>End date</i> to enter the end date of the daterange." ) );
00158     mToTimeLabel->setText( tr2i18n( "End ti&me:" ) );
00159     QWhatsThis::add( mToTimeLabel, tr2i18n( "All events which start later than the given time will not be printed." ) );
00160     QWhatsThis::add( mToTime, tr2i18n( "All events which start later than the given time will not be printed." ) );
00161     mFromTimeLabel->setText( tr2i18n( "Start &time:" ) );
00162     QWhatsThis::add( mFromTimeLabel, tr2i18n( "All events which start earlier than the given time will not be printed." ) );
00163     QWhatsThis::add( mFromTime, tr2i18n( "All events which start earlier than the given time will not be printed." ) );
00164     QWhatsThis::add( mToDate, tr2i18n( "Here you can choose which events should be printed based on their date. This check enables you to enter the end date of the date range. Use the <i>Start date</i> to enter the start date of the daterange." ) );
00165     mToDateLabel->setText( tr2i18n( "&End date:" ) );
00166     QWhatsThis::add( mToDateLabel, tr2i18n( "Here you can choose which events should be printed based on their date. This check enables you to enter the end date of the date range. Use the <i>Start date</i> to enter the start date of the daterange." ) );
00167     mColors->setText( tr2i18n( "&Use colors" ) );
00168     QWhatsThis::add( mColors, tr2i18n( "The timetable view supports colors. If you want to make use of colors you should check this option. The category colors will be used." ) );
00169     mPrintType->setTitle( tr2i18n( "Print Layout" ) );
00170     mPrintTypeButton1->setText( tr2i18n( "Print as &Filofax page" ) );
00171     QWhatsThis::add( mPrintTypeButton1, tr2i18n( "The Filofax view prints one week per page, so all days have a large surface." ) );
00172     mPrintTypeButton2->setText( tr2i18n( "Print as &timetable view" ) );
00173     QWhatsThis::add( mPrintTypeButton2, tr2i18n( "This view is similar to the weekview in KOrganizer. The week is printed in landscape layout. You can even use the same colors for the items if you check <i>Use Colors</i>." ) );
00174     mPrintTypeButton3->setText( tr2i18n( "Print as split week view" ) );
00175     QWhatsThis::add( mPrintTypeButton3, tr2i18n( "This view is similar to the week view in KOrganizer. The only difference with the timetable view is the page layout. Timetables are printed in landscape, the split week view in portrait." ) );
00176     mIncludeTodos->setText( tr2i18n( "Include to-&dos that are due on the printed day(s)" ) );
00177     QWhatsThis::add( mIncludeTodos, tr2i18n( "Check this option if you want to have to-dos on the print, placed by their due date." ) );
00178 }
00179 
00180 #include "calprintweekconfig_base.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys