korganizer

calprintyearconfig_base.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './calprintyearconfig_base.ui'
00005 **
00006 ** Created: Thu Mar 29 06:11:33 2007
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "calprintyearconfig_base.h"
00013 
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qbuttongroup.h>
00017 #include <qlabel.h>
00018 #include <qspinbox.h>
00019 #include <qcombobox.h>
00020 #include <qgroupbox.h>
00021 #include <qlayout.h>
00022 #include <qtooltip.h>
00023 #include <qwhatsthis.h>
00024 
00025 /*
00026  *  Constructs a CalPrintYearConfig_Base as a child of 'parent', with the
00027  *  name 'name' and widget flags set to 'f'.
00028  */
00029 CalPrintYearConfig_Base::CalPrintYearConfig_Base( QWidget* parent, const char* name, WFlags fl )
00030     : QWidget( parent, name, fl )
00031 {
00032     if ( !name )
00033     setName( "CalPrintYear_Base" );
00034     CalPrintYear_BaseLayout = new QVBoxLayout( this, 0, 6, "CalPrintYear_BaseLayout"); 
00035 
00036     mDateRangeGroup = new QButtonGroup( this, "mDateRangeGroup" );
00037     mDateRangeGroup->setProperty( "selectedId", -1 );
00038     mDateRangeGroup->setColumnLayout(0, Qt::Vertical );
00039     mDateRangeGroup->layout()->setSpacing( 6 );
00040     mDateRangeGroup->layout()->setMargin( 11 );
00041     mDateRangeGroupLayout = new QGridLayout( mDateRangeGroup->layout() );
00042     mDateRangeGroupLayout->setAlignment( Qt::AlignTop );
00043 
00044     mYearLabel = new QLabel( mDateRangeGroup, "mYearLabel" );
00045 
00046     mDateRangeGroupLayout->addWidget( mYearLabel, 0, 0 );
00047 
00048     mPagesLabel = new QLabel( mDateRangeGroup, "mPagesLabel" );
00049 
00050     mDateRangeGroupLayout->addWidget( mPagesLabel, 1, 0 );
00051 
00052     mYear = new QSpinBox( mDateRangeGroup, "mYear" );
00053     mYear->setMaxValue( 2500 );
00054     mYear->setMinValue( 0 );
00055     mYear->setValue( 2007 );
00056 
00057     mDateRangeGroupLayout->addWidget( mYear, 0, 1 );
00058     spacer4 = new QSpacerItem( 120, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00059     mDateRangeGroupLayout->addItem( spacer4, 0, 2 );
00060 
00061     mPages = new QComboBox( FALSE, mDateRangeGroup, "mPages" );
00062 
00063     mDateRangeGroupLayout->addWidget( mPages, 1, 1 );
00064     spacer5 = new QSpacerItem( 131, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00065     mDateRangeGroupLayout->addItem( spacer5, 1, 2 );
00066     CalPrintYear_BaseLayout->addWidget( mDateRangeGroup );
00067 
00068     mDisplayOptionsGroup = new QGroupBox( this, "mDisplayOptionsGroup" );
00069     mDisplayOptionsGroup->setColumnLayout(0, Qt::Vertical );
00070     mDisplayOptionsGroup->layout()->setSpacing( 6 );
00071     mDisplayOptionsGroup->layout()->setMargin( 11 );
00072     mDisplayOptionsGroupLayout = new QGridLayout( mDisplayOptionsGroup->layout() );
00073     mDisplayOptionsGroupLayout->setAlignment( Qt::AlignTop );
00074 
00075     mSubDaysLabel = new QLabel( mDisplayOptionsGroup, "mSubDaysLabel" );
00076 
00077     mDisplayOptionsGroupLayout->addWidget( mSubDaysLabel, 0, 0 );
00078 
00079     mHolidaysLabel = new QLabel( mDisplayOptionsGroup, "mHolidaysLabel" );
00080 
00081     mDisplayOptionsGroupLayout->addWidget( mHolidaysLabel, 1, 0 );
00082 
00083     mSubDays = new QComboBox( FALSE, mDisplayOptionsGroup, "mSubDays" );
00084 
00085     mDisplayOptionsGroupLayout->addWidget( mSubDays, 0, 1 );
00086 
00087     mHolidays = new QComboBox( FALSE, mDisplayOptionsGroup, "mHolidays" );
00088 
00089     mDisplayOptionsGroupLayout->addWidget( mHolidays, 1, 1 );
00090     CalPrintYear_BaseLayout->addWidget( mDisplayOptionsGroup );
00091     spacer3 = new QSpacerItem( 21, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
00092     CalPrintYear_BaseLayout->addItem( spacer3 );
00093     languageChange();
00094     resize( QSize(340, 237).expandedTo(minimumSizeHint()) );
00095     clearWState( WState_Polished );
00096 
00097     // buddies
00098     mYearLabel->setBuddy( mYear );
00099     mPagesLabel->setBuddy( mPages );
00100 }
00101 
00102 /*
00103  *  Destroys the object and frees any allocated resources
00104  */
00105 CalPrintYearConfig_Base::~CalPrintYearConfig_Base()
00106 {
00107     // no need to delete child widgets, Qt does it all for us
00108 }
00109 
00110 /*
00111  *  Sets the strings of the subwidgets using the current
00112  *  language.
00113  */
00114 void CalPrintYearConfig_Base::languageChange()
00115 {
00116     setCaption( tr2i18n( "CalPrintYear_Base" ) );
00117     mDateRangeGroup->setTitle( tr2i18n( "Yearly print options" ) );
00118     mYearLabel->setText( tr2i18n( "Print &Year:" ) );
00119     mPagesLabel->setText( tr2i18n( "Number of &pages:" ) );
00120     mDisplayOptionsGroup->setTitle( tr2i18n( "Display Options" ) );
00121     mSubDaysLabel->setText( tr2i18n( "Show sub-day events as:" ) );
00122     mHolidaysLabel->setText( tr2i18n( "Show holidays as:" ) );
00123     mSubDays->clear();
00124     mSubDays->insertItem( tr2i18n( "Text" ) );
00125     mSubDays->insertItem( tr2i18n( "Time Boxes" ) );
00126     mSubDays->setCurrentItem( 1 );
00127     mHolidays->clear();
00128     mHolidays->insertItem( tr2i18n( "Text" ) );
00129     mHolidays->insertItem( tr2i18n( "Time Boxes" ) );
00130 }
00131 
00132 #include "calprintyearconfig_base.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys