summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-11-01 17:07:12 (UTC)
committer llornkcor <llornkcor>2002-11-01 17:07:12 (UTC)
commit800932401b86a43cd52f9cbc2833b2795d1c955b (patch) (side-by-side diff)
treefbf319da8ba850d8987b4e73707a1df3f3e682ce
parent9e5589036e37a54a70243617f38741b6c709aff1 (diff)
downloadopie-800932401b86a43cd52f9cbc2833b2795d1c955b.zip
opie-800932401b86a43cd52f9cbc2833b2795d1c955b.tar.gz
opie-800932401b86a43cd52f9cbc2833b2795d1c955b.tar.bz2
add lookup timer delay spin
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro4
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp7
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp11
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h2
4 files changed, 17 insertions, 7 deletions
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro
index 28ef072..5281373 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro
@@ -1,16 +1,16 @@
TEMPLATE = lib
CONFIG -= moc
CONFIG += qt debug
-HEADERS = stocktickerplugin.h stocktickeruginimpl.h stocktickerpluginwidget.h ticker.h \
+HEADERS = stocktickerplugin.h stocktickeruginimpl.h stocktickerpluginwidget.h ticker.h stocktickerconfig.h \
../libstocks/csv.h \
../libstocks/http.h \
../libstocks/lists.h \
../libstocks/stocks.h
-SOURCES = stocktickerplugin.cpp stocktickerpluginimpl.cpp stocktickerpluginwidget.cpp ticker.cpp \
+SOURCES = stocktickerplugin.cpp stocktickerpluginimpl.cpp stocktickerpluginwidget.cpp ticker.cpp stocktickerconfig.cpp \
../libstocks/csv.c \
../libstocks/currency.c \
../libstocks/history.c \
../libstocks/http.c \
../libstocks/lists.c \
../libstocks/stocks.c
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp
index 24c151b..2eb1697 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp
@@ -14,13 +14,13 @@
* *
***************************************************************************/
#include "stocktickerplugin.h"
#include "stocktickerpluginwidget.h"
-
+#include "stocktickerconfig.h"
StockTickerPlugin::StockTickerPlugin() {
}
StockTickerPlugin::~StockTickerPlugin() {
}
@@ -43,17 +43,18 @@ QWidget* StockTickerPlugin::widget( QWidget * wid ) {
QString StockTickerPlugin::pixmapNameConfig() const {
return 0l;
}
TodayConfigWidget* StockTickerPlugin::configWidget( QWidget* wid ) {
- return 0l;
+ return new StocktickerPluginConfig( wid , "Stockticker" );
}
QString StockTickerPlugin::appName() const {
return "stockticker";
}
bool StockTickerPlugin::excludeFromRefresh() const {
-//return false;
+
return true;
}
+
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp
index aabb4d2..e178338 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp
@@ -51,12 +51,19 @@ void StockTickerPluginWidget::init() {
stocktickerTicker = new Ticker(this);
stocktickerTicker->setMinimumHeight(15);
connect( stocktickerTicker, SIGNAL( mousePressed()), this, SLOT( doStocks() ));
layout->addWidget( stocktickerTicker);
+
+ Config cfg( "stockticker");
+ cfg.setGroup("Timer");
+ timerDelay= cfg.readNumEntry("Delay",0);
+ if(timerDelay > 0)
+ startTimer(timerDelay*60000);
+
}
void StockTickerPluginWidget::doStocks() {
Config cfg( "stockticker");
cfg.setGroup( "Symbols" );
@@ -117,13 +124,13 @@ void StockTickerPluginWidget::getStocks( const char *blah) {
/* Displays the stocks */
while(stocks_tmp!=0){
if (stocks_tmp->Time) {
// printf("%s ", stocks_tmp->Time);
- tempString.sprintf("|| %s ", stocks_tmp->Time);
+ tempString.sprintf("| %s ", stocks_tmp->Time);
tempString.replace(QRegExp("\""),"");
if( dotimeCheck)
output +=tempString;
}
if (stocks_tmp->Date) {
// printf("%s ", stocks_tmp->Date);
@@ -240,7 +247,9 @@ void StockTickerPluginWidget::DefProxy(void) {
}
}
void StockTickerPluginWidget::timerEvent( QTimerEvent *e ) {
killTimer(e->timerId());
doStocks();
+ if(timerDelay > 0)
+ startTimer(timerDelay*1000);
}
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h
index 6a15f56..8f3441d 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h
@@ -55,10 +55,10 @@ protected slots:
private:
Ticker *stocktickerTicker;
void timerEvent( QTimerEvent * );
void init();
void getStocks( const char *stock_liste);
void DefProxy(void);
-
+ int timerDelay;
};
#endif