summaryrefslogtreecommitdiff
authorzecke <zecke>2004-03-14 15:12:59 (UTC)
committer zecke <zecke>2004-03-14 15:12:59 (UTC)
commita104a921518d4427bf3dc9edd2c968133420607c (patch) (unidiff)
tree005a054e766250891039f9adf4bacf3d6f0486f0
parent8a243adc61fc9c8a48fa9061f0eba12c7b345d70 (diff)
downloadopie-a104a921518d4427bf3dc9edd2c968133420607c.zip
opie-a104a921518d4427bf3dc9edd2c968133420607c.tar.gz
opie-a104a921518d4427bf3dc9edd2c968133420607c.tar.bz2
ODP changes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/todayplugins/fortune/fortunepluginwidget.cpp6
-rw-r--r--noncore/todayplugins/fortune/fortunepluginwidget.h6
-rw-r--r--noncore/todayplugins/stockticker/stockticker/inputDialog.cpp4
-rw-r--r--noncore/todayplugins/stockticker/stockticker/inputDialog.h2
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp2
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h4
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktimerpluginwidget.h4
-rw-r--r--noncore/todayplugins/weather/weatherpluginwidget.cpp3
-rw-r--r--noncore/todayplugins/weather/weatherpluginwidget.h4
9 files changed, 21 insertions, 14 deletions
diff --git a/noncore/todayplugins/fortune/fortunepluginwidget.cpp b/noncore/todayplugins/fortune/fortunepluginwidget.cpp
index 3aa978c..c3ee546 100644
--- a/noncore/todayplugins/fortune/fortunepluginwidget.cpp
+++ b/noncore/todayplugins/fortune/fortunepluginwidget.cpp
@@ -17,24 +17,26 @@
17#include "fortunepluginwidget.h" 17#include "fortunepluginwidget.h"
18 18
19#include <qpe/config.h> 19#include <qpe/config.h>
20#include <qpe/qcopenvelope_qws.h> 20#include <qpe/qcopenvelope_qws.h>
21 21
22#include <qvaluelist.h> 22#include <qvaluelist.h>
23#include <qtl.h> 23#include <qtl.h>
24#include <qstring.h> 24#include <qstring.h>
25#include <qscrollview.h> 25#include <qscrollview.h>
26#include <qobject.h> 26#include <qobject.h>
27#include <qlayout.h> 27#include <qlayout.h>
28 28
29using namespace Opie::Core;
30using namespace Opie::Ui;
29FortunePluginWidget::FortunePluginWidget( QWidget *parent, const char* name ) 31FortunePluginWidget::FortunePluginWidget( QWidget *parent, const char* name )
30 : QWidget( parent, name ) 32 : QWidget( parent, name )
31{ 33{
32 34
33 fortune = NULL; 35 fortune = NULL;
34 getFortune(); 36 getFortune();
35} 37}
36 38
37FortunePluginWidget::~FortunePluginWidget() { 39FortunePluginWidget::~FortunePluginWidget() {
38 if( fortuneProcess ){ 40 if( fortuneProcess ){
39 delete fortuneProcess; 41 delete fortuneProcess;
40 } 42 }
@@ -52,26 +54,26 @@ void FortunePluginWidget::getFortune() {
52 } 54 }
53 55
54 fortune = new OTicker( this ); 56 fortune = new OTicker( this );
55 //fortune->setReadOnly( TRUE ); 57 //fortune->setReadOnly( TRUE );
56 //fortune->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); 58 //fortune->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
57 59
58 fortune->setText( QString("Obtaining fortune...") ); 60 fortune->setText( QString("Obtaining fortune...") );
59 layoutFortune->addWidget( fortune ); 61 layoutFortune->addWidget( fortune );
60 62
61 fortuneProcess = new OProcess(); 63 fortuneProcess = new OProcess();
62 *fortuneProcess << "fortune"; 64 *fortuneProcess << "fortune";
63 65
64 connect(fortuneProcess, SIGNAL(receivedStdout(OProcess*,char*,int) ), 66 connect(fortuneProcess, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ),
65 this, SLOT(slotStdOut(OProcess*,char*,int) ) ); 67 this, SLOT(slotStdOut(Opie::Core::OProcess*,char*,int) ) );
66 68
67 if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { 69 if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
68 qWarning("could not start :("); 70 qWarning("could not start :(");
69 fortune->setText( QString("Failed to obtain fortune.") ); 71 fortune->setText( QString("Failed to obtain fortune.") );
70 delete fortuneProcess; 72 delete fortuneProcess;
71 fortuneProcess = 0; 73 fortuneProcess = 0;
72 } 74 }
73 75
74} 76}
75 77
76void FortunePluginWidget::slotStdOut( OProcess* /*proc*/, char* buf, int len ) 78void FortunePluginWidget::slotStdOut( OProcess* /*proc*/, char* buf, int len )
77{ 79{
diff --git a/noncore/todayplugins/fortune/fortunepluginwidget.h b/noncore/todayplugins/fortune/fortunepluginwidget.h
index abb7bed..1b71430 100644
--- a/noncore/todayplugins/fortune/fortunepluginwidget.h
+++ b/noncore/todayplugins/fortune/fortunepluginwidget.h
@@ -24,22 +24,22 @@
24#include <qwidget.h> 24#include <qwidget.h>
25 25
26class FortunePluginWidget : public QWidget 26class FortunePluginWidget : public QWidget
27{ 27{
28 28
29 Q_OBJECT 29 Q_OBJECT
30 30
31public: 31public:
32 FortunePluginWidget( QWidget *parent, const char *name ); 32 FortunePluginWidget( QWidget *parent, const char *name );
33 ~FortunePluginWidget(); 33 ~FortunePluginWidget();
34 34
35private: 35private:
36 OTicker *fortune; 36 Opie::Ui::OTicker *fortune;
37 OProcess *fortuneProcess; 37 Opie::Core::OProcess *fortuneProcess;
38 38
39 void getFortune(); 39 void getFortune();
40 40
41private slots: 41private slots:
42 void slotStdOut( OProcess*, char*, int ); 42 void slotStdOut( Opie::Core::OProcess*, char*, int );
43}; 43};
44 44
45#endif 45#endif
diff --git a/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp b/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp
index b3fa708..ce35256 100644
--- a/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp
+++ b/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp
@@ -2,24 +2,26 @@
2 2
3#include <qapplication.h> 3#include <qapplication.h>
4#include <qlayout.h> 4#include <qlayout.h>
5#include <qcheckbox.h> 5#include <qcheckbox.h>
6#include <qlineedit.h> 6#include <qlineedit.h>
7#include <qvariant.h> 7#include <qvariant.h>
8#include <qpushbutton.h> 8#include <qpushbutton.h>
9#include <qwhatsthis.h> 9#include <qwhatsthis.h>
10#include <qlabel.h> 10#include <qlabel.h>
11#include <qlayout.h> 11#include <qlayout.h>
12#include <qpe/config.h> 12#include <qpe/config.h>
13#include <qstringlist.h> 13#include <qstringlist.h>
14using namespace Opie::Core;
15using namespace Opie::Core;
14#include <qmainwindow.h> 16#include <qmainwindow.h>
15#include "helpwindow.h" 17#include "helpwindow.h"
16 18
17#include <stdlib.h> 19#include <stdlib.h>
18// #include <sys/stat.h> 20// #include <sys/stat.h>
19// #include <unistd.h> 21// #include <unistd.h>
20 22
21InputDialog::InputDialog( ) 23InputDialog::InputDialog( )
22 : QMainWindow( 0x0, 0x0, WStyle_ContextHelp ) { 24 : QMainWindow( 0x0, 0x0, WStyle_ContextHelp ) {
23 setCaption( tr("Symbol Lookup")); 25 setCaption( tr("Symbol Lookup"));
24 26
25 QGridLayout *layout = new QGridLayout( this ); 27 QGridLayout *layout = new QGridLayout( this );
@@ -51,25 +53,25 @@ void InputDialog::doLookup() {
51 53
52 QString url = "\"http://finance.yahoo.com/l?m=&s="+LineEdit1->text()+"\""; 54 QString url = "\"http://finance.yahoo.com/l?m=&s="+LineEdit1->text()+"\"";
53 QString tempHtml = "/tmp/stockticker.html"; 55 QString tempHtml = "/tmp/stockticker.html";
54 QString cmd = "wget -O "+tempHtml+" "+url; 56 QString cmd = "wget -O "+tempHtml+" "+url;
55 qDebug(cmd); 57 qDebug(cmd);
56 58
57 59
58/* 60/*
59 OProcess proc; 61 OProcess proc;
60 proc << "/usr/bin/wget"; 62 proc << "/usr/bin/wget";
61 proc<<"-O"<< tempHtml<< url; 63 proc<<"-O"<< tempHtml<< url;
62 64
63 connect( &proc, SIGNAL( processExited(OProcess*)),this, SLOT( showBrowser(OProcess*))); 65 connect( &proc, SIGNAL( processExited(Opie::Core::OProcess*)),this, SLOT( showBrowser(Opie::Core::OProcess*)));
64 proc.start( OProcess::NotifyOnExit); 66 proc.start( OProcess::NotifyOnExit);
65*/ 67*/
66 system(cmd.latin1()); 68 system(cmd.latin1());
67 HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup"); 69 HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup");
68 StockLookup->setCaption("Symbol"); 70 StockLookup->setCaption("Symbol");
69 StockLookup->showMaximized(); 71 StockLookup->showMaximized();
70 StockLookup->show(); 72 StockLookup->show();
71 LineEdit1->text(); 73 LineEdit1->text();
72 74
73 75
74} 76}
75 77
diff --git a/noncore/todayplugins/stockticker/stockticker/inputDialog.h b/noncore/todayplugins/stockticker/stockticker/inputDialog.h
index a1c00bd..d7ff94c 100644
--- a/noncore/todayplugins/stockticker/stockticker/inputDialog.h
+++ b/noncore/todayplugins/stockticker/stockticker/inputDialog.h
@@ -13,18 +13,18 @@ class QCheckBox;
13 13
14class InputDialog : public QMainWindow { 14class InputDialog : public QMainWindow {
15 Q_OBJECT 15 Q_OBJECT
16 16
17public: 17public:
18 InputDialog( ); 18 InputDialog( );
19 ~InputDialog(); 19 ~InputDialog();
20 20
21private: 21private:
22 QLineEdit* LineEdit1; 22 QLineEdit* LineEdit1;
23private slots: 23private slots:
24 void doLookup(); 24 void doLookup();
25 void showBrowser(OProcess*); 25 void showBrowser(Opie::Core::OProcess*);
26protected slots: 26protected slots:
27 27
28}; 28};
29 29
30#endif // INPUTDIALOG_H 30#endif // INPUTDIALOG_H
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp
index 51113ba..aaeb5ee 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp
@@ -11,24 +11,26 @@
11 * it under the terms of the GNU General Public License as published by * 11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or * 12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. * 13 * (at your option) any later version. *
14 * * 14 * *
15 ***************************************************************************/ 15 ***************************************************************************/
16 16
17 #include <opie2/oticker.h> 17 #include <opie2/oticker.h>
18 18
19 #include <qpe/config.h> 19 #include <qpe/config.h>
20 20
21 #include <qlayout.h> 21 #include <qlayout.h>
22 22
23using namespace Opie::Ui;
24using namespace Opie::Ui;
23extern "C" { 25extern "C" {
24 #include "libstocks/stocks.h" 26 #include "libstocks/stocks.h"
25 } 27 }
26 28
27 #include <pthread.h> 29 #include <pthread.h>
28 30
29 #include "stocktickerpluginwidget.h" 31 #include "stocktickerpluginwidget.h"
30 32
31 QString output; 33 QString output;
32 OTicker *stocktickerTicker; 34 OTicker *stocktickerTicker;
33 QCString stock_liste; 35 QCString stock_liste;
34 bool dotimeCheck, dodateCheck, dosymbolCheck, donameCheck; 36 bool dotimeCheck, dodateCheck, dosymbolCheck, donameCheck;
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h
index 8a8fbf8..727e289 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h
@@ -14,26 +14,26 @@
14 * * 14 * *
15 ***************************************************************************/ 15 ***************************************************************************/
16 16
17 17
18#ifndef STOCKTICKERL_PLUGIN_WIDGET_H 18#ifndef STOCKTICKERL_PLUGIN_WIDGET_H
19#define STOCKTICKERL_PLUGIN_WIDGET_H 19#define STOCKTICKERL_PLUGIN_WIDGET_H
20 20
21#include <qsocket.h> 21#include <qsocket.h>
22#include <qstring.h> 22#include <qstring.h>
23#include <qwidget.h> 23#include <qwidget.h>
24#include <qlineedit.h> 24#include <qlineedit.h>
25 25
26#include <opie/oclickablelabel.h> 26#include <opie2/oclickablelabel.h>
27#include <opie/oticker.h> 27#include <opie2/oticker.h>
28 28
29#include <sys/types.h> 29#include <sys/types.h>
30#include <sys/uio.h> 30#include <sys/uio.h>
31#include <unistd.h> 31#include <unistd.h>
32#include <stdio.h> 32#include <stdio.h>
33#include <stdlib.h> 33#include <stdlib.h>
34#include <string.h> 34#include <string.h>
35 35
36class QTimer; 36class QTimer;
37 37
38class StockTickerPluginWidget : public QWidget { 38class StockTickerPluginWidget : public QWidget {
39 39
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktimerpluginwidget.h b/noncore/todayplugins/stockticker/stocktickerlib/stocktimerpluginwidget.h
index d7b6047..667d9c9 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktimerpluginwidget.h
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktimerpluginwidget.h
@@ -12,33 +12,33 @@
12 * the Free Software Foundation; either version 2 of the License, or * 12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. * 13 * (at your option) any later version. *
14 * * 14 * *
15 ***************************************************************************/ 15 ***************************************************************************/
16 16
17 17
18#ifndef MAIL_PLUGIN_WIDGET_H 18#ifndef MAIL_PLUGIN_WIDGET_H
19#define MAIL_PLUGIN_WIDGET_H 19#define MAIL_PLUGIN_WIDGET_H
20 20
21#include <qstring.h> 21#include <qstring.h>
22#include <qwidget.h> 22#include <qwidget.h>
23 23
24#include <opie/oclickablelabel.h> 24#include <opie2/oclickablelabel.h>
25 25
26class MailPluginWidget : public QWidget { 26class MailPluginWidget : public QWidget {
27 27
28 Q_OBJECT 28 Q_OBJECT
29 29
30 30
31public: 31public:
32 MailPluginWidget( QWidget *parent, const char *name ); 32 MailPluginWidget( QWidget *parent, const char *name );
33 ~MailPluginWidget(); 33 ~MailPluginWidget();
34 34
35protected slots: 35protected slots:
36 void startMail(); 36 void startMail();
37 37
38private: 38private:
39 OClickableLabel *mailLabel; 39 Opie::Ui::OClickableLabel *mailLabel;
40 void readConfig(); 40 void readConfig();
41 void getInfo(); 41 void getInfo();
42}; 42};
43 43
44#endif 44#endif
diff --git a/noncore/todayplugins/weather/weatherpluginwidget.cpp b/noncore/todayplugins/weather/weatherpluginwidget.cpp
index ad99a43..8e00c36 100644
--- a/noncore/todayplugins/weather/weatherpluginwidget.cpp
+++ b/noncore/todayplugins/weather/weatherpluginwidget.cpp
@@ -31,24 +31,25 @@
31#include <qlabel.h> 31#include <qlabel.h>
32#include <qlayout.h> 32#include <qlayout.h>
33#include <qpixmap.h> 33#include <qpixmap.h>
34#include <qtextstream.h> 34#include <qtextstream.h>
35 35
36#include <opie2/oprocess.h> 36#include <opie2/oprocess.h>
37 37
38#include <qpe/config.h> 38#include <qpe/config.h>
39#include <qpe/resource.h> 39#include <qpe/resource.h>
40 40
41#include "weatherpluginwidget.h" 41#include "weatherpluginwidget.h"
42 42
43using namespace Opie::Core;
43WeatherPluginWidget::WeatherPluginWidget( QWidget *parent, const char* name ) 44WeatherPluginWidget::WeatherPluginWidget( QWidget *parent, const char* name )
44 : QWidget( parent, name ) 45 : QWidget( parent, name )
45{ 46{
46 QHBoxLayout *layout = new QHBoxLayout( this ); 47 QHBoxLayout *layout = new QHBoxLayout( this );
47 layout->setAutoAdd( TRUE ); 48 layout->setAutoAdd( TRUE );
48 layout->setSpacing( 2 ); 49 layout->setSpacing( 2 );
49 50
50 weatherIcon = new QLabel( this ); 51 weatherIcon = new QLabel( this );
51 weatherIcon->setMaximumWidth( 32 ); 52 weatherIcon->setMaximumWidth( 32 );
52 QImage logo1 = Resource::loadImage( "Clock" ); 53 QImage logo1 = Resource::loadImage( "Clock" );
53 QPixmap pic; 54 QPixmap pic;
54 pic.convertFromImage( logo1 ); 55 pic.convertFromImage( logo1 );
@@ -96,25 +97,25 @@ void WeatherPluginWidget::retreiveData()
96 remoteFile.append( location ); 97 remoteFile.append( location );
97 remoteFile.append( ".TXT" ); 98 remoteFile.append( ".TXT" );
98 99
99 QFile file( localFile ); 100 QFile file( localFile );
100 if ( file.exists() ) 101 if ( file.exists() )
101 { 102 {
102 file.remove(); 103 file.remove();
103 } 104 }
104 105
105 OProcess *proc = new OProcess; 106 OProcess *proc = new OProcess;
106 107
107 *proc << "wget" << "-q" << remoteFile << "-O" << localFile; 108 *proc << "wget" << "-q" << remoteFile << "-O" << localFile;
108 connect( proc, SIGNAL( processExited(OProcess*) ), this, SLOT( dataRetrieved(OProcess*) ) ); 109 connect( proc, SIGNAL( processExited(Opie::Core::OProcess*) ), this, SLOT( dataRetrieved(Opie::Core::OProcess*) ) );
109 proc->start(); 110 proc->start();
110} 111}
111 112
112void WeatherPluginWidget::displayWeather() 113void WeatherPluginWidget::displayWeather()
113{ 114{
114 weatherData = QString::null; 115 weatherData = QString::null;
115 116
116 QFile file( localFile ); 117 QFile file( localFile );
117 118
118 if ( file.size() > 0 && file.open( IO_ReadOnly ) ) 119 if ( file.size() > 0 && file.open( IO_ReadOnly ) )
119 { 120 {
120 QTextStream data( &file ); 121 QTextStream data( &file );
diff --git a/noncore/todayplugins/weather/weatherpluginwidget.h b/noncore/todayplugins/weather/weatherpluginwidget.h
index d2bbd8b..93d0f59 100644
--- a/noncore/todayplugins/weather/weatherpluginwidget.h
+++ b/noncore/todayplugins/weather/weatherpluginwidget.h
@@ -23,25 +23,25 @@
23    --        :-=` Free Software Foundation, Inc., 23    --        :-=` Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330, 24 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#ifndef WEATHER_PLUGIN_WIDGET_H 29#ifndef WEATHER_PLUGIN_WIDGET_H
30#define WEATHER_PLUGIN_WIDGET_H 30#define WEATHER_PLUGIN_WIDGET_H
31 31
32#include <qstring.h> 32#include <qstring.h>
33#include <qwidget.h> 33#include <qwidget.h>
34 34
35class OProcess; 35namespace Opie {namespace Core {class Opie::Core::OProcess;}}
36class QLabel; 36class QLabel;
37class QTimer; 37class QTimer;
38 38
39class WeatherPluginWidget : public QWidget { 39class WeatherPluginWidget : public QWidget {
40 40
41 Q_OBJECT 41 Q_OBJECT
42 42
43 public: 43 public:
44 WeatherPluginWidget( QWidget *parent, const char *name ); 44 WeatherPluginWidget( QWidget *parent, const char *name );
45 ~WeatherPluginWidget(); 45 ~WeatherPluginWidget();
46 46
47 private: 47 private:
@@ -56,16 +56,16 @@ class WeatherPluginWidget : public QWidget {
56 QLabel *weatherLabel; 56 QLabel *weatherLabel;
57 QLabel *weatherIcon; 57 QLabel *weatherIcon;
58 58
59 void timerEvent( QTimerEvent * ); 59 void timerEvent( QTimerEvent * );
60 void retreiveData(); 60 void retreiveData();
61 void displayWeather(); 61 void displayWeather();
62 void getTemp( const QString & ); 62 void getTemp( const QString & );
63 void getWind( const QString & ); 63 void getWind( const QString & );
64 void getPressure( const QString & ); 64 void getPressure( const QString & );
65 void getIcon( const QString & ); 65 void getIcon( const QString & );
66 66
67 private slots: 67 private slots:
68 void dataRetrieved( OProcess * ); 68 void dataRetrieved( Opie::Core::OProcess * );
69}; 69};
70 70
71#endif 71#endif