Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

topgroup.cpp

Go to the documentation of this file.
00001 /*
00002 Opie-Remote.  emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie.
00003 Copyright (C) 2002 Thomas Stephens
00004 
00005 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
00006 License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
00007 version.
00008 
00009 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
00010 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
00011 Public License for more details.
00012 
00013 You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
00014 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00015 */
00016 
00017 #include "topgroup.h"
00018 
00019 TopGroup::TopGroup(QWidget *parent, const char *name):QWidget(parent,name)
00020 {
00021         QHBoxLayout *layout = new QHBoxLayout(this, 0, -1, 0);
00022 
00023         QPushButton *power = new QPushButton("Power",this,"power");
00024         layout->addWidget(power);
00025         connect(power, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00026 //      power->setGeometry(5, 5,40, 20);
00027 
00028         layout->addSpacing(5);
00029 
00030         QPushButton *source = new QPushButton("Source",this,"source");
00031         layout->addWidget(source);
00032         connect(source, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00033         //      source->setGeometry(50,5,40,20);
00034 
00035         remotes = new QComboBox(false, this, "remotes");
00036         connect(remotes, SIGNAL(activated(const QString&)), this->parentWidget(), SLOT(remoteSelected(const QString&)) );
00037         remotes->insertItem("Select Remote");
00038 //      remotes->setGeometry(135,5,95,20);
00039 
00040         QLabel *remoteLabel = new QLabel(remotes, "Remote: ",this,"remoteLabel");
00041 //      remoteLabel->setGeometry(90,5,40,20);
00042         remoteLabel->setAlignment(AlignRight | AlignVCenter);
00043 
00044         layout->addWidget(remoteLabel);
00045         layout->addWidget(remotes);
00046 }
00047 
00048 void TopGroup::updateRemotes(Config *cfg)
00049 {
00050         remotes->clear();
00051         remotes->insertItem(QString("SelectRemote"));
00052         cfg->setGroup("Remotes");
00053         remotes->insertStringList(cfg->readListEntry("remoteList", ',') );
00054 }

Generated on Sat Nov 5 16:18:03 2005 for OPIE by  doxygen 1.4.2