summaryrefslogtreecommitdiff
path: root/noncore/tools/remote/topgroupconf.cpp
blob: 0419a65cb21bbe3a2f8913e53f0c592e9269967b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
Opie-Remote.  emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie.
Copyright (C) 2002 Thomas Stephens

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include "topgroupconf.h"

TopGroupConf::TopGroupConf(QWidget *parent, const char *name):QWidget(parent,name)
{
	QHBoxLayout *layout = new QHBoxLayout(this);

	QPushButton *power = new QPushButton("Power",this,"power");
	layout->addWidget(power);
	connect(power, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
//	power->setGeometry(5, 5,40, 20);

	layout->addSpacing(5);

	QPushButton *source = new QPushButton("Source",this,"source");
	layout->addWidget(source);
	connect(source, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
	//	source->setGeometry(50,5,40,20);

	remotes = new QComboBox(true, this, "remotes");
	remotes->insertItem(QString("Remotes"));
	layout->addWidget(remotes);
	layout->setStretchFactor(remotes, 1);
	connect(remotes, SIGNAL(activated(const QString&)), this->parentWidget(), SLOT(remoteSelected(const QString&)) );


	QPushButton *newrem = new QPushButton("New", this, "new");
	layout->addWidget(newrem);
	connect(newrem, SIGNAL(pressed()), this->parentWidget(), SLOT(newPressed()) );


/*	remotes = new QComboBox(false, this, "remotes");
	connect(remotes, SIGNAL(activated(const QString&)), this->parentWidget(), SLOT(remoteSelected(const QString&)) );
	remotes->insertItem("Select Remote");
//	remotes->setGeometry(135,5,95,20);

	QLabel *remoteLabel = new QLabel(remotes, "Remote: ",this,"remoteLabel");
//	remoteLabel->setGeometry(90,5,40,20);
	remoteLabel->setAlignment(AlignRight | AlignVCenter);

	layout->addWidget(remoteLabel);
	layout->addWidget(remotes);
*/
}

void TopGroupConf::updateRemotes(QStringList list)
{
	remotes->insertStringList(list);
}

QString TopGroupConf::getRemotesText()
{
	return remotes->currentText();
}