author | llornkcor <llornkcor> | 2002-11-03 19:45:33 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-03 19:45:33 (UTC) |
commit | fe933da66a39ae964f44d0f057fabece5bdf077b (patch) (unidiff) | |
tree | 8e2bb1cfb4f52da40da9efc8834f8967da4bf080 /noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp | |
parent | 88539c74ca4a6b6699df2b050a498a81d22a0793 (diff) | |
download | opie-fe933da66a39ae964f44d0f057fabece5bdf077b.zip opie-fe933da66a39ae964f44d0f057fabece5bdf077b.tar.gz opie-fe933da66a39ae964f44d0f057fabece5bdf077b.tar.bz2 |
moved ticker to oticker
Diffstat (limited to 'noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp index a7f98be..8830472 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp | |||
@@ -19,62 +19,56 @@ | |||
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 | #include <qtimer.h> |
26 | 26 | ||
27 | #include <qpe/config.h> | 27 | #include <qpe/config.h> |
28 | #include <qpe/timestring.h> | 28 | #include <qpe/timestring.h> |
29 | #include <qpe/qcopenvelope_qws.h> | 29 | #include <qpe/qcopenvelope_qws.h> |
30 | 30 | ||
31 | #include "ticker.h" | 31 | #include <opie/oticker.h> |
32 | //#include "ticker.h" | ||
32 | 33 | ||
33 | extern "C" { | 34 | extern "C" { |
34 | #include "libstocks/stocks.h" | 35 | #include "libstocks/stocks.h" |
35 | } | 36 | } |
36 | 37 | ||
37 | #include "stocktickerpluginwidget.h" | 38 | #include "stocktickerpluginwidget.h" |
38 | 39 | ||
39 | StockTickerPluginWidget::StockTickerPluginWidget( QWidget *parent, const char* name) | 40 | StockTickerPluginWidget::StockTickerPluginWidget( QWidget *parent, const char* name) |
40 | : QWidget(parent, name ) { | 41 | : QWidget(parent, name ) { |
41 | init(); | 42 | init(); |
42 | startTimer(1000); | 43 | startTimer(1000); |
43 | } | 44 | } |
44 | 45 | ||
45 | StockTickerPluginWidget::~StockTickerPluginWidget() { | 46 | StockTickerPluginWidget::~StockTickerPluginWidget() { |
46 | } | 47 | } |
47 | 48 | ||
48 | void StockTickerPluginWidget::init() { | 49 | void StockTickerPluginWidget::init() { |
49 | 50 | ||
50 | QHBoxLayout* layout = new QHBoxLayout( this ); | 51 | QHBoxLayout* layout = new QHBoxLayout( this ); |
51 | 52 | ||
52 | stocktickerTicker = new Ticker(this); | 53 | stocktickerTicker = new OTicker(this); |
53 | stocktickerTicker->setMinimumHeight(15); | 54 | stocktickerTicker->setMinimumHeight(15); |
54 | connect( stocktickerTicker, SIGNAL( mousePressed()), this, SLOT( doStocks() )); | 55 | connect( stocktickerTicker, SIGNAL( mousePressed()), this, SLOT( doStocks() )); |
55 | 56 | ||
56 | layout->addWidget( stocktickerTicker); | 57 | layout->addWidget( stocktickerTicker); |
57 | // Config cfg( "stockticker"); | ||
58 | // cfg.setGroup("Timer"); | ||
59 | // timerDelay= cfg.readNumEntry("Delay",0); | ||
60 | // if(timerDelay > 0 ) | ||
61 | // startTimer(timerDelay*60000); | ||
62 | // qDebug("timer ^ set for %d",(timerDelay*60000)/60000); | ||
63 | 58 | ||
64 | } | 59 | } |
65 | 60 | ||
66 | void StockTickerPluginWidget::doStocks() { | 61 | void StockTickerPluginWidget::doStocks() { |
67 | Config cfg( "stockticker"); | 62 | Config cfg( "stockticker"); |
68 | |||
69 | cfg.setGroup( "Symbols" ); | 63 | cfg.setGroup( "Symbols" ); |
70 | QString symbollist; | 64 | QString symbollist; |
71 | symbollist = cfg.readEntry("Symbols", ""); | 65 | symbollist = cfg.readEntry("Symbols", ""); |
72 | symbollist.replace(QRegExp(" "),"+");//seperated by + | 66 | symbollist.replace(QRegExp(" "),"+");//seperated by + |
73 | // qDebug(symbollist); | 67 | // qDebug(symbollist); |
74 | 68 | ||
75 | getStocks( symbollist.latin1()); | 69 | getStocks( symbollist.latin1()); |
76 | 70 | ||
77 | stocktickerTicker->setText( output ); | 71 | stocktickerTicker->setText( output ); |
78 | } | 72 | } |
79 | 73 | ||
80 | void StockTickerPluginWidget::getStocks( const char *blah) { | 74 | void StockTickerPluginWidget::getStocks( const char *blah) { |