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