Diffstat (limited to 'noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp') (more/less context) (ignore 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 | |||
@@ -212,7 +212,7 @@ void getStocks( const QString *blah) { | |||
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 | ||
@@ -220,6 +220,8 @@ StockTickerPluginWidget::StockTickerPluginWidget( QWidget *parent, const char* | |||
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 | ||
@@ -243,13 +245,14 @@ void StockTickerPluginWidget::doStocks() { | |||
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 ) { |