author | harlekin <harlekin> | 2002-10-24 11:52:25 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-24 11:52:25 (UTC) |
commit | 667da4143ff65ac9502d55fb09ca8223b16a8994 (patch) (unidiff) | |
tree | cc7f7762a8ba88f0e913515d572b788073066bce /core/pim/today | |
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/changelog | 4 | ||||
-rw-r--r-- | core/pim/today/opie-today.control | 2 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 17 | ||||
-rw-r--r-- | core/pim/today/today.h | 4 | ||||
-rw-r--r-- | core/pim/today/todayconfig.cpp | 14 | ||||
-rw-r--r-- | core/pim/today/todayconfig.h | 1 |
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 @@ | |||
1 | 0.5.2 | ||
2 | |||
3 | * refresh settings | ||
4 | |||
1 | 0.5.1 | 5 | 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> | |||
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: 0.5.1-$SUB_VERSION | 6 | Version: 0.5.2-$SUB_VERSION |
7 | Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION) | 7 | 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 ) | |||
67 | setOwnerField(); | 67 | setOwnerField(); |
68 | m_refreshTimer = new QTimer( this ); | ||
69 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | ||
70 | m_refreshTimer->start( 15000 ); | ||
68 | refresh(); | 71 | refresh(); |
@@ -83,2 +86,10 @@ void Today::channelReceived( const QCString &msg, const QByteArray & data ) { | |||
83 | 86 | ||
87 | void Today::setRefreshTimer( int interval ) { | ||
88 | |||
89 | if ( m_refreshTimerEnabled ) { | ||
90 | m_refreshTimer->changeInterval( interval ); | ||
91 | } | ||
92 | } | ||
93 | |||
94 | |||
84 | /** | 95 | /** |
@@ -113,8 +124,11 @@ void Today::init() { | |||
113 | Config cfg( "today" ); | 124 | Config cfg( "today" ); |
114 | cfg.setGroup( "Plugins" ); | ||
115 | 125 | ||
126 | cfg.setGroup( "Plugins" ); | ||
116 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); | 127 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); |
117 | m_allApplets = cfg.readListEntry( "AllApplets", ',' ); | 128 | m_allApplets = cfg.readListEntry( "AllApplets", ',' ); |
129 | |||
118 | cfg.setGroup( "General" ); | 130 | cfg.setGroup( "General" ); |
119 | m_iconSize = cfg.readNumEntry( "IconSize", 18 ); | 131 | m_iconSize = cfg.readNumEntry( "IconSize", 18 ); |
132 | m_refreshTimer->changeInterval( cfg.readNumEntry( "checkinterval", 15000 ) ); | ||
133 | |||
120 | } | 134 | } |
@@ -295,2 +309,3 @@ void Today::refresh() { | |||
295 | 309 | ||
310 | qDebug(" refresh "); | ||
296 | // set the date in top label | 311 | // 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: | |||
58 | void draw(); | 58 | void draw(); |
59 | void setRefreshTimer( int ); | ||
59 | 60 | ||
@@ -67,2 +68,5 @@ private slots: | |||
67 | 68 | ||
69 | QTimer *m_refreshTimer; | ||
70 | |||
71 | bool m_refreshTimerEnabled; | ||
68 | int m_newStart; | 72 | 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 ) | |||
101 | 101 | ||
102 | QHBox *hbox_refresh = new QHBox( tab_3 ); | ||
103 | QLabel *refreshLabel = new QLabel( hbox_refresh ); | ||
104 | refreshLabel->setText( tr( "Refresh" ) ); | ||
105 | QWhatsThis::add( refreshLabel, tr( "How often should Today refresh itself" ) ); | ||
106 | SpinRefresh = new QSpinBox( hbox_refresh ); | ||
107 | SpinRefresh->setMinValue( 2 ); | ||
108 | SpinRefresh->setSuffix( tr( " seconds" ) ); | ||
109 | QWhatsThis::add( SpinRefresh, tr( "How often should Today refresh itself" ) ); | ||
110 | |||
102 | tab3Layout->addWidget( hbox_auto ); | 111 | tab3Layout->addWidget( hbox_auto ); |
@@ -104,2 +113,3 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) | |||
104 | tab3Layout->addWidget( hbox_iconSize ); | 113 | tab3Layout->addWidget( hbox_iconSize ); |
114 | tab3Layout->addWidget( hbox_refresh ); | ||
105 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); | 115 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); |
@@ -148,2 +158,4 @@ void TodayConfig::readConfig() { | |||
148 | SpinBoxIconSize->setValue( m_iconSize ); | 158 | SpinBoxIconSize->setValue( m_iconSize ); |
159 | SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 ); | ||
160 | |||
149 | 161 | ||
@@ -194,3 +206,3 @@ void TodayConfig::writeConfig() { | |||
194 | cfg.writeEntry( "IconSize", m_iconSize ); | 206 | cfg.writeEntry( "IconSize", m_iconSize ); |
195 | 207 | cfg.writeEntry( "checkinterval", SpinRefresh->value()*1000 ); | |
196 | 208 | ||
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: | |||
69 | QSpinBox* SpinBoxTime; | 69 | QSpinBox* SpinBoxTime; |
70 | QSpinBox* SpinRefresh; | ||
70 | QSpinBox* SpinBoxIconSize; | 71 | QSpinBox* SpinBoxIconSize; |