author | zecke <zecke> | 2004-03-14 15:07:48 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 15:07:48 (UTC) |
commit | 8a243adc61fc9c8a48fa9061f0eba12c7b345d70 (patch) (unidiff) | |
tree | 8f240482113d5588c4fb73769a2ced2ccdb87fb9 | |
parent | 346288b5a95b72a84fabe9acb2e32aa8a8388c8c (diff) | |
download | opie-8a243adc61fc9c8a48fa9061f0eba12c7b345d70.zip opie-8a243adc61fc9c8a48fa9061f0eba12c7b345d70.tar.gz opie-8a243adc61fc9c8a48fa9061f0eba12c7b345d70.tar.bz2 |
Opie2 and ODP changes
Also try to make signals/slots syntax obey the namespaces
-rw-r--r-- | noncore/tools/clock/clock.cpp | 3 | ||||
-rw-r--r-- | noncore/tools/clock/main.cpp | 2 | ||||
-rw-r--r-- | noncore/tools/clock/setAlarm.cpp | 3 | ||||
-rw-r--r-- | noncore/tools/euroconv/main.cpp | 4 | ||||
-rw-r--r-- | noncore/tools/formatter/formatter.cpp | 2 | ||||
-rw-r--r-- | noncore/tools/formatter/main.cpp | 2 | ||||
-rw-r--r-- | noncore/tools/opie-sh/config.in | 2 | ||||
-rw-r--r-- | noncore/tools/remote/config.in | 2 | ||||
-rw-r--r-- | noncore/tools/remote/recorddialog.cpp | 8 | ||||
-rw-r--r-- | noncore/tools/remote/recorddialog.h | 8 | ||||
-rw-r--r-- | noncore/tools/remote/remote.pro | 2 |
11 files changed, 24 insertions, 14 deletions
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp index b780675..485354b 100644 --- a/noncore/tools/clock/clock.cpp +++ b/noncore/tools/clock/clock.cpp | |||
@@ -43,32 +43,33 @@ | |||
43 | #include <qradiobutton.h> | 43 | #include <qradiobutton.h> |
44 | #include <qbuttongroup.h> | 44 | #include <qbuttongroup.h> |
45 | #include <qpainter.h> | 45 | #include <qpainter.h> |
46 | #include <qmessagebox.h> | 46 | #include <qmessagebox.h> |
47 | #include <qdatetime.h> | 47 | #include <qdatetime.h> |
48 | 48 | ||
49 | #include <math.h> | 49 | #include <math.h> |
50 | #include <unistd.h> | 50 | #include <unistd.h> |
51 | #include <sys/types.h> | 51 | #include <sys/types.h> |
52 | 52 | ||
53 | #include <pthread.h> | 53 | #include <pthread.h> |
54 | 54 | ||
55 | 55 | ||
56 | const double deg2rad = 0.017453292519943295769; // pi/180 | 56 | const double deg2rad = 0.017453292519943295769; // pi/180 |
57 | const int sw_prec = 2; | 57 | const int sw_prec = 2; |
58 | 58 | ||
59 | using namespace Opie::Ui; | ||
59 | void startPlayer() | 60 | void startPlayer() |
60 | { | 61 | { |
61 | Config config( "qpe" ); | 62 | Config config( "qpe" ); |
62 | config.setGroup( "Time" ); | 63 | config.setGroup( "Time" ); |
63 | sleep(15); | 64 | sleep(15); |
64 | QCopEnvelope e( "QPE/Application/opieplayer", "setDocument(QString)" ); | 65 | QCopEnvelope e( "QPE/Application/opieplayer", "setDocument(QString)" ); |
65 | e << config.readEntry( "mp3File", "" ); | 66 | e << config.readEntry( "mp3File", "" ); |
66 | } | 67 | } |
67 | 68 | ||
68 | 69 | ||
69 | static void toggleScreenSaver( bool on ) | 70 | static void toggleScreenSaver( bool on ) |
70 | { | 71 | { |
71 | QCopEnvelope e( "QPE/System", "setScreenSaverMode(int)" ); | 72 | QCopEnvelope e( "QPE/System", "setScreenSaverMode(int)" ); |
72 | e << ( on ? QPEApplication::Enable : QPEApplication::DisableSuspend ); | 73 | e << ( on ? QPEApplication::Enable : QPEApplication::DisableSuspend ); |
73 | } | 74 | } |
74 | 75 | ||
@@ -132,33 +133,33 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) | |||
132 | grp->insert( set ); | 133 | grp->insert( set ); |
133 | 134 | ||
134 | reset = new QPushButton ( controls ); | 135 | reset = new QPushButton ( controls ); |
135 | gl->addWidget( reset, 1, 1 ); | 136 | gl->addWidget( reset, 1, 1 ); |
136 | reset->setText( tr( "Reset" ) ); | 137 | reset->setText( tr( "Reset" ) ); |
137 | reset->setEnabled( FALSE ); | 138 | reset->setEnabled( FALSE ); |
138 | grp->insert( reset ); | 139 | grp->insert( reset ); |
139 | 140 | ||
140 | alarmOffBtn = new QPushButton ( controls ); | 141 | alarmOffBtn = new QPushButton ( controls ); |
141 | gl->addWidget( alarmOffBtn, 0, 2 ); | 142 | gl->addWidget( alarmOffBtn, 0, 2 ); |
142 | 143 | ||
143 | alarmBtn = new QPushButton ( controls ); | 144 | alarmBtn = new QPushButton ( controls ); |
144 | gl->addWidget( alarmBtn, 1, 2 ); | 145 | gl->addWidget( alarmBtn, 1, 2 ); |
145 | 146 | ||
146 | alarmBtn->setText( tr( "Set Alarm" ) ); | 147 | alarmBtn->setText( tr( "Set Alarm" ) ); |
147 | 148 | ||
148 | Opie::OClickableLabel *click = new Opie::OClickableLabel( controls, "label" ); | 149 | OClickableLabel *click = new Opie::Ui::OClickableLabel( controls, "label" ); |
149 | click->setText( tr( "Set date and time." ) ); | 150 | click->setText( tr( "Set date and time." ) ); |
150 | gl->addMultiCellWidget( click, 3, 3, 0, 2, AlignHCenter ); | 151 | gl->addMultiCellWidget( click, 3, 3, 0, 2, AlignHCenter ); |
151 | connect( click, SIGNAL( clicked() ), this, SLOT( slotAdjustTime() ) ); | 152 | connect( click, SIGNAL( clicked() ), this, SLOT( slotAdjustTime() ) ); |
152 | 153 | ||
153 | connect( set , SIGNAL( pressed() ), SLOT( slotSet() ) ); | 154 | connect( set , SIGNAL( pressed() ), SLOT( slotSet() ) ); |
154 | connect( reset, SIGNAL( clicked() ), SLOT( slotReset() ) ); | 155 | connect( reset, SIGNAL( clicked() ), SLOT( slotReset() ) ); |
155 | 156 | ||
156 | connect( alarmBtn, SIGNAL( clicked() ), SLOT( slotSetAlarm() ) ); | 157 | connect( alarmBtn, SIGNAL( clicked() ), SLOT( slotSetAlarm() ) ); |
157 | connect( snoozeBtn, SIGNAL( clicked() ), SLOT( slotSnooze() ) ); | 158 | connect( snoozeBtn, SIGNAL( clicked() ), SLOT( slotSnooze() ) ); |
158 | connect( alarmOffBtn, SIGNAL( clicked() ), SLOT( slotToggleAlarm() ) ); | 159 | connect( alarmOffBtn, SIGNAL( clicked() ), SLOT( slotToggleAlarm() ) ); |
159 | 160 | ||
160 | connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), | 161 | connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), |
161 | this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); | 162 | this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); |
162 | 163 | ||
163 | t = new QTimer( this ); | 164 | t = new QTimer( this ); |
164 | connect( t, SIGNAL( timeout() ), SLOT( updateClock() ) ); | 165 | connect( t, SIGNAL( timeout() ), SLOT( updateClock() ) ); |
diff --git a/noncore/tools/clock/main.cpp b/noncore/tools/clock/main.cpp index 89dd1bd..237d9f0 100644 --- a/noncore/tools/clock/main.cpp +++ b/noncore/tools/clock/main.cpp | |||
@@ -10,17 +10,19 @@ | |||
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "clock.h" | 21 | #include "clock.h" |
22 | 22 | ||
23 | #include <opie2/oapplicationfactory.h> | 23 | #include <opie2/oapplicationfactory.h> |
24 | 24 | ||
25 | 25 | ||
26 | using namespace Opie::Core; | ||
27 | using namespace Opie::Core; | ||
26 | OPIE_EXPORT_APP( OApplicationFactory<Clock> ) | 28 | OPIE_EXPORT_APP( OApplicationFactory<Clock> ) |
diff --git a/noncore/tools/clock/setAlarm.cpp b/noncore/tools/clock/setAlarm.cpp index 6fec5a0..9d5fc49 100644 --- a/noncore/tools/clock/setAlarm.cpp +++ b/noncore/tools/clock/setAlarm.cpp | |||
@@ -19,32 +19,33 @@ | |||
19 | 19 | ||
20 | #include <qpe/config.h> | 20 | #include <qpe/config.h> |
21 | #include <qpe/qpeapplication.h> | 21 | #include <qpe/qpeapplication.h> |
22 | #include <qstring.h> | 22 | #include <qstring.h> |
23 | #include <qlabel.h> | 23 | #include <qlabel.h> |
24 | #include <qlcdnumber.h> | 24 | #include <qlcdnumber.h> |
25 | #include <qpushbutton.h> | 25 | #include <qpushbutton.h> |
26 | #include <qradiobutton.h> | 26 | #include <qradiobutton.h> |
27 | #include <qslider.h> | 27 | #include <qslider.h> |
28 | #include <qlayout.h> | 28 | #include <qlayout.h> |
29 | #include <qvariant.h> | 29 | #include <qvariant.h> |
30 | #include <qtooltip.h> | 30 | #include <qtooltip.h> |
31 | #include <qwhatsthis.h> | 31 | #include <qwhatsthis.h> |
32 | #include <qbuttongroup.h> | 32 | #include <qbuttongroup.h> |
33 | #include <qcheckbox.h> | 33 | #include <qcheckbox.h> |
34 | 34 | ||
35 | using namespace Opie::Ui; | ||
35 | Set_Alarm::Set_Alarm( QWidget* parent, const char* name, bool modal, WFlags fl ) | 36 | Set_Alarm::Set_Alarm( QWidget* parent, const char* name, bool modal, WFlags fl ) |
36 | : QDialog( parent, name, modal, fl ) | 37 | : QDialog( parent, name, modal, fl ) |
37 | { | 38 | { |
38 | if ( !name ) | 39 | if ( !name ) |
39 | setName( "Set_Alarm" ); | 40 | setName( "Set_Alarm" ); |
40 | resize( 240, 101 ); | 41 | resize( 240, 101 ); |
41 | setMaximumSize( QSize( 240, 320 ) ); | 42 | setMaximumSize( QSize( 240, 320 ) ); |
42 | move(0,45); | 43 | move(0,45); |
43 | setCaption( tr( "Set Alarm" ) ); | 44 | setCaption( tr( "Set Alarm" ) ); |
44 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 45 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
45 | 46 | ||
46 | Set_AlarmLayout = new QGridLayout( this ); | 47 | Set_AlarmLayout = new QGridLayout( this ); |
47 | Set_AlarmLayout->setSpacing( 6 ); | 48 | Set_AlarmLayout->setSpacing( 6 ); |
48 | Set_AlarmLayout->setMargin( 11 ); | 49 | Set_AlarmLayout->setMargin( 11 ); |
49 | 50 | ||
50 | TextLabel1 = new QLabel( this, "TextLabel1" ); | 51 | TextLabel1 = new QLabel( this, "TextLabel1" ); |
@@ -196,28 +197,28 @@ void Set_Alarm::pmButtonToggled(bool b) | |||
196 | Am_RadioButton->setChecked(FALSE); | 197 | Am_RadioButton->setChecked(FALSE); |
197 | } | 198 | } |
198 | 199 | ||
199 | void Set_Alarm::cleanUp() | 200 | void Set_Alarm::cleanUp() |
200 | { | 201 | { |
201 | } | 202 | } |
202 | 203 | ||
203 | void Set_Alarm::slotChangemp3CkeckBox(bool b) { | 204 | void Set_Alarm::slotChangemp3CkeckBox(bool b) { |
204 | Config config( "qpe" ); | 205 | Config config( "qpe" ); |
205 | config.setGroup("Time"); | 206 | config.setGroup("Time"); |
206 | if(b) { | 207 | if(b) { |
207 | QMap<QString, QStringList> map; | 208 | QMap<QString, QStringList> map; |
208 | map.insert(tr("All"), QStringList() ); | 209 | map.insert(tr("All"), QStringList() ); |
209 | QStringList text; | 210 | QStringList text; |
210 | text << "audio/*"; | 211 | text << "audio/*"; |
211 | map.insert(tr("Audio"), text ); | 212 | map.insert(tr("Audio"), text ); |
212 | QString str = Opie::OFileDialog::getOpenFileName( 2,"/", QString::null, map);//,"", "*", this ); | 213 | QString str = OFileDialog::getOpenFileName( 2,"/", QString::null, map);//,"", "*", this ); |
213 | // QString str = Opie::OFileDialog::getOpenFileName( 2,"/");//,"", "*", this ); | 214 | // QString str = Opie::OFileDialog::getOpenFileName( 2,"/");//,"", "*", this ); |
214 | if(!str.isEmpty() ) { | 215 | if(!str.isEmpty() ) { |
215 | qDebug(str); | 216 | qDebug(str); |
216 | config.writeEntry("mp3Alarm",1); | 217 | config.writeEntry("mp3Alarm",1); |
217 | config.writeEntry("mp3File",str); | 218 | config.writeEntry("mp3File",str); |
218 | } | 219 | } |
219 | } else { | 220 | } else { |
220 | config.writeEntry("mp3Alarm",0); | 221 | config.writeEntry("mp3Alarm",0); |
221 | config.writeEntry("mp3File",""); | 222 | config.writeEntry("mp3File",""); |
222 | } | 223 | } |
223 | } | 224 | } |
diff --git a/noncore/tools/euroconv/main.cpp b/noncore/tools/euroconv/main.cpp index b765a5e..d5f6c7f 100644 --- a/noncore/tools/euroconv/main.cpp +++ b/noncore/tools/euroconv/main.cpp | |||
@@ -1,37 +1,39 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | * | 2 | * |
3 | using namespace Opie::Core; | ||
4 | using namespace Opie::Core; | ||
3 | * File: main.cpp | 5 | * File: main.cpp |
4 | * | 6 | * |
5 | * Description: main file for OPIE Euroconv aapp | 7 | * Description: main file for OPIE Euroconv aapp |
6 | * | 8 | * |
7 | * | 9 | * |
8 | * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> | 10 | * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> |
9 | * | 11 | * |
10 | * Requirements: Qt | 12 | * Requirements: Qt |
11 | * | 13 | * |
12 | * | 14 | * |
13 | ***************************************************************************/ | 15 | ***************************************************************************/ |
14 | 16 | ||
15 | #include <qpe/qpeapplication.h> | 17 | #include <qpe/qpeapplication.h> |
16 | #include <qvbox.h> | 18 | #include <qvbox.h> |
17 | 19 | ||
18 | #include "calcdisplay.h" | 20 | #include "calcdisplay.h" |
19 | #include "calckeypad.h" | 21 | #include "calckeypad.h" |
20 | 22 | ||
21 | #include <opie/oapplicationfactory.h> | 23 | #include <opie2/oapplicationfactory.h> |
22 | 24 | ||
23 | struct Layout : QVBox{ | 25 | struct Layout : QVBox{ |
24 | static QString appName() { return QString::fromLatin1("euroconv"); } | 26 | static QString appName() { return QString::fromLatin1("euroconv"); } |
25 | Layout(QWidget *p, const char* n, WFlags) | 27 | Layout(QWidget *p, const char* n, WFlags) |
26 | :QVBox(0,"fond" ) | 28 | :QVBox(0,"fond" ) |
27 | { | 29 | { |
28 | LCDDisplay *lcd = new LCDDisplay(this, "lcd"); | 30 | LCDDisplay *lcd = new LCDDisplay(this, "lcd"); |
29 | KeyPad *num = new KeyPad(lcd, this, "keypad"); | 31 | KeyPad *num = new KeyPad(lcd, this, "keypad"); |
30 | 32 | ||
31 | setCaption( QObject::tr("Euroconv") ); | 33 | setCaption( QObject::tr("Euroconv") ); |
32 | }; | 34 | }; |
33 | 35 | ||
34 | }; | 36 | }; |
35 | 37 | ||
36 | OPIE_EXPORT_APP( OApplicationFactory<Layout> ) | 38 | OPIE_EXPORT_APP( OApplicationFactory<Layout> ) |
37 | 39 | ||
diff --git a/noncore/tools/formatter/formatter.cpp b/noncore/tools/formatter/formatter.cpp index 77e1790..4204d73 100644 --- a/noncore/tools/formatter/formatter.cpp +++ b/noncore/tools/formatter/formatter.cpp | |||
@@ -1,30 +1,30 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** formatter.cpp | 2 | ** formatter.cpp |
3 | ** | 3 | ** |
4 | ** Copyright: Thu Apr 11 11:01:13 2002 | 4 | ** Copyright: Thu Apr 11 11:01:13 2002 |
5 | ** by: L. J. Potter | 5 | ** by: L. J. Potter |
6 | ** | 6 | ** |
7 | ****************************************************************************/ | 7 | ****************************************************************************/ |
8 | 8 | ||
9 | #include "formatter.h" | 9 | #include "formatter.h" |
10 | #include "inputDialog.h" | 10 | #include "inputDialog.h" |
11 | #include "output.h" | 11 | #include "output.h" |
12 | 12 | ||
13 | /* OPIE */ | 13 | /* OPIE */ |
14 | #include <qpe/qpetoolbar.h> | 14 | #include <qtoolbar.h> |
15 | #include <qpe/qpeapplication.h> | 15 | #include <qpe/qpeapplication.h> |
16 | #include <qpe/resource.h> | 16 | #include <qpe/resource.h> |
17 | #include <qpe/config.h> | 17 | #include <qpe/config.h> |
18 | #include <qpe/mimetype.h> | 18 | #include <qpe/mimetype.h> |
19 | #include <qpe/qcopenvelope_qws.h> | 19 | #include <qpe/qcopenvelope_qws.h> |
20 | #include <qpe/storage.h> | 20 | #include <qpe/storage.h> |
21 | 21 | ||
22 | /* QT */ | 22 | /* QT */ |
23 | #include <qmenubar.h> | 23 | #include <qmenubar.h> |
24 | #include <qmultilineedit.h> | 24 | #include <qmultilineedit.h> |
25 | #include <qstring.h> | 25 | #include <qstring.h> |
26 | #include <qlist.h> | 26 | #include <qlist.h> |
27 | #include <qstringlist.h> | 27 | #include <qstringlist.h> |
28 | #include <qdir.h> | 28 | #include <qdir.h> |
29 | #include <qfile.h> | 29 | #include <qfile.h> |
30 | #include <qtstream.h> | 30 | #include <qtstream.h> |
diff --git a/noncore/tools/formatter/main.cpp b/noncore/tools/formatter/main.cpp index bdd4a2c..d47479e 100644 --- a/noncore/tools/formatter/main.cpp +++ b/noncore/tools/formatter/main.cpp | |||
@@ -1,18 +1,20 @@ | |||
1 | 1 | ||
2 | /*************************************************************************** | 2 | /*************************************************************************** |
3 | |||
3 | main.cpp - description | 4 | main.cpp - description |
4 | ------------------- | 5 | ------------------- |
5 | begin : March 10, 2002 | 6 | begin : March 10, 2002 |
6 | copyright : (C) 2002 by llornkcor | 7 | copyright : (C) 2002 by llornkcor |
7 | email : ljp@llornkcor.com | 8 | email : ljp@llornkcor.com |
8 | * This program is free software; you can redistribute it and/or modify * | 9 | * This program is free software; you can redistribute it and/or modify * |
9 | * it under the terms of the GNU General Public License as published by * | 10 | * it under the terms of the GNU General Public License as published by * |
10 | * the Free Software Foundation; either version 2 of the License, or * | 11 | * the Free Software Foundation; either version 2 of the License, or * |
11 | * (at your option) any later version. * | 12 | * (at your option) any later version. * |
12 | ***************************************************************************/ | 13 | ***************************************************************************/ |
13 | 14 | ||
14 | #include "formatter.h" | 15 | #include "formatter.h" |
15 | 16 | ||
16 | #include <opie2/oapplicationfactory.h> | 17 | #include <opie2/oapplicationfactory.h> |
17 | 18 | ||
19 | using namespace Opie::Core; | ||
18 | OPIE_EXPORT_APP( OApplicationFactory<FormatterApp> ) | 20 | OPIE_EXPORT_APP( OApplicationFactory<FormatterApp> ) |
diff --git a/noncore/tools/opie-sh/config.in b/noncore/tools/opie-sh/config.in index 614ac8b..b3ca373 100644 --- a/noncore/tools/opie-sh/config.in +++ b/noncore/tools/opie-sh/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config OPIE-SH | 1 | config OPIE-SH |
2 | boolean "opie-sh (qdialog frontend allows you to write dialogs from shell scripts)" | 2 | boolean "opie-sh (qdialog frontend allows you to write dialogs from shell scripts)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | 4 | depends ( LIBQPE || LIBQPE-X11 ) |
diff --git a/noncore/tools/remote/config.in b/noncore/tools/remote/config.in index 3b70590..2a42c58 100644 --- a/noncore/tools/remote/config.in +++ b/noncore/tools/remote/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config REMOTE | 1 | config REMOTE |
2 | boolean "opie-remote (remote control using irda, frontent to lirc)" | 2 | boolean "opie-remote (remote control using irda, frontent to lirc)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIECORE2 |
diff --git a/noncore/tools/remote/recorddialog.cpp b/noncore/tools/remote/recorddialog.cpp index 1ce5472..a9c4c61 100644 --- a/noncore/tools/remote/recorddialog.cpp +++ b/noncore/tools/remote/recorddialog.cpp | |||
@@ -3,32 +3,34 @@ Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. | |||
3 | Copyright (C) 2002 Thomas Stephens | 3 | Copyright (C) 2002 Thomas Stephens |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public | 5 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public |
6 | License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later | 6 | License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later |
7 | version. | 7 | version. |
8 | 8 | ||
9 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | 9 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the |
10 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | 10 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
11 | Public License for more details. | 11 | Public License for more details. |
12 | 12 | ||
13 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free | 13 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free |
14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "recorddialog.h" | 17 | #include "recorddialog.h" |
18 | 18 | ||
19 | using namespace Opie::Core; | ||
20 | using namespace Opie::Core; | ||
19 | RecordDialog::RecordDialog(QWidget *parent, const char *name) | 21 | RecordDialog::RecordDialog(QWidget *parent, const char *name) |
20 | :QDialog(parent, name) | 22 | :QDialog(parent, name) |
21 | { | 23 | { |
22 | QVBoxLayout *layout = new QVBoxLayout(this); | 24 | QVBoxLayout *layout = new QVBoxLayout(this); |
23 | QHBoxLayout *hlayout = new QHBoxLayout(this); | 25 | QHBoxLayout *hlayout = new QHBoxLayout(this); |
24 | 26 | ||
25 | layout->insertSpacing(0,5); | 27 | layout->insertSpacing(0,5); |
26 | output = new QTextView("Please enter the name of the new remote, and press Return\n", 0, this, "output"); | 28 | output = new QTextView("Please enter the name of the new remote, and press Return\n", 0, this, "output"); |
27 | layout->insertWidget(-1, output); | 29 | layout->insertWidget(-1, output); |
28 | layout->insertSpacing(-1, 5); | 30 | layout->insertSpacing(-1, 5); |
29 | layout->insertLayout(-1, hlayout); | 31 | layout->insertLayout(-1, hlayout); |
30 | layout->insertSpacing(-1, 5); | 32 | layout->insertSpacing(-1, 5); |
31 | 33 | ||
32 | hlayout->insertSpacing(0, 5); | 34 | hlayout->insertSpacing(0, 5); |
33 | input = new QLineEdit(this, "input"); | 35 | input = new QLineEdit(this, "input"); |
34 | hlayout->insertWidget(-1, input, 1); | 36 | hlayout->insertWidget(-1, input, 1); |
@@ -36,35 +38,35 @@ RecordDialog::RecordDialog(QWidget *parent, const char *name) | |||
36 | 38 | ||
37 | QPushButton *ret = new QPushButton("Return", this, "return"); | 39 | QPushButton *ret = new QPushButton("Return", this, "return"); |
38 | hlayout->insertWidget(-1, ret); | 40 | hlayout->insertWidget(-1, ret); |
39 | hlayout->insertSpacing(-1, 5); | 41 | hlayout->insertSpacing(-1, 5); |
40 | connect(ret, SIGNAL(clicked()), this, SLOT(retPressed()) ); | 42 | connect(ret, SIGNAL(clicked()), this, SLOT(retPressed()) ); |
41 | where = 0; | 43 | where = 0; |
42 | 44 | ||
43 | record = new OProcess; | 45 | record = new OProcess; |
44 | } | 46 | } |
45 | 47 | ||
46 | void RecordDialog::retPressed() | 48 | void RecordDialog::retPressed() |
47 | { | 49 | { |
48 | printf("RecordDialog::retPressed: ret pressed\n"); | 50 | printf("RecordDialog::retPressed: ret pressed\n"); |
49 | 51 | ||
50 | if(where == 0) | 52 | if(where == 0) |
51 | { | 53 | { |
52 | connect(record, SIGNAL(receivedStdout(OProcess*,char*,int)), this, SLOT(incoming(OProcess*,char*,int)) ); | 54 | connect(record, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), this, SLOT(incoming(Opie::Core::OProcess*,char*,int)) ); |
53 | connect(record, SIGNAL(receivedStderr(OProcess*,char*,int)), this, SLOT(incoming(OProcess*,char*,int)) ); | 55 | connect(record, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)), this, SLOT(incoming(Opie::Core::OProcess*,char*,int)) ); |
54 | connect(record, SIGNAL(processExited(OProcess*)), this, SLOT(done(OProcess*)) ); | 56 | connect(record, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT(done(Opie::Core::OProcess*)) ); |
55 | printf("RecordDialog::retPressed: starting irrecord\n"); | 57 | printf("RecordDialog::retPressed: starting irrecord\n"); |
56 | QString file = "/tmp/" + input->text(); | 58 | QString file = "/tmp/" + input->text(); |
57 | *record<<"irrecord"<<file.latin1(); | 59 | *record<<"irrecord"<<file.latin1(); |
58 | if(!record->start(OProcess::NotifyOnExit, OProcess::AllOutput)) | 60 | if(!record->start(OProcess::NotifyOnExit, OProcess::AllOutput)) |
59 | { | 61 | { |
60 | QMessageBox *mb = new QMessageBox("Error!", | 62 | QMessageBox *mb = new QMessageBox("Error!", |
61 | "Could not start irrecord. You must<br>use an lirc ipkg that includes<br>irrecord", | 63 | "Could not start irrecord. You must<br>use an lirc ipkg that includes<br>irrecord", |
62 | QMessageBox::NoIcon, | 64 | QMessageBox::NoIcon, |
63 | QMessageBox::Ok, | 65 | QMessageBox::Ok, |
64 | QMessageBox::NoButton, | 66 | QMessageBox::NoButton, |
65 | QMessageBox::NoButton); | 67 | QMessageBox::NoButton); |
66 | mb->exec(); | 68 | mb->exec(); |
67 | return; | 69 | return; |
68 | } | 70 | } |
69 | // record->resume(); | 71 | // record->resume(); |
70 | where = 1; | 72 | where = 1; |
diff --git a/noncore/tools/remote/recorddialog.h b/noncore/tools/remote/recorddialog.h index e4dcae6..46a82ce 100644 --- a/noncore/tools/remote/recorddialog.h +++ b/noncore/tools/remote/recorddialog.h | |||
@@ -14,36 +14,36 @@ You should have received a copy of the GNU General Public License along with thi | |||
14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef RecordDialog_H | 17 | #ifndef RecordDialog_H |
18 | #define RecordDialog_H | 18 | #define RecordDialog_H |
19 | 19 | ||
20 | #include <qdialog.h> | 20 | #include <qdialog.h> |
21 | #include <qtextview.h> | 21 | #include <qtextview.h> |
22 | #include <qlineedit.h> | 22 | #include <qlineedit.h> |
23 | #include <qpushbutton.h> | 23 | #include <qpushbutton.h> |
24 | #include <qwidget.h> | 24 | #include <qwidget.h> |
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qmessagebox.h> | 26 | #include <qmessagebox.h> |
27 | 27 | ||
28 | #include <stdio.h> | 28 | #include <stdio.h> |
29 | 29 | ||
30 | #include <opie/oprocess.h> | 30 | #include <opie2/oprocess.h> |
31 | 31 | ||
32 | class RecordDialog : public QDialog | 32 | class RecordDialog : public QDialog |
33 | { | 33 | { |
34 | Q_OBJECT | 34 | Q_OBJECT |
35 | public: | 35 | public: |
36 | RecordDialog(QWidget *parent=0, const char *name=0); | 36 | RecordDialog(QWidget *parent=0, const char *name=0); |
37 | public slots: | 37 | public slots: |
38 | void retPressed(); | 38 | void retPressed(); |
39 | void incoming(OProcess *proc, char *buffer, int len); | 39 | void incoming(Opie::Core::OProcess *proc, char *buffer, int len); |
40 | void done(OProcess *proc); | 40 | void done(Opie::Core::OProcess *proc); |
41 | private: | 41 | private: |
42 | QTextView *output; | 42 | QTextView *output; |
43 | QLineEdit *input; | 43 | QLineEdit *input; |
44 | OProcess *record; | 44 | Opie::Core::OProcess *record; |
45 | int where; | 45 | int where; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | #endif | 48 | #endif |
49 | 49 | ||
diff --git a/noncore/tools/remote/remote.pro b/noncore/tools/remote/remote.pro index 660c7f7..8b3e4be 100644 --- a/noncore/tools/remote/remote.pro +++ b/noncore/tools/remote/remote.pro | |||
@@ -1,11 +1,11 @@ | |||
1 | TEMPLATE=app | 1 | TEMPLATE=app |
2 | CONFIG +=qt warn_on release | 2 | CONFIG +=qt warn_on release |
3 | DESTDIR =$(OPIEDIR)/bin | 3 | DESTDIR =$(OPIEDIR)/bin |
4 | HEADERS = remotetab.h learntab.h configtab.h topgroup.h dvdgroup.h channelgroup.h vcrgroup.h buttondialog.h topgroupconf.h dvdgroupconf.h channelgroupconf.h vcrgroupconf.h mainview.h recorddialog.h helptab.h | 4 | HEADERS = remotetab.h learntab.h configtab.h topgroup.h dvdgroup.h channelgroup.h vcrgroup.h buttondialog.h topgroupconf.h dvdgroupconf.h channelgroupconf.h vcrgroupconf.h mainview.h recorddialog.h helptab.h |
5 | SOURCES =remote.cpp remotetab.cpp learntab.cpp configtab.cpp topgroup.cpp dvdgroup.cpp channelgroup.cpp vcrgroup.cpp buttondialog.cpp topgroupconf.cpp dvdgroupconf.cpp channelgroupconf.cpp vcrgroupconf.cpp mainview.cpp recorddialog.cpp helptab.cpp | 5 | SOURCES =remote.cpp remotetab.cpp learntab.cpp configtab.cpp topgroup.cpp dvdgroup.cpp channelgroup.cpp vcrgroup.cpp buttondialog.cpp topgroupconf.cpp dvdgroupconf.cpp channelgroupconf.cpp vcrgroupconf.cpp mainview.cpp recorddialog.cpp helptab.cpp |
6 | INCLUDEPATH+=$(OPIEDIR)/include | 6 | INCLUDEPATH+=$(OPIEDIR)/include |
7 | DEPENDPATH+=$(OPIEDIR)/include | 7 | DEPENDPATH+=$(OPIEDIR)/include |
8 | LIBS +=-lqpe -lopie | 8 | LIBS +=-lqpe -lopiecore2 |
9 | TARGET = remote | 9 | TARGET = remote |
10 | 10 | ||
11 | include ( $(OPIEDIR)/include.pro ) | 11 | include ( $(OPIEDIR)/include.pro ) |