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