summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show 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
@@ -2,12 +2,12 @@ TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt debug 3CONFIG += qt debug
4 4
5HEADERS = stocktickerplugin.h stocktickeruginimpl.h stocktickerpluginwidget.h ticker.h \ 5HEADERS = 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
10SOURCES = stocktickerplugin.cpp stocktickerpluginimpl.cpp stocktickerpluginwidget.cpp ticker.cpp \ 10SOURCES = 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 \
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
@@ -17,7 +17,7 @@
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
22StockTickerPlugin::StockTickerPlugin() { 22StockTickerPlugin::StockTickerPlugin() {
23} 23}
@@ -46,7 +46,7 @@ QString StockTickerPlugin::pixmapNameConfig() const {
46} 46}
47 47
48TodayConfigWidget* StockTickerPlugin::configWidget( QWidget* wid ) { 48TodayConfigWidget* StockTickerPlugin::configWidget( QWidget* wid ) {
49 return 0l; 49 return new StocktickerPluginConfig( wid , "Stockticker" );
50} 50}
51 51
52QString StockTickerPlugin::appName() const { 52QString StockTickerPlugin::appName() const {
@@ -54,6 +54,7 @@ QString StockTickerPlugin::appName() const {
54} 54}
55 55
56bool StockTickerPlugin::excludeFromRefresh() const { 56bool StockTickerPlugin::excludeFromRefresh() const {
57//return false; 57
58return true; 58return 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
@@ -54,6 +54,13 @@ void StockTickerPluginWidget::init() {
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
59void StockTickerPluginWidget::doStocks() { 66void StockTickerPluginWidget::doStocks() {
@@ -120,7 +127,7 @@ void StockTickerPluginWidget::getStocks( const char *blah) {
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;
@@ -243,4 +250,6 @@ void StockTickerPluginWidget::DefProxy(void) {
243void StockTickerPluginWidget::timerEvent( QTimerEvent *e ) { 250void 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
@@ -58,7 +58,7 @@ private:
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