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