Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

dvdgroup.cpp

Go to the documentation of this file.
00001 /*
00002 Opie-Remote.  emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie.
00003 Copyright (C) 2002 Thomas Stephens
00004 
00005 This program is free software; you can redistribute it and/or modify it under 
00006 the terms of the GNU General Public
00007 License as published by the Free Software Foundation; either version 2 of the 
00008 License, or (at your option) any later
00009 version.
00010 
00011 This program is distributed in the hope that it will be useful, but WITHOUT ANY 
00012 WARRANTY; without even the
00013 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
00014 
00015 GNU General
00016 Public License for more details.
00017 
00018 You should have received a copy of the GNU General Public License along with 
00019 this program; if not, write to the Free
00020 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00021 */
00022 
00023 #include "dvdgroup.h"
00024 
00025 DVDGroup::DVDGroup(QWidget *parent, const char *name):QWidget(parent,name)
00026 {
00027         QGridLayout *layout = new QGridLayout(this);
00028 
00029 //put rows between the buttons of size 1
00030         layout->addRowSpacing(1,1);
00031         layout->addRowSpacing(3,1);
00032 
00033 //put collumns between the buttons of size 5
00034         layout->addColSpacing(1,5);
00035         layout->addColSpacing(3,5);
00036         layout->addColSpacing(5,5);
00037         layout->addColSpacing(7,5);
00038 
00039 //make sure that the collumns with the buttons in them stretch before the filler collumns do
00040 //since there is so little room, there is no need to do this for the rows
00041         layout->setColStretch(4,1);
00042         layout->setColStretch(2,1);
00043         layout->setColStretch(6,1);
00044         layout->setColStretch(8,1);
00045         layout->setColStretch(0,1);
00046 
00047 //add the menu navigation buttons, and connect them to the RemoteTab slots...
00048         QPushButton *up = new QPushButton("Up", this,"up");
00049         layout->addWidget(up, 0, 4, 0);
00050         connect(up, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00051 
00052         QPushButton *down = new QPushButton("Down",this,"down");
00053         layout->addWidget(down, 4, 4, 0);
00054         connect(down, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00055 
00056         QPushButton *left = new QPushButton("Left",this,"left");
00057         layout->addWidget(left, 2, 2, 0);
00058         connect(left, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00059 
00060         QPushButton *right = new QPushButton("Right", this, "right");
00061         layout->addWidget(right, 2, 6, 0);
00062         connect(right, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00063 
00064         QPushButton *enter = new QPushButton("Enter",this,"enter");
00065         layout->addWidget(enter, 2, 4, 0);
00066         connect(enter, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00067 
00068 //add some other buttons
00069 
00070         QPushButton *eject = new QPushButton("Eject", this, "eject");
00071         layout->addWidget(eject, 0, 0, 0);
00072         connect(eject, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00073 
00074         QPushButton *menu = new QPushButton("Menu", this, "menu");
00075         layout->addWidget(menu, 2, 0, 0);
00076         connect(menu, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00077 
00078         QPushButton *topMenu = new QPushButton("Top", this, "topMenu");
00079         layout->addWidget(topMenu, 4, 0, 0);
00080         connect(topMenu, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00081 
00082         QPushButton *audio = new QPushButton("Audio", this, "audio");
00083         layout->addWidget(audio, 0, 8, 0);
00084         connect(audio, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00085 
00086         QPushButton *sub = new QPushButton("Sub", this, "sub");
00087         layout->addWidget(sub, 2, 8, 0);
00088         connect(sub, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00089 
00090         QPushButton *angle = new QPushButton("Angle", this, "angle");
00091         layout->addWidget(angle, 4, 8, 0);
00092         connect(angle, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
00093 }

Generated on Sat Nov 5 16:18:02 2005 for OPIE by  doxygen 1.4.2