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

topgroupconf.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 "topgroupconf.h"
00018 
00019 TopGroupConf::TopGroupConf(QWidget *parent, const char *name):QWidget(parent,name)
00020 {
00021         QHBoxLayout *layout = new QHBoxLayout(this);
00022 
00023         QPushButton *power = new QPushButton("Power",this,"power");
00024         layout->addWidget(power);
00025         connect(power, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
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(buttonPressed()) );
00033         //      source->setGeometry(50,5,40,20);
00034 
00035         remotes = new QComboBox(true, this, "remotes");
00036         remotes->insertItem(QString("Remotes"));
00037         layout->addWidget(remotes);
00038         layout->setStretchFactor(remotes, 1);
00039         connect(remotes, SIGNAL(activated(const QString&)), this->parentWidget(), SLOT(remoteSelected(const QString&)) );
00040 
00041 
00042         QPushButton *newrem = new QPushButton("New", this, "new");
00043         layout->addWidget(newrem);
00044         connect(newrem, SIGNAL(pressed()), this->parentWidget(), SLOT(newPressed()) );
00045 
00046 
00047 /*      remotes = new QComboBox(false, this, "remotes");
00048         connect(remotes, SIGNAL(activated(const QString&)), this->parentWidget(), SLOT(remoteSelected(const QString&)) );
00049         remotes->insertItem("Select Remote");
00050 //      remotes->setGeometry(135,5,95,20);
00051 
00052         QLabel *remoteLabel = new QLabel(remotes, "Remote: ",this,"remoteLabel");
00053 //      remoteLabel->setGeometry(90,5,40,20);
00054         remoteLabel->setAlignment(AlignRight | AlignVCenter);
00055 
00056         layout->addWidget(remoteLabel);
00057         layout->addWidget(remotes);
00058 */
00059 }
00060 
00061 void TopGroupConf::updateRemotes(QStringList list)
00062 {
00063         remotes->insertStringList(list);
00064 }
00065 
00066 QString TopGroupConf::getRemotesText()
00067 {
00068         return remotes->currentText();
00069 }
00070 

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