Diffstat (limited to 'noncore/tools/remote/mainview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/tools/remote/mainview.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/noncore/tools/remote/mainview.cpp b/noncore/tools/remote/mainview.cpp index a7be9e3..eaba7df 100644 --- a/noncore/tools/remote/mainview.cpp +++ b/noncore/tools/remote/mainview.cpp | |||
@@ -5,63 +5,60 @@ Copyright (C) 2002 Thomas Stephens | |||
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 | MainView::MainView(QWidget *parent, const char *name) : QWidget(parent, name) | 19 | MainView::MainView(QWidget *parent, const char *name) : QWidget(parent, name) |
20 | { | 20 | { |
21 | setIcon( Resource::loadPixmap( "remote" ) ); | 21 | setIcon( Resource::loadPixmap( "remote" ) ); |
22 | setCaption(tr("Remote") ); | 22 | setCaption(tr("Remote") ); |
23 | 23 | ||
24 | QVBoxLayout *layout = new QVBoxLayout(this); | 24 | QVBoxLayout *layout = new QVBoxLayout(this); |
25 | QTabWidget *tabs = new QTabWidget(this); | 25 | QTabWidget *tabs = new QTabWidget(this); |
26 | 26 | ||
27 | layout->addWidget(tabs); | 27 | layout->addWidget(tabs); |
28 | 28 | ||
29 | printf("MainView: 1\n"); | ||
30 | remote = new RemoteTab(tabs); | 29 | remote = new RemoteTab(tabs); |
31 | printf("MainView: 2\n"); | ||
32 | learn = new LearnTab(tabs); | 30 | learn = new LearnTab(tabs); |
33 | printf("MainView: 3\n"); | ||
34 | config = new ConfigTab(tabs); | 31 | config = new ConfigTab(tabs); |
35 | printf("MainView: 4\n"); | 32 | help = new HelpTab(tabs); |
36 | connect(config, SIGNAL(remotesChanged()), this, SLOT(updateRemotesList()) ); | 33 | connect(config, SIGNAL(remotesChanged()), this, SLOT(updateRemotesList()) ); |
37 | printf("MainView: 5\n"); | ||
38 | 34 | ||
39 | remote->setIRSocket(fd); | 35 | remote->setIRSocket(fd); |
40 | 36 | ||
41 | tabs->addTab(remote, tr("Remote") ); | 37 | tabs->addTab(remote, tr("Remote") ); |
42 | tabs->addTab(learn,tr("Learn") ); | 38 | tabs->addTab(learn,tr("Learn") ); |
43 | tabs->addTab(config,tr("Config") ); | 39 | tabs->addTab(config,tr("Config") ); |
40 | tabs->addTab(help, tr("Help") ); | ||
44 | 41 | ||
45 | printf("1\n"); | 42 | printf("1\n"); |
46 | cfg = new Config("Remote"); | 43 | cfg = new Config("Remote"); |
47 | printf("2\n"); | 44 | printf("2\n"); |
48 | 45 | ||
49 | remote->setConfig(cfg); | 46 | remote->setConfig(cfg); |
50 | config->setConfig(cfg); | 47 | config->setConfig(cfg); |
51 | } | 48 | } |
52 | 49 | ||
53 | int MainView::getIRSocket() | 50 | int MainView::getIRSocket() |
54 | { | 51 | { |
55 | return fd; | 52 | return fd; |
56 | } | 53 | } |
57 | 54 | ||
58 | void MainView::setIRSocket(int newfd) | 55 | void MainView::setIRSocket(int newfd) |
59 | { | 56 | { |
60 | fd = newfd; | 57 | fd = newfd; |
61 | remote->setIRSocket(fd); | 58 | remote->setIRSocket(fd); |
62 | } | 59 | } |
63 | 60 | ||
64 | void MainView::updateRemotesList() | 61 | void MainView::updateRemotesList() |
65 | { | 62 | { |
66 | remote->updateRemotesList(); | 63 | remote->updateRemotesList(); |
67 | printf("MainView: got remotes changed signal\n"); | 64 | printf("MainView: got remotes changed signal\n"); |