author | llornkcor <llornkcor> | 2002-11-01 17:07:12 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-01 17:07:12 (UTC) |
commit | 800932401b86a43cd52f9cbc2833b2795d1c955b (patch) (unidiff) | |
tree | fbf319da8ba850d8987b4e73707a1df3f3e682ce | |
parent | 9e5589036e37a54a70243617f38741b6c709aff1 (diff) | |
download | opie-800932401b86a43cd52f9cbc2833b2795d1c955b.zip opie-800932401b86a43cd52f9cbc2833b2795d1c955b.tar.gz opie-800932401b86a43cd52f9cbc2833b2795d1c955b.tar.bz2 |
add lookup timer delay spin
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,14 +1,14 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG -= moc | 2 | CONFIG -= moc |
3 | CONFIG += qt debug | 3 | CONFIG += qt debug |
4 | 4 | ||
5 | HEADERS = stocktickerplugin.h stocktickeruginimpl.h stocktickerpluginwidget.h ticker.h \ | 5 | HEADERS = stocktickerplugin.h stocktickeruginimpl.h stocktickerpluginwidget.h ticker.h stocktickerconfig.h \ |
6 | ../libstocks/csv.h \ | 6 | ../libstocks/csv.h \ |
7 | ../libstocks/http.h \ | 7 | ../libstocks/http.h \ |
8 | ../libstocks/lists.h \ | 8 | ../libstocks/lists.h \ |
9 | ../libstocks/stocks.h | 9 | ../libstocks/stocks.h |
10 | SOURCES = stocktickerplugin.cpp stocktickerpluginimpl.cpp stocktickerpluginwidget.cpp ticker.cpp \ | 10 | SOURCES = stocktickerplugin.cpp stocktickerpluginimpl.cpp stocktickerpluginwidget.cpp ticker.cpp stocktickerconfig.cpp \ |
11 | ../libstocks/csv.c \ | 11 | ../libstocks/csv.c \ |
12 | ../libstocks/currency.c \ | 12 | ../libstocks/currency.c \ |
13 | ../libstocks/history.c \ | 13 | ../libstocks/history.c \ |
14 | ../libstocks/http.c \ | 14 | ../libstocks/http.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 | |||
@@ -16,9 +16,9 @@ | |||
16 | 16 | ||
17 | 17 | ||
18 | #include "stocktickerplugin.h" | 18 | #include "stocktickerplugin.h" |
19 | #include "stocktickerpluginwidget.h" | 19 | #include "stocktickerpluginwidget.h" |
20 | 20 | #include "stocktickerconfig.h" | |
21 | 21 | ||
22 | StockTickerPlugin::StockTickerPlugin() { | 22 | StockTickerPlugin::StockTickerPlugin() { |
23 | } | 23 | } |
24 | 24 | ||
@@ -45,15 +45,16 @@ QString StockTickerPlugin::pixmapNameConfig() const { | |||
45 | return 0l; | 45 | return 0l; |
46 | } | 46 | } |
47 | 47 | ||
48 | TodayConfigWidget* StockTickerPlugin::configWidget( QWidget* wid ) { | 48 | TodayConfigWidget* StockTickerPlugin::configWidget( QWidget* wid ) { |
49 | return 0l; | 49 | return new StocktickerPluginConfig( wid , "Stockticker" ); |
50 | } | 50 | } |
51 | 51 | ||
52 | QString StockTickerPlugin::appName() const { | 52 | QString StockTickerPlugin::appName() const { |
53 | return "stockticker"; | 53 | return "stockticker"; |
54 | } | 54 | } |
55 | 55 | ||
56 | bool StockTickerPlugin::excludeFromRefresh() const { | 56 | bool StockTickerPlugin::excludeFromRefresh() const { |
57 | //return false; | 57 | |
58 | return true; | 58 | return true; |
59 | } | 59 | } |
60 | |||
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 | |||
@@ -53,8 +53,15 @@ void StockTickerPluginWidget::init() { | |||
53 | stocktickerTicker->setMinimumHeight(15); | 53 | stocktickerTicker->setMinimumHeight(15); |
54 | connect( stocktickerTicker, SIGNAL( mousePressed()), this, SLOT( doStocks() )); | 54 | connect( stocktickerTicker, SIGNAL( mousePressed()), this, SLOT( doStocks() )); |
55 | 55 | ||
56 | layout->addWidget( stocktickerTicker); | 56 | layout->addWidget( stocktickerTicker); |
57 | |||
58 | Config cfg( "stockticker"); | ||
59 | cfg.setGroup("Timer"); | ||
60 | timerDelay= cfg.readNumEntry("Delay",0); | ||
61 | if(timerDelay > 0) | ||
62 | startTimer(timerDelay*60000); | ||
63 | |||
57 | } | 64 | } |
58 | 65 | ||
59 | void StockTickerPluginWidget::doStocks() { | 66 | void StockTickerPluginWidget::doStocks() { |
60 | 67 | ||
@@ -119,9 +126,9 @@ void StockTickerPluginWidget::getStocks( const char *blah) { | |||
119 | while(stocks_tmp!=0){ | 126 | while(stocks_tmp!=0){ |
120 | 127 | ||
121 | if (stocks_tmp->Time) { | 128 | if (stocks_tmp->Time) { |
122 | // printf("%s ", stocks_tmp->Time); | 129 | // printf("%s ", stocks_tmp->Time); |
123 | tempString.sprintf("|| %s ", stocks_tmp->Time); | 130 | tempString.sprintf("| %s ", stocks_tmp->Time); |
124 | tempString.replace(QRegExp("\""),""); | 131 | tempString.replace(QRegExp("\""),""); |
125 | if( dotimeCheck) | 132 | if( dotimeCheck) |
126 | output +=tempString; | 133 | output +=tempString; |
127 | } | 134 | } |
@@ -242,5 +249,7 @@ void StockTickerPluginWidget::DefProxy(void) { | |||
242 | 249 | ||
243 | void StockTickerPluginWidget::timerEvent( QTimerEvent *e ) { | 250 | void StockTickerPluginWidget::timerEvent( QTimerEvent *e ) { |
244 | killTimer(e->timerId()); | 251 | killTimer(e->timerId()); |
245 | doStocks(); | 252 | doStocks(); |
253 | if(timerDelay > 0) | ||
254 | startTimer(timerDelay*1000); | ||
246 | } | 255 | } |
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 | |||
@@ -57,8 +57,8 @@ private: | |||
57 | void timerEvent( QTimerEvent * ); | 57 | void timerEvent( QTimerEvent * ); |
58 | void init(); | 58 | void init(); |
59 | void getStocks( const char *stock_liste); | 59 | void getStocks( const char *stock_liste); |
60 | void DefProxy(void); | 60 | void DefProxy(void); |
61 | 61 | int timerDelay; | |
62 | }; | 62 | }; |
63 | 63 | ||
64 | #endif | 64 | #endif |