11#ifndef BACKEND_PHOTO_H
12#define BACKEND_PHOTO_H
25#include <Q3TextStream>
64 QString slideshowName,
65 QString thumbnailName);
68 bool setImage(QString imageName,
int uniqueID);
72 bool setImage(QString editedImageFilename);
A photo consists of a full size image, a smaller slide show image, a very small thumbnail image,...
void rotate270()
Rotates image clockwise 270 degrees.
bool getRecentlyReverted()
was the photo recently reverted? if so ignore the presence of orig files on disk
void setSlideshowChecksum(QString val)
Update slideshow checksum.
Subalbum * subalbum
Subalbum photo is in.
QDateTime * importFromDisk(QDomNode *root)
Builds photo from XML DOM node, returns date modified info from xml.
void setThumbnailChecksum(QString val)
Update thumbnail checksum.
bool getNeedsSavingVal()
Returns if the image needs to be saved to its permament location.
bool setImage(QString imageName, QString slideshowName, QString thumbnailName)
Setup photo using preexisting full size, slideshow, and thumbnail images.
void setRecentlyReverted(bool val)
reset the recently reverted value to val
Photo(Subalbum *subalbum, Photo *prev, int photoNumber)
Sets default information.
Photo * getNext()
Returns next photo pointer.
void applyTransformation(TRANSFORM_CODE transformation)
Apply transformation.
void rotate90()
Rotates image clockwise 90 degrees.
bool everSaved
Has the photo ever been saved?
QString thumbnailChecksum
QString getThumbnailChecksum()
Get thumbanil checksum.
void setInitialSubalbumNumber(int val)
Sets initial subalbum number.
QString getImageFilename()
Gets the image filename.
void setEverSaved(bool val)
sets everSaved
bool getEverSaved()
Returns if the image has ever been saved to a permanant location.
QString originalImageFilename()
orig filename
Photo * prev
Pointer to prev photo.
void setNext(Photo *val)
Sets next photo pointer.
QString description
Photo description.
void setPrev(Photo *val)
Sets prev photo pointer.
void setNeedsSavingVal(bool val)
Sets if the image needs to be saved to its permanent location.
QString thumbnailLocation
int getInitialSubalbumNumber()
Returns initial subalbum number.
void setThumbnailFilename(QString val)
Sets the thumbnail filename.
QString slideshowChecksum
void setInitialPhotoNumber(int val)
Sets initial photo number.
void flipVertically()
Flips image about vertical axis.
Photo * next
Pointer to next photo.
QString getThumbnailFilename()
Gets the thumbnail filename.
QImage * getThumbnailImage()
Gets thumbnail image.
Photo * getPrev()
Returns the previous photo pointer.
void exportToXML(Q3TextStream &stream)
Exports photo to xml.
int getInitialPhotoNumber()
Returns initial photo number.
QString imageChecksum
MD5 checksums, used to determine if image/thumbnail have been changed.
int initialSubalbumNumber
QString imageLocation
Filenames
bool recentlyReverted
Has the photo recently been reverted to it's original form? If so during the next save the orig file ...
QString getSlideshowChecksum()
Get thumbanil checksum.
void setSlideshowFilename(QString val)
Sets the slideshow filename.
void setDescription(QString val)
Sets the description.
void flipHorizontally()
Flips image about horizontal axis.
QString getImageChecksum()
Get image checksum.
bool needsSaving
Unsaved modifications?
void setImageFilename(QString val)
Sets the image filename.
bool revertPossible()
can photo be reverted to a differnt original form
QString slideshowLocation
QString getSlideshowFilename()
Gets the slideshow filename.
QString getDescription()
Gets the description.
QImage * thumbnailImage
Thumbnail Image.
void revertPhoto()
revert photo to original form
void setImageChecksum(QString val)
Update image checksum.
bool constructSmallerImages()
Construct thumbnail and slideshow images, load up thumbnail image, and set photo has being modified.
A subalbum contains photos.