akregator
akregator_config_appearance.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "akregator_config_appearance.h"
00025 #include "akregatorconfig.h"
00026
00027 #include <KAboutData>
00028 #include <KConfigDialogManager>
00029 #include <KGenericFactory>
00030 #include <KLocalizedString>
00031 #include <kdemacros.h>
00032
00033 #include <QVBoxLayout>
00034
00035 using namespace Akregator;
00036
00037 K_PLUGIN_FACTORY(KCMAkregatorAppearanceConfigFactory, registerPlugin<KCMAkregatorAppearanceConfig>();)
00038 K_EXPORT_PLUGIN(KCMAkregatorAppearanceConfigFactory( "kcmakrappearanceconfig" ))
00039
00040 KCMAkregatorAppearanceConfig::KCMAkregatorAppearanceConfig( QWidget* parent, const QVariantList& args )
00041 : KCModule( KCMAkregatorAppearanceConfigFactory::componentData(), parent, args ), m_widget( new QWidget )
00042 {
00043 m_ui.setupUi( m_widget );
00044
00045 QVBoxLayout* layout = new QVBoxLayout( this );
00046 layout->addWidget( m_widget );
00047
00048 connect( m_ui.kcfg_UseCustomColors, SIGNAL( toggled( bool ) ),
00049 m_ui.kcfg_ColorUnreadArticles, SLOT( setEnabled( bool ) ) );
00050 connect( m_ui.kcfg_UseCustomColors, SIGNAL( toggled( bool ) ),
00051 m_ui.kcfg_ColorNewArticles, SLOT( setEnabled( bool ) ) );
00052 connect( m_ui.kcfg_UseCustomColors, SIGNAL( toggled( bool ) ),
00053 m_ui.lbl_newArticles, SLOT( setEnabled( bool ) ) );
00054 connect( m_ui.kcfg_UseCustomColors, SIGNAL( toggled( bool ) ),
00055 m_ui.lbl_unreadArticles, SLOT( setEnabled( bool ) ) );
00056 connect( m_ui.slider_minimumFontSize, SIGNAL( sliderMoved( int ) ),
00057 m_ui.kcfg_MinimumFontSize , SLOT( setValue( int ) ) );
00058 connect( m_ui.slider_mediumFontSize, SIGNAL( sliderMoved( int ) ),
00059 m_ui.kcfg_MediumFontSize , SLOT( setValue( int ) ) );
00060 connect( m_ui.kcfg_MinimumFontSize, SIGNAL( valueChanged( int ) ),
00061 m_ui.slider_minimumFontSize, SLOT( setValue( int ) ) );
00062 connect( m_ui.kcfg_MediumFontSize, SIGNAL( valueChanged( int ) ),
00063 m_ui.slider_mediumFontSize, SLOT( setValue( int ) ) );
00064
00065 KAboutData *about = new KAboutData( I18N_NOOP( "kcmakrappearanceconfig" ), 0,
00066 ki18n( "Configure Feed Reader Appearance" ),
00067 0, KLocalizedString(), KAboutData::License_GPL,
00068 ki18n( "(c), 2004 - 2008 Frank Osterfeld" ) );
00069
00070 about->addAuthor( ki18n( "Frank Osterfeld" ), KLocalizedString(), "osterfeld@kde.org" );
00071 setAboutData( about );
00072
00073 m_ui.slider_minimumFontSize->setDisabled( Settings::self()->isImmutable("MinimumFontSize") );
00074 m_ui.slider_mediumFontSize->setDisabled( Settings::self()->isImmutable("MediumFontSize") );
00075 m_ui.lbl_MinimumFontSize->setDisabled( Settings::self()->isImmutable("MinimumFontSize") );
00076 m_ui.lbl_MediumFontSize->setDisabled( Settings::self()->isImmutable("MediumFontSize") );
00077
00078 addConfig( Settings::self(), m_widget );
00079 }
00080
00081
00082 #include "akregator_config_appearance.moc"