author | drw <drw> | 2004-03-02 16:46:08 (UTC) |
---|---|---|
committer | drw <drw> | 2004-03-02 16:46:08 (UTC) |
commit | 42008f6bc88cde6d0ed49187e4c2df14f178d1c0 (patch) (unidiff) | |
tree | ed62b583edc5dd9e1d6ece37153715ad60bee099 | |
parent | ef17e26cb4d883bf59171d2dcac808cfe2b1372e (diff) | |
download | opie-42008f6bc88cde6d0ed49187e4c2df14f178d1c0.zip opie-42008f6bc88cde6d0ed49187e4c2df14f178d1c0.tar.gz opie-42008f6bc88cde6d0ed49187e4c2df14f178d1c0.tar.bz2 |
Today fortune plugin: libopie -> libopie2
-rw-r--r-- | noncore/todayplugins/fortune/config.in | 1 | ||||
-rw-r--r-- | noncore/todayplugins/fortune/fortune.pro | 2 | ||||
-rw-r--r-- | noncore/todayplugins/fortune/fortuneplugin.cpp | 2 | ||||
-rw-r--r-- | noncore/todayplugins/fortune/fortuneplugin.h | 6 | ||||
-rw-r--r-- | noncore/todayplugins/fortune/fortunepluginimpl.h | 2 | ||||
-rw-r--r-- | noncore/todayplugins/fortune/fortunepluginwidget.cpp | 17 | ||||
-rw-r--r-- | noncore/todayplugins/fortune/fortunepluginwidget.h | 7 | ||||
-rw-r--r-- | noncore/todayplugins/fortune/opie-today-fortuneplugin.control | 2 |
8 files changed, 18 insertions, 21 deletions
diff --git a/noncore/todayplugins/fortune/config.in b/noncore/todayplugins/fortune/config.in index 1f9a08b..ca476f1 100644 --- a/noncore/todayplugins/fortune/config.in +++ b/noncore/todayplugins/fortune/config.in | |||
@@ -1,4 +1,5 @@ | |||
1 | config TODAY_FORTUNE | 1 | config TODAY_FORTUNE |
2 | boolean "opie-today-fortuneplugin (a joke a day keeps the doctor away)" | 2 | boolean "opie-today-fortuneplugin (a joke a day keeps the doctor away)" |
3 | default "y" | 3 | default "y" |
4 | depends (LIBQPE || LIBQPE-X11) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM && TODAY | ||
4 | depends TODAY | 5 | depends TODAY |
diff --git a/noncore/todayplugins/fortune/fortune.pro b/noncore/todayplugins/fortune/fortune.pro index 3446732..84a5730 100644 --- a/noncore/todayplugins/fortune/fortune.pro +++ b/noncore/todayplugins/fortune/fortune.pro | |||
@@ -1,21 +1,21 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | #CONFIG -= moc | 2 | #CONFIG -= moc |
3 | CONFIG += qt plugin release | 3 | CONFIG += qt plugin release |
4 | 4 | ||
5 | # Input | 5 | # Input |
6 | HEADERS = fortuneplugin.h fortunepluginimpl.h \ | 6 | HEADERS = fortuneplugin.h fortunepluginimpl.h \ |
7 | fortunepluginwidget.h | 7 | fortunepluginwidget.h |
8 | SOURCES = fortuneplugin.cpp fortunepluginimpl.cpp \ | 8 | SOURCES = fortuneplugin.cpp fortunepluginimpl.cpp \ |
9 | fortunepluginwidget.cpp | 9 | fortunepluginwidget.cpp |
10 | 10 | ||
11 | INCLUDEPATH += $(OPIEDIR)/include \ | 11 | INCLUDEPATH += $(OPIEDIR)/include \ |
12 | ../ ../library | 12 | ../ ../library |
13 | DEPENDPATH += $(OPIEDIR)/include \ | 13 | DEPENDPATH += $(OPIEDIR)/include \ |
14 | ../ ../library | 14 | ../ ../library |
15 | 15 | ||
16 | LIBS+= -lqpe -lopie | 16 | LIBS+= -lqpe -lopiecore2 -lopiepim2 -lopieui2 |
17 | 17 | ||
18 | DESTDIR = $(OPIEDIR)/plugins/today | 18 | DESTDIR = $(OPIEDIR)/plugins/today |
19 | TARGET = todayfortuneplugin | 19 | TARGET = todayfortuneplugin |
20 | 20 | ||
21 | include ( $(OPIEDIR)/include.pro ) | 21 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/todayplugins/fortune/fortuneplugin.cpp b/noncore/todayplugins/fortune/fortuneplugin.cpp index 9751e6f..69d2c45 100644 --- a/noncore/todayplugins/fortune/fortuneplugin.cpp +++ b/noncore/todayplugins/fortune/fortuneplugin.cpp | |||
@@ -40,32 +40,32 @@ double FortunePlugin::versionNumber() const | |||
40 | 40 | ||
41 | QString FortunePlugin::pixmapNameWidget() const | 41 | QString FortunePlugin::pixmapNameWidget() const |
42 | { | 42 | { |
43 | return "Fortune"; | 43 | return "Fortune"; |
44 | } | 44 | } |
45 | 45 | ||
46 | QWidget* FortunePlugin::widget( QWidget *wid ) | 46 | QWidget* FortunePlugin::widget( QWidget *wid ) |
47 | { | 47 | { |
48 | return new FortunePluginWidget( wid, "Fortune" ); | 48 | return new FortunePluginWidget( wid, "Fortune" ); |
49 | } | 49 | } |
50 | 50 | ||
51 | QString FortunePlugin::pixmapNameConfig() const | 51 | QString FortunePlugin::pixmapNameConfig() const |
52 | { | 52 | { |
53 | return "Fortune"; | 53 | return "Fortune"; |
54 | } | 54 | } |
55 | 55 | ||
56 | TodayConfigWidget* FortunePlugin::configWidget( QWidget* wid ) | 56 | TodayConfigWidget* FortunePlugin::configWidget( QWidget* /*wid*/ ) |
57 | { | 57 | { |
58 | // return new FortunePluginConfig( wid , "Fortune" ); | 58 | // return new FortunePluginConfig( wid , "Fortune" ); |
59 | return NULL; | 59 | return NULL; |
60 | } | 60 | } |
61 | 61 | ||
62 | QString FortunePlugin::appName() const | 62 | QString FortunePlugin::appName() const |
63 | { | 63 | { |
64 | return "fortune"; | 64 | return "fortune"; |
65 | } | 65 | } |
66 | 66 | ||
67 | 67 | ||
68 | bool FortunePlugin::excludeFromRefresh() const | 68 | bool FortunePlugin::excludeFromRefresh() const |
69 | { | 69 | { |
70 | return false; | 70 | return false; |
71 | } | 71 | } |
diff --git a/noncore/todayplugins/fortune/fortuneplugin.h b/noncore/todayplugins/fortune/fortuneplugin.h index 9376771..9b590ad 100644 --- a/noncore/todayplugins/fortune/fortuneplugin.h +++ b/noncore/todayplugins/fortune/fortuneplugin.h | |||
@@ -4,38 +4,38 @@ | |||
4 | * copyright : (c) 2002 by Chris Larson | 4 | * copyright : (c) 2002 by Chris Larson |
5 | * email : kergoth@handhelds.org | 5 | * email : kergoth@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
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 | #ifndef FORTUNE_PLUGIN_H | 17 | #ifndef FORTUNE_PLUGIN_H |
18 | #define FORTUNE_PLUGIN_H | 18 | #define FORTUNE_PLUGIN_H |
19 | 19 | ||
20 | #include <opie2/oclickablelabel.h> | ||
21 | #include <opie2/todayplugininterface.h> | ||
22 | |||
20 | #include <qstring.h> | 23 | #include <qstring.h> |
21 | #include <qwidget.h> | 24 | #include <qwidget.h> |
22 | 25 | ||
23 | #include <opie/oclickablelabel.h> | ||
24 | #include <opie/todayplugininterface.h> | ||
25 | |||
26 | class FortunePlugin : public TodayPluginObject | 26 | class FortunePlugin : public TodayPluginObject |
27 | { | 27 | { |
28 | 28 | ||
29 | public: | 29 | public: |
30 | FortunePlugin(); | 30 | FortunePlugin(); |
31 | ~FortunePlugin(); | 31 | ~FortunePlugin(); |
32 | 32 | ||
33 | QString pluginName() const; | 33 | QString pluginName() const; |
34 | double versionNumber() const; | 34 | double versionNumber() const; |
35 | QString pixmapNameWidget() const; | 35 | QString pixmapNameWidget() const; |
36 | QWidget* widget( QWidget * ); | 36 | QWidget* widget( QWidget * ); |
37 | QString pixmapNameConfig() const; | 37 | QString pixmapNameConfig() const; |
38 | TodayConfigWidget* configWidget( QWidget * ); | 38 | TodayConfigWidget* configWidget( QWidget * ); |
39 | QString appName() const; | 39 | QString appName() const; |
40 | bool excludeFromRefresh() const; | 40 | bool excludeFromRefresh() const; |
41 | }; | 41 | }; |
diff --git a/noncore/todayplugins/fortune/fortunepluginimpl.h b/noncore/todayplugins/fortune/fortunepluginimpl.h index 8e380f5..35ecf92 100644 --- a/noncore/todayplugins/fortune/fortunepluginimpl.h +++ b/noncore/todayplugins/fortune/fortunepluginimpl.h | |||
@@ -4,33 +4,33 @@ | |||
4 | * copyright : (c) 2002 by Maximilian Reiß | 4 | * copyright : (c) 2002 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
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 | #ifndef FORTUNE_PLUGIN_IMPL_H | 17 | #ifndef FORTUNE_PLUGIN_IMPL_H |
18 | #define FORTUNE_PLUGIN_IMPL_H | 18 | #define FORTUNE_PLUGIN_IMPL_H |
19 | 19 | ||
20 | #include <opie/todayplugininterface.h> | 20 | #include <opie2/todayplugininterface.h> |
21 | 21 | ||
22 | class FortunePlugin; | 22 | class FortunePlugin; |
23 | 23 | ||
24 | class FortunePluginImpl : public TodayPluginInterface | 24 | class FortunePluginImpl : public TodayPluginInterface |
25 | { | 25 | { |
26 | 26 | ||
27 | public: | 27 | public: |
28 | FortunePluginImpl(); | 28 | FortunePluginImpl(); |
29 | virtual ~FortunePluginImpl(); | 29 | virtual ~FortunePluginImpl(); |
30 | 30 | ||
31 | QRESULT queryInterface( const QUuid &, QUnknownInterface** ); | 31 | QRESULT queryInterface( const QUuid &, QUnknownInterface** ); |
32 | Q_REFCOUNT | 32 | Q_REFCOUNT |
33 | 33 | ||
34 | virtual TodayPluginObject *guiPart(); | 34 | virtual TodayPluginObject *guiPart(); |
35 | 35 | ||
36 | private: | 36 | private: |
diff --git a/noncore/todayplugins/fortune/fortunepluginwidget.cpp b/noncore/todayplugins/fortune/fortunepluginwidget.cpp index e6a0d09..3aa978c 100644 --- a/noncore/todayplugins/fortune/fortunepluginwidget.cpp +++ b/noncore/todayplugins/fortune/fortunepluginwidget.cpp | |||
@@ -3,45 +3,42 @@ | |||
3 | * | 3 | * |
4 | * copyright : (c) 2002 by Maximilian Reiß | 4 | * copyright : (c) 2002 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
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 "fortunepluginwidget.h" | 17 | #include "fortunepluginwidget.h" |
18 | 18 | ||
19 | #include <qpe/config.h> | ||
20 | #include <qpe/qcopenvelope_qws.h> | ||
21 | |||
19 | #include <qvaluelist.h> | 22 | #include <qvaluelist.h> |
20 | #include <qtl.h> | 23 | #include <qtl.h> |
21 | #include <qstring.h> | 24 | #include <qstring.h> |
22 | #include <qscrollview.h> | 25 | #include <qscrollview.h> |
23 | #include <qobject.h> | 26 | #include <qobject.h> |
24 | #include <qlayout.h> | 27 | #include <qlayout.h> |
25 | 28 | ||
26 | #include <qpe/config.h> | ||
27 | #include <qpe/qcopenvelope_qws.h> | ||
28 | |||
29 | #include <opie/oprocess.h> | ||
30 | #include <opie/oticker.h> | ||
31 | |||
32 | FortunePluginWidget::FortunePluginWidget( QWidget *parent, const char* name ) | 29 | FortunePluginWidget::FortunePluginWidget( QWidget *parent, const char* name ) |
33 | : QWidget( parent, name ) | 30 | : QWidget( parent, name ) |
34 | { | 31 | { |
35 | 32 | ||
36 | fortune = NULL; | 33 | fortune = NULL; |
37 | getFortune(); | 34 | getFortune(); |
38 | } | 35 | } |
39 | 36 | ||
40 | FortunePluginWidget::~FortunePluginWidget() { | 37 | FortunePluginWidget::~FortunePluginWidget() { |
41 | if( fortuneProcess ){ | 38 | if( fortuneProcess ){ |
42 | delete fortuneProcess; | 39 | delete fortuneProcess; |
43 | } | 40 | } |
44 | } | 41 | } |
45 | 42 | ||
46 | /** | 43 | /** |
47 | * Get the fortunes | 44 | * Get the fortunes |
@@ -50,35 +47,35 @@ void FortunePluginWidget::getFortune() { | |||
50 | 47 | ||
51 | QVBoxLayout* layoutFortune = new QVBoxLayout( this ); | 48 | QVBoxLayout* layoutFortune = new QVBoxLayout( this ); |
52 | 49 | ||
53 | if ( fortune ) { | 50 | if ( fortune ) { |
54 | delete fortune; | 51 | delete fortune; |
55 | } | 52 | } |
56 | 53 | ||
57 | fortune = new OTicker( this ); | 54 | fortune = new OTicker( this ); |
58 | //fortune->setReadOnly( TRUE ); | 55 | //fortune->setReadOnly( TRUE ); |
59 | //fortune->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); | 56 | //fortune->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); |
60 | 57 | ||
61 | fortune->setText( QString("Obtaining fortune...") ); | 58 | fortune->setText( QString("Obtaining fortune...") ); |
62 | layoutFortune->addWidget( fortune ); | 59 | layoutFortune->addWidget( fortune ); |
63 | 60 | ||
64 | fortuneProcess = new OProcess(); | 61 | fortuneProcess = new OProcess(); |
65 | *fortuneProcess << "fortune"; | 62 | *fortuneProcess << "fortune"; |
66 | 63 | ||
67 | connect(fortuneProcess, SIGNAL(receivedStdout(OProcess*,char*,int) ), | 64 | connect(fortuneProcess, SIGNAL(receivedStdout(OProcess*,char*,int) ), |
68 | this, SLOT(slotStdOut(OProcess*,char*,int) ) ); | 65 | this, SLOT(slotStdOut(OProcess*,char*,int) ) ); |
69 | 66 | ||
70 | if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { | 67 | if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
71 | qWarning("could not start :("); | 68 | qWarning("could not start :("); |
72 | fortune->setText( QString("Failed to obtain fortune.") ); | 69 | fortune->setText( QString("Failed to obtain fortune.") ); |
73 | delete fortuneProcess; | 70 | delete fortuneProcess; |
74 | fortuneProcess = 0; | 71 | fortuneProcess = 0; |
75 | } | 72 | } |
76 | 73 | ||
77 | } | 74 | } |
78 | 75 | ||
79 | void FortunePluginWidget::slotStdOut( OProcess* proc, char* buf, int len ) | 76 | void FortunePluginWidget::slotStdOut( OProcess* /*proc*/, char* buf, int len ) |
80 | { | 77 | { |
81 | QCString s( buf, len ); | 78 | QCString s( buf, len ); |
82 | s.replace( QRegExp("\n"), "" ); | 79 | s.replace( QRegExp("\n"), "" ); |
83 | fortune->setText( s ); | 80 | fortune->setText( s ); |
84 | } | 81 | } |
diff --git a/noncore/todayplugins/fortune/fortunepluginwidget.h b/noncore/todayplugins/fortune/fortunepluginwidget.h index 302d046..abb7bed 100644 --- a/noncore/todayplugins/fortune/fortunepluginwidget.h +++ b/noncore/todayplugins/fortune/fortunepluginwidget.h | |||
@@ -4,39 +4,38 @@ | |||
4 | * copyright : (c) 2002 by Chris Larson | 4 | * copyright : (c) 2002 by Chris Larson |
5 | * email : kergoth@handhelds.org | 5 | * email : kergoth@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
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 | #ifndef FORTUNE_PLUGIN_WIDGET_H | 17 | #ifndef FORTUNE_PLUGIN_WIDGET_H |
18 | #define FORTUNE_PLUGIN_WIDGET_H | 18 | #define FORTUNE_PLUGIN_WIDGET_H |
19 | 19 | ||
20 | #include <opie2/oprocess.h> | ||
21 | #include <opie2/oticker.h> | ||
22 | |||
20 | #include <qstring.h> | 23 | #include <qstring.h> |
21 | #include <qwidget.h> | 24 | #include <qwidget.h> |
22 | 25 | ||
23 | #include <opie/oticker.h> | ||
24 | #include <opie/oprocess.h> | ||
25 | |||
26 | |||
27 | class FortunePluginWidget : public QWidget | 26 | class FortunePluginWidget : public QWidget |
28 | { | 27 | { |
29 | 28 | ||
30 | Q_OBJECT | 29 | Q_OBJECT |
31 | 30 | ||
32 | public: | 31 | public: |
33 | FortunePluginWidget( QWidget *parent, const char *name ); | 32 | FortunePluginWidget( QWidget *parent, const char *name ); |
34 | ~FortunePluginWidget(); | 33 | ~FortunePluginWidget(); |
35 | 34 | ||
36 | private: | 35 | private: |
37 | OTicker *fortune; | 36 | OTicker *fortune; |
38 | OProcess *fortuneProcess; | 37 | OProcess *fortuneProcess; |
39 | 38 | ||
40 | void getFortune(); | 39 | void getFortune(); |
41 | 40 | ||
42 | private slots: | 41 | private slots: |
diff --git a/noncore/todayplugins/fortune/opie-today-fortuneplugin.control b/noncore/todayplugins/fortune/opie-today-fortuneplugin.control index 48ddab1..9b7adbe 100644 --- a/noncore/todayplugins/fortune/opie-today-fortuneplugin.control +++ b/noncore/todayplugins/fortune/opie-today-fortuneplugin.control | |||
@@ -1,9 +1,9 @@ | |||
1 | Package: opie-today-fortuneplugin | 1 | Package: opie-today-fortuneplugin |
2 | Files: plugins/today/libtodayfortuneplugin.so* | 2 | Files: plugins/today/libtodayfortuneplugin.so* |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/plugins | 4 | Section: opie/plugins |
5 | Maintainer: Chris Larson <kergoth@handhelds.org> | 5 | Maintainer: Chris Larson <kergoth@handhelds.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: opie-today, fortune (<=9708-0.1) | fortune-mod | 7 | Depends: opie-today, fortune (<=9708-0.1) | fortune-mod, libopiecore2, libopiepim2, libopieui2 |
8 | Description: 'fortune' plugin for Today | 8 | Description: 'fortune' plugin for Today |
9 | Version: $QPE_VERSION$EXTRAVERSION | 9 | Version: $QPE_VERSION$EXTRAVERSION |