akregator/src

settings_general.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './settings_general.ui'
00005 **
00006 ** Created: Fri Jul 20 15:59:31 2012
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "settings_general.h"
00012 
00013 #include <qvariant.h>
00014 #include <qpushbutton.h>
00015 #include <qgroupbox.h>
00016 #include <qcheckbox.h>
00017 #include <qlabel.h>
00018 #include <qspinbox.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 
00023 /*
00024  *  Constructs a Akregator::SettingsGeneral as a child of 'parent', with the
00025  *  name 'name' and widget flags set to 'f'.
00026  */
00027 Akregator::SettingsGeneral::SettingsGeneral( QWidget* parent, const char* name, WFlags fl )
00028     : QWidget( parent, name, fl )
00029 {
00030     if ( !name )
00031     setName( "SettingsGeneral" );
00032     SettingsGeneralLayout = new QGridLayout( this, 1, 1, 0, 6, "SettingsGeneralLayout"); 
00033 
00034     groupBox3_2 = new QGroupBox( this, "groupBox3_2" );
00035     groupBox3_2->setColumnLayout(0, Qt::Vertical );
00036     groupBox3_2->layout()->setSpacing( 6 );
00037     groupBox3_2->layout()->setMargin( 11 );
00038     groupBox3_2Layout = new QGridLayout( groupBox3_2->layout() );
00039     groupBox3_2Layout->setAlignment( Qt::AlignTop );
00040 
00041     kcfg_UseIntervalFetch = new QCheckBox( groupBox3_2, "kcfg_UseIntervalFetch" );
00042 
00043     groupBox3_2Layout->addMultiCellWidget( kcfg_UseIntervalFetch, 2, 2, 0, 1 );
00044 
00045     kcfg_UseNotifications = new QCheckBox( groupBox3_2, "kcfg_UseNotifications" );
00046 
00047     groupBox3_2Layout->addMultiCellWidget( kcfg_UseNotifications, 1, 1, 0, 1 );
00048 
00049     kcfg_ShowTrayIcon = new QCheckBox( groupBox3_2, "kcfg_ShowTrayIcon" );
00050 
00051     groupBox3_2Layout->addMultiCellWidget( kcfg_ShowTrayIcon, 0, 0, 0, 1 );
00052 
00053     textLabel1 = new QLabel( groupBox3_2, "textLabel1" );
00054     textLabel1->setEnabled( FALSE );
00055 
00056     groupBox3_2Layout->addWidget( textLabel1, 3, 0 );
00057 
00058     kcfg_AutoFetchInterval = new QSpinBox( groupBox3_2, "kcfg_AutoFetchInterval" );
00059     kcfg_AutoFetchInterval->setEnabled( FALSE );
00060     kcfg_AutoFetchInterval->setMaxValue( 3600 );
00061     kcfg_AutoFetchInterval->setMinValue( 1 );
00062     kcfg_AutoFetchInterval->setLineStep( 10 );
00063 
00064     groupBox3_2Layout->addWidget( kcfg_AutoFetchInterval, 3, 1 );
00065 
00066     SettingsGeneralLayout->addWidget( groupBox3_2, 0, 0 );
00067 
00068     groupBox3 = new QGroupBox( this, "groupBox3" );
00069     groupBox3->setColumnLayout(0, Qt::Vertical );
00070     groupBox3->layout()->setSpacing( 6 );
00071     groupBox3->layout()->setMargin( 11 );
00072     groupBox3Layout = new QGridLayout( groupBox3->layout() );
00073     groupBox3Layout->setAlignment( Qt::AlignTop );
00074 
00075     kcfg_MarkAllFeedsReadOnStartup = new QCheckBox( groupBox3, "kcfg_MarkAllFeedsReadOnStartup" );
00076 
00077     groupBox3Layout->addWidget( kcfg_MarkAllFeedsReadOnStartup, 0, 0 );
00078 
00079     kcfg_FetchOnStartup = new QCheckBox( groupBox3, "kcfg_FetchOnStartup" );
00080 
00081     groupBox3Layout->addWidget( kcfg_FetchOnStartup, 1, 0 );
00082 
00083     SettingsGeneralLayout->addWidget( groupBox3, 1, 0 );
00084     spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00085     SettingsGeneralLayout->addItem( spacer1, 3, 0 );
00086 
00087     groupBox3_3 = new QGroupBox( this, "groupBox3_3" );
00088     groupBox3_3->setColumnLayout(0, Qt::Vertical );
00089     groupBox3_3->layout()->setSpacing( 6 );
00090     groupBox3_3->layout()->setMargin( 11 );
00091     groupBox3_3Layout = new QGridLayout( groupBox3_3->layout() );
00092     groupBox3_3Layout->setAlignment( Qt::AlignTop );
00093 
00094     kcfg_UseHTMLCache = new QCheckBox( groupBox3_3, "kcfg_UseHTMLCache" );
00095 
00096     groupBox3_3Layout->addWidget( kcfg_UseHTMLCache, 0, 0 );
00097 
00098     SettingsGeneralLayout->addWidget( groupBox3_3, 2, 0 );
00099     languageChange();
00100     resize( QSize(272, 382).expandedTo(minimumSizeHint()) );
00101     clearWState( WState_Polished );
00102 
00103     // signals and slots connections
00104     connect( kcfg_UseIntervalFetch, SIGNAL( toggled(bool) ), kcfg_AutoFetchInterval, SLOT( setEnabled(bool) ) );
00105     connect( kcfg_UseIntervalFetch, SIGNAL( toggled(bool) ), textLabel1, SLOT( setEnabled(bool) ) );
00106 }
00107 
00108 /*
00109  *  Destroys the object and frees any allocated resources
00110  */
00111 Akregator::SettingsGeneral::~SettingsGeneral()
00112 {
00113     // no need to delete child widgets, Qt does it all for us
00114 }
00115 
00116 /*
00117  *  Sets the strings of the subwidgets using the current
00118  *  language.
00119  */
00120 void Akregator::SettingsGeneral::languageChange()
00121 {
00122     setCaption( tr2i18n( "General" ) );
00123     groupBox3_2->setTitle( tr2i18n( "Global" ) );
00124     kcfg_UseIntervalFetch->setText( tr2i18n( "&Use interval fetching" ) );
00125     kcfg_UseNotifications->setText( tr2i18n( "Use &notifications for all feeds" ) );
00126     QToolTip::add( kcfg_UseNotifications, QString::null );
00127     QWhatsThis::add( kcfg_UseNotifications, tr2i18n( "Select this if you want to get notified when there are new articles." ) );
00128     kcfg_ShowTrayIcon->setText( tr2i18n( "Show tra&y icon" ) );
00129     textLabel1->setText( tr2i18n( "Fetch feeds every:" ) );
00130     kcfg_AutoFetchInterval->setSuffix( tr2i18n( " minutes" ) );
00131     kcfg_AutoFetchInterval->setSpecialValueText( tr2i18n( "1 minute" ) );
00132     groupBox3->setTitle( tr2i18n( "Startup" ) );
00133     kcfg_MarkAllFeedsReadOnStartup->setText( tr2i18n( "Mark &all feeds as read on startup" ) );
00134     kcfg_FetchOnStartup->setText( tr2i18n( "Fetch all fee&ds on startup" ) );
00135     groupBox3_3->setTitle( tr2i18n( "Network" ) );
00136     kcfg_UseHTMLCache->setText( tr2i18n( "Use the &browser cache (less network traffic)" ) );
00137 }
00138 
00139 #include "settings_general.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys