Diffstat (limited to 'noncore/tools/remote/configtab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/tools/remote/configtab.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/tools/remote/configtab.cpp b/noncore/tools/remote/configtab.cpp index f5896a9..17cdc6a 100644 --- a/noncore/tools/remote/configtab.cpp +++ b/noncore/tools/remote/configtab.cpp | |||
@@ -1,67 +1,67 @@ | |||
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 "configtab.h" | 17 | #include "configtab.h" |
18 | 18 | ||
19 | ConfigTab::ConfigTab(QWidget *parent=0, const char *name=0):QWidget(parent,name) | 19 | ConfigTab::ConfigTab(QWidget *parent, const char *name):QWidget(parent,name) |
20 | { | 20 | { |
21 | 21 | ||
22 | QVBoxLayout *layout = new QVBoxLayout(this); | 22 | QVBoxLayout *layout = new QVBoxLayout(this); |
23 | 23 | ||
24 | topGroupConf = new TopGroupConf(this, "topGroupConf"); | 24 | topGroupConf = new TopGroupConf(this, "topGroupConf"); |
25 | layout->addWidget(topGroupConf, 1); | 25 | layout->addWidget(topGroupConf, 1); |
26 | layout->addSpacing(1); | 26 | layout->addSpacing(1); |
27 | 27 | ||
28 | dvdGroupConf = new DVDGroupConf(this, "dvdGroupConf"); | 28 | dvdGroupConf = new DVDGroupConf(this, "dvdGroupConf"); |
29 | layout->addWidget(dvdGroupConf, 1); | 29 | layout->addWidget(dvdGroupConf, 1); |
30 | layout->addSpacing(1); | 30 | layout->addSpacing(1); |
31 | 31 | ||
32 | vcrGroupConf = new VCRGroupConf(this, "vcrGroupConf"); | 32 | vcrGroupConf = new VCRGroupConf(this, "vcrGroupConf"); |
33 | layout->addWidget(vcrGroupConf, 1); | 33 | layout->addWidget(vcrGroupConf, 1); |
34 | layout->addSpacing(1); | 34 | layout->addSpacing(1); |
35 | 35 | ||
36 | channelGroupConf = new ChannelGroupConf(this, "channelGroupConf"); | 36 | channelGroupConf = new ChannelGroupConf(this, "channelGroupConf"); |
37 | layout->addWidget(channelGroupConf, 1); | 37 | layout->addWidget(channelGroupConf, 1); |
38 | 38 | ||
39 | 39 | ||
40 | } | 40 | } |
41 | 41 | ||
42 | void ConfigTab::setConfig(Config *newCfg) | 42 | void ConfigTab::setConfig(Config *newCfg) |
43 | { | 43 | { |
44 | cfg = newCfg; | 44 | cfg = newCfg; |
45 | cfg->setGroup("Remotes"); | 45 | cfg->setGroup("Remotes"); |
46 | topGroupConf->updateRemotes(cfg->readListEntry("remoteList", ',') ); | 46 | topGroupConf->updateRemotes(cfg->readListEntry("remoteList", ',') ); |
47 | cfg->setGroup("Default"); | 47 | cfg->setGroup("Default"); |
48 | const QObject *obj; | 48 | const QObject *obj; |
49 | 49 | ||
50 | const QObjectList *objList = topGroupConf->children(); | 50 | const QObjectList *objList = topGroupConf->children(); |
51 | for(obj = ((QObjectList *)objList)->first(); obj != 0; obj=((QObjectList *)objList)->next()) | 51 | for(obj = ((QObjectList *)objList)->first(); obj != 0; obj=((QObjectList *)objList)->next()) |
52 | { | 52 | { |
53 | if(obj->inherits("QPushButton")) | 53 | if(obj->inherits("QPushButton")) |
54 | { | 54 | { |
55 | if(!cfg->hasKey((QString)obj->name()+"Label")) | 55 | if(!cfg->hasKey((QString)obj->name()+"Label")) |
56 | { | 56 | { |
57 | cfg->writeEntry((QString)obj->name()+"Label", ((QPushButton *)obj)->text()); | 57 | cfg->writeEntry((QString)obj->name()+"Label", ((QPushButton *)obj)->text()); |
58 | } | 58 | } |
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
62 | objList = dvdGroupConf->children(); | 62 | objList = dvdGroupConf->children(); |
63 | for(obj = ((QObjectList *)objList)->first(); obj != 0; obj=((QObjectList *)objList)->next()) | 63 | for(obj = ((QObjectList *)objList)->first(); obj != 0; obj=((QObjectList *)objList)->next()) |
64 | { | 64 | { |
65 | if(obj->inherits("QPushButton")) | 65 | if(obj->inherits("QPushButton")) |
66 | { | 66 | { |
67 | if(!cfg->hasKey((QString)obj->name()+"Label")) | 67 | if(!cfg->hasKey((QString)obj->name()+"Label")) |