summaryrefslogtreecommitdiff
path: root/core/pim/today/today.cpp
Unidiff
Diffstat (limited to 'core/pim/today/today.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp42
1 files changed, 25 insertions, 17 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 91028c8..1f758f2 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -71,5 +71,6 @@ Today::Today( QWidget* parent, const char* name, WFlags fl )
71 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); 71 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
72 m_refreshTimer->start( 15000 ); 72 m_refreshTimer->start( 15000 );
73 refresh(); 73 init();
74 loadPlugins();
74 showMaximized(); 75 showMaximized();
75} 76}
@@ -137,4 +138,19 @@ void Today::init() {
137 m_iconSize = cfg.readNumEntry( "IconSize", 18 ); 138 m_iconSize = cfg.readNumEntry( "IconSize", 18 );
138 setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) ); 139 setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) );
140
141
142 // qDebug(" refresh ");
143 // set the date in top label
144 QDate date = QDate::currentDate();
145 QString time = ( tr( date.toString() ) );
146
147 DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) );
148
149 if ( layout ) {
150 delete layout;
151 }
152 layout = new QVBoxLayout( this );
153 layout->addWidget( Frame );
154 layout->addWidget( OwnerField );
139} 155}
140 156
@@ -267,4 +283,5 @@ void Today::loadPlugins() {
267 } 283 }
268 } 284 }
285 draw();
269} 286}
270 287
@@ -341,5 +358,5 @@ void Today::startConfig() {
341 confWidget->writeConfig(); 358 confWidget->writeConfig();
342 } 359 }
343 refresh(); 360 loadPlugins();
344 } else { 361 } else {
345 // since refresh is not called in that case , reconnect the signal 362 // since refresh is not called in that case , reconnect the signal
@@ -356,20 +373,11 @@ void Today::refresh() {
356 init(); 373 init();
357 374
358 // qDebug(" refresh "); 375 QValueList<TodayPlugin>::Iterator it;
359 // set the date in top label 376 for ( it = pluginList.begin(); it != pluginList.end(); ++it ) {
360 QDate date = QDate::currentDate(); 377 if ( !(*it).excludeRefresh ) {
361 QString time = ( tr( date.toString() ) ); 378 (*it).guiPart->refresh();
362 379 qDebug( "refresh" );
363 DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) ); 380 }
364
365 if ( layout ) {
366 delete layout;
367 } 381 }
368 layout = new QVBoxLayout( this );
369 layout->addWidget( Frame );
370 layout->addWidget( OwnerField );
371
372 loadPlugins();
373 draw();
374} 382}
375 383