summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/remote/dvdgroup.h1
-rw-r--r--noncore/tools/remote/mainview.cpp4
-rw-r--r--noncore/tools/remote/mainview.h1
-rw-r--r--noncore/tools/remote/remote.cpp1
-rw-r--r--noncore/tools/remote/vcrgroup.h1
5 files changed, 3 insertions, 5 deletions
diff --git a/noncore/tools/remote/dvdgroup.h b/noncore/tools/remote/dvdgroup.h
index 04c301b..c9fe347 100644
--- a/noncore/tools/remote/dvdgroup.h
+++ b/noncore/tools/remote/dvdgroup.h
@@ -1,27 +1,26 @@
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 <qwidget.h> 17#include <qwidget.h>
18#include <qpushbutton.h> 18#include <qpushbutton.h>
19#include <qlayout.h> 19#include <qlayout.h>
20#include <qpe/resource.h>
21#include <qiconset.h> 20#include <qiconset.h>
22 21
23class DVDGroup : public QWidget 22class DVDGroup : public QWidget
24{ 23{
25public: 24public:
26 DVDGroup(QWidget *parent=0, const char *name=0); 25 DVDGroup(QWidget *parent=0, const char *name=0);
27}; 26};
diff --git a/noncore/tools/remote/mainview.cpp b/noncore/tools/remote/mainview.cpp
index eaba7df..724eba9 100644
--- a/noncore/tools/remote/mainview.cpp
+++ b/noncore/tools/remote/mainview.cpp
@@ -1,65 +1,67 @@
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 "mainview.h" 17#include "mainview.h"
18 18
19#include <opie2/oresource.h>
20
19MainView::MainView(QWidget *parent, const char *name) : QWidget(parent, name) 21MainView::MainView(QWidget *parent, const char *name) : QWidget(parent, name)
20{ 22{
21 setIcon( Resource::loadPixmap( "remote" ) ); 23 setIcon( Opie::Core::OResource::loadPixmap( "remote", Opie::Core::OResource::SmallIcon ) );
22 setCaption(tr("Remote") ); 24 setCaption(tr("Remote") );
23 25
24 QVBoxLayout *layout = new QVBoxLayout(this); 26 QVBoxLayout *layout = new QVBoxLayout(this);
25 QTabWidget *tabs = new QTabWidget(this); 27 QTabWidget *tabs = new QTabWidget(this);
26 28
27 layout->addWidget(tabs); 29 layout->addWidget(tabs);
28 30
29 remote = new RemoteTab(tabs); 31 remote = new RemoteTab(tabs);
30 learn = new LearnTab(tabs); 32 learn = new LearnTab(tabs);
31 config = new ConfigTab(tabs); 33 config = new ConfigTab(tabs);
32 help = new HelpTab(tabs); 34 help = new HelpTab(tabs);
33 connect(config, SIGNAL(remotesChanged()), this, SLOT(updateRemotesList()) ); 35 connect(config, SIGNAL(remotesChanged()), this, SLOT(updateRemotesList()) );
34 36
35 remote->setIRSocket(fd); 37 remote->setIRSocket(fd);
36 38
37 tabs->addTab(remote, tr("Remote") ); 39 tabs->addTab(remote, tr("Remote") );
38 tabs->addTab(learn,tr("Learn") ); 40 tabs->addTab(learn,tr("Learn") );
39 tabs->addTab(config,tr("Config") ); 41 tabs->addTab(config,tr("Config") );
40 tabs->addTab(help, tr("Help") ); 42 tabs->addTab(help, tr("Help") );
41 43
42 printf("1\n"); 44 printf("1\n");
43 cfg = new Config("Remote"); 45 cfg = new Config("Remote");
44 printf("2\n"); 46 printf("2\n");
45 47
46 remote->setConfig(cfg); 48 remote->setConfig(cfg);
47 config->setConfig(cfg); 49 config->setConfig(cfg);
48} 50}
49 51
50int MainView::getIRSocket() 52int MainView::getIRSocket()
51{ 53{
52 return fd; 54 return fd;
53} 55}
54 56
55void MainView::setIRSocket(int newfd) 57void MainView::setIRSocket(int newfd)
56{ 58{
57 fd = newfd; 59 fd = newfd;
58 remote->setIRSocket(fd); 60 remote->setIRSocket(fd);
59} 61}
60 62
61void MainView::updateRemotesList() 63void MainView::updateRemotesList()
62{ 64{
63 remote->updateRemotesList(); 65 remote->updateRemotesList();
64 printf("MainView: got remotes changed signal\n"); 66 printf("MainView: got remotes changed signal\n");
65} 67}
diff --git a/noncore/tools/remote/mainview.h b/noncore/tools/remote/mainview.h
index e93da5c..7ea82a6 100644
--- a/noncore/tools/remote/mainview.h
+++ b/noncore/tools/remote/mainview.h
@@ -1,56 +1,55 @@
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 <qpe/qpeapplication.h> 17#include <qpe/qpeapplication.h>
18#include <qpe/resource.h>
19#include <qpe/config.h> 18#include <qpe/config.h>
20#include <qpushbutton.h> 19#include <qpushbutton.h>
21#include <qtabwidget.h> 20#include <qtabwidget.h>
22#include <qlayout.h> 21#include <qlayout.h>
23#include <qmessagebox.h> 22#include <qmessagebox.h>
24#include <qpaintdevice.h> 23#include <qpaintdevice.h>
25#include <qobject.h> 24#include <qobject.h>
26#include <sys/socket.h> 25#include <sys/socket.h>
27#include <sys/types.h> 26#include <sys/types.h>
28#include <sys/un.h> 27#include <sys/un.h>
29#include <unistd.h> 28#include <unistd.h>
30#include <stdio.h> 29#include <stdio.h>
31#include <signal.h> 30#include <signal.h>
32 31
33#include "remotetab.h" 32#include "remotetab.h"
34#include "learntab.h" 33#include "learntab.h"
35#include "configtab.h" 34#include "configtab.h"
36#include "helptab.h" 35#include "helptab.h"
37 36
38#define BUFFERSIZE 256 37#define BUFFERSIZE 256
39 38
40class MainView : public QWidget 39class MainView : public QWidget
41{ 40{
42 Q_OBJECT 41 Q_OBJECT
43public: 42public:
44 MainView(QWidget *parent=0, const char *name=0); 43 MainView(QWidget *parent=0, const char *name=0);
45 int getIRSocket(); 44 int getIRSocket();
46 void setIRSocket(int newfd); 45 void setIRSocket(int newfd);
47public slots: 46public slots:
48 void updateRemotesList(); 47 void updateRemotesList();
49private: 48private:
50 int fd; 49 int fd;
51 RemoteTab *remote; 50 RemoteTab *remote;
52 ConfigTab *config; 51 ConfigTab *config;
53 LearnTab *learn; 52 LearnTab *learn;
54 HelpTab *help; 53 HelpTab *help;
55 Config *cfg; 54 Config *cfg;
56}; 55};
diff --git a/noncore/tools/remote/remote.cpp b/noncore/tools/remote/remote.cpp
index 638629f..35d06bc 100644
--- a/noncore/tools/remote/remote.cpp
+++ b/noncore/tools/remote/remote.cpp
@@ -1,106 +1,105 @@
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 "mainview.h" 17#include "mainview.h"
18 18
19/* OPIE */ 19/* OPIE */
20#include <qpe/qpeapplication.h> 20#include <qpe/qpeapplication.h>
21#include <qpe/resource.h>
22#include <qpe/config.h> 21#include <qpe/config.h>
23 22
24/* QT */ 23/* QT */
25#include <qpushbutton.h> 24#include <qpushbutton.h>
26#include <qtabwidget.h> 25#include <qtabwidget.h>
27#include <qlayout.h> 26#include <qlayout.h>
28#include <qmessagebox.h> 27#include <qmessagebox.h>
29#include <qpaintdevice.h> 28#include <qpaintdevice.h>
30#include <qobject.h> 29#include <qobject.h>
31 30
32/* STD */ 31/* STD */
33#include <sys/socket.h> 32#include <sys/socket.h>
34#include <sys/types.h> 33#include <sys/types.h>
35#include <sys/un.h> 34#include <sys/un.h>
36#include <unistd.h> 35#include <unistd.h>
37#include <stdio.h> 36#include <stdio.h>
38#include <signal.h> 37#include <signal.h>
39 38
40 39
41/*void reconnect(int &fd) 40/*void reconnect(int &fd)
42{ 41{
43 //struct sockaddr_un addr; 42 //struct sockaddr_un addr;
44 43
45 addr.sun_family=AF_UNIX; 44 addr.sun_family=AF_UNIX;
46 strcpy(addr.sun_path,"/dev/lircd"); 45 strcpy(addr.sun_path,"/dev/lircd");
47 fd = socket(AF_UNIX, SOCK_STREAM, 0); 46 fd = socket(AF_UNIX, SOCK_STREAM, 0);
48 47
49 if(connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1) 48 if(connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1)
50 { 49 {
51 QMessageBox *mb = new QMessageBox("error", 50 QMessageBox *mb = new QMessageBox("error",
52 "couldnt connect to socket", 51 "couldnt connect to socket",
53 QMessageBox::NoIcon, 52 QMessageBox::NoIcon,
54 QMessageBox::Ok, 53 QMessageBox::Ok,
55 QMessageBox::NoButton, 54 QMessageBox::NoButton,
56 QMessageBox::NoButton); 55 QMessageBox::NoButton);
57 mb->exec(); 56 mb->exec();
58 } 57 }
59} 58}
60*/ 59*/
61 60
62int main( int argc, char **argv ) 61int main( int argc, char **argv )
63{ 62{
64 QPEApplication a( argc, argv ); 63 QPEApplication a( argc, argv );
65 MainView w; 64 MainView w;
66 65
67 int fd; 66 int fd;
68 //struct sockaddr_un addr; 67 //struct sockaddr_un addr;
69 //char read_buffer[BUFFERSIZE+1]; 68 //char read_buffer[BUFFERSIZE+1];
70 //char write_buffer[] = "LIST\n"; 69 //char write_buffer[] = "LIST\n";
71 70
72 //addr.sun_family=AF_UNIX; 71 //addr.sun_family=AF_UNIX;
73 //strcpy(addr.sun_path,"/dev/lircd"); 72 //strcpy(addr.sun_path,"/dev/lircd");
74 //fd = socket(AF_UNIX, SOCK_STREAM, 0); 73 //fd = socket(AF_UNIX, SOCK_STREAM, 0);
75 74
76 //printf("fd1: %d\n", fd); 75 //printf("fd1: %d\n", fd);
77 /* 76 /*
78 if(connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1) 77 if(connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1)
79 { 78 {
80 QMessageBox *mb = new QMessageBox("error", 79 QMessageBox *mb = new QMessageBox("error",
81 "couldnt connect to socket", 80 "couldnt connect to socket",
82 QMessageBox::NoIcon, 81 QMessageBox::NoIcon,
83 QMessageBox::Ok, 82 QMessageBox::Ok,
84 QMessageBox::NoButton, 83 QMessageBox::NoButton,
85 QMessageBox::NoButton); 84 QMessageBox::NoButton);
86 mb->exec(); 85 mb->exec();
87 } 86 }
88 */ 87 */
89 88
90 //printf("%d\n", write(fd, write_buffer, sizeof(write_buffer) ) ); 89 //printf("%d\n", write(fd, write_buffer, sizeof(write_buffer) ) );
91 90
92 //printf("%d\n", read(fd, read_buffer, BUFFERSIZE ) ); 91 //printf("%d\n", read(fd, read_buffer, BUFFERSIZE ) );
93 92
94 //QMessageBox *mbtest = new QMessageBox("lirc test", 93 //QMessageBox *mbtest = new QMessageBox("lirc test",
95 // *new QString((const char *) read_buffer), 94 // *new QString((const char *) read_buffer),
96 // QMessageBox::NoIcon, 95 // QMessageBox::NoIcon,
97 // QMessageBox::Ok, 96 // QMessageBox::Ok,
98 // QMessageBox::NoButton, 97 // QMessageBox::NoButton,
99 // QMessageBox::NoButton); 98 // QMessageBox::NoButton);
100 //mbtest->exec(); 99 //mbtest->exec();
101 100
102 a.setMainWidget( &w ); 101 a.setMainWidget( &w );
103 w.setIRSocket(fd); 102 w.setIRSocket(fd);
104 QPEApplication::showWidget( &w ); 103 QPEApplication::showWidget( &w );
105 return a.exec(); 104 return a.exec();
106} 105}
diff --git a/noncore/tools/remote/vcrgroup.h b/noncore/tools/remote/vcrgroup.h
index fe40e42..dac31fd 100644
--- a/noncore/tools/remote/vcrgroup.h
+++ b/noncore/tools/remote/vcrgroup.h
@@ -1,27 +1,26 @@
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 <qwidget.h> 17#include <qwidget.h>
18#include <qpushbutton.h> 18#include <qpushbutton.h>
19#include <qlayout.h> 19#include <qlayout.h>
20#include <qpe/resource.h>
21#include <qiconset.h> 20#include <qiconset.h>
22 21
23class VCRGroup : public QWidget 22class VCRGroup : public QWidget
24{ 23{
25public: 24public:
26 VCRGroup(QWidget *parent=0, const char *name=0); 25 VCRGroup(QWidget *parent=0, const char *name=0);
27}; 26};