korganizer

calprintmonthconfig_base.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './calprintmonthconfig_base.ui'
00005 **
00006 ** Created: Thu Sep 14 10:56:41 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 "calprintmonthconfig_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 <qcheckbox.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023 #include "libkdepim/kdateedit.h"
00024 
00025 /*
00026  *  Constructs a CalPrintMonthConfig_Base as a child of 'parent', with the
00027  *  name 'name' and widget flags set to 'f'.
00028  */
00029 CalPrintMonthConfig_Base::CalPrintMonthConfig_Base( QWidget* parent, const char* name, WFlags fl )
00030     : QWidget( parent, name, fl )
00031 {
00032     if ( !name )
00033     setName( "CalPrintMonth_Base" );
00034     CalPrintMonth_BaseLayout = new QGridLayout( this, 1, 1, 0, 6, "CalPrintMonth_BaseLayout"); 
00035     spacer2 = new QSpacerItem( 21, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00036     CalPrintMonth_BaseLayout->addItem( spacer2, 5, 0 );
00037 
00038     mDateRangeGroup = new QGroupBox( this, "mDateRangeGroup" );
00039     mDateRangeGroup->setColumnLayout(0, Qt::Vertical );
00040     mDateRangeGroup->layout()->setSpacing( 6 );
00041     mDateRangeGroup->layout()->setMargin( 11 );
00042     mDateRangeGroupLayout = new QGridLayout( mDateRangeGroup->layout() );
00043     mDateRangeGroupLayout->setAlignment( Qt::AlignTop );
00044     spacer1 = new QSpacerItem( 17, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00045     mDateRangeGroupLayout->addItem( spacer1, 0, 4 );
00046 
00047     mToDateLabel = new QLabel( mDateRangeGroup, "mToDateLabel" );
00048 
00049     mDateRangeGroupLayout->addWidget( mToDateLabel, 0, 2 );
00050 
00051     mFromDateLabel = new QLabel( mDateRangeGroup, "mFromDateLabel" );
00052 
00053     mDateRangeGroupLayout->addWidget( mFromDateLabel, 0, 0 );
00054 
00055     mToDate = new KDateEdit( mDateRangeGroup, "mToDate" );
00056     mToDate->setMinimumSize( QSize( 50, 0 ) );
00057     mToDate->setFocusPolicy( KDateEdit::StrongFocus );
00058 
00059     mDateRangeGroupLayout->addWidget( mToDate, 0, 3 );
00060 
00061     mFromDate = new KDateEdit( mDateRangeGroup, "mFromDate" );
00062     mFromDate->setMinimumSize( QSize( 50, 0 ) );
00063     mFromDate->setFocusPolicy( KDateEdit::StrongFocus );
00064 
00065     mDateRangeGroupLayout->addWidget( mFromDate, 0, 1 );
00066 
00067     CalPrintMonth_BaseLayout->addWidget( mDateRangeGroup, 0, 0 );
00068 
00069     mIncludeTodos = new QCheckBox( this, "mIncludeTodos" );
00070     mIncludeTodos->setEnabled( FALSE );
00071 
00072     CalPrintMonth_BaseLayout->addWidget( mIncludeTodos, 4, 0 );
00073 
00074     mWeekNumbers = new QCheckBox( this, "mWeekNumbers" );
00075 
00076     CalPrintMonth_BaseLayout->addWidget( mWeekNumbers, 1, 0 );
00077 
00078     mRecurDaily = new QCheckBox( this, "mRecurDaily" );
00079 
00080     CalPrintMonth_BaseLayout->addWidget( mRecurDaily, 2, 0 );
00081 
00082     mRecurWeekly = new QCheckBox( this, "mRecurWeekly" );
00083 
00084     CalPrintMonth_BaseLayout->addWidget( mRecurWeekly, 3, 0 );
00085     languageChange();
00086     resize( QSize(401, 173).expandedTo(minimumSizeHint()) );
00087     clearWState( WState_Polished );
00088 
00089     // tab order
00090     setTabOrder( mFromDate, mToDate );
00091     setTabOrder( mToDate, mWeekNumbers );
00092     setTabOrder( mWeekNumbers, mRecurDaily );
00093     setTabOrder( mRecurDaily, mRecurWeekly );
00094     setTabOrder( mRecurWeekly, mIncludeTodos );
00095 
00096     // buddies
00097     mToDateLabel->setBuddy( mToDate );
00098     mFromDateLabel->setBuddy( mFromDate );
00099 }
00100 
00101 /*
00102  *  Destroys the object and frees any allocated resources
00103  */
00104 CalPrintMonthConfig_Base::~CalPrintMonthConfig_Base()
00105 {
00106     // no need to delete child widgets, Qt does it all for us
00107 }
00108 
00109 /*
00110  *  Sets the strings of the subwidgets using the current
00111  *  language.
00112  */
00113 void CalPrintMonthConfig_Base::languageChange()
00114 {
00115     mDateRangeGroup->setTitle( tr2i18n( "Date && Time Range" ) );
00116     mToDateLabel->setText( tr2i18n( "&End month:" ) );
00117     QWhatsThis::add( mToDateLabel, tr2i18n( "When you want to print more months at once, you can define a month range. This option defines the last month to be printed. Use the option <i>Start month</i> to define the first month in this range." ) );
00118     mFromDateLabel->setText( tr2i18n( "&Start month:" ) );
00119     QWhatsThis::add( mFromDateLabel, tr2i18n( "When you want to print more months at once, you can define a month range. This option defines the first month to be printed. Use the option <i>End month</i> to define the last month in this range." ) );
00120     QWhatsThis::add( mToDate, tr2i18n( "When you want to print more months at once, you can define a month range. This option defines the last month to be printed. Use the option <i>Start month</i> to define the first month in this range." ) );
00121     QWhatsThis::add( mFromDate, tr2i18n( "When you want to print more months at once, you can define a month range. This option defines the first month to be printed." ) );
00122     mIncludeTodos->setText( tr2i18n( "Include to-&dos that are due on the printed day(s)" ) );
00123     QWhatsThis::add( mIncludeTodos, tr2i18n( "Check this option if you want to have to-dos on the print, placed by their due date." ) );
00124     mWeekNumbers->setText( tr2i18n( "Print week &numbers" ) );
00125     QWhatsThis::add( mWeekNumbers, tr2i18n( "Enable this to print week numbers at the left of each row." ) );
00126     mRecurDaily->setText( tr2i18n( "Print daily re&curring to-dos and events" ) );
00127     QWhatsThis::add( mRecurDaily, tr2i18n( "With this option it is possible to leave out the daily recurring to-dos and events in the print. They take a lot of space and make the month view needlessly complicated." ) );
00128     mRecurWeekly->setText( tr2i18n( "Print weekl&y recurring to-dos and events" ) );
00129     QWhatsThis::add( mRecurWeekly, tr2i18n( "Similar to \"Print daily recurring to-dos and events\". Weekly to-dos and events will be omitted when making a print of the selected month." ) );
00130 }
00131 
00132 #include "calprintmonthconfig_base.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys