author | harlekin <harlekin> | 2002-10-24 11:52:25 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-24 11:52:25 (UTC) |
commit | 667da4143ff65ac9502d55fb09ca8223b16a8994 (patch) (side-by-side diff) | |
tree | cc7f7762a8ba88f0e913515d572b788073066bce /core/pim/today/today.cpp | |
parent | bb381ba95d321259295ff7fc02534281d21ded87 (diff) | |
download | opie-667da4143ff65ac9502d55fb09ca8223b16a8994.zip opie-667da4143ff65ac9502d55fb09ca8223b16a8994.tar.gz opie-667da4143ff65ac9502d55fb09ca8223b16a8994.tar.bz2 |
today refreshes itself now by a timer, important for fast load and on retail rom which might not get the pim signal we will have soon - closes bug #335
-rw-r--r-- | core/pim/today/today.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index dd98824..8184730 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -66,4 +66,7 @@ Today::Today( QWidget* parent, const char* name, WFlags fl ) setOwnerField(); + m_refreshTimer = new QTimer( this ); + connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); + m_refreshTimer->start( 15000 ); refresh(); showMaximized(); @@ -82,4 +85,12 @@ void Today::channelReceived( const QCString &msg, const QByteArray & data ) { } +void Today::setRefreshTimer( int interval ) { + + if ( m_refreshTimerEnabled ) { + m_refreshTimer->changeInterval( interval ); + } +} + + /** * Initialises the owner field with the default value, the username @@ -112,10 +123,13 @@ void Today::init() { // read config Config cfg( "today" ); - cfg.setGroup( "Plugins" ); + cfg.setGroup( "Plugins" ); m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); m_allApplets = cfg.readListEntry( "AllApplets", ',' ); + cfg.setGroup( "General" ); m_iconSize = cfg.readNumEntry( "IconSize", 18 ); + m_refreshTimer->changeInterval( cfg.readNumEntry( "checkinterval", 15000 ) ); + } @@ -294,4 +308,5 @@ void Today::refresh() { init(); + qDebug(" refresh "); // set the date in top label QDate date = QDate::currentDate(); |