Main Page   Compound List   File List   Compound Members   File Members  

window.cpp

Go to the documentation of this file.
00001 //==============================================
00002 //  copyright            : (C) 2003 by Will Stokes
00003 //==============================================
00004 //  This program is free software; you can redistribute it 
00005 //  and/or modify it under the terms of the GNU General 
00006 //  Public License as published by the Free Software 
00007 //  Foundation; either version 2 of the License, or  
00008 //  (at your option) any later version.         
00009 //
00010 //  As a special exception, Will Stokes gives permission to 
00011 //  link this program with Qt non-commercial edition, and 
00012 //  distribute the resulting executable, without including the 
00013 //  source code for the Qt non-commercial edition in the 
00014 //  source distribution. 
00015 //==============================================
00016 
00017 //Systemwide includes
00018 #include <qlayout.h>
00019 #include <qpixmap.h>
00020 
00021 //Projectwide includes
00022 #include "window.h"
00023 #include "titleWidget.h"
00024 #include "layoutWidget.h"
00025 #include "../config.h"
00026 
00027 //==============================================
00028 Window::Window( QWidget* parent,
00029                 const char* name ) : 
00030                 QWidget(parent,name)
00031 {
00032   title = new TitleWidget(this, "title");
00033   layout = new LayoutWidget(this, "layout");
00034 
00035   //create new grid and add widgets
00036   grid = new QGridLayout( this, 2, 1, 0);
00037   grid->addWidget( title, 0, 0 );
00038   grid->addWidget( layout, 1, 0 );
00039 
00040   //set the layout widget to take up all remaining space
00041   grid->setRowStretch( 1, 1 );
00042 
00043   //set the background of the widget to be white
00044   setPaletteBackgroundColor( QColor(255, 255, 255) );
00045   
00046   //create and set application icon
00047   applicationIcon = new QPixmap(QString(IMAGE_PATH)+"albumShaperIcon.png");
00048   setIcon( *applicationIcon );
00049   setCaption( "Album Shaper © Will Stokes");
00050 }
00051 //==============================================
00052 TitleWidget* Window::getTitle()
00053 {
00054   return title;
00055 }
00056 //==============================================
00057 LayoutWidget* Window::getLayout()
00058 {
00059   return layout;
00060 }
00061 //==============================================
00062 void Window::refresh()
00063 {
00064   layout->refresh();
00065 }
00066 //==============================================

Generated on Tue Jun 10 23:41:21 2003 for AlbumShaper by doxygen 1.3.1