summaryrefslogtreecommitdiff
path: root/noncore/tools/remote
authorzecke <zecke>2004-03-14 15:07:48 (UTC)
committer zecke <zecke>2004-03-14 15:07:48 (UTC)
commit8a243adc61fc9c8a48fa9061f0eba12c7b345d70 (patch) (unidiff)
tree8f240482113d5588c4fb73769a2ced2ccdb87fb9 /noncore/tools/remote
parent346288b5a95b72a84fabe9acb2e32aa8a8388c8c (diff)
downloadopie-8a243adc61fc9c8a48fa9061f0eba12c7b345d70.zip
opie-8a243adc61fc9c8a48fa9061f0eba12c7b345d70.tar.gz
opie-8a243adc61fc9c8a48fa9061f0eba12c7b345d70.tar.bz2
Opie2 and ODP changes
Also try to make signals/slots syntax obey the namespaces
Diffstat (limited to 'noncore/tools/remote') (more/less context) (show whitespace changes)
-rw-r--r--noncore/tools/remote/config.in2
-rw-r--r--noncore/tools/remote/recorddialog.cpp8
-rw-r--r--noncore/tools/remote/recorddialog.h8
-rw-r--r--noncore/tools/remote/remote.pro2
4 files changed, 11 insertions, 9 deletions
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
@@ -7,24 +7,26 @@ License as published by the Free Software Foundation; either version 2 of the Li
7version. 7version.
8 8
9This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 9This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
10implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11Public License for more details. 11Public License for more details.
12 12
13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free 13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14Software 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
19using namespace Opie::Core;
20using namespace Opie::Core;
19RecordDialog::RecordDialog(QWidget *parent, const char *name) 21RecordDialog::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);
@@ -40,27 +42,27 @@ RecordDialog::RecordDialog(QWidget *parent, const char *name)
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
46void RecordDialog::retPressed() 48void 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();
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
@@ -18,32 +18,32 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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
32class RecordDialog : public QDialog 32class RecordDialog : public QDialog
33{ 33{
34 Q_OBJECT 34 Q_OBJECT
35public: 35public:
36 RecordDialog(QWidget *parent=0, const char *name=0); 36 RecordDialog(QWidget *parent=0, const char *name=0);
37public slots: 37public 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);
41private: 41private:
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
9TARGET = remote 9TARGET = remote
10 10
11include ( $(OPIEDIR)/include.pro ) 11include ( $(OPIEDIR)/include.pro )