#include <layoutWidget.h>
Inheritance diagram for LayoutWidget:


Definition at line 40 of file layoutWidget.h.
Public Member Functions | |
| LayoutWidget (QWidget *parent=0, const char *name=0) | |
| Creates empty layout. | |
| void | updateSubalbum (Subalbum *salbum, bool oldExists) |
| Removes current subalbum widget. | |
| void | updateSubalbumName (const QString &val) |
| Updates current subalbums name. | |
| void | updateSubalbumImage (QPixmap *val) |
| Updates the current subalbums image. | |
| SubalbumWidget * | getSubalbum () |
| Returns a pointer to the subalbum. | |
| SubalbumsWidget * | getSubalbums () |
| Returns a pointer to the subalbums. | |
| Window * | getWindow () |
| Returns a pointer to the window. | |
| void | refresh () |
| Refreshes layout. | |
| void | editPhoto (Photo *photo) |
| Brings up edit dialog for specified photo. | |
| void | stopEdit (bool oldExists) |
| Tears down the edit dialog and returns to the layout for the selected subalbum. | |
Private Attributes | |
| Window * | window |
| Window pointer. | |
| QGridLayout * | grid |
| Grid items placed in. | |
| SubalbumWidget * | subalbum |
| Particular subalbum layout. | |
| SubalbumsWidget * | subalbums |
| List of subalbums. | |
| PhotoEditWidget * | photoEdit |
| Photo editing widget. | |
|
||||||||||||
|
Creates empty layout.
Definition at line 32 of file layoutWidget.cpp. References grid, photoEdit, subalbum, subalbums, and window.
00033 : QWidget(parent,name) 00034 { 00035 window = (Window*)parent; 00036 00037 subalbums = new SubalbumsWidget( this, "subalbums" ); 00038 subalbum = NULL; 00039 00040 //place the subalbums list and subalbum view in grid 00041 grid = new QGridLayout( this, 1, 2, 0 ); 00042 grid->addWidget( subalbums, 0, 0 ); 00043 00044 //create a photo edit widget, when need the current subalbum can be 00045 //removed from the grid and the photo edit widget can be inserted, then 00046 //exchanged again when edting concludes. 00047 photoEdit = new PhotoEditWidget( this, "photo edit" ); 00048 grid->addWidget( photoEdit, 0, 1 ); 00049 photoEdit->hide(); 00050 00051 grid->setColStretch( 1, 1 ); 00052 00053 //set the background of the widget to be white 00054 setPaletteBackgroundColor( QColor(255, 255, 255) ); 00055 } |
|
|
Brings up edit dialog for specified photo.
Definition at line 125 of file layoutWidget.cpp. References photoEdit, PhotoEditWidget::setPhoto(), and subalbum. Referenced by SubalbumWidget::editAction().
00126 {
00127 //never edit null photos, this should never happen but it's a sanity check anyways
00128 if(photo == NULL)
00129 return;
00130
00131 //if a subalbum exists hide it
00132 if(subalbum != NULL)
00133 subalbum->hide();
00134
00135 //set the photo pointer for the photo edit widget
00136 photoEdit->setPhoto(photo);
00137
00138 //unhide the photo edit widget
00139 photoEdit->show();
00140 }
|
|
|
Returns a pointer to the subalbum.
Definition at line 105 of file layoutWidget.cpp. References subalbum. Referenced by TitleWidget::loadAlbum(), TitleWidget::saveAlbum(), TitleWidget::saveAsAlbum(), and TitleWidget::setImageAction().
00106 {
00107 return subalbum;
00108 }
|
|
|
Returns a pointer to the subalbums.
Definition at line 110 of file layoutWidget.cpp. References subalbums. Referenced by SubalbumWidget::addImageAction(), SubalbumWidget::flipHorizontallyImageAction(), SubalbumWidget::flipVerticallyImageAction(), TitleWidget::loadAlbum(), SubalbumWidget::removeImageAction(), SubalbumWidget::rotate270ImageAction(), SubalbumWidget::rotate90ImageAction(), TitleWidget::saveAlbum(), and TitleWidget::saveAsAlbum().
00111 {
00112 return subalbums;
00113 }
|
|
|
Returns a pointer to the window.
Definition at line 115 of file layoutWidget.cpp. References window. 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().
00116 {
00117 return window;
00118 }
|
|
|
Refreshes layout.
Definition at line 120 of file layoutWidget.cpp. References SubalbumsWidget::refresh(), and subalbums. Referenced by Window::refresh().
|
|
|
Tears down the edit dialog and returns to the layout for the selected subalbum.
Definition at line 142 of file layoutWidget.cpp. References photoEdit, SubalbumWidget::refreshSelectedPhotos(), and subalbum. Referenced by PhotoEditWidget::returnFromEdit(), and SubalbumsWidget::updateSubalbumLayout().
00143 {
00144 //hide edit window, show subalbum window
00145 //refresh thumbnail and text for selected image
00146 photoEdit->hide();
00147 if(subalbum != NULL)
00148 {
00149 subalbum->show();
00150 if(oldExists)
00151 subalbum->refreshSelectedPhotos();
00152 }
00153 }
|
|
||||||||||||
|
Removes current subalbum widget. Creates new widget using new subalbum pointer Definition at line 57 of file layoutWidget.cpp. References SubalbumWidget::getSubalbum(), grid, SubalbumWidget::refreshPhotos(), SubalbumWidget::setSubalbum(), subalbum, and SubalbumWidget::syncPhotos(). Referenced by SubalbumsWidget::updateSubalbumLayout().
00058 {
00059 //if new selection is same as old selection do nothing
00060 if(subalbum != NULL && salbum == subalbum->getSubalbum())
00061 return;
00062
00063 //if a subalbum previously displayed update it
00064 if(subalbum != NULL)
00065 {
00066 //sync up old data
00067 if(oldExists)
00068 subalbum->syncPhotos();
00069
00070 //if new subalbum exists update subalbum
00071 if(salbum != NULL)
00072 {
00073 subalbum->setSubalbum(salbum);
00074 }
00075 //else just destroy old subalbum view
00076 else
00077 {
00078 delete subalbum;
00079 subalbum = NULL;
00080 }
00081 }
00082 //else create a new subalbum widget and populate it
00083 else if(salbum != NULL)
00084 {
00085 //create new subalbum widget
00086 subalbum = new SubalbumWidget( salbum, this, "subalbum" );
00087
00088 //insert into layout
00089 grid->addWidget( subalbum, 0, 1 );
00090 subalbum->show();
00091 subalbum->refreshPhotos();
00092 }
00093 }
|
|
|
Updates the current subalbums image.
Definition at line 100 of file layoutWidget.cpp. References subalbums, and SubalbumsWidget::updateSubalbumThumbnail(). Referenced by SubalbumWidget::setImageAction().
00101 {
00102 subalbums->updateSubalbumThumbnail(val);
00103 }
|
|
|
Updates current subalbums name.
Definition at line 95 of file layoutWidget.cpp. References subalbums, and SubalbumsWidget::updateSubalbumName(). Referenced by SubalbumWidget::updateName().
00096 {
00097 subalbums->updateSubalbumName(val);
00098 }
|
|
|
Grid items placed in.
Definition at line 79 of file layoutWidget.h. Referenced by LayoutWidget(), and updateSubalbum(). |
|
|
Photo editing widget.
Definition at line 88 of file layoutWidget.h. Referenced by editPhoto(), LayoutWidget(), and stopEdit(). |
|
|
Particular subalbum layout.
Definition at line 82 of file layoutWidget.h. Referenced by editPhoto(), getSubalbum(), LayoutWidget(), stopEdit(), and updateSubalbum(). |
|
|
List of subalbums.
Definition at line 85 of file layoutWidget.h. Referenced by getSubalbums(), LayoutWidget(), refresh(), updateSubalbumImage(), and updateSubalbumName(). |
|
|
Window pointer.
Definition at line 76 of file layoutWidget.h. Referenced by getWindow(), and LayoutWidget(). |
1.3.4