#include <photo.h>
Collaboration diagram for Photo:
Definition at line 41 of file photo.h.
Public Member Functions | |
Photo (Subalbum *subalbum, Photo *prev, int photoNumber) | |
Sets default information. | |
~Photo () | |
QImage * | getThumbnailImage () |
Gets thumbnail image. | |
bool | constructSmallerImages () |
Construct thumbnail and slideshow images, load up thumbnail image, and set photo has being modified. | |
bool | setImage (QString imageName, QString slideshowName, QString thumbnailName) |
Setup photo using preexisting full size, slideshow, and thumbnail images. | |
bool | setImage (QString imageName, int uniqueID) |
Setup photo using a new image. We'll need to create slideshow and thumbnail images. | |
bool | setImage (QString editedImageFilename) |
Reset photo data after photo editing has taken place. | |
QString | getImageFilename () |
Gets the image filename. | |
QString | getSlideshowFilename () |
Gets the slideshow filename. | |
QString | getThumbnailFilename () |
Gets the thumbnail filename. | |
void | setImageFilename (QString val) |
Sets the image filename. | |
void | setSlideshowFilename (QString val) |
Sets the slideshow filename. | |
void | setThumbnailFilename (QString val) |
Sets the thumbnail filename. | |
QString | getImageChecksum () |
Get image checksum. | |
QString | getThumbnailChecksum () |
Get thumbanil checksum. | |
QString | getSlideshowChecksum () |
Get thumbanil checksum. | |
void | setImageChecksum (QString val) |
Update image checksum. | |
void | setThumbnailChecksum (QString val) |
Update thumbnail checksum. | |
void | setSlideshowChecksum (QString val) |
Update slideshow checksum. | |
QString | getDescription () |
Gets the description. | |
void | setDescription (QString val) |
Sets the description. | |
Photo * | getPrev () |
Returns the previous photo pointer. | |
Photo * | getNext () |
Returns next photo pointer. | |
void | setPrev (Photo *val) |
Sets prev photo pointer. | |
void | setNext (Photo *val) |
Sets next photo pointer. | |
QDateTime * | importFromDisk (QDomNode *root) |
Builds photo from XML DOM node, returns date modified info from xml. | |
void | exportToXML (QTextStream &stream) |
Exports photo to xml. | |
void | rotate90 () |
Rotates image clockwise 90 degrees. | |
void | rotate270 () |
Rotates image clockwise 270 degrees. | |
void | flipHorizontally () |
Flips image about horizontal axis. | |
void | flipVertically () |
Flips image about vertical axis. | |
void | applyTransformation (TRANSFORM_CODE transformation) |
Apply transformation. | |
bool | getNeedsSavingVal () |
Returns if the image needs to be saved to its permament location. | |
void | setNeedsSavingVal (bool val) |
Sets if the image needs to be saved to its permanent location. | |
bool | getEverSaved () |
Returns if the image has ever been saved to a permanant location. | |
void | setEverSaved (bool val) |
sets everSaved | |
void | revertPhoto () |
revert photo to original form | |
bool | revertPossible () |
can photo be reverted to a differnt original form | |
bool | getRecentlyReverted () |
was the photo recently reverted? if so ignore the presence of orig files on disk | |
void | setRecentlyReverted (bool val) |
reset the recently reverted value to val | |
QString | originalImageFilename () |
orig filename | |
int | getInitialPhotoNumber () |
Returns initial photo number. | |
void | setInitialPhotoNumber (int val) |
Sets initial photo number. | |
int | getInitialSubalbumNumber () |
Returns initial subalbum number. | |
void | setInitialSubalbumNumber (int val) |
Sets initial subalbum number. | |
Private Attributes | |
Subalbum * | subalbum |
Subalbum photo is in. | |
Photo * | prev |
Pointer to prev photo. | |
Photo * | next |
Pointer to next photo. | |
int | initialPhotoNumber |
int | initialSubalbumNumber |
QString | description |
Photo description. | |
QImage * | thumbnailImage |
Thumbnail Image. | |
QString | imageLocation |
Filenames. | |
QString | slideshowLocation |
QString | thumbnailLocation |
QString | imageChecksum |
MD5 checksums, used to determine if image/thumbnail have been changed. | |
QString | slideshowChecksum |
QString | thumbnailChecksum |
bool | needsSaving |
Unsaved modifications? | |
bool | everSaved |
Has the photo ever been saved? | |
bool | recentlyReverted |
Has the photo recently been reverted to it's original form? If so during the next save the orig file can safely be remove. |
|
Sets default information.
Definition at line 31 of file photo.cpp. References description, everSaved, imageChecksum, imageLocation, initialPhotoNumber, initialSubalbumNumber, needsSaving, next, Photo(), recentlyReverted, slideshowChecksum, slideshowLocation, thumbnailChecksum, thumbnailImage, and thumbnailLocation. Referenced by Photo().
|
|
Definition at line 76 of file photo.cpp. References thumbnailImage.
|
|
Apply transformation.
Definition at line 475 of file photo.cpp. References applyTransformation(), constructSmallerImages(), Subalbum::getAlbum(), getEverSaved(), Album::getTmpDir(), imageLocation, initialPhotoNumber, initialSubalbumNumber, moveFile(), needsSaving, recentlyReverted, slideshowLocation, subalbum, thumbnailLocation, and transformImage(). Referenced by applyTransformation(), flipHorizontally(), flipVertically(), rotate270(), and rotate90().
|
|
Construct thumbnail and slideshow images, load up thumbnail image, and set photo has being modified.
Definition at line 84 of file photo.cpp. References constructImages(), imageLocation, needsSaving, Subalbum::setModified(), slideshowLocation, subalbum, thumbnailImage, and thumbnailLocation. Referenced by applyTransformation(), and setImage().
|
|
Exports photo to xml.
Definition at line 413 of file photo.cpp. References description, exportToXML(), fixXMLString(), getImageFilename(), getSlideshowFilename(), getThumbnailFilename(), imageChecksum, slideshowChecksum, and thumbnailChecksum. Referenced by Subalbum::exportToXML(), and exportToXML().
|
|
Flips image about horizontal axis.
Definition at line 472 of file photo.cpp. References applyTransformation(), and FLIP_H.
|
|
Flips image about vertical axis.
Definition at line 473 of file photo.cpp. References applyTransformation(), and FLIP_V.
|
|
Gets the description.
Definition at line 207 of file photo.cpp. References description. Referenced by SlideshowWidget::showPhoto(), and PhotoPreviewWidget::updateDescription().
|
|
Returns if the image has ever been saved to a permanant location.
Definition at line 533 of file photo.cpp. References everSaved. Referenced by applyTransformation(), Album::exportSubalbumImages(), originalImageFilename(), and setImage().
|
|
Get image checksum.
Definition at line 199 of file photo.cpp. References imageChecksum. Referenced by Subalbum::importFromDisk().
|
|
|
Returns initial photo number.
Definition at line 607 of file photo.cpp. References initialPhotoNumber. Referenced by Album::exportSubalbumImages(), and Album::reorderSubalbumImages().
|
|
Returns initial subalbum number.
Definition at line 610 of file photo.cpp. References initialSubalbumNumber. Referenced by Album::exportSubalbumImages(), and Album::reorderSubalbumImages().
|
|
Returns if the image needs to be saved to its permament location.
Definition at line 530 of file photo.cpp. References needsSaving. Referenced by Album::exportSubalbumImages().
|
|
Returns next photo pointer.
Definition at line 224 of file photo.cpp. References next. Referenced by SlideshowWidget::advancePhoto(), AlbumStatistics::AlbumStatistics(), SlideshowWidget::beginSlideshow(), Album::exportCompressedWebAlbum(), Album::exportLargeImages(), Album::exportSubalbumImages(), Subalbum::exportToXML(), Album::getThumbnailFilenames(), Subalbum::photoMoved(), SubalbumWidget::refreshPhotos(), Subalbum::removePhoto(), Album::removeStagnantOrigFiles(), Album::reorderSubalbumImages(), EditingInterface::showNextPhoto(), EditingInterface::showNextPrevFirstLastPhoto(), Subalbum::syncPhotoList(), and Subalbum::~Subalbum().
|
|
Returns the previous photo pointer.
Definition at line 223 of file photo.cpp. References prev. Referenced by SlideshowWidget::backupPhoto(), Subalbum::photoMoved(), Subalbum::removePhoto(), EditingInterface::showNextPrevFirstLastPhoto(), and EditingInterface::showPrevPhoto().
|
|
was the photo recently reverted? if so ignore the presence of orig files on disk
Definition at line 546 of file photo.cpp. References recentlyReverted. Referenced by Album::exportSubalbumImages(), and Album::removeStagnantOrigFiles().
|
|
Get thumbanil checksum.
Definition at line 201 of file photo.cpp. References slideshowChecksum. Referenced by Subalbum::importFromDisk().
|
|
Gets the slideshow filename.
Definition at line 192 of file photo.cpp. References slideshowLocation. Referenced by AlbumStatistics::AlbumStatistics(), Album::exportCompressedWebAlbum(), Album::exportSubalbumImages(), and exportToXML().
|
|
Get thumbanil checksum.
Definition at line 200 of file photo.cpp. References thumbnailChecksum. Referenced by Subalbum::importFromDisk().
|
|
Gets the thumbnail filename.
Definition at line 193 of file photo.cpp. References thumbnailLocation. Referenced by Album::exportCompressedWebAlbum(), Album::exportSubalbumImages(), exportToXML(), Album::getThumbnailFilenames(), TitleWidget::setSubalbumImage(), and PhotoPreviewWidget::updateImage().
|
|
Gets thumbnail image.
Definition at line 82 of file photo.cpp. References thumbnailImage.
|
|
Builds photo from XML DOM node, returns date modified info from xml.
Definition at line 238 of file photo.cpp. References description, imageChecksum, importFromDisk(), slideshowChecksum, and thumbnailChecksum. Referenced by Subalbum::importFromDisk(), and importFromDisk().
|
|
orig filename
Definition at line 571 of file photo.cpp. References Subalbum::getAlbum(), getEverSaved(), Album::getSaveLocation(), imageLocation, initialPhotoNumber, initialSubalbumNumber, and subalbum. Referenced by Album::removeStagnantOrigFiles(), EditingInterface::revertCurrentPhoto(), revertPhoto(), and revertPossible().
|
|
revert photo to original form
Definition at line 556 of file photo.cpp. References originalImageFilename(), recentlyReverted, revertPossible(), and setImage(). Referenced by EditingInterface::revertCurrentPhoto().
|
|
can photo be reverted to a differnt original form
Definition at line 536 of file photo.cpp. References getImageFilename(), originalImageFilename(), and recentlyReverted. Referenced by EditingInterface::currentPhotoRevertable(), and revertPhoto().
|
|
Rotates image clockwise 270 degrees.
Definition at line 471 of file photo.cpp. References applyTransformation(), and ROTATE_270.
|
|
Rotates image clockwise 90 degrees.
Definition at line 470 of file photo.cpp. References applyTransformation(), and ROTATE_90.
|
|
Sets the description.
Definition at line 209 of file photo.cpp. References description, setDescription(), Subalbum::setModified(), and subalbum. Referenced by Subalbum::addPhoto(), PhotoDescEdit::disappear(), and setDescription().
|
|
sets everSaved
Definition at line 534 of file photo.cpp. References everSaved, and setEverSaved(). Referenced by Album::exportSubalbumImages(), setEverSaved(), and setImage().
|
|
Reset photo data after photo editing has taken place. Slideshow and thumbnail images need to be regenerated. Definition at line 155 of file photo.cpp. References constructSmallerImages(), copyFile(), Subalbum::getAlbum(), getEverSaved(), Album::getTmpDir(), imageLocation, initialPhotoNumber, initialSubalbumNumber, recentlyReverted, setImage(), slideshowLocation, subalbum, and thumbnailLocation.
|
|
Setup photo using a new image. We'll need to create slideshow and thumbnail images.
Definition at line 123 of file photo.cpp. References constructSmallerImages(), copyFile(), Subalbum::getAlbum(), Album::getTmpDir(), imageLocation, initialPhotoNumber, initialSubalbumNumber, isJpeg(), setEverSaved(), setImage(), slideshowLocation, subalbum, and thumbnailLocation.
|
|
Setup photo using preexisting full size, slideshow, and thumbnail images. We call this method when loading photos from disk and resizing is not necessary. Definition at line 104 of file photo.cpp. References imageLocation, needsSaving, setImage(), slideshowLocation, thumbnailImage, and thumbnailLocation. Referenced by Subalbum::addPhoto(), EditingInterface::applyImageUpdate(), Subalbum::lazyAddPhoto(), revertPhoto(), EditingInterface::rotateFlip(), and setImage().
|
|
Update image checksum.
Definition at line 203 of file photo.cpp. References imageChecksum, and setImageChecksum(). Referenced by Album::exportSubalbumImages(), and setImageChecksum().
|
|
Sets the image filename.
Definition at line 195 of file photo.cpp. References imageLocation, and setImageFilename(). Referenced by Album::exportSubalbumImages(), Album::reorderSubalbumImages(), and setImageFilename().
|
|
Sets initial photo number.
Definition at line 608 of file photo.cpp. References initialPhotoNumber, and setInitialPhotoNumber(). Referenced by Album::reorderSubalbumImages(), and setInitialPhotoNumber().
|
|
Sets initial subalbum number.
Definition at line 611 of file photo.cpp. References initialSubalbumNumber, and setInitialSubalbumNumber(). Referenced by Album::reorderSubalbumImages(), and setInitialSubalbumNumber().
|
|
Sets if the image needs to be saved to its permanent location.
Definition at line 531 of file photo.cpp. References needsSaving, and setNeedsSavingVal(). Referenced by Album::exportSubalbumImages(), and setNeedsSavingVal().
|
|
Sets next photo pointer.
Definition at line 232 of file photo.cpp. References next, Subalbum::setModified(), setNext(), and subalbum. Referenced by Subalbum::addPhoto(), Subalbum::lazyAddPhoto(), Subalbum::photoMoved(), Subalbum::removePhoto(), setNext(), and Subalbum::syncPhotoList().
|
|
Sets prev photo pointer.
Definition at line 226 of file photo.cpp. References prev, Subalbum::setModified(), setPrev(), and subalbum. Referenced by Subalbum::addPhoto(), Subalbum::lazyAddPhoto(), Subalbum::photoMoved(), Subalbum::removePhoto(), setPrev(), and Subalbum::syncPhotoList().
|
|
reset the recently reverted value to val
Definition at line 551 of file photo.cpp. References recentlyReverted, and setRecentlyReverted(). Referenced by Album::removeStagnantOrigFiles(), and setRecentlyReverted().
|
|
Update slideshow checksum.
Definition at line 205 of file photo.cpp. References setSlideshowChecksum(), and slideshowChecksum. Referenced by Album::exportSubalbumImages(), and setSlideshowChecksum().
|
|
Sets the slideshow filename.
Definition at line 196 of file photo.cpp. References setSlideshowFilename(), and slideshowLocation. Referenced by Album::exportSubalbumImages(), Album::reorderSubalbumImages(), and setSlideshowFilename().
|
|
Update thumbnail checksum.
Definition at line 204 of file photo.cpp. References setThumbnailChecksum(), and thumbnailChecksum. Referenced by Album::exportSubalbumImages(), and setThumbnailChecksum().
|
|
Sets the thumbnail filename.
Definition at line 197 of file photo.cpp. References setThumbnailFilename(), and thumbnailLocation. Referenced by Album::exportSubalbumImages(), Album::reorderSubalbumImages(), and setThumbnailFilename().
|
|
Photo description.
Definition at line 202 of file photo.h. Referenced by exportToXML(), getDescription(), importFromDisk(), Photo(), and setDescription(). |
|
Has the photo ever been saved?
Definition at line 221 of file photo.h. Referenced by getEverSaved(), Photo(), and setEverSaved(). |
|
MD5 checksums, used to determine if image/thumbnail have been changed.
Definition at line 213 of file photo.h. Referenced by exportToXML(), getImageChecksum(), importFromDisk(), Photo(), and setImageChecksum(). |
|
Filenames.
Definition at line 208 of file photo.h. Referenced by applyTransformation(), constructSmallerImages(), getImageFilename(), originalImageFilename(), Photo(), setImage(), and setImageFilename(). |
|
Definition at line 196 of file photo.h. Referenced by applyTransformation(), getInitialPhotoNumber(), originalImageFilename(), Photo(), setImage(), and setInitialPhotoNumber(). |
|
Definition at line 199 of file photo.h. Referenced by applyTransformation(), getInitialSubalbumNumber(), originalImageFilename(), Photo(), setImage(), and setInitialSubalbumNumber(). |
|
Unsaved modifications?
Definition at line 218 of file photo.h. Referenced by applyTransformation(), constructSmallerImages(), getNeedsSavingVal(), Photo(), setImage(), and setNeedsSavingVal(). |
|
Pointer to next photo.
|
|
Pointer to prev photo.
|
|
Has the photo recently been reverted to it's original form? If so during the next save the orig file can safely be remove.
Definition at line 225 of file photo.h. Referenced by applyTransformation(), getRecentlyReverted(), Photo(), revertPhoto(), revertPossible(), setImage(), and setRecentlyReverted(). |
|
Definition at line 214 of file photo.h. Referenced by exportToXML(), getSlideshowChecksum(), importFromDisk(), Photo(), and setSlideshowChecksum(). |
|
Definition at line 209 of file photo.h. Referenced by applyTransformation(), constructSmallerImages(), getSlideshowFilename(), Photo(), setImage(), and setSlideshowFilename(). |
|
Subalbum photo is in.
Definition at line 187 of file photo.h. Referenced by applyTransformation(), constructSmallerImages(), originalImageFilename(), setDescription(), setImage(), setNext(), and setPrev(). |
|
Definition at line 215 of file photo.h. Referenced by exportToXML(), getThumbnailChecksum(), importFromDisk(), Photo(), and setThumbnailChecksum(). |
|
Thumbnail Image.
Definition at line 205 of file photo.h. Referenced by constructSmallerImages(), getThumbnailImage(), Photo(), setImage(), and ~Photo(). |
|
Definition at line 210 of file photo.h. Referenced by applyTransformation(), constructSmallerImages(), getThumbnailFilename(), Photo(), setImage(), and setThumbnailFilename(). |