author | harlekin <harlekin> | 2003-02-10 21:28:14 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-02-10 21:28:14 (UTC) |
commit | bbb3cdf8f91d567f6c2e786bd144b64bd679ff9a (patch) (side-by-side diff) | |
tree | 9c622e670cab66c44d9bd079707945cf3c9bcb89 /core/pim/today/today.cpp | |
parent | de272b8c47c3960a3fe574317fe2e6fb0c32e4af (diff) | |
download | opie-bbb3cdf8f91d567f6c2e786bd144b64bd679ff9a.zip opie-bbb3cdf8f91d567f6c2e786bd144b64bd679ff9a.tar.gz opie-bbb3cdf8f91d567f6c2e786bd144b64bd679ff9a.tar.bz2 |
adapted to new refresh, datebookplugin still need some work
-rw-r--r-- | core/pim/today/today.cpp | 42 |
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 ) connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); m_refreshTimer->start( 15000 ); - refresh(); + init(); + loadPlugins(); showMaximized(); } @@ -137,4 +138,19 @@ void Today::init() { m_iconSize = cfg.readNumEntry( "IconSize", 18 ); setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) ); + + + // qDebug(" refresh "); + // set the date in top label + QDate date = QDate::currentDate(); + QString time = ( tr( date.toString() ) ); + + DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) ); + + if ( layout ) { + delete layout; + } + layout = new QVBoxLayout( this ); + layout->addWidget( Frame ); + layout->addWidget( OwnerField ); } @@ -267,4 +283,5 @@ void Today::loadPlugins() { } } + draw(); } @@ -341,5 +358,5 @@ void Today::startConfig() { confWidget->writeConfig(); } - refresh(); + loadPlugins(); } else { // since refresh is not called in that case , reconnect the signal @@ -356,20 +373,11 @@ void Today::refresh() { init(); - // qDebug(" refresh "); - // set the date in top label - QDate date = QDate::currentDate(); - QString time = ( tr( date.toString() ) ); - - DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) ); - - if ( layout ) { - delete layout; + QValueList<TodayPlugin>::Iterator it; + for ( it = pluginList.begin(); it != pluginList.end(); ++it ) { + if ( !(*it).excludeRefresh ) { + (*it).guiPart->refresh(); + qDebug( "refresh" ); + } } - layout = new QVBoxLayout( this ); - layout->addWidget( Frame ); - layout->addWidget( OwnerField ); - - loadPlugins(); - draw(); } |