Diffstat (limited to 'core/pim/today/todayconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/todayconfig.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index f9dd8f7..db1141a 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp | |||
@@ -96,15 +96,25 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) | |||
96 | iconSizeLabel->setText( tr( "Icon size" ) ); | 96 | iconSizeLabel->setText( tr( "Icon size" ) ); |
97 | QWhatsThis::add( iconSizeLabel, tr( "Set the icon size in pixel" ) ); | 97 | QWhatsThis::add( iconSizeLabel, tr( "Set the icon size in pixel" ) ); |
98 | SpinBoxIconSize = new QSpinBox( hbox_iconSize, "TimeSpinner" ); | 98 | SpinBoxIconSize = new QSpinBox( hbox_iconSize, "TimeSpinner" ); |
99 | SpinBoxIconSize->setMaxValue( 32 ); | 99 | SpinBoxIconSize->setMaxValue( 32 ); |
100 | QWhatsThis::add( SpinBoxIconSize, tr( "Set the icon size in pixel" ) ); | 100 | QWhatsThis::add( SpinBoxIconSize, tr( "Set the icon size in pixel" ) ); |
101 | 101 | ||
102 | QHBox *hbox_refresh = new QHBox( tab_3 ); | ||
103 | QLabel *refreshLabel = new QLabel( hbox_refresh ); | ||
104 | refreshLabel->setText( tr( "Refresh" ) ); | ||
105 | QWhatsThis::add( refreshLabel, tr( "How often should Today refresh itself" ) ); | ||
106 | SpinRefresh = new QSpinBox( hbox_refresh ); | ||
107 | SpinRefresh->setMinValue( 2 ); | ||
108 | SpinRefresh->setSuffix( tr( " seconds" ) ); | ||
109 | QWhatsThis::add( SpinRefresh, tr( "How often should Today refresh itself" ) ); | ||
110 | |||
102 | tab3Layout->addWidget( hbox_auto ); | 111 | tab3Layout->addWidget( hbox_auto ); |
103 | tab3Layout->addWidget( hbox_inactive ); | 112 | tab3Layout->addWidget( hbox_inactive ); |
104 | tab3Layout->addWidget( hbox_iconSize ); | 113 | tab3Layout->addWidget( hbox_iconSize ); |
114 | tab3Layout->addWidget( hbox_refresh ); | ||
105 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); | 115 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); |
106 | 116 | ||
107 | m_applets_changed = false; | 117 | m_applets_changed = false; |
108 | 118 | ||
109 | connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); | 119 | connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); |
110 | 120 | ||
@@ -143,12 +153,14 @@ void TodayConfig::readConfig() { | |||
143 | m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 ); | 153 | m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 ); |
144 | SpinBoxTime->setValue( m_autoStartTimer ); | 154 | SpinBoxTime->setValue( m_autoStartTimer ); |
145 | 155 | ||
146 | cfg.setGroup( "General" ); | 156 | cfg.setGroup( "General" ); |
147 | m_iconSize = cfg.readNumEntry( "IconSize", 18 ); | 157 | m_iconSize = cfg.readNumEntry( "IconSize", 18 ); |
148 | SpinBoxIconSize->setValue( m_iconSize ); | 158 | SpinBoxIconSize->setValue( m_iconSize ); |
159 | SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 ); | ||
160 | |||
149 | 161 | ||
150 | cfg.setGroup( "Plugins" ); | 162 | cfg.setGroup( "Plugins" ); |
151 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); | 163 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); |
152 | } | 164 | } |
153 | 165 | ||
154 | /** | 166 | /** |
@@ -189,13 +201,13 @@ void TodayConfig::writeConfig() { | |||
189 | m_autoStartTimer = SpinBoxTime->value(); | 201 | m_autoStartTimer = SpinBoxTime->value(); |
190 | cfg.writeEntry( "autostartdelay", m_autoStartTimer ); | 202 | cfg.writeEntry( "autostartdelay", m_autoStartTimer ); |
191 | m_iconSize = SpinBoxIconSize->value(); | 203 | m_iconSize = SpinBoxIconSize->value(); |
192 | 204 | ||
193 | cfg.setGroup( "General" ); | 205 | cfg.setGroup( "General" ); |
194 | cfg.writeEntry( "IconSize", m_iconSize ); | 206 | cfg.writeEntry( "IconSize", m_iconSize ); |
195 | 207 | cfg.writeEntry( "checkinterval", SpinRefresh->value()*1000 ); | |
196 | 208 | ||
197 | // set autostart settings | 209 | // set autostart settings |
198 | setAutoStart(); | 210 | setAutoStart(); |
199 | } | 211 | } |
200 | 212 | ||
201 | 213 | ||