Diffstat (limited to 'noncore/todayplugins/stockticker/stocktickerlib') (more/less context) (show whitespace changes)
3 files changed, 11 insertions, 1 deletions
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp index baf8198..24c151b 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp | |||
@@ -51,8 +51,9 @@ TodayConfigWidget* StockTickerPlugin::configWidget( QWidget* wid ) { | |||
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 | return true; | 58 | return true; |
58 | } | 59 | } |
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp index 3eaade4..6d53a91 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp | |||
@@ -19,12 +19,13 @@ | |||
19 | #include <qstring.h> | 19 | #include <qstring.h> |
20 | #include <qstringlist.h> | 20 | #include <qstringlist.h> |
21 | #include <qobject.h> | 21 | #include <qobject.h> |
22 | #include <qlayout.h> | 22 | #include <qlayout.h> |
23 | #include <qlineedit.h> | 23 | #include <qlineedit.h> |
24 | #include <qregexp.h> | 24 | #include <qregexp.h> |
25 | #include <qtimer.h> | ||
25 | 26 | ||
26 | #include <qpe/config.h> | 27 | #include <qpe/config.h> |
27 | #include <qpe/timestring.h> | 28 | #include <qpe/timestring.h> |
28 | #include <qpe/qcopenvelope_qws.h> | 29 | #include <qpe/qcopenvelope_qws.h> |
29 | 30 | ||
30 | #include "ticker.h" | 31 | #include "ticker.h" |
@@ -35,12 +36,13 @@ extern "C" { | |||
35 | 36 | ||
36 | #include "stocktickerpluginwidget.h" | 37 | #include "stocktickerpluginwidget.h" |
37 | 38 | ||
38 | StockTickerPluginWidget::StockTickerPluginWidget( QWidget *parent, const char* name) | 39 | StockTickerPluginWidget::StockTickerPluginWidget( QWidget *parent, const char* name) |
39 | : QWidget(parent, name ) { | 40 | : QWidget(parent, name ) { |
40 | init(); | 41 | init(); |
42 | startTimer(1000); | ||
41 | } | 43 | } |
42 | 44 | ||
43 | StockTickerPluginWidget::~StockTickerPluginWidget() { | 45 | StockTickerPluginWidget::~StockTickerPluginWidget() { |
44 | } | 46 | } |
45 | 47 | ||
46 | void StockTickerPluginWidget::init() { | 48 | void StockTickerPluginWidget::init() { |
@@ -234,6 +236,11 @@ void StockTickerPluginWidget::DefProxy(void) { | |||
234 | output = tempString; | 236 | output = tempString; |
235 | return; | 237 | return; |
236 | // exit(1); | 238 | // exit(1); |
237 | } | 239 | } |
238 | } | 240 | } |
239 | } | 241 | } |
242 | |||
243 | void StockTickerPluginWidget::timerEvent( QTimerEvent *e ) { | ||
244 | killTimer(e->timerId()); | ||
245 | doStocks(); | ||
246 | } | ||
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h index 6524ae4..6a15f56 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h | |||
@@ -35,12 +35,14 @@ | |||
35 | #include "ticker.h" | 35 | #include "ticker.h" |
36 | 36 | ||
37 | /* extern "C" { */ | 37 | /* extern "C" { */ |
38 | /* #include "stocks.h" */ | 38 | /* #include "stocks.h" */ |
39 | /* } */ | 39 | /* } */ |
40 | 40 | ||
41 | class QTimer; | ||
42 | |||
41 | class StockTickerPluginWidget : public QWidget { | 43 | class StockTickerPluginWidget : public QWidget { |
42 | 44 | ||
43 | Q_OBJECT | 45 | Q_OBJECT |
44 | 46 | ||
45 | public: | 47 | public: |
46 | StockTickerPluginWidget( QWidget *parent, const char *name ); | 48 | StockTickerPluginWidget( QWidget *parent, const char *name ); |
@@ -49,13 +51,13 @@ public: | |||
49 | 51 | ||
50 | protected slots: | 52 | protected slots: |
51 | void doStocks(); | 53 | void doStocks(); |
52 | 54 | ||
53 | private: | 55 | private: |
54 | Ticker *stocktickerTicker; | 56 | Ticker *stocktickerTicker; |
55 | 57 | void timerEvent( QTimerEvent * ); | |
56 | void init(); | 58 | void init(); |
57 | void getStocks( const char *stock_liste); | 59 | void getStocks( const char *stock_liste); |
58 | void DefProxy(void); | 60 | void DefProxy(void); |
59 | 61 | ||
60 | }; | 62 | }; |
61 | 63 | ||