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: Fri Jun 27 13:53:11 2008
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.7   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 <qgroupbox.h>
00016 #include <qlabel.h>
00017 #include <kcombobox.h>
00018 #include <knuminput.h>
00019 #include <qcheckbox.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023 
00024 /*
00025  *  Constructs a CalPrintMonthConfig_Base as a child of 'parent', with the
00026  *  name 'name' and widget flags set to 'f'.
00027  */
00028 CalPrintMonthConfig_Base::CalPrintMonthConfig_Base( QWidget* parent, const char* name, WFlags fl )
00029     : QWidget( parent, name, fl )
00030 {
00031     if ( !name )
00032     setName( "CalPrintMonth_Base" );
00033     CalPrintMonth_BaseLayout = new QGridLayout( this, 1, 1, 0, 6, "CalPrintMonth_BaseLayout"); 
00034     spacer2 = new QSpacerItem( 21, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00035     CalPrintMonth_BaseLayout->addItem( spacer2, 5, 0 );
00036 
00037     mDateRangeGroup = new QGroupBox( this, "mDateRangeGroup" );
00038     mDateRangeGroup->setColumnLayout(0, Qt::Vertical );
00039     mDateRangeGroup->layout()->setSpacing( 6 );
00040     mDateRangeGroup->layout()->setMargin( 11 );
00041     mDateRangeGroupLayout = new QHBoxLayout( mDateRangeGroup->layout() );
00042     mDateRangeGroupLayout->setAlignment( Qt::AlignTop );
00043 
00044     mFromDateLabel = new QLabel( mDateRangeGroup, "mFromDateLabel" );
00045     mDateRangeGroupLayout->addWidget( mFromDateLabel );
00046 
00047     mFromMonth = new KComboBox( FALSE, mDateRangeGroup, "mFromMonth" );
00048     mDateRangeGroupLayout->addWidget( mFromMonth );
00049 
00050     mFromYear = new KIntSpinBox( mDateRangeGroup, "mFromYear" );
00051     mFromYear->setMaxValue( 3000 );
00052     mFromYear->setValue( 2007 );
00053     mDateRangeGroupLayout->addWidget( mFromYear );
00054 
00055     mToDateLabel = new QLabel( mDateRangeGroup, "mToDateLabel" );
00056     mDateRangeGroupLayout->addWidget( mToDateLabel );
00057 
00058     mToMonth = new KComboBox( FALSE, mDateRangeGroup, "mToMonth" );
00059     mDateRangeGroupLayout->addWidget( mToMonth );
00060 
00061     mToYear = new KIntSpinBox( mDateRangeGroup, "mToYear" );
00062     mToYear->setMaxValue( 3000 );
00063     mToYear->setValue( 2007 );
00064     mDateRangeGroupLayout->addWidget( mToYear );
00065     spacer1 = new QSpacerItem( 17, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00066     mDateRangeGroupLayout->addItem( spacer1 );
00067 
00068     CalPrintMonth_BaseLayout->addWidget( mDateRangeGroup, 0, 0 );
00069 
00070     mIncludeTodos = new QCheckBox( this, "mIncludeTodos" );
00071     mIncludeTodos->setEnabled( FALSE );
00072 
00073     CalPrintMonth_BaseLayout->addWidget( mIncludeTodos, 4, 0 );
00074 
00075     mWeekNumbers = new QCheckBox( this, "mWeekNumbers" );
00076 
00077     CalPrintMonth_BaseLayout->addWidget( mWeekNumbers, 1, 0 );
00078 
00079     mRecurDaily = new QCheckBox( this, "mRecurDaily" );
00080 
00081     CalPrintMonth_BaseLayout->addWidget( mRecurDaily, 2, 0 );
00082 
00083     mRecurWeekly = new QCheckBox( this, "mRecurWeekly" );
00084 
00085     CalPrintMonth_BaseLayout->addWidget( mRecurWeekly, 3, 0 );
00086     languageChange();
00087     resize( QSize(463, 161).expandedTo(minimumSizeHint()) );
00088     clearWState( WState_Polished );
00089 
00090     // tab order
00091     setTabOrder( mWeekNumbers, mRecurDaily );
00092     setTabOrder( mRecurDaily, mRecurWeekly );
00093     setTabOrder( mRecurWeekly, mIncludeTodos );
00094 
00095     // buddies
00096     mFromDateLabel->setBuddy( mFromMonth );
00097     mToDateLabel->setBuddy( mToMonth );
00098 }
00099 
00100 /*
00101  *  Destroys the object and frees any allocated resources
00102  */
00103 CalPrintMonthConfig_Base::~CalPrintMonthConfig_Base()
00104 {
00105     // no need to delete child widgets, Qt does it all for us
00106 }
00107 
00108 /*
00109  *  Sets the strings of the subwidgets using the current
00110  *  language.
00111  */
00112 void CalPrintMonthConfig_Base::languageChange()
00113 {
00114     mDateRangeGroup->setTitle( tr2i18n( "Date && Time Range" ) );
00115     mFromDateLabel->setText( tr2i18n( "&Start month:" ) );
00116     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." ) );
00117     QWhatsThis::add( mFromMonth, 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 on <i>End month</i> to define the last month in this range." ) );
00118     QWhatsThis::add( mFromYear, 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 on <i>End month</i> to define the last month in this range." ) );
00119     mToDateLabel->setText( tr2i18n( "&End month:" ) );
00120     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." ) );
00121     QWhatsThis::add( mToMonth, 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." ) );
00122     QWhatsThis::add( mToYear, 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." ) );
00123     mIncludeTodos->setText( tr2i18n( "Include to-&dos that are due on the printed day(s)" ) );
00124     QWhatsThis::add( mIncludeTodos, tr2i18n( "Check this option if you want to have to-dos on the print, placed by their due date." ) );
00125     mWeekNumbers->setText( tr2i18n( "Print week &numbers" ) );
00126     QWhatsThis::add( mWeekNumbers, tr2i18n( "Enable this to print week numbers at the left of each row." ) );
00127     mRecurDaily->setText( tr2i18n( "Print daily re&curring to-dos and events" ) );
00128     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." ) );
00129     mRecurWeekly->setText( tr2i18n( "Print weekl&y recurring to-dos and events" ) );
00130     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." ) );
00131 }
00132 
00133 #include "calprintmonthconfig_base.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys