|
AlbumShaper 1.0a3
|
A subalbum contains photos. More...
#include <subalbum.h>

Public Member Functions | |
| Subalbum (Album *albm, int number) | |
| Sets default information. | |
| ~Subalbum () | |
| Frees photos. | |
| void | setName (QString val) |
| Sets the Subalbum Name. | |
| QString | getName () |
| Gets the Subalbum Name. | |
| void | setDescription (QString val) |
| Sets the Subalbum description. | |
| QString | getDescription () |
| Gets the Subalbum description. | |
| QPixmap * | getRepresentativeImage (int size) |
| gets a sized representative image | |
| void | setRepresentativeImage (QString imageFilename) |
| sets a sized representative image | |
| bool | addPhoto (QString fileName, bool replaceDescription=false, Photo *newPhoto=NULL) |
| Adds a new photo to the Subalbum and appends it to the end, returns TRUE if successful. | |
| bool | lazyAddPhoto (QString imageName, QString slideshowName, QString thumbnailName, Photo *newPhoto) |
| Lazily adds a new photo to the subalbum without rescaling from scrath, returns TRUE if successful. | |
| void | addPhoto (Photo *newPhoto) |
| Adds a preexisting photo object to the Subalbum, appending it to the end. | |
| void | photoMoved (Photo *val) |
| Removes a specified photo without deleting the object. | |
| void | removePhoto (Photo *val) |
| Removes a specified photo. | |
| Subalbum * | getPrev () |
| Returns pointer to prev subalbum. | |
| Subalbum * | getNext () |
| Returns pointer to next subalbum. | |
| void | setPrev (Subalbum *val) |
| Sets pointer of prev subalbum. | |
| void | setNext (Subalbum *val) |
| Sets pointer of next subalbum. | |
| Photo * | getFirst () |
| Returns first photo in subalbum. | |
| Photo * | getLast () |
| Returns last photo in subalbum. | |
| void | exportToXML (StatusWidget *status, Q3TextStream &stream) |
| Exports subalbum to xml. | |
| void | importFromDisk (QDomNode *root, int subalbumNum, StatusWidget *status, QString dirName, bool disableCheckPhotoMods) |
| Builds subalbum from XML DOM node. | |
| void | syncPhotoList (PhotoPreviewWidget *item) |
| Syncs photo ordering with front end gui ordering. | |
| int | getSubalbumNumber () |
| Returns subalbum number. | |
| void | setSubalbumNumber (int newVal) |
| Sets the subalbum number to newVal. | |
| int | getNumPhotos () |
| Returns the number of photos in the subalbum. | |
| int | getNumLoadedPhotos () |
| Returns the number of loaded photos in subalbum. | |
| void | resetNumLoadedPhotos () |
| void | setModified () |
| Album * | getAlbum () |
| returns the album pointer | |
Private Attributes | |
| int | number |
| Subalbum Number. | |
| int | numPhotos |
| Number of photos in subalbum. | |
| int | loadedPhotos |
| Number of photos in subalbum when last loaded. | |
| QString | name |
| Short Name for subalbum. | |
| QString | description |
| Longer description of subalbum. | |
| QPixmap * | smallRepresentativeImage |
| QPixmap * | mediumRepresentativeImage |
| QPixmap * | largeRepresentativeImage |
| Photo * | firstPhoto |
| Pointer to first photo. | |
| Photo * | lastPhoto |
| Pointer to last photo. | |
| Subalbum * | prevSubalbum |
| Pointer to prev subalbum. | |
| Subalbum * | nextSubalbum |
| Pointer to next subalbum. | |
| Album * | albm |
| Pointer to album subalbum is in. | |
A subalbum contains photos.
Specific contents:
Definition at line 48 of file subalbum.h.
| Subalbum::Subalbum | ( | Album * | albm, |
| int | number ) |
Sets default information.
@number is the Subalbum number
Definition at line 36 of file subalbum.cpp.
References albm, SubalbumPreviewWidget::createSubalbumPixmap(), description, firstPhoto, IMAGE_PATH, largeRepresentativeImage, lastPhoto, loadedPhotos, mediumRepresentativeImage, name, nextSubalbum, number, numPhotos, prevSubalbum, and smallRepresentativeImage.
| Subalbum::~Subalbum | ( | ) |
Frees photos.
Definition at line 67 of file subalbum.cpp.
References firstPhoto, Photo::getNext(), largeRepresentativeImage, mediumRepresentativeImage, and smallRepresentativeImage.
| void Subalbum::addPhoto | ( | Photo * | newPhoto | ) |
Adds a preexisting photo object to the Subalbum, appending it to the end.
Definition at line 174 of file subalbum.cpp.
References albm, firstPhoto, lastPhoto, numPhotos, Album::setModified(), Photo::setNext(), and Photo::setPrev().
| bool Subalbum::addPhoto | ( | QString | fileName, |
| bool | replaceDescription = false, | ||
| Photo * | newPhoto = NULL ) |
Adds a new photo to the Subalbum and appends it to the end, returns TRUE if successful.
Definition at line 198 of file subalbum.cpp.
References albm, firstPhoto, getLast(), Album::getNextUniquePhotoID(), lastPhoto, numPhotos, Photo::setDescription(), Photo::setImage(), Album::setModified(), Photo::setNext(), and Photo::setPrev().
Referenced by SubalbumWidget::addImageAction(), SubalbumPreviewWidget::dropped(), and importFromDisk().
| void Subalbum::exportToXML | ( | StatusWidget * | status, |
| Q3TextStream & | stream ) |
Exports subalbum to xml.
Definition at line 313 of file subalbum.cpp.
References description, Photo::exportToXML(), firstPhoto, fixXMLString(), Photo::getNext(), getRepresentativeImage(), LARGE, name, and number.
Referenced by Album::exportToXML().
| Album * Subalbum::getAlbum | ( | ) |
returns the album pointer
Definition at line 95 of file subalbum.cpp.
References albm.
Referenced by Photo::applyTransformation(), Photo::originalImageFilename(), Photo::setImage(), and Photo::setImage().
| QString Subalbum::getDescription | ( | ) |
Gets the Subalbum description.
Definition at line 85 of file subalbum.cpp.
References description.
Referenced by TitleWidget::refreshCollectionAnnotations().
| Photo * Subalbum::getFirst | ( | ) |
Returns first photo in subalbum.
Definition at line 100 of file subalbum.cpp.
References firstPhoto.
Referenced by SlideshowWidget::advanceCollection(), AlbumStatistics::AlbumStatistics(), SlideshowWidget::beginSlideshow(), Album::exportCompressedWebAlbum(), Album::exportLargeImages(), Album::exportSubalbumImages(), Album::getThumbnailFilenames(), SubalbumWidget::refreshPhotos(), Album::removeStagnantOrigFiles(), Album::reorderSubalbumImages(), SlideshowWidget::showCollectionPage(), EditingInterface::showFirstPhoto(), and SlideshowWidget::skipToFirstPhoto().
| Photo * Subalbum::getLast | ( | ) |
Returns last photo in subalbum.
Definition at line 101 of file subalbum.cpp.
References lastPhoto.
Referenced by SubalbumWidget::addImageAction(), addPhoto(), SlideshowWidget::backupCollection(), importFromDisk(), EditingInterface::showLastPhoto(), and SlideshowWidget::skipToLastPhoto().
| QString Subalbum::getName | ( | ) |
Gets the Subalbum Name.
Definition at line 84 of file subalbum.cpp.
References name.
Referenced by TitleWidget::refreshCollectionAnnotations(), and TitleWidget::storeAnnotations().
| Subalbum * Subalbum::getNext | ( | ) |
Returns pointer to next subalbum.
Definition at line 98 of file subalbum.cpp.
References nextSubalbum.
Referenced by SlideshowWidget::advanceCollection(), AlbumStatistics::AlbumStatistics(), SlideshowWidget::beginSlideshow(), Album::exportCompressedWebAlbum(), Album::exportLargeImages(), Album::exportSubalbumImages(), Album::exportToDisk(), Album::exportTopLevelImages(), Album::exportToXML(), Album::getNumPhotos(), Album::getThumbnailFilenames(), SubalbumsWidget::refreshCollectionsList(), Album::removeStagnantImages(), Album::removeStagnantOrigFiles(), Album::removeSubalbum(), Album::reorderSubalbumImages(), Album::syncSubalbumList(), and Album::~Album().
| int Subalbum::getNumLoadedPhotos | ( | ) |
Returns the number of loaded photos in subalbum.
Definition at line 105 of file subalbum.cpp.
References loadedPhotos.
| int Subalbum::getNumPhotos | ( | ) |
Returns the number of photos in the subalbum.
Definition at line 104 of file subalbum.cpp.
References numPhotos.
Referenced by SlideshowWidget::backupCollection(), Album::exportLargeImages(), Album::exportToDisk(), Album::getNumPhotos(), SlideshowWidget::paintOverlaidControls(), Album::removeStagnantImages(), and SlideshowWidget::skipToLastPhoto().
| Subalbum * Subalbum::getPrev | ( | ) |
Returns pointer to prev subalbum.
Definition at line 97 of file subalbum.cpp.
References prevSubalbum.
Referenced by SlideshowWidget::backupCollection(), and Album::removeSubalbum().
| QPixmap * Subalbum::getRepresentativeImage | ( | int | size | ) |
gets a sized representative image
Definition at line 87 of file subalbum.cpp.
References LARGE, largeRepresentativeImage, MEDIUM, mediumRepresentativeImage, SMALL, and smallRepresentativeImage.
Referenced by Album::exportCompressedWebAlbum(), Album::exportTopLevelImages(), exportToXML(), TitleWidget::refreshCollectionAnnotations(), TitleWidget::setSubalbumImage(), and TitleWidget::unsetSubalbumImage().
| int Subalbum::getSubalbumNumber | ( | ) |
Returns subalbum number.
Definition at line 103 of file subalbum.cpp.
References number.
Referenced by Photo::Photo().
| void Subalbum::importFromDisk | ( | QDomNode * | root, |
| int | subalbumNum, | ||
| StatusWidget * | status, | ||
| QString | dirName, | ||
| bool | disableCheckPhotoMods ) |
Builds subalbum from XML DOM node.
Definition at line 350 of file subalbum.cpp.
References addPhoto(), description, Photo::getImageChecksum(), getLast(), getMD5(), Photo::getSlideshowChecksum(), Photo::getThumbnailChecksum(), Photo::importFromDisk(), StatusWidget::incrementProgress(), lazyAddPhoto(), name, resetNumLoadedPhotos(), setRepresentativeImage(), and status.
Referenced by Album::importFromDisk().
| bool Subalbum::lazyAddPhoto | ( | QString | imageName, |
| QString | slideshowName, | ||
| QString | thumbnailName, | ||
| Photo * | newPhoto ) |
Lazily adds a new photo to the subalbum without rescaling from scrath, returns TRUE if successful.
Definition at line 252 of file subalbum.cpp.
References albm, firstPhoto, lastPhoto, numPhotos, Photo::setImage(), Album::setModified(), Photo::setNext(), and Photo::setPrev().
Referenced by importFromDisk().
| void Subalbum::photoMoved | ( | Photo * | val | ) |
Removes a specified photo without deleting the object.
Definition at line 484 of file subalbum.cpp.
References albm, firstPhoto, Photo::getNext(), Photo::getPrev(), lastPhoto, numPhotos, Album::setModified(), Photo::setNext(), and Photo::setPrev().
Referenced by SubalbumPreviewWidget::dropped().
| void Subalbum::removePhoto | ( | Photo * | val | ) |
Removes a specified photo.
Definition at line 281 of file subalbum.cpp.
References albm, firstPhoto, Photo::getNext(), Photo::getPrev(), lastPhoto, numPhotos, Album::setModified(), Photo::setNext(), and Photo::setPrev().
Referenced by SubalbumWidget::removeImageAction().
| void Subalbum::resetNumLoadedPhotos | ( | ) |
Definition at line 171 of file subalbum.cpp.
References loadedPhotos, and numPhotos.
Referenced by importFromDisk(), and Album::removeStagnantImages().
| void Subalbum::setDescription | ( | QString | val | ) |
Sets the Subalbum description.
Definition at line 116 of file subalbum.cpp.
References albm, description, and Album::setModified().
Referenced by TitleWidget::storeAnnotations().
| void Subalbum::setModified | ( | ) |
Definition at line 172 of file subalbum.cpp.
References albm, and Album::setModified().
Referenced by Photo::constructSmallerImages(), Photo::setDescription(), Photo::setNext(), and Photo::setPrev().
| void Subalbum::setName | ( | QString | val | ) |
Sets the Subalbum Name.
Definition at line 107 of file subalbum.cpp.
References albm, name, and Album::setModified().
Referenced by TitleWidget::storeAnnotations().
| void Subalbum::setNext | ( | Subalbum * | val | ) |
Sets pointer of next subalbum.
Definition at line 307 of file subalbum.cpp.
References albm, nextSubalbum, and Album::setModified().
Referenced by Album::appendSubalbum(), Album::removeSubalbum(), and Album::syncSubalbumList().
| void Subalbum::setPrev | ( | Subalbum * | val | ) |
Sets pointer of prev subalbum.
Definition at line 301 of file subalbum.cpp.
References albm, prevSubalbum, and Album::setModified().
Referenced by Album::appendSubalbum(), Album::removeSubalbum(), and Album::syncSubalbumList().
| void Subalbum::setRepresentativeImage | ( | QString | imageFilename | ) |
sets a sized representative image
Definition at line 125 of file subalbum.cpp.
References albm, calcScaledImageDimensions(), SubalbumPreviewWidget::createSubalbumPixmap(), getImageSize(), IMAGE_PATH, largeRepresentativeImage, mediumRepresentativeImage, REP_IMAGE_HEIGHT, scaleImage(), Album::setModified(), and smallRepresentativeImage.
Referenced by importFromDisk(), TitleWidget::setSubalbumImage(), and TitleWidget::unsetSubalbumImage().
| void Subalbum::setSubalbumNumber | ( | int | newVal | ) |
Sets the subalbum number to newVal.
Definition at line 170 of file subalbum.cpp.
References number.
Referenced by Album::exportToDisk().
| void Subalbum::syncPhotoList | ( | PhotoPreviewWidget * | item | ) |
Syncs photo ordering with front end gui ordering.
Definition at line 501 of file subalbum.cpp.
References firstPhoto, Photo::getNext(), PhotoPreviewWidget::getPhoto(), lastPhoto, Photo::setNext(), and Photo::setPrev().
Referenced by SubalbumWidget::reorder().
|
private |
Pointer to album subalbum is in.
Definition at line 180 of file subalbum.h.
Referenced by addPhoto(), addPhoto(), getAlbum(), lazyAddPhoto(), photoMoved(), removePhoto(), setDescription(), setModified(), setName(), setNext(), setPrev(), setRepresentativeImage(), and Subalbum().
|
private |
Longer description of subalbum.
Definition at line 160 of file subalbum.h.
Referenced by exportToXML(), getDescription(), importFromDisk(), setDescription(), and Subalbum().
|
private |
Pointer to first photo.
Definition at line 168 of file subalbum.h.
Referenced by addPhoto(), addPhoto(), exportToXML(), getFirst(), lazyAddPhoto(), photoMoved(), removePhoto(), Subalbum(), syncPhotoList(), and ~Subalbum().
|
private |
Definition at line 165 of file subalbum.h.
Referenced by getRepresentativeImage(), setRepresentativeImage(), Subalbum(), and ~Subalbum().
|
private |
Pointer to last photo.
Definition at line 171 of file subalbum.h.
Referenced by addPhoto(), addPhoto(), getLast(), lazyAddPhoto(), photoMoved(), removePhoto(), Subalbum(), and syncPhotoList().
|
private |
Number of photos in subalbum when last loaded.
Definition at line 154 of file subalbum.h.
Referenced by getNumLoadedPhotos(), resetNumLoadedPhotos(), and Subalbum().
|
private |
Definition at line 164 of file subalbum.h.
Referenced by getRepresentativeImage(), setRepresentativeImage(), Subalbum(), and ~Subalbum().
|
private |
Short Name for subalbum.
Definition at line 157 of file subalbum.h.
Referenced by exportToXML(), getName(), importFromDisk(), setName(), and Subalbum().
|
private |
Pointer to next subalbum.
Definition at line 177 of file subalbum.h.
Referenced by getNext(), setNext(), and Subalbum().
|
private |
Subalbum Number.
Definition at line 148 of file subalbum.h.
Referenced by exportToXML(), getSubalbumNumber(), setSubalbumNumber(), and Subalbum().
|
private |
Number of photos in subalbum.
Definition at line 151 of file subalbum.h.
Referenced by addPhoto(), addPhoto(), getNumPhotos(), lazyAddPhoto(), photoMoved(), removePhoto(), resetNumLoadedPhotos(), and Subalbum().
|
private |
Pointer to prev subalbum.
Definition at line 174 of file subalbum.h.
Referenced by getPrev(), setPrev(), and Subalbum().
|
private |
Definition at line 163 of file subalbum.h.
Referenced by getRepresentativeImage(), setRepresentativeImage(), Subalbum(), and ~Subalbum().