00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "calprintyearconfig_base.h"
00012
00013 #include <qvariant.h>
00014 #include <qpushbutton.h>
00015 #include <qbuttongroup.h>
00016 #include <qlabel.h>
00017 #include <qspinbox.h>
00018 #include <qcombobox.h>
00019 #include <qgroupbox.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023
00024
00025
00026
00027
00028 CalPrintYearConfig_Base::CalPrintYearConfig_Base( QWidget* parent, const char* name, WFlags fl )
00029 : QWidget( parent, name, fl )
00030 {
00031 if ( !name )
00032 setName( "CalPrintYear_Base" );
00033 CalPrintYear_BaseLayout = new QVBoxLayout( this, 0, 6, "CalPrintYear_BaseLayout");
00034
00035 mDateRangeGroup = new QButtonGroup( this, "mDateRangeGroup" );
00036 mDateRangeGroup->setProperty( "selectedId", -1 );
00037 mDateRangeGroup->setColumnLayout(0, Qt::Vertical );
00038 mDateRangeGroup->layout()->setSpacing( 6 );
00039 mDateRangeGroup->layout()->setMargin( 11 );
00040 mDateRangeGroupLayout = new QGridLayout( mDateRangeGroup->layout() );
00041 mDateRangeGroupLayout->setAlignment( Qt::AlignTop );
00042
00043 mYearLabel = new QLabel( mDateRangeGroup, "mYearLabel" );
00044
00045 mDateRangeGroupLayout->addWidget( mYearLabel, 0, 0 );
00046
00047 mPagesLabel = new QLabel( mDateRangeGroup, "mPagesLabel" );
00048
00049 mDateRangeGroupLayout->addWidget( mPagesLabel, 1, 0 );
00050
00051 mYear = new QSpinBox( mDateRangeGroup, "mYear" );
00052 mYear->setMaxValue( 2500 );
00053 mYear->setMinValue( 0 );
00054 mYear->setValue( 2007 );
00055
00056 mDateRangeGroupLayout->addWidget( mYear, 0, 1 );
00057 spacer4 = new QSpacerItem( 120, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00058 mDateRangeGroupLayout->addItem( spacer4, 0, 2 );
00059
00060 mPages = new QComboBox( FALSE, mDateRangeGroup, "mPages" );
00061
00062 mDateRangeGroupLayout->addWidget( mPages, 1, 1 );
00063 spacer5 = new QSpacerItem( 131, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00064 mDateRangeGroupLayout->addItem( spacer5, 1, 2 );
00065 CalPrintYear_BaseLayout->addWidget( mDateRangeGroup );
00066
00067 mDisplayOptionsGroup = new QGroupBox( this, "mDisplayOptionsGroup" );
00068 mDisplayOptionsGroup->setColumnLayout(0, Qt::Vertical );
00069 mDisplayOptionsGroup->layout()->setSpacing( 6 );
00070 mDisplayOptionsGroup->layout()->setMargin( 11 );
00071 mDisplayOptionsGroupLayout = new QGridLayout( mDisplayOptionsGroup->layout() );
00072 mDisplayOptionsGroupLayout->setAlignment( Qt::AlignTop );
00073
00074 mSubDaysLabel = new QLabel( mDisplayOptionsGroup, "mSubDaysLabel" );
00075
00076 mDisplayOptionsGroupLayout->addWidget( mSubDaysLabel, 0, 0 );
00077
00078 mHolidaysLabel = new QLabel( mDisplayOptionsGroup, "mHolidaysLabel" );
00079
00080 mDisplayOptionsGroupLayout->addWidget( mHolidaysLabel, 1, 0 );
00081
00082 mSubDays = new QComboBox( FALSE, mDisplayOptionsGroup, "mSubDays" );
00083
00084 mDisplayOptionsGroupLayout->addWidget( mSubDays, 0, 1 );
00085
00086 mHolidays = new QComboBox( FALSE, mDisplayOptionsGroup, "mHolidays" );
00087
00088 mDisplayOptionsGroupLayout->addWidget( mHolidays, 1, 1 );
00089 CalPrintYear_BaseLayout->addWidget( mDisplayOptionsGroup );
00090 spacer3 = new QSpacerItem( 21, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
00091 CalPrintYear_BaseLayout->addItem( spacer3 );
00092 languageChange();
00093 resize( QSize(340, 237).expandedTo(minimumSizeHint()) );
00094 clearWState( WState_Polished );
00095
00096
00097 mYearLabel->setBuddy( mYear );
00098 mPagesLabel->setBuddy( mPages );
00099 }
00100
00101
00102
00103
00104 CalPrintYearConfig_Base::~CalPrintYearConfig_Base()
00105 {
00106
00107 }
00108
00109
00110
00111
00112
00113 void CalPrintYearConfig_Base::languageChange()
00114 {
00115 setCaption( tr2i18n( "CalPrintYear_Base" ) );
00116 mDateRangeGroup->setTitle( tr2i18n( "Yearly print options" ) );
00117 mYearLabel->setText( tr2i18n( "Print &Year:" ) );
00118 mPagesLabel->setText( tr2i18n( "Number of &pages:" ) );
00119 mDisplayOptionsGroup->setTitle( tr2i18n( "Display Options" ) );
00120 mSubDaysLabel->setText( tr2i18n( "Show sub-day events as:" ) );
00121 mHolidaysLabel->setText( tr2i18n( "Show holidays as:" ) );
00122 mSubDays->clear();
00123 mSubDays->insertItem( tr2i18n( "Text" ) );
00124 mSubDays->insertItem( tr2i18n( "Time Boxes" ) );
00125 mSubDays->setCurrentItem( 1 );
00126 mHolidays->clear();
00127 mHolidays->insertItem( tr2i18n( "Text" ) );
00128 mHolidays->insertItem( tr2i18n( "Time Boxes" ) );
00129 }
00130
00131 #include "calprintyearconfig_base.moc"