summaryrefslogtreecommitdiff
path: root/noncore/tools/remote/dvdgroupconf.cpp
Unidiff
Diffstat (limited to 'noncore/tools/remote/dvdgroupconf.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/remote/dvdgroupconf.cpp87
1 files changed, 87 insertions, 0 deletions
diff --git a/noncore/tools/remote/dvdgroupconf.cpp b/noncore/tools/remote/dvdgroupconf.cpp
new file mode 100644
index 0000000..5bfe393
--- a/dev/null
+++ b/noncore/tools/remote/dvdgroupconf.cpp
@@ -0,0 +1,87 @@
1/*
2Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie.
3Copyright (C) 2002 Thomas Stephens
4
5This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
6License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
7version.
8
9This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
10implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11Public License for more details.
12
13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15*/
16
17#include "dvdgroupconf.h"
18
19DVDGroupConf::DVDGroupConf(QWidget *parent=0, const char *name=0):QWidget(parent,name)
20{
21 QGridLayout *layout = new QGridLayout(this);
22
23//put rows between the buttons of size 1
24 layout->addRowSpacing(1,1);
25 layout->addRowSpacing(3,1);
26
27//put collumns between the buttons of size 5
28 layout->addColSpacing(1,5);
29 layout->addColSpacing(3,5);
30 layout->addColSpacing(5,5);
31 layout->addColSpacing(7,5);
32
33//make sure that the collumns with the buttons in them stretch before the filler collumns do
34//since there is so little room, there is no need to do this for the rows
35 layout->setColStretch(4,1);
36 layout->setColStretch(2,1);
37 layout->setColStretch(6,1);
38 layout->setColStretch(8,1);
39 layout->setColStretch(0,1);
40
41//add the menu navigation buttons, and connect them to the RemoteTab slots...
42 QPushButton *up = new QPushButton("Up",this,"up");
43 layout->addWidget(up, 0, 4, 0);
44 connect(up, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
45
46 QPushButton *down = new QPushButton("Down",this,"down");
47 layout->addWidget(down, 4, 4, 0);
48 connect(down, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
49
50 QPushButton *left = new QPushButton("Left",this,"left");
51 layout->addWidget(left, 2, 2, 0);
52 connect(left, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
53
54 QPushButton *right = new QPushButton("Right", this, "right");
55 layout->addWidget(right, 2, 6, 0);
56 connect(right, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
57
58 QPushButton *enter = new QPushButton("Enter",this,"enter");
59 layout->addWidget(enter, 2, 4, 0);
60 connect(enter, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
61
62//add some other buttons
63
64 QPushButton *eject = new QPushButton("Eject", this, "eject");
65 layout->addWidget(eject, 0, 0, 0);
66 connect(eject, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
67
68 QPushButton *menu = new QPushButton("Menu", this, "menu");
69 layout->addWidget(menu, 2, 0, 0);
70 connect(menu, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
71
72 QPushButton *topMenu = new QPushButton("Top", this, "topMenu");
73 layout->addWidget(topMenu, 4, 0, 0);
74 connect(topMenu, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
75
76 QPushButton *audio = new QPushButton("Audio", this, "audio");
77 layout->addWidget(audio, 0, 8, 0);
78 connect(audio, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
79
80 QPushButton *sub = new QPushButton("Sub", this, "sub");
81 layout->addWidget(sub, 2, 8, 0);
82 connect(sub, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
83
84 QPushButton *angle = new QPushButton("Angle", this, "angle");
85 layout->addWidget(angle, 4, 8, 0);
86 connect(angle, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
87}