-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 @@ -67,2 +67,5 @@ 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(); @@ -83,2 +86,10 @@ void Today::channelReceived( const QCString &msg, const QByteArray & data ) { +void Today::setRefreshTimer( int interval ) { + + if ( m_refreshTimerEnabled ) { + m_refreshTimer->changeInterval( interval ); + } +} + + /** @@ -113,8 +124,11 @@ void Today::init() { 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 ) ); + } @@ -295,2 +309,3 @@ void Today::refresh() { + qDebug(" refresh "); // set the date in top label |