aboutbox.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                          aboutbox.cpp  -  description
00003                              -------------------
00004     begin                : Sat Jul 30 2005
00005     copyright            : (C) 2005-2006 by Ben Swerts
00006     email                : bswerts@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00019 
00026 
00027 
00028 
00030 
00031 // Qt header files
00032 #include <qapplication.h>
00033 
00034 // Xbrabo header files
00035 #include "aboutbox.h"
00036 #include "iconsets.h"
00037 
00041 
00043 AboutBox::AboutBox(QWidget* parent, const char* name) : QDialog(parent, name, true, Qt::WStyle_Customize | Qt::WStyle_NoBorder)
00046 {
00047   // load the pixmap and adapt the dialog to it
00048   QPixmap pm(IconSets::getSplash());
00049   resize(pm.size());
00050   setBackgroundPixmap(pm);
00051   if(pm.mask())
00052     setMask(*pm.mask());
00053   
00054   // center it on the dekstop
00055   QRect screenRect = QApplication::desktop()->availableGeometry(QApplication::desktop()->primaryScreen());
00056   move(screenRect.width()/2 - 309, screenRect.height()/2 - 193);
00057 }
00058 
00060 AboutBox::~AboutBox()
00062 {
00063 }
00064 
00068 
00070 void AboutBox::keyPressEvent(QKeyEvent*)
00072 {
00073   close();
00074 }
00075 
00077 void AboutBox::mousePressEvent(QMouseEvent*)
00079 {
00080   close();
00081 }
00082 

Generated on Fri May 19 14:31:53 2006 for Brabosphere by  doxygen 1.4.6-NO