22 #include <tqbuttongroup.h>
24 #include <tqradiobutton.h>
25 #include <tqspinbox.h>
29 #include <tdelocale.h>
32 #include "resourcecached.h"
34 #include "resourcecachedconfig.h"
38 ResourceCachedReloadConfig::ResourceCachedReloadConfig( TQWidget *parent,
40 : TQWidget( parent, name )
42 TQBoxLayout *topLayout =
new TQVBoxLayout(
this );
44 mGroup =
new TQButtonGroup( 1, TQt::Horizontal, i18n(
"Automatic Reload"),
this );
45 topLayout->addWidget( mGroup );
46 new TQRadioButton( i18n(
"Never"), mGroup );
47 new TQRadioButton( i18n(
"On startup"), mGroup );
49 TQRadioButton *intervalRadio =
new TQRadioButton( i18n(
"Regular interval"),
51 connect( intervalRadio, TQ_SIGNAL( stateChanged(
int ) ),
52 TQ_SLOT( slotIntervalStateChanged(
int ) ) );
53 TQHBox *intervalBox =
new TQHBox( mGroup );
54 new TQLabel( i18n(
"Interval in minutes"), intervalBox );
55 mIntervalSpin =
new TQSpinBox( 1,900, 1,intervalBox );
56 mIntervalSpin->setEnabled(
false );
59 void ResourceCachedReloadConfig::loadSettings(
ResourceCached *resource )
65 void ResourceCachedReloadConfig::saveSettings(
ResourceCached *resource )
71 void ResourceCachedReloadConfig::slotIntervalStateChanged(
int state )
73 if ( state == TQButton::On ) mIntervalSpin->setEnabled(
true );
74 else mIntervalSpin->setEnabled(
false );
78 ResourceCachedSaveConfig::ResourceCachedSaveConfig( TQWidget *parent,
80 : TQWidget( parent, name )
82 TQBoxLayout *topLayout =
new TQVBoxLayout(
this );
84 mGroup =
new TQButtonGroup( 1, TQt::Horizontal, i18n(
"Automatic Save"),
this );
85 topLayout->addWidget( mGroup );
86 new TQRadioButton( i18n(
"Never"), mGroup );
87 new TQRadioButton( i18n(
"On exit"), mGroup );
89 TQRadioButton *intervalRadio =
new TQRadioButton( i18n(
"Regular interval"),
91 connect( intervalRadio, TQ_SIGNAL( stateChanged(
int ) ),
92 TQ_SLOT( slotIntervalStateChanged(
int ) ) );
93 TQHBox *intervalBox =
new TQHBox( mGroup );
94 new TQLabel( i18n(
"Interval in minutes"), intervalBox );
95 mIntervalSpin =
new TQSpinBox( 1,900, 1,intervalBox );
96 mIntervalSpin->setEnabled(
false );
98 new TQRadioButton( i18n(
"Delayed after changes"), mGroup );
99 new TQRadioButton( i18n(
"On every change"), mGroup );
102 void ResourceCachedSaveConfig::loadSettings(
ResourceCached *resource )
108 void ResourceCachedSaveConfig::saveSettings(
ResourceCached *resource )
114 void ResourceCachedSaveConfig::slotIntervalStateChanged(
int state )
116 if ( state == TQButton::On ) mIntervalSpin->setEnabled(
true );
117 else mIntervalSpin->setEnabled(
false );
120 #include "resourcecachedconfig.moc"