Diffstat (limited to 'noncore/tools/remote/mainview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/tools/remote/mainview.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/tools/remote/mainview.cpp b/noncore/tools/remote/mainview.cpp index 8c87785..a00a75a 100644 --- a/noncore/tools/remote/mainview.cpp +++ b/noncore/tools/remote/mainview.cpp | |||
@@ -1,54 +1,59 @@ | |||
1 | /* | 1 | /* |
2 | Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. | 2 | 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 "mainview.h" | 17 | #include "mainview.h" |
18 | 18 | ||
19 | #include <opie2/oresource.h> | 19 | #include <opie2/oresource.h> |
20 | 20 | ||
21 | MainView::MainView(QWidget *parent, const char *name) : QWidget(parent, name) | 21 | MainView::MainView(QWidget *parent, const char *name) : QWidget(parent, name) |
22 | { | 22 | { |
23 | setIcon( Opie::Core::OResource::loadPixmap( "remote", Opie::Core::OResource::SmallIcon ) ); | 23 | setIcon( Opie::Core::OResource::loadPixmap( "remote", Opie::Core::OResource::SmallIcon ) ); |
24 | setCaption(tr("Remote") ); | 24 | setCaption(tr("Remote") ); |
25 | 25 | ||
26 | QVBoxLayout *layout = new QVBoxLayout(this); | 26 | QVBoxLayout *layout = new QVBoxLayout(this); |
27 | QTabWidget *tabs = new QTabWidget(this); | 27 | QTabWidget *tabs = new QTabWidget(this); |
28 | 28 | ||
29 | layout->addWidget(tabs); | 29 | layout->addWidget(tabs); |
30 | 30 | ||
31 | remote = new RemoteTab(tabs); | 31 | remote = new RemoteTab(tabs); |
32 | learn = new LearnTab(tabs); | 32 | learn = new LearnTab(tabs); |
33 | config = new ConfigTab(tabs); | 33 | config = new ConfigTab(tabs); |
34 | help = new HelpTab(tabs); | 34 | help = new HelpTab(tabs); |
35 | connect(config, SIGNAL(remotesChanged()), this, SLOT(updateRemotesList()) ); | 35 | connect(config, SIGNAL(remotesChanged()), this, SLOT(updateRemotesList()) ); |
36 | 36 | ||
37 | tabs->addTab(remote, tr("Remote") ); | 37 | tabs->addTab(remote, tr("Remote") ); |
38 | tabs->addTab(learn,tr("Learn") ); | 38 | tabs->addTab(learn,tr("Learn") ); |
39 | tabs->addTab(config,tr("Config") ); | 39 | tabs->addTab(config,tr("Config") ); |
40 | tabs->addTab(help, tr("Help") ); | 40 | tabs->addTab(help, tr("Help") ); |
41 | 41 | ||
42 | printf("1\n"); | 42 | printf("1\n"); |
43 | cfg = new Config("Remote"); | 43 | cfg = new Config("Remote"); |
44 | printf("2\n"); | 44 | printf("2\n"); |
45 | 45 | ||
46 | remote->setConfig(cfg); | 46 | remote->setConfig(cfg); |
47 | config->setConfig(cfg); | 47 | config->setConfig(cfg); |
48 | } | 48 | } |
49 | 49 | ||
50 | void MainView::updateRemotesList() | 50 | void MainView::updateRemotesList() |
51 | { | 51 | { |
52 | remote->updateRemotesList(); | 52 | remote->updateRemotesList(); |
53 | printf("MainView: got remotes changed signal\n"); | 53 | printf("MainView: got remotes changed signal\n"); |
54 | } | 54 | } |
55 | |||
56 | void MainView::updateLearnTab() | ||
57 | { | ||
58 | learn->updateRemotesList(); | ||
59 | } | ||