Diffstat (limited to 'noncore/tools/remote/channelgroupconf.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/tools/remote/channelgroupconf.cpp | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/noncore/tools/remote/channelgroupconf.cpp b/noncore/tools/remote/channelgroupconf.cpp new file mode 100644 index 0000000..2d98115 --- a/dev/null +++ b/noncore/tools/remote/channelgroupconf.cpp | |||
@@ -0,0 +1,100 @@ | |||
1 | /* | ||
2 | Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. | ||
3 | Copyright (C) 2002 Thomas Stephens | ||
4 | |||
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 | ||
7 | version. | ||
8 | |||
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 | ||
11 | Public License for more details. | ||
12 | |||
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 | ||
15 | */ | ||
16 | |||
17 | #include "channelgroupconf.h" | ||
18 | |||
19 | ChannelGroupConf::ChannelGroupConf(QWidget *parent=0, const char *name=0):QWidget(parent,name) | ||
20 | { | ||
21 | QGridLayout *layout = new QGridLayout(this); | ||
22 | QVBoxLayout *volLayout = new QVBoxLayout(this); | ||
23 | QVBoxLayout *chanLayout = new QVBoxLayout(this); | ||
24 | |||
25 | layout->addRowSpacing(1,5); | ||
26 | layout->addRowSpacing(3,5); | ||
27 | layout->addRowSpacing(5,5); | ||
28 | |||
29 | layout->addColSpacing(1,1); | ||
30 | layout->addColSpacing(3,1); | ||
31 | layout->addColSpacing(5,1); | ||
32 | layout->addColSpacing(7,1); | ||
33 | |||
34 | QPushButton *one = new QPushButton("1", this, "one"); | ||
35 | layout->addWidget(one, 0, 2, 0); | ||
36 | connect(one, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
37 | |||
38 | QPushButton *two = new QPushButton("2", this, "two"); | ||
39 | layout->addWidget(two, 0, 4, 0); | ||
40 | connect(two, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
41 | |||
42 | QPushButton *three = new QPushButton("3", this, "three"); | ||
43 | layout->addWidget(three, 0, 6, 0); | ||
44 | connect(three, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
45 | |||
46 | QPushButton *four = new QPushButton("4", this, "four"); | ||
47 | layout->addWidget(four, 2, 2, 0); | ||
48 | connect(four, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
49 | |||
50 | QPushButton *five = new QPushButton("5", this, "five"); | ||
51 | layout->addWidget(five, 2, 4, 0); | ||
52 | connect(five, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
53 | |||
54 | QPushButton *six = new QPushButton("6", this, "six"); | ||
55 | layout->addWidget(six, 2, 6, 0); | ||
56 | connect(six, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
57 | |||
58 | QPushButton *seven = new QPushButton("7", this, "seven"); | ||
59 | layout->addWidget(seven, 4, 2, 0); | ||
60 | connect(seven, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
61 | |||
62 | QPushButton *eight = new QPushButton("8", this, "eight"); | ||
63 | layout->addWidget(eight, 4, 4, 0); | ||
64 | connect(eight, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
65 | |||
66 | QPushButton *nine = new QPushButton("9", this, "nine"); | ||
67 | layout->addWidget(nine, 4, 6, 0); | ||
68 | connect(nine, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
69 | |||
70 | QPushButton *zero = new QPushButton("0", this, "zero"); | ||
71 | layout->addWidget(zero, 6, 4, 0); | ||
72 | connect(zero, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
73 | |||
74 | layout->addMultiCellLayout(volLayout, 0, 6, 0, 0, 0); | ||
75 | layout->addMultiCellLayout(chanLayout, 0, 6, 8, 8, 0); | ||
76 | |||
77 | QPushButton *volUp = new QPushButton("+", this, "volUp"); | ||
78 | volLayout->addWidget(volUp, 1, 0); | ||
79 | connect(volUp, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
80 | |||
81 | QLabel *volLabel = new QLabel("Volume ", this, "volLabel"); | ||
82 | volLayout->addWidget(volLabel, 0, 0); | ||
83 | |||
84 | QPushButton *volDown = new QPushButton("-", this, "volDown"); | ||
85 | volLayout->addWidget(volDown, 1, 0); | ||
86 | connect(volDown, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
87 | |||
88 | |||
89 | QPushButton *chanUp = new QPushButton("+", this, "chanUp"); | ||
90 | chanLayout->addWidget(chanUp, 1, 0); | ||
91 | connect(chanUp, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
92 | |||
93 | QLabel *chanLabel = new QLabel("Channel", this, "chanLabel"); | ||
94 | chanLayout->addWidget(chanLabel, 0, 0); | ||
95 | |||
96 | QPushButton *chanDown = new QPushButton("-", this, "chanDown"); | ||
97 | chanLayout->addWidget(chanDown, 1, 0); | ||
98 | connect(chanDown, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | ||
99 | |||
100 | } | ||