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