summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-24 11:52:25 (UTC)
committer harlekin <harlekin>2002-10-24 11:52:25 (UTC)
commit667da4143ff65ac9502d55fb09ca8223b16a8994 (patch) (side-by-side diff)
treecc7f7762a8ba88f0e913515d572b788073066bce
parentbb381ba95d321259295ff7fc02534281d21ded87 (diff)
downloadopie-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
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/changelog4
-rw-r--r--core/pim/today/opie-today.control2
-rw-r--r--core/pim/today/today.cpp17
-rw-r--r--core/pim/today/today.h4
-rw-r--r--core/pim/today/todayconfig.cpp14
-rw-r--r--core/pim/today/todayconfig.h1
6 files changed, 39 insertions, 3 deletions
diff --git a/core/pim/today/changelog b/core/pim/today/changelog
index 25d63ef..eb2496a 100644
--- a/core/pim/today/changelog
+++ b/core/pim/today/changelog
@@ -1 +1,5 @@
+0.5.2
+
+* refresh settings
+
0.5.1
diff --git a/core/pim/today/opie-today.control b/core/pim/today/opie-today.control
index 28087f9..267a195 100644
--- a/core/pim/today/opie-today.control
+++ b/core/pim/today/opie-today.control
@@ -5,3 +5,3 @@ Maintainer: Maximilian Reiß <harlekin@handhelds.org>
Architecture: arm
-Version: 0.5.1-$SUB_VERSION
+Version: 0.5.2-$SUB_VERSION
Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION)
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
diff --git a/core/pim/today/today.h b/core/pim/today/today.h
index 6f13df6..4485a0b 100644
--- a/core/pim/today/today.h
+++ b/core/pim/today/today.h
@@ -58,2 +58,3 @@ private:
void draw();
+ void setRefreshTimer( int );
@@ -67,2 +68,5 @@ private slots:
+ QTimer *m_refreshTimer;
+
+ bool m_refreshTimerEnabled;
int m_newStart;
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index f9dd8f7..db1141a 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -101,2 +101,11 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
+ QHBox *hbox_refresh = new QHBox( tab_3 );
+ QLabel *refreshLabel = new QLabel( hbox_refresh );
+ refreshLabel->setText( tr( "Refresh" ) );
+ QWhatsThis::add( refreshLabel, tr( "How often should Today refresh itself" ) );
+ SpinRefresh = new QSpinBox( hbox_refresh );
+ SpinRefresh->setMinValue( 2 );
+ SpinRefresh->setSuffix( tr( " seconds" ) );
+ QWhatsThis::add( SpinRefresh, tr( "How often should Today refresh itself" ) );
+
tab3Layout->addWidget( hbox_auto );
@@ -104,2 +113,3 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
tab3Layout->addWidget( hbox_iconSize );
+ tab3Layout->addWidget( hbox_refresh );
TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) );
@@ -148,2 +158,4 @@ void TodayConfig::readConfig() {
SpinBoxIconSize->setValue( m_iconSize );
+ SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 );
+
@@ -194,3 +206,3 @@ void TodayConfig::writeConfig() {
cfg.writeEntry( "IconSize", m_iconSize );
-
+ cfg.writeEntry( "checkinterval", SpinRefresh->value()*1000 );
diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h
index 827e106..68483c2 100644
--- a/core/pim/today/todayconfig.h
+++ b/core/pim/today/todayconfig.h
@@ -69,2 +69,3 @@ private:
QSpinBox* SpinBoxTime;
+ QSpinBox* SpinRefresh;
QSpinBox* SpinBoxIconSize;