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

About Class Reference

#include <about.h>

Inheritance diagram for About:

Inheritance graph
[legend]
Collaboration diagram for About:

Collaboration graph
[legend]
List of all members.

Detailed Description

About window widget.

Definition at line 34 of file about.h.

Signals

void aboutClosed ()

Public Member Functions

 About (QWidget *parent=0, const char *name=0)
void closeEvent (QCloseEvent *e)

Private Attributes

QGridLayout * grid
QPixmap * albumShaperImage
QLabel * albumShaperLogo
QLabel * progDesc
QLabel * progURL
QTextBrowser * browser


Constructor & Destructor Documentation

About::About QWidget parent = 0,
const char *  name = 0
 

Definition at line 33 of file about.cpp.

References albumShaperImage, albumShaperLogo, browser, DEFAULT_HEIGHT, DEFAULT_WIDTH, EASTER_PATH, grid, IMAGE_PATH, progDesc, progURL, and TEXT_PATH.

00034                                  : 
00035               QDialog(parent,name)
00036 {
00037   //--
00038   //set window title
00039   setCaption( tr("About Album Shaper"));
00040   //--
00041   //set the background of the widget to be white
00042   setPaletteBackgroundColor( QColor(255, 255, 255) );
00043   //--
00044   //application logo
00045   albumShaperImage = new QPixmap( QString(IMAGE_PATH)+"albumShaper.png" );
00046   albumShaperLogo = new QLabel( this );
00047   albumShaperLogo->setPixmap( *albumShaperImage );
00048   //--
00049   //text labels
00050   QFont textFont( "Times", 12, QFont::Bold );
00051   
00052   progDesc = new QLabel( tr("Album Shaper 1.0a3, © 2003 Will Stokes"), this );
00053   progDesc->setFont( textFont );
00054   
00055   progURL = new QLabel( "http://albumshaper.sourceforge.net", this );
00056   progURL->setFont( textFont );
00057   //--
00058   //about scrollable box
00059   browser = new QTextBrowser( this ); 
00060   browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
00061   browser->mimeSourceFactory()->setFilePath( QStringList(TEXT_PATH) );
00062   browser->setSource( "about.html");
00063   //--
00064   grid = new QGridLayout( this, 5, 3, 0);
00065   grid->addWidget( albumShaperLogo,  0, 1, Qt::AlignCenter );
00066   grid->addWidget( progDesc,         2, 1, Qt::AlignCenter  );
00067   grid->addWidget( progURL,          3, 1, Qt::AlignCenter  );
00068   grid->addMultiCellWidget( browser, 4, 4, 0, 2 );
00069   //--
00070   //show birthday cake around Album Shaper's birthday (first release date - 4/3/2003)
00071   QDate currentDate = QDate::currentDate();
00072   if( currentDate.year() > 2003 && currentDate.month() == 4 && currentDate.day() <= 15)
00073   {
00074     QPixmap* cakeImage = new QPixmap( QString(EASTER_PATH)+"birthdayCake.png" );
00075     QLabel* cakeLogo = new QLabel(this);
00076     cakeLogo->setPixmap( *cakeImage );    
00077     QLabel* cakeLogo2 = new QLabel(this);
00078     cakeLogo2->setPixmap( *cakeImage );    
00079     QLabel* cakeMessage = new QLabel( QString( tr("Happy Birthday Album Shaper!") +  
00080                                                                         QString(" %1 ").arg(currentDate.year() - 2003) + 
00081                                                                         tr("Years Old!")), this ); 
00082     QFont birthdayFont( "Times", 12, QFont::Bold );
00083     cakeMessage->setFont(birthdayFont);  
00084     //-- 
00085     grid->addWidget( cakeLogo, 0, 0, Qt::AlignCenter );
00086     grid->addWidget( cakeLogo2, 0, 2, Qt::AlignCenter );
00087     grid->addMultiCellWidget( cakeMessage, 1, 1, 0, 2, Qt::AlignCenter );
00088   }  
00089   //--
00090   grid->setRowStretch( 4, 1 );  
00091   grid->setColStretch( 0, 1 );
00092   grid->setColStretch( 2, 1 );
00093   //--
00094   resize( DEFAULT_WIDTH, DEFAULT_HEIGHT );
00095   //-------------------------------
00096   //set window to not be resizeable
00097   this->show();
00098   setFixedSize(size());
00099   //-------------------------------
00100 }


Member Function Documentation

void About::aboutClosed  )  [signal]
 

Referenced by closeEvent().

void About::closeEvent QCloseEvent *  e  ) 
 

Definition at line 102 of file about.cpp.

References aboutClosed().

00103 {
00104   aboutClosed();
00105   QWidget::closeEvent( e );
00106 }


Member Data Documentation

QPixmap* About::albumShaperImage [private]
 

Definition at line 48 of file about.h.

Referenced by About().

QLabel* About::albumShaperLogo [private]
 

Definition at line 49 of file about.h.

Referenced by About().

QTextBrowser* About::browser [private]
 

Definition at line 53 of file about.h.

Referenced by About().

QGridLayout* About::grid [private]
 

Definition at line 46 of file about.h.

Referenced by About().

QLabel* About::progDesc [private]
 

Definition at line 51 of file about.h.

Referenced by About().

QLabel* About::progURL [private]
 

Definition at line 52 of file about.h.

Referenced by About().


The documentation for this class was generated from the following files:
Generated on Thu Nov 13 00:11:06 2003 for AlbumShaper by doxygen 1.3.4