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 @@ -3,10 +3,10 @@ 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 \ 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 @@ -18,5 +18,5 @@ #include "stocktickerplugin.h" #include "stocktickerpluginwidget.h" - +#include "stocktickerconfig.h" StockTickerPlugin::StockTickerPlugin() { @@ -47,5 +47,5 @@ QString StockTickerPlugin::pixmapNameConfig() const { TodayConfigWidget* StockTickerPlugin::configWidget( QWidget* wid ) { - return 0l; + return new StocktickerPluginConfig( wid , "Stockticker" ); } @@ -55,5 +55,6 @@ QString StockTickerPlugin::appName() const { 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 @@ -55,4 +55,11 @@ void StockTickerPluginWidget::init() { layout->addWidget( stocktickerTicker); + + Config cfg( "stockticker"); + cfg.setGroup("Timer"); + timerDelay= cfg.readNumEntry("Delay",0); + if(timerDelay > 0) + startTimer(timerDelay*60000); + } @@ -121,5 +128,5 @@ void StockTickerPluginWidget::getStocks( const char *blah) { 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) @@ -244,3 +251,5 @@ 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 @@ -59,5 +59,5 @@ private: void getStocks( const char *stock_liste); void DefProxy(void); - + int timerDelay; }; |