summaryrefslogtreecommitdiff
path: root/core/pim/today/today.cpp
authorharlekin <harlekin>2003-02-10 21:28:14 (UTC)
committer harlekin <harlekin>2003-02-10 21:28:14 (UTC)
commitbbb3cdf8f91d567f6c2e786bd144b64bd679ff9a (patch) (side-by-side diff)
tree9c622e670cab66c44d9bd079707945cf3c9bcb89 /core/pim/today/today.cpp
parentde272b8c47c3960a3fe574317fe2e6fb0c32e4af (diff)
downloadopie-bbb3cdf8f91d567f6c2e786bd144b64bd679ff9a.zip
opie-bbb3cdf8f91d567f6c2e786bd144b64bd679ff9a.tar.gz
opie-bbb3cdf8f91d567f6c2e786bd144b64bd679ff9a.tar.bz2
adapted to new refresh, datebookplugin still need some work
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
@@ -70,7 +70,8 @@ Today::Today( QWidget* parent, const char* name, WFlags fl )
m_refreshTimer = new QTimer( this );
connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
m_refreshTimer->start( 15000 );
- refresh();
+ init();
+ loadPlugins();
showMaximized();
}
@@ -136,6 +137,21 @@ void Today::init() {
cfg.setGroup( "General" );
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 );
}
@@ -266,6 +282,7 @@ void Today::loadPlugins() {
}
}
}
+ draw();
}
@@ -340,7 +357,7 @@ void Today::startConfig() {
confWidget = configWidgetList.next() ) {
confWidget->writeConfig();
}
- refresh();
+ loadPlugins();
} else {
// since refresh is not called in that case , reconnect the signal
connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
@@ -355,22 +372,13 @@ void Today::startConfig() {
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();
}
void Today::startApplication() {