00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "channelgroup.h"
00018
00019 ChannelGroup::ChannelGroup(QWidget *parent, const char *name):QWidget(parent,name)
00020 {
00021 QGridLayout *layout = new QGridLayout(this);
00022 QVBoxLayout *volLayout = new QVBoxLayout(this);
00023 QVBoxLayout *chanLayout = new QVBoxLayout(this);
00024
00025 layout->addRowSpacing(1,1);
00026 layout->addRowSpacing(3,1);
00027 layout->addRowSpacing(5,1);
00028
00029 layout->addColSpacing(1,1);
00030 layout->addColSpacing(3,1);
00031 layout->addColSpacing(5,1);
00032 layout->addColSpacing(7,1);
00033
00034 QPushButton *one = new QPushButton("1", this, "one");
00035 layout->addWidget(one, 0, 2, 0);
00036 connect(one, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00037
00038 QPushButton *two = new QPushButton("2", this, "two");
00039 layout->addWidget(two, 0, 4, 0);
00040 connect(two, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00041
00042 QPushButton *three = new QPushButton("3", this, "three");
00043 layout->addWidget(three, 0, 6, 0);
00044 connect(three, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00045
00046 QPushButton *four = new QPushButton("4", this, "four");
00047 layout->addWidget(four, 2, 2, 0);
00048 connect(four, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00049
00050 QPushButton *five = new QPushButton("5", this, "five");
00051 layout->addWidget(five, 2, 4, 0);
00052 connect(five, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00053
00054 QPushButton *six = new QPushButton("6", this, "six");
00055 layout->addWidget(six, 2, 6, 0);
00056 connect(six, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00057
00058 QPushButton *seven = new QPushButton("7", this, "seven");
00059 layout->addWidget(seven, 4, 2, 0);
00060 connect(seven, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00061
00062 QPushButton *eight = new QPushButton("8", this, "eight");
00063 layout->addWidget(eight, 4, 4, 0);
00064 connect(eight, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00065
00066 QPushButton *nine = new QPushButton("9", this, "nine");
00067 layout->addWidget(nine, 4, 6, 0);
00068 connect(nine, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00069
00070 QPushButton *zero = new QPushButton("0", this, "zero");
00071 layout->addWidget(zero, 6, 4, 0);
00072 connect(zero, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00073
00074 layout->addMultiCellLayout(volLayout, 0, 6, 0, 0, 0);
00075 layout->addMultiCellLayout(chanLayout, 0, 6, 8, 8, 0);
00076
00077 QPushButton *volUp = new QPushButton("+", this, "volUp");
00078 volLayout->addWidget(volUp, 1, 0);
00079 connect(volUp, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00080
00081 QLabel *volLabel = new QLabel("Volume ", this, "volLabel");
00082 volLayout->addWidget(volLabel, 0, 0);
00083
00084 QPushButton *volDown = new QPushButton("-", this, "volDown");
00085 volLayout->addWidget(volDown, 1, 0);
00086 connect(volDown, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00087
00088
00089 QPushButton *chanUp = new QPushButton("+", this, "chanUp");
00090 chanLayout->addWidget(chanUp, 1, 0);
00091 connect(chanUp, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00092
00093 QLabel *chanLabel = new QLabel("Channel", this, "chanLabel");
00094 chanLayout->addWidget(chanLabel, 0, 0);
00095
00096 QPushButton *chanDown = new QPushButton("-", this, "chanDown");
00097 chanLayout->addWidget(chanDown, 1, 0);
00098 connect(chanDown, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00099
00100 }