author | drw <drw> | 2004-03-02 16:38:47 (UTC) |
---|---|---|
committer | drw <drw> | 2004-03-02 16:38:47 (UTC) |
commit | 2c00fdd8f3b0c9680ee642a78dfd6587f32e8460 (patch) (unidiff) | |
tree | ba73624ab704354f7c14db80dc4f2322920a7407 /noncore/todayplugins/stockticker/stocktickerlib | |
parent | c4c97ef4ccf9d379ff59560c3ae3c32f95fc51d1 (diff) | |
download | opie-2c00fdd8f3b0c9680ee642a78dfd6587f32e8460.zip opie-2c00fdd8f3b0c9680ee642a78dfd6587f32e8460.tar.gz opie-2c00fdd8f3b0c9680ee642a78dfd6587f32e8460.tar.bz2 |
Today stock ticker plugin: libopie -> libopie2
Diffstat (limited to 'noncore/todayplugins/stockticker/stocktickerlib') (more/less context) (ignore whitespace changes)
5 files changed, 25 insertions, 25 deletions
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp index 915233a..009d390 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp | |||
@@ -14,14 +14,14 @@ | |||
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #include "stocktickerconfig.h" | 17 | #include "stocktickerconfig.h" |
18 | #include <opie/todayconfigwidget.h> | 18 | |
19 | #include <opie2/todayconfigwidget.h> | ||
19 | 20 | ||
20 | #include <qpe/config.h> | 21 | #include <qpe/config.h> |
21 | 22 | ||
22 | #include <qapplication.h> | 23 | #include <qapplication.h> |
23 | |||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qspinbox.h> | 25 | #include <qspinbox.h> |
26 | #include <qcheckbox.h> | 26 | #include <qcheckbox.h> |
27 | #include <qlineedit.h> | 27 | #include <qlineedit.h> |
@@ -43,17 +43,17 @@ StocktickerPluginConfig::StocktickerPluginConfig( QWidget *parent, const char* | |||
43 | 43 | ||
44 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); | 44 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); |
45 | LineEdit1->setFocus(); | 45 | LineEdit1->setFocus(); |
46 | // QWhatsThis::add( LineEdit1, tr("Enter the stock symbols you want to be shown here.")); | 46 | // QWhatsThis::add( LineEdit1, tr("Enter the stock symbols you want to be shown here.")); |
47 | 47 | ||
48 | layout->addMultiCellWidget( LineEdit1, 0, 0, 0, 4); | 48 | layout->addMultiCellWidget( LineEdit1, 0, 0, 0, 4); |
49 | 49 | ||
50 | Config cfg( "stockticker"); | 50 | Config cfg( "stockticker"); |
51 | cfg.setGroup( "Symbols" ); | 51 | cfg.setGroup( "Symbols" ); |
52 | QString symbollist; | 52 | QString symbollist; |
53 | symbollist = cfg.readEntry("Symbols", ""); | 53 | symbollist = cfg.readEntry("Symbols", ""); |
54 | LineEdit1->setText(symbollist); | 54 | LineEdit1->setText(symbollist); |
55 | 55 | ||
56 | QLabel *label; | 56 | QLabel *label; |
57 | label = new QLabel(this); | 57 | label = new QLabel(this); |
58 | label->setText( tr("Enter stock symbols seperated\nby a space.")); | 58 | label->setText( tr("Enter stock symbols seperated\nby a space.")); |
59 | label->setMaximumHeight(60); | 59 | label->setMaximumHeight(60); |
@@ -64,14 +64,14 @@ StocktickerPluginConfig::StocktickerPluginConfig( QWidget *parent, const char* | |||
64 | timeCheck= new QCheckBox ( "Time",this ); | 64 | timeCheck= new QCheckBox ( "Time",this ); |
65 | timeCheck->setChecked( cfg.readBoolEntry("timeCheck",1)); | 65 | timeCheck->setChecked( cfg.readBoolEntry("timeCheck",1)); |
66 | layout->addMultiCellWidget(timeCheck, 2, 2, 0, 0 ); | 66 | layout->addMultiCellWidget(timeCheck, 2, 2, 0, 0 ); |
67 | QWhatsThis::add( timeCheck, tr("Toggles Time of current price field")); | 67 | QWhatsThis::add( timeCheck, tr("Toggles Time of current price field")); |
68 | 68 | ||
69 | dateCheck= new QCheckBox ( "Date", this ); | 69 | dateCheck= new QCheckBox ( "Date", this ); |
70 | dateCheck->setChecked( cfg.readBoolEntry("dateCheck",1)); | 70 | dateCheck->setChecked( cfg.readBoolEntry("dateCheck",1)); |
71 | layout->addMultiCellWidget( dateCheck, 2, 2, 1, 1 ); | 71 | layout->addMultiCellWidget( dateCheck, 2, 2, 1, 1 ); |
72 | QWhatsThis::add(dateCheck, tr("Toggles date field")); | 72 | QWhatsThis::add(dateCheck, tr("Toggles date field")); |
73 | 73 | ||
74 | symbolCheck= new QCheckBox ( "Symbol", this ); | 74 | symbolCheck= new QCheckBox ( "Symbol", this ); |
75 | symbolCheck->setChecked( cfg.readBoolEntry("symbolCheck",1)); | 75 | symbolCheck->setChecked( cfg.readBoolEntry("symbolCheck",1)); |
76 | layout->addMultiCellWidget( symbolCheck, 2, 2, 2, 2 ); | 76 | layout->addMultiCellWidget( symbolCheck, 2, 2, 2, 2 ); |
77 | QWhatsThis::add(symbolCheck, tr("Toggles Symbol field")); | 77 | QWhatsThis::add(symbolCheck, tr("Toggles Symbol field")); |
@@ -122,9 +122,9 @@ StocktickerPluginConfig::StocktickerPluginConfig( QWidget *parent, const char* | |||
122 | 122 | ||
123 | cfg.setGroup("Timer"); | 123 | cfg.setGroup("Timer"); |
124 | timerDelaySpin->setValue( cfg.readNumEntry("Delay",15)); | 124 | timerDelaySpin->setValue( cfg.readNumEntry("Delay",15)); |
125 | layout->addMultiCellWidget( timerDelaySpin , 6, 6, 0, 0); | 125 | layout->addMultiCellWidget( timerDelaySpin , 6, 6, 0, 0); |
126 | 126 | ||
127 | QLabel *label2; | 127 | QLabel *label2; |
128 | label2 = new QLabel(this); | 128 | label2 = new QLabel(this); |
129 | label2->setText( tr("Minutes between lookups.")); | 129 | label2->setText( tr("Minutes between lookups.")); |
130 | label2->setMaximumHeight(60); | 130 | label2->setMaximumHeight(60); |
@@ -136,9 +136,9 @@ StocktickerPluginConfig::StocktickerPluginConfig( QWidget *parent, const char* | |||
136 | scrollSpeed->setSteps(50,50); | 136 | scrollSpeed->setSteps(50,50); |
137 | cfg.setGroup("Timer"); | 137 | cfg.setGroup("Timer"); |
138 | scrollSpeed->setValue( cfg.readNumEntry("ScrollSpeed",50)); | 138 | scrollSpeed->setValue( cfg.readNumEntry("ScrollSpeed",50)); |
139 | layout->addMultiCellWidget( scrollSpeed , 7, 7, 0, 0); | 139 | layout->addMultiCellWidget( scrollSpeed , 7, 7, 0, 0); |
140 | 140 | ||
141 | QLabel *label3; | 141 | QLabel *label3; |
142 | label3 = new QLabel(this); | 142 | label3 = new QLabel(this); |
143 | label3->setText( tr("Scroll Speed, in milliseconds")); | 143 | label3->setText( tr("Scroll Speed, in milliseconds")); |
144 | label3->setMaximumHeight(60); | 144 | label3->setMaximumHeight(60); |
@@ -150,20 +150,20 @@ StocktickerPluginConfig::StocktickerPluginConfig( QWidget *parent, const char* | |||
150 | // scrollLength->setSteps(5,5); | 150 | // scrollLength->setSteps(5,5); |
151 | cfg.setGroup("Timer"); | 151 | cfg.setGroup("Timer"); |
152 | scrollLength->setValue( cfg.readNumEntry("ScrollLength",1)); | 152 | scrollLength->setValue( cfg.readNumEntry("ScrollLength",1)); |
153 | layout->addMultiCellWidget( scrollLength , 8, 8, 0, 0); | 153 | layout->addMultiCellWidget( scrollLength , 8, 8, 0, 0); |
154 | 154 | ||
155 | QLabel *label4; | 155 | QLabel *label4; |
156 | label4 = new QLabel(this); | 156 | label4 = new QLabel(this); |
157 | label4->setText( tr("Scroll Length")); | 157 | label4->setText( tr("Scroll Length")); |
158 | label4->setMaximumHeight(60); | 158 | label4->setMaximumHeight(60); |
159 | layout->addMultiCellWidget( label4, 8, 8, 1, 2); | 159 | layout->addMultiCellWidget( label4, 8, 8, 1, 2); |
160 | 160 | ||
161 | // lookupButton = new QPushButton(this, "LookupButton"); | 161 | // lookupButton = new QPushButton(this, "LookupButton"); |
162 | // lookupButton->setText(tr("Symbol Lookup")); | 162 | // lookupButton->setText(tr("Symbol Lookup")); |
163 | // connect(lookupButton,SIGNAL(clicked()),SLOT( doLookup())); | 163 | // connect(lookupButton,SIGNAL(clicked()),SLOT( doLookup())); |
164 | // layout->addMultiCellWidget( lookupButton , 9, 9, 0, 0); | 164 | // layout->addMultiCellWidget( lookupButton , 9, 9, 0, 0); |
165 | 165 | ||
166 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); | 166 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); |
167 | layout->addItem( spacer, 9, 0 ); | 167 | layout->addItem( spacer, 9, 0 ); |
168 | 168 | ||
169 | } | 169 | } |
@@ -191,9 +191,9 @@ void StocktickerPluginConfig::writeConfig() { | |||
191 | cfg.setGroup("Timer"); | 191 | cfg.setGroup("Timer"); |
192 | cfg.writeEntry("Delay",timerDelaySpin->value()); | 192 | cfg.writeEntry("Delay",timerDelaySpin->value()); |
193 | cfg.writeEntry("ScrollLength",scrollLength->value()); | 193 | cfg.writeEntry("ScrollLength",scrollLength->value()); |
194 | cfg.writeEntry("ScrollSpeed",scrollSpeed->value()); | 194 | cfg.writeEntry("ScrollSpeed",scrollSpeed->value()); |
195 | 195 | ||
196 | cfg.write(); | 196 | cfg.write(); |
197 | } | 197 | } |
198 | 198 | ||
199 | StocktickerPluginConfig::~StocktickerPluginConfig() { | 199 | StocktickerPluginConfig::~StocktickerPluginConfig() { |
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.h b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.h index 10f9678..3c852ce 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.h +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.h | |||
@@ -16,10 +16,11 @@ | |||
16 | 16 | ||
17 | #ifndef STOCKTICKER_PLUGIN_CONFIG_H | 17 | #ifndef STOCKTICKER_PLUGIN_CONFIG_H |
18 | #define STOCKTICKER_PLUGIN_CONFIG_H | 18 | #define STOCKTICKER_PLUGIN_CONFIG_H |
19 | 19 | ||
20 | #include <opie2/todayconfigwidget.h> | ||
21 | |||
20 | #include <qwidget.h> | 22 | #include <qwidget.h> |
21 | #include <opie/todayconfigwidget.h> | ||
22 | #include <qstring.h> | 23 | #include <qstring.h> |
23 | 24 | ||
24 | class QLineEdit; | 25 | class QLineEdit; |
25 | class QCheckBox; | 26 | class QCheckBox; |
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro index bb22b4e..baf6430 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro | |||
@@ -19,9 +19,9 @@ INCLUDEPATH += $(OPIEDIR)/include \ | |||
19 | ../ ../library | 19 | ../ ../library |
20 | DEPENDPATH += $(OPIEDIR)/include \ | 20 | DEPENDPATH += $(OPIEDIR)/include \ |
21 | ../ ../library | 21 | ../ ../library |
22 | 22 | ||
23 | LIBS+= -lqpe -lopie -lpthread | 23 | LIBS+= -lqpe -lopiecore2 -lopiepim2 -lopieui2 -lpthread |
24 | TMAKE_CFLAGS += -D__UNIX__ | 24 | TMAKE_CFLAGS += -D__UNIX__ |
25 | 25 | ||
26 | DESTDIR = $(OPIEDIR)/plugins/today | 26 | DESTDIR = $(OPIEDIR)/plugins/today |
27 | TARGET = todaystocktickerplugin | 27 | TARGET = todaystocktickerplugin |
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.h b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.h index e88c687..42af821 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.h +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.h | |||
@@ -17,16 +17,15 @@ | |||
17 | 17 | ||
18 | #ifndef STOCKTICKER_PLUGIN_H | 18 | #ifndef STOCKTICKER_PLUGIN_H |
19 | #define STOCKTICKER_PLUGIN_H | 19 | #define STOCKTICKER_PLUGIN_H |
20 | 20 | ||
21 | #include <opie2/oclickablelabel.h> | ||
22 | #include <opie2/todayplugininterface.h> | ||
23 | #include <opie2/todayconfigwidget.h> | ||
24 | |||
21 | #include <qstring.h> | 25 | #include <qstring.h> |
22 | #include <qwidget.h> | 26 | #include <qwidget.h> |
23 | 27 | ||
24 | #include <opie/oclickablelabel.h> | ||
25 | |||
26 | #include <opie/todayplugininterface.h> | ||
27 | #include <opie/todayconfigwidget.h> | ||
28 | |||
29 | class StockTickerPlugin : public TodayPluginObject { | 28 | class StockTickerPlugin : public TodayPluginObject { |
30 | 29 | ||
31 | public: | 30 | public: |
32 | StockTickerPlugin(); | 31 | StockTickerPlugin(); |
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp index fedc79c..51113ba 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp | |||
@@ -13,15 +13,15 @@ | |||
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #include <qlayout.h> | 17 | #include <opie2/oticker.h> |
18 | 18 | ||
19 | #include <qpe/config.h> | 19 | #include <qpe/config.h> |
20 | 20 | ||
21 | #include <opie/oticker.h> | 21 | #include <qlayout.h> |
22 | 22 | ||
23 | extern "C" { | 23 | extern "C" { |
24 | #include "libstocks/stocks.h" | 24 | #include "libstocks/stocks.h" |
25 | } | 25 | } |
26 | 26 | ||
27 | #include <pthread.h> | 27 | #include <pthread.h> |
@@ -209,9 +209,9 @@ void getStocks(char *blah) { | |||
209 | // printf("----------------------------------------\n\n"); | 209 | // printf("----------------------------------------\n\n"); |
210 | tempString.sprintf("||==++==|"); | 210 | tempString.sprintf("||==++==|"); |
211 | output +=tempString; | 211 | output +=tempString; |
212 | 212 | ||
213 | /* Simple function which help to browse in the stocks list */ | 213 | /* Simple function which help to browse in the stocks list */ |
214 | stocks_tmp = next_stock(stocks_tmp); | 214 | stocks_tmp = next_stock(stocks_tmp); |
215 | } | 215 | } |
216 | 216 | ||
217 | stocktickerTicker->setText( output.latin1() ); | 217 | stocktickerTicker->setText( output.latin1() ); |
@@ -281,9 +281,9 @@ void getStocks(char *blah) { | |||
281 | 281 | ||
282 | // if( wasError) | 282 | // if( wasError) |
283 | // stocktickerTicker->setText("Checking connection"); | 283 | // stocktickerTicker->setText("Checking connection"); |
284 | 284 | ||
285 | // if(Sock->state() == QSocket::Idle) { | 285 | // if(Sock->state() == QSocket::Idle) { |
286 | // Sock->connectToHost("finance.yahoo.com", 80); | 286 | // Sock->connectToHost("finance.yahoo.com", 80); |
287 | // connect( Sock, SIGNAL( error(int) ), SLOT(socketError(int)) ); | 287 | // connect( Sock, SIGNAL( error(int) ), SLOT(socketError(int)) ); |
288 | // connect( Sock, SIGNAL( hostFound() ), SLOT(isConnected()) ); | 288 | // connect( Sock, SIGNAL( hostFound() ), SLOT(isConnected()) ); |
289 | // } else { | 289 | // } else { |