author | harlekin <harlekin> | 2002-05-12 08:39:15 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-05-12 08:39:15 (UTC) |
commit | 8362e586d0fd9a0ad6cea3f26d624a05196a60f8 (patch) (unidiff) | |
tree | 82bd5b113cd9f526c6555888cffbfdd907406eb9 /noncore/tools/remote/mainview.cpp | |
parent | 28e86f19c9da68dca417b531e63e534c4545916b (diff) | |
download | opie-8362e586d0fd9a0ad6cea3f26d624a05196a60f8.zip opie-8362e586d0fd9a0ad6cea3f26d624a05196a60f8.tar.gz opie-8362e586d0fd9a0ad6cea3f26d624a05196a60f8.tar.bz2 |
opie remote control
Diffstat (limited to 'noncore/tools/remote/mainview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/tools/remote/mainview.cpp | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/noncore/tools/remote/mainview.cpp b/noncore/tools/remote/mainview.cpp new file mode 100644 index 0000000..47027fb --- a/dev/null +++ b/noncore/tools/remote/mainview.cpp | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. | ||
3 | Copyright (C) 2002 Thomas Stephens | ||
4 | |||
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 | ||
7 | version. | ||
8 | |||
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 | ||
11 | Public License for more details. | ||
12 | |||
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 | ||
15 | */ | ||
16 | |||
17 | #include "mainview.h" | ||
18 | |||
19 | MainView::MainView(QWidget *parent, const char *name=0) : QWidget(parent, name) | ||
20 | { | ||
21 | setIcon( Resource::loadPixmap( "remote" ) ); | ||
22 | setCaption(tr("Remote") ); | ||
23 | |||
24 | QVBoxLayout *layout = new QVBoxLayout(this); | ||
25 | QTabWidget *tabs = new QTabWidget(this); | ||
26 | |||
27 | layout->addWidget(tabs); | ||
28 | |||
29 | printf("MainView: 1\n"); | ||
30 | remote = new RemoteTab(tabs); | ||
31 | printf("MainView: 2\n"); | ||
32 | learn = new LearnTab(tabs); | ||
33 | printf("MainView: 3\n"); | ||
34 | config = new ConfigTab(tabs); | ||
35 | printf("MainView: 4\n"); | ||
36 | connect(config, SIGNAL(remotesChanged()), this, SLOT(updateRemotesList()) ); | ||
37 | printf("MainView: 5\n"); | ||
38 | |||
39 | remote->setIRSocket(fd); | ||
40 | |||
41 | tabs->addTab(remote, tr("Remote") ); | ||
42 | tabs->addTab(learn,tr("Learn") ); | ||
43 | tabs->addTab(config,tr("Config") ); | ||
44 | |||
45 | printf("1\n"); | ||
46 | cfg = new Config("Remote"); | ||
47 | printf("2\n"); | ||
48 | |||
49 | remote->setConfig(cfg); | ||
50 | config->setConfig(cfg); | ||
51 | } | ||
52 | |||
53 | int MainView::getIRSocket() | ||
54 | { | ||
55 | return fd; | ||
56 | } | ||
57 | |||
58 | void MainView::setIRSocket(int newfd) | ||
59 | { | ||
60 | fd = newfd; | ||
61 | remote->setIRSocket(fd); | ||
62 | } | ||
63 | |||
64 | void MainView::updateRemotesList() | ||
65 | { | ||
66 | remote->updateRemotesList(); | ||
67 | printf("MainView: got remotes changed signal\n"); | ||
68 | } | ||