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