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

Window Class Reference

#include <window.h>

Inheritance diagram for Window:

Inheritance graph
[legend]
Collaboration diagram for Window:

Collaboration graph
[legend]
List of all members.

Detailed Description

Top level widget, encapsulates the title widget, the layout widget, and the toolbar widget.

Definition at line 36 of file window.h.

Public Member Functions

 Window (QWidget *parent=0, const char *name=0)
 Creates title area, layout, and tool bar and places them in grid.

TitleWidgetgetTitle ()
 returns a pointer to the title widget

LayoutWidgetgetLayout ()
 returns a pointer to the layout object

StatusWidgetgetStatus ()
 returns a pointer to the status widget

void refresh ()
 refreshes the layout


Protected Member Functions

void closeEvent (QCloseEvent *e)

Private Attributes

QGridLayout * grid
 Grid objects placed in.

TitleWidgettitle
 Title widget cont ains menu's, album information and Album Shaper icon.

LayoutWidgetlayout
 Layout includes subalbums listing and particular subalbum layout.

StatusWidgetstatus
 Status widget either displays a status message or progress bar.

QPixmap * applicationIcon
 Application icon.


Constructor & Destructor Documentation

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

Creates title area, layout, and tool bar and places them in grid.

Definition at line 31 of file window.cpp.

References applicationIcon, grid, IMAGE_PATH, layout, status, and title.

00032                                    : 
00033                 QWidget(parent,name)
00034 {
00035   title  = new TitleWidget (this, "title");
00036   layout = new LayoutWidget(this, "layout");
00037   status = new StatusWidget(this, "status");
00038   
00039   //create new grid and add widgets
00040   grid = new QGridLayout( this, 3, 1, 0);
00041   grid->addWidget( title,  0, 0 );
00042   grid->addWidget( layout, 1, 0 );
00043   grid->addWidget( status, 2, 0 );
00044 
00045   //set the layout widget to take up all remaining space
00046   grid->setRowStretch( 1, 1 );
00047 
00048   //set the background of the widget to be white
00049   setPaletteBackgroundColor( QColor(255, 255, 255) );
00050   
00051   //create and set application icon
00052   applicationIcon = new QPixmap(QString(IMAGE_PATH)+"albumShaperIcon.png");
00053   setIcon( *applicationIcon );
00054   
00055   setCaption( tr("Album Shaper"));
00056 }


Member Function Documentation

void Window::closeEvent QCloseEvent *  e  )  [protected]
 

Definition at line 78 of file window.cpp.

References Album::albumModified(), TitleWidget::getAlbum(), and title.

00079 {
00080   //check if unsaved modifications exist, warn user they
00081   //will lose these if they quit now
00082   if(title->getAlbum()->albumModified() )
00083   {
00084     QuestionDialog sure( tr("Quit without saving?"),
00085                        tr("You have unsaved work. Are you sure you want to quit without saving?"),
00086                        "warning.png",
00087                        this );
00088     if(sure.exec())  
00089       e->accept();
00090     else
00091       e->ignore();
00092   }
00093   else
00094   {
00095     e->accept();
00096   }
00097 }

LayoutWidget * Window::getLayout  ) 
 

returns a pointer to the layout object

Definition at line 63 of file window.cpp.

References layout.

Referenced by TitleWidget::loadAlbum(), TitleWidget::saveAlbum(), TitleWidget::saveAsAlbum(), and TitleWidget::setImageAction().

00064 {
00065   return layout;
00066 }

StatusWidget * Window::getStatus  ) 
 

returns a pointer to the status widget

Definition at line 68 of file window.cpp.

References status.

Referenced by SubalbumWidget::addImageAction(), SubalbumWidget::flipHorizontallyImageAction(), SubalbumWidget::flipVerticallyImageAction(), TitleWidget::loadAlbum(), SubalbumWidget::rotate270ImageAction(), SubalbumWidget::rotate90ImageAction(), TitleWidget::saveAlbum(), and TitleWidget::saveAsAlbum().

00069 {
00070   return status;
00071 }

TitleWidget * Window::getTitle  ) 
 

returns a pointer to the title widget

Definition at line 58 of file window.cpp.

References title.

Referenced by SubalbumWidget::addImageAction(), SubalbumsWidget::createAction(), SubalbumsWidget::deleteAction(), SubalbumWidget::flipHorizontallyImageAction(), SubalbumWidget::flipVerticallyImageAction(), SubalbumsWidget::refresh(), SubalbumWidget::removeImageAction(), SubalbumsWidget::reorder(), SubalbumWidget::rotate270ImageAction(), SubalbumWidget::rotate90ImageAction(), SubalbumWidget::updateButtons(), and SubalbumsWidget::updateSubalbumLayout().

00059 {
00060   return title;
00061 }

void Window::refresh  ) 
 

refreshes the layout

Definition at line 73 of file window.cpp.

References layout, and LayoutWidget::refresh().

Referenced by TitleWidget::loadAlbum(), and TitleWidget::newAlbum().

00074 {
00075   layout->refresh();
00076 }


Member Data Documentation

QPixmap* Window::applicationIcon [private]
 

Application icon.

Definition at line 73 of file window.h.

Referenced by Window().

QGridLayout* Window::grid [private]
 

Grid objects placed in.

Definition at line 61 of file window.h.

Referenced by Window().

LayoutWidget* Window::layout [private]
 

Layout includes subalbums listing and particular subalbum layout.

Definition at line 67 of file window.h.

Referenced by getLayout(), refresh(), and Window().

StatusWidget* Window::status [private]
 

Status widget either displays a status message or progress bar.

Definition at line 70 of file window.h.

Referenced by getStatus(), and Window().

TitleWidget* Window::title [private]
 

Title widget cont ains menu's, album information and Album Shaper icon.

Definition at line 64 of file window.h.

Referenced by closeEvent(), getTitle(), and Window().


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