summaryrefslogtreecommitdiff
authorspiralman <spiralman>2002-07-23 22:39:56 (UTC)
committer spiralman <spiralman>2002-07-23 22:39:56 (UTC)
commit17068d35cc662a1cace883cfa98bb1f21534cb41 (patch) (unidiff)
tree62cbc086c8d1a3af4acff547dafa80f8c930f8be
parent7b69ef59464072521adb20148d49f9c654c066ee (diff)
downloadopie-17068d35cc662a1cace883cfa98bb1f21534cb41.zip
opie-17068d35cc662a1cace883cfa98bb1f21534cb41.tar.gz
opie-17068d35cc662a1cace883cfa98bb1f21534cb41.tar.bz2
made it compilable again
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/remote/recorddialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/tools/remote/recorddialog.cpp b/noncore/tools/remote/recorddialog.cpp
index 642e99c..f7cd30c 100644
--- a/noncore/tools/remote/recorddialog.cpp
+++ b/noncore/tools/remote/recorddialog.cpp
@@ -1,81 +1,81 @@
1/* 1/*
2Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. 2Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie.
3Copyright (C) 2002 Thomas Stephens 3Copyright (C) 2002 Thomas Stephens
4 4
5This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public 5This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
6License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later 6License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
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
19RecordDialog::RecordDialog(QWidget *parent=0, const char *name=0):QDialog(parent, name) 19RecordDialog::RecordDialog(QWidget *parent=0, const char *name=0):QDialog(parent, name)
20{ 20{
21 QVBoxLayout *layout = new QVBoxLayout(this); 21 QVBoxLayout *layout = new QVBoxLayout(this);
22 QHBoxLayout *hlayout = new QHBoxLayout(this); 22 QHBoxLayout *hlayout = new QHBoxLayout(this);
23 23
24 layout->insertSpacing(0,5); 24 layout->insertSpacing(0,5);
25 output = new QTextView("Please enter the name of the new remote, and press Return\n", 0, this, "output"); 25 output = new QTextView("Please enter the name of the new remote, and press Return\n", 0, this, "output");
26 layout->insertWidget(-1, output); 26 layout->insertWidget(-1, output);
27 layout->insertSpacing(-1, 5); 27 layout->insertSpacing(-1, 5);
28 layout->insertLayout(-1, hlayout); 28 layout->insertLayout(-1, hlayout);
29 layout->insertSpacing(-1, 5); 29 layout->insertSpacing(-1, 5);
30 30
31 hlayout->insertSpacing(0, 5); 31 hlayout->insertSpacing(0, 5);
32 input = new QLineEdit(this, "input"); 32 input = new QLineEdit(this, "input");
33 hlayout->insertWidget(-1, input, 1); 33 hlayout->insertWidget(-1, input, 1);
34 hlayout->insertSpacing(-1, 5); 34 hlayout->insertSpacing(-1, 5);
35 35
36 QPushButton *ret = new QPushButton("Return", this, "return"); 36 QPushButton *ret = new QPushButton("Return", this, "return");
37 hlayout->insertWidget(-1, ret); 37 hlayout->insertWidget(-1, ret);
38 hlayout->insertSpacing(-1, 5); 38 hlayout->insertSpacing(-1, 5);
39 connect(ret, SIGNAL(clicked()), this, SLOT(retPressed()) ); 39 connect(ret, SIGNAL(clicked()), this, SLOT(retPressed()) );
40 where = 0; 40 where = 0;
41 41
42 record = new OProcess; 42 record = new OProcess;
43} 43}
44 44
45void RecordDialog::retPressed() 45void RecordDialog::retPressed()
46{ 46{
47 printf("RecordDialog::retPressed: ret pressed\n"); 47 printf("RecordDialog::retPressed: ret pressed\n");
48 48
49 if(where == 0) 49 if(where == 0)
50 { 50 {
51 connect(record, SIGNAL(receivedStdout(OProcess *, char *, int)), this, SLOT(incoming(OProcess *, char *, int)) ); 51 connect(record, SIGNAL(receivedStdout(OProcess *, char *, int)), this, SLOT(incoming(OProcess *, char *, int)) );
52 connect(record, SIGNAL(receivedStderr(OProcess *, char *, int)), this, SLOT(incoming(OProcess *, char *, int)) ); 52 connect(record, SIGNAL(receivedStderr(OProcess *, char *, int)), this, SLOT(incoming(OProcess *, char *, int)) );
53 connect(record, SIGNAL(processExited(OProcess *)), this, SLOT(done(OProcess *)) ); 53 connect(record, SIGNAL(processExited(OProcess *)), this, SLOT(done(OProcess *)) );
54 printf("RecordDialog::retPressed: starting irrecord\n"); 54 printf("RecordDialog::retPressed: starting irrecord\n");
55 QString file = "/tmp/" + input->text(); 55 QString file = "/tmp/" + input->text();
56 *record<<"irrecord"<<file.latin1(); 56 *record<<"irrecord"<<file.latin1();
57 if(!record->start(OProcess::NotifyOnExit, OProcess::AllOutput)) 57 if(!record->start(OProcess::NotifyOnExit, OProcess::AllOutput))
58 { 58 {
59 QMessageBox *mb = new QMessageBox("Error!", 59 QMessageBox *mb = new QMessageBox("Error!",
60 "Could not start irrecord. You must<br>use an lirc ipkg that includes<br>irrecord", 60 "Could not start irrecord. You must<br>use an lirc ipkg that includes<br>irrecord",
61 QMessageBox::NoIcon, 61 QMessageBox::NoIcon,
62 QMessageBox::Ok, 62 QMessageBox::Ok,
63 QMessageBox::NoButton, 63 QMessageBox::NoButton,
64 QMessageBox::NoButton); 64 QMessageBox::NoButton);
65 mb->exec(); 65 mb->exec();
66 return; 66 return;
67 } 67 }
68 // record->resume(); 68 // record->resume();
69 where = 1; 69 where = 1;
70 } 70 }
71} 71}
72 72
73void RecordDialog::incoming(OProcess *proc, char *buffer, int len) 73void RecordDialog::incoming(OProcess *proc, char *buffer, int len)
74{ 74{
75 output->setText(output->text() + QString(buffer).truncate(len-1)); 75 //output->setText(output->text() + QString(buffer).truncate(len-1));
76 printf("RecordDialog::incoming: got text from irrecord\n"); 76 printf("RecordDialog::incoming: got text from irrecord\n");
77} 77}
78 78
79void RecordDialog::done(OProcess *proc) 79void RecordDialog::done(OProcess *proc)
80{ 80{
81} 81}