Diffstat (limited to 'noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp index 18c9e51..0d90d0f 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp | |||
@@ -211,16 +211,18 @@ void getStocks( const QString *blah) { | |||
211 | } | 211 | } |
212 | 212 | ||
213 | /* frees stocks */ | 213 | /* frees stocks */ |
214 | free_stocks(stocks_quotes); | 214 | free_stocks(stocks_quotes); |
215 | stocktickerTicker->setText( output ); | 215 | stocktickerTicker->setText( output.latin1() ); |
216 | 216 | ||
217 | } | 217 | } |
218 | 218 | ||
219 | StockTickerPluginWidget::StockTickerPluginWidget( QWidget *parent, const char* name) | 219 | StockTickerPluginWidget::StockTickerPluginWidget( QWidget *parent, const char* name) |
220 | : QWidget(parent, name ) { | 220 | : QWidget(parent, name ) { |
221 | init(); | 221 | init(); |
222 | startTimer(1000); | 222 | startTimer(1000); |
223 | |||
224 | stocktickerTicker->setTextFormat(Qt::RichText); | ||
223 | // checkConnection(); | 225 | // checkConnection(); |
224 | } | 226 | } |
225 | 227 | ||
226 | StockTickerPluginWidget::~StockTickerPluginWidget() { | 228 | StockTickerPluginWidget::~StockTickerPluginWidget() { |
@@ -242,15 +244,16 @@ void StockTickerPluginWidget::doStocks() { | |||
242 | symbollist=""; | 244 | symbollist=""; |
243 | symbollist = cfg.readEntry("Symbols", ""); | 245 | symbollist = cfg.readEntry("Symbols", ""); |
244 | symbollist.replace(QRegExp(" "),"+");//seperated by + | 246 | symbollist.replace(QRegExp(" "),"+");//seperated by + |
245 | 247 | ||
246 | // qDebug(symbollist); | 248 | cfg.setGroup("Timer"); |
249 | stocktickerTicker->setUpdateTime( cfg.readNumEntry("ScrollSpeed",50)); | ||
250 | stocktickerTicker->setScrollLength( cfg.readNumEntry("ScrollLength",10)); | ||
251 | |||
247 | if (!symbollist.isEmpty()) { | 252 | if (!symbollist.isEmpty()) { |
248 | pthread_t thread1; | 253 | pthread_t thread1; |
249 | pthread_create(&thread1,NULL, (void * (*)(void *))getStocks, &symbollist); | 254 | pthread_create(&thread1,NULL, (void * (*)(void *))getStocks, &symbollist); |
250 | } | 255 | } |
251 | // pthread_join(thread1,NULL); | ||
252 | // getStocks( symbollist.latin1() ); | ||
253 | } | 256 | } |
254 | 257 | ||
255 | void StockTickerPluginWidget::timerEvent( QTimerEvent *e ) { | 258 | void StockTickerPluginWidget::timerEvent( QTimerEvent *e ) { |
256 | killTimer(e->timerId()); | 259 | killTimer(e->timerId()); |