00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "settings_appearance.h"
00013
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qgroupbox.h>
00017 #include <qlabel.h>
00018 #include <qslider.h>
00019 #include <knuminput.h>
00020 #include <kfontcombo.h>
00021 #include <qcheckbox.h>
00022 #include <qlayout.h>
00023 #include <qtooltip.h>
00024 #include <qwhatsthis.h>
00025
00026
00027
00028
00029
00030 Akregator::SettingsAppearance::SettingsAppearance( QWidget* parent, const char* name, WFlags fl )
00031 : QWidget( parent, name, fl )
00032 {
00033 if ( !name )
00034 setName( "SettingsAppearance" );
00035 SettingsAppearanceLayout = new QVBoxLayout( this, 0, 6, "SettingsAppearanceLayout");
00036
00037 groupBox3 = new QGroupBox( this, "groupBox3" );
00038 groupBox3->setColumnLayout(0, Qt::Vertical );
00039 groupBox3->layout()->setSpacing( 6 );
00040 groupBox3->layout()->setMargin( 11 );
00041 groupBox3Layout = new QGridLayout( groupBox3->layout() );
00042 groupBox3Layout->setAlignment( Qt::AlignTop );
00043
00044 lbl_MinimumFontSize = new QLabel( groupBox3, "lbl_MinimumFontSize" );
00045
00046 groupBox3Layout->addMultiCellWidget( lbl_MinimumFontSize, 0, 0, 0, 1 );
00047
00048 slider_minimumFontSize = new QSlider( groupBox3, "slider_minimumFontSize" );
00049 slider_minimumFontSize->setMinValue( 2 );
00050 slider_minimumFontSize->setMaxValue( 30 );
00051 slider_minimumFontSize->setValue( 8 );
00052 slider_minimumFontSize->setOrientation( QSlider::Horizontal );
00053 slider_minimumFontSize->setTickmarks( QSlider::Below );
00054 slider_minimumFontSize->setTickInterval( 3 );
00055
00056 groupBox3Layout->addWidget( slider_minimumFontSize, 1, 0 );
00057
00058 kcfg_MinimumFontSize = new KIntSpinBox( groupBox3, "kcfg_MinimumFontSize" );
00059 kcfg_MinimumFontSize->setValue( 8 );
00060
00061 groupBox3Layout->addWidget( kcfg_MinimumFontSize, 1, 1 );
00062
00063 lbl_MediumFontSize = new QLabel( groupBox3, "lbl_MediumFontSize" );
00064
00065 groupBox3Layout->addMultiCellWidget( lbl_MediumFontSize, 2, 2, 0, 1 );
00066
00067 slider_mediumFontSize = new QSlider( groupBox3, "slider_mediumFontSize" );
00068 slider_mediumFontSize->setMinValue( 2 );
00069 slider_mediumFontSize->setMaxValue( 30 );
00070 slider_mediumFontSize->setValue( 12 );
00071 slider_mediumFontSize->setOrientation( QSlider::Horizontal );
00072 slider_mediumFontSize->setTickmarks( QSlider::Below );
00073 slider_mediumFontSize->setTickInterval( 3 );
00074
00075 groupBox3Layout->addWidget( slider_mediumFontSize, 3, 0 );
00076
00077 kcfg_MediumFontSize = new KIntSpinBox( groupBox3, "kcfg_MediumFontSize" );
00078 kcfg_MediumFontSize->setValue( 12 );
00079
00080 groupBox3Layout->addWidget( kcfg_MediumFontSize, 3, 1 );
00081 SettingsAppearanceLayout->addWidget( groupBox3 );
00082
00083 FontsGroupBox = new QGroupBox( this, "FontsGroupBox" );
00084 FontsGroupBox->setColumnLayout(0, Qt::Vertical );
00085 FontsGroupBox->layout()->setSpacing( 6 );
00086 FontsGroupBox->layout()->setMargin( 11 );
00087 FontsGroupBoxLayout = new QGridLayout( FontsGroupBox->layout() );
00088 FontsGroupBoxLayout->setAlignment( Qt::AlignTop );
00089
00090 textLabel1 = new QLabel( FontsGroupBox, "textLabel1" );
00091
00092 FontsGroupBoxLayout->addWidget( textLabel1, 0, 0 );
00093
00094 kcfg_StandardFont = new KFontCombo( FontsGroupBox, "kcfg_StandardFont" );
00095
00096 FontsGroupBoxLayout->addWidget( kcfg_StandardFont, 0, 1 );
00097
00098 textLabel2_2 = new QLabel( FontsGroupBox, "textLabel2_2" );
00099
00100 FontsGroupBoxLayout->addWidget( textLabel2_2, 1, 0 );
00101
00102 kcfg_FixedFont = new KFontCombo( FontsGroupBox, "kcfg_FixedFont" );
00103
00104 FontsGroupBoxLayout->addWidget( kcfg_FixedFont, 1, 1 );
00105
00106 textLabel3 = new QLabel( FontsGroupBox, "textLabel3" );
00107
00108 FontsGroupBoxLayout->addWidget( textLabel3, 2, 0 );
00109
00110 kcfg_SerifFont = new KFontCombo( FontsGroupBox, "kcfg_SerifFont" );
00111
00112 FontsGroupBoxLayout->addWidget( kcfg_SerifFont, 2, 1 );
00113
00114 textLabel4 = new QLabel( FontsGroupBox, "textLabel4" );
00115
00116 FontsGroupBoxLayout->addWidget( textLabel4, 3, 0 );
00117
00118 kcfg_SansSerifFont = new KFontCombo( FontsGroupBox, "kcfg_SansSerifFont" );
00119
00120 FontsGroupBoxLayout->addWidget( kcfg_SansSerifFont, 3, 1 );
00121 SettingsAppearanceLayout->addWidget( FontsGroupBox );
00122
00123 kcfg_UnderlineLinks = new QCheckBox( this, "kcfg_UnderlineLinks" );
00124 SettingsAppearanceLayout->addWidget( kcfg_UnderlineLinks );
00125 spacer1 = new QSpacerItem( 20, 41, QSizePolicy::Minimum, QSizePolicy::Expanding );
00126 SettingsAppearanceLayout->addItem( spacer1 );
00127 languageChange();
00128 resize( QSize(418, 377).expandedTo(minimumSizeHint()) );
00129 clearWState( WState_Polished );
00130
00131
00132 connect( kcfg_MediumFontSize, SIGNAL( valueChanged(int) ), slider_mediumFontSize, SLOT( setValue(int) ) );
00133 connect( slider_mediumFontSize, SIGNAL( valueChanged(int) ), kcfg_MediumFontSize, SLOT( setValue(int) ) );
00134 connect( kcfg_MinimumFontSize, SIGNAL( valueChanged(int) ), slider_minimumFontSize, SLOT( setValue(int) ) );
00135 connect( slider_minimumFontSize, SIGNAL( valueChanged(int) ), kcfg_MinimumFontSize, SLOT( setValue(int) ) );
00136 }
00137
00138
00139
00140
00141 Akregator::SettingsAppearance::~SettingsAppearance()
00142 {
00143
00144 }
00145
00146
00147
00148
00149
00150 void Akregator::SettingsAppearance::languageChange()
00151 {
00152 setCaption( tr2i18n( "General" ) );
00153 groupBox3->setTitle( tr2i18n( "Font Size" ) );
00154 lbl_MinimumFontSize->setText( tr2i18n( "Minimum font size:" ) );
00155 lbl_MediumFontSize->setText( tr2i18n( "Medium font size:" ) );
00156 FontsGroupBox->setTitle( tr2i18n( "Fonts" ) );
00157 textLabel1->setText( tr2i18n( "Standard font:" ) );
00158 textLabel2_2->setText( tr2i18n( "Fixed font:" ) );
00159 textLabel3->setText( tr2i18n( "Serif font:" ) );
00160 textLabel4->setText( tr2i18n( "Sans serif font:" ) );
00161 kcfg_UnderlineLinks->setText( tr2i18n( "&Underline links" ) );
00162 }
00163
00164 #include "settings_appearance.moc"