Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

guiTools.h File Reference

#include <qlabel.h>
#include <qfiledialog.h>

Include dependency graph for guiTools.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

void centerWindow (QWidget *window)


Function Documentation

void centerWindow QWidget window  ) 
 

Definition at line 29 of file guiTools.cpp.

Referenced by TitleWidget::aboutProgram(), TitleWidget::albumStatistics(), and TitleWidget::handbook().

00030 {
00031   //get size and location of application window
00032   QRect appRec = qApp->mainWidget()->geometry();
00033   QRect windowRec = window->geometry();
00034     
00035   //center this dialoag within application window
00036   int x, y;
00037   if(windowRec.width() < appRec.width())
00038   { x = appRec.x() + ((appRec.width() - windowRec.width())/2); }
00039   else
00040   { x = appRec.x(); }
00041   if(windowRec.height() < appRec.height())
00042   { y = appRec.y() + ((appRec.height() - windowRec.height())/2); }
00043   else
00044   { y = appRec.y(); }
00045     
00046   window->move( QPoint( x, y) );            
00047 }


Generated on Thu Nov 13 00:10:57 2003 for AlbumShaper by doxygen 1.3.4