#include <album.h>
Collaboration diagram for Album:
Specific contents:
Definition at line 50 of file album.h.
Public Member Functions | |
Album (QString tmpDir, bool createSubalbum=true) | |
Sets default information and create temporary directory as necessary. | |
~Album () | |
Frees Subalbums. | |
void | setName (QString val) |
Sets the album name. | |
QString | getName () |
Gets the album name. | |
void | setDescription (QString val) |
Sets the album description. | |
QString | getDescription () |
Gets the album description. | |
void | setAuthor (QString val) |
Sets the album author. | |
QString | getAuthor () |
Gets the album author. | |
void | setRepresentativeImages (QString imageFilename) |
Sets the representative image. | |
QPixmap * | getRepresentativeImage (int size) |
Returns the representative image. | |
Subalbum * | getFirstSubalbum () |
Returns a pointer to the first Subalbum. | |
Subalbum * | getLastSubalbum () |
Returns a pointer to the last Subalbum. | |
void | appendSubalbum (Subalbum *val) |
Appends subalbum to end of linked list. | |
void | removeSubalbum (Subalbum *val) |
Removes a subalbum. | |
int | getModificationYear () |
Returns the last modified year. | |
int | getModificationMonth () |
Returns the last modified month. | |
int | getModificationDay () |
Returns the last modified day. | |
int | getCreationYear () |
Returns the creation year. | |
int | getCreationMonth () |
Returns the creation month. | |
int | getCreationDay () |
Returnst he creation day. | |
void | updateCreationDate () |
Updates the creation date to today's date. | |
void | updateModificationDate () |
Updates the modification date to today's date. | |
int | importFromDisk (StatusWidget *status, QString fileName, bool disableCheckPhotoMods) |
Imports album from XML format, returning int indicates success or not. | |
int | exportToDisk (StatusWidget *status, QString dirName, QString themeName) |
Exports album in XML and HTML format, along with resized images. | |
int | exportToDisk (StatusWidget *status, bool forceSave=false) |
Exports album in XML and HTML format, along with resized images, saves all files to the last saved directory, if none set returns. | |
int | exportCompressedWebAlbum (StatusWidget *status, QString exportLocation, QString exportMessage) |
Export a compressed web album (excludes full size images and xml data). | |
int | exportLargeImages (StatusWidget *status, QString exportPath, QString exportMessage) |
Export fullsize images (excludes slideshow and thumbnail images, album and collection iamges, and html or xml files). | |
bool | prevSave () |
Returns true if album previously saved to disk. | |
bool | albumModified () |
Returns true if album has been modified since the last save operation. | |
void | setModified (bool val=true) |
Sets the album as modified. | |
void | syncSubalbumList (SubalbumPreviewWidget *item) |
Syncs subalbum ordering with front end gui ordering. | |
QString | getSaveLocation () |
Returns the current save location of all images. | |
int | getNumPhotos () |
Returns the number of photos. | |
int | getNumSubalbums () |
Returns number of subalbums. | |
QString | getTheme () |
Returns currently selected theme. | |
QString | getTmpDir () |
Returns the temporary directory for use when modifying and adding new images. | |
int | getNextUniquePhotoID () |
Returns the next unique photo id. | |
QStringList | getThumbnailFilenames () |
Returns a list of the most up to date thumbnail filesnames. | |
Private Member Functions | |
int | exportToXML (StatusWidget *status, QString exportPath) |
Exports album to XML. | |
void | exportTopLevelImages () |
Exports top level images. | |
void | exportSubalbumImages (StatusWidget *status, bool forceSave) |
Exports subalbum images. | |
void | removeStagnantOrigFiles (StatusWidget *status) |
Removes any _orig images for photos which have been recently reverted to their original form (and hence we can reduce disk usage but removing these effective duplicates). | |
void | reorderSubalbumImages (StatusWidget *status) |
Checks if images need to be moved and does so if necessary. | |
void | removeStagnantImages () |
Removes old stagnant images caused when photos are removed from album or moved from one subalbum to another. | |
void | exportThemeResources (QString theme) |
Removes previously saved resources, copies over new resources. | |
Private Attributes | |
QString | name |
Short name for album. | |
QString | description |
Longer description of album. | |
QString | author |
Album Creator. | |
QPixmap * | smallRepresentativeImage |
Representative images. | |
QPixmap * | largeRepresentativeImage |
Subalbum * | firstSubalbum |
Pointer to first Subalbum. | |
Subalbum * | lastSubalbum |
Pointer to last Subalbum. | |
int | modificationYear |
Last modification year. | |
int | modificationMonth |
Last modification month. | |
int | modificationDay |
Last modification day. | |
int | creationYear |
Creation year. | |
int | creationMonth |
Creation month. | |
int | creationDay |
Creation day. | |
int | numSubalbums |
Number of subalbums. | |
int | numLoadedSubalbums |
Number of loaded subalbums. | |
bool | savedToDisk |
Set if album was loaded/has been saved to disk. | |
QString | saveLocation |
Directory album saved to. | |
QString | oldSaveLocation |
QString | theme |
Theme to save album with. | |
bool | modified |
Modification status of the album. | |
QString | tmpDir |
Temporary directory for placing modified or new images before saving takes place. | |
int | nextUniqueID |
Next Unique ID for new photos. |
|
Sets default information and create temporary directory as necessary.
Definition at line 41 of file album.cpp. References Album(), appendSubalbum(), author, description, firstSubalbum, getTmpDir(), largeRepresentativeImage, lastSubalbum, modified, name, nextUniqueID, numLoadedSubalbums, numSubalbums, savedToDisk, saveLocation, smallRepresentativeImage, theme, updateCreationDate(), and updateModificationDate(). Referenced by Album().
|
|
Frees Subalbums.
Definition at line 84 of file album.cpp. References firstSubalbum, Subalbum::getNext(), largeRepresentativeImage, smallRepresentativeImage, and tmpDir.
|
|
Returns true if album has been modified since the last save operation.
Definition at line 139 of file album.cpp. References modified. Referenced by Window::closeEvent(), TitleWidget::newAlbum(), TitleWidget::proceedWithLoad(), and TitleWidget::revertToSaved().
|
|
Appends subalbum to end of linked list.
Definition at line 234 of file album.cpp. References appendSubalbum(), firstSubalbum, lastSubalbum, modified, numSubalbums, Subalbum::setNext(), and Subalbum::setPrev(). Referenced by Album(), appendSubalbum(), SubalbumsWidget::createAction(), and importFromDisk().
|
|
Export a compressed web album (excludes full size images and xml data).
Definition at line 616 of file album.cpp. References ALBUM_EXPORTED, copyFile(), exportCompressedWebAlbum(), exportToXML(), firstSubalbum, Subalbum::getFirst(), Subalbum::getNext(), Photo::getNext(), getNumPhotos(), Subalbum::getRepresentativeImage(), getRepresentativeImage(), Photo::getSlideshowFilename(), Photo::getThumbnailFilename(), LARGE, status, theme, THEMES_PATH, transformXMLtoHTML(), and StatusWidget::updateProgress(). Referenced by exportCompressedWebAlbum(), and TitleWidget::exportSmallWebGallery().
|
|
Export fullsize images (excludes slideshow and thumbnail images, album and collection iamges, and html or xml files).
Definition at line 726 of file album.cpp. References ALBUM_EXPORTED, copyFile(), exportLargeImages(), Subalbum::getFirst(), getFirstSubalbum(), Photo::getImageFilename(), Photo::getNext(), Subalbum::getNext(), getNumPhotos(), Subalbum::getNumPhotos(), getNumSubalbums(), status, and StatusWidget::updateProgress(). Referenced by TitleWidget::exportLargeImages(), and exportLargeImages().
|
|
Exports subalbum images. ok, now it's safe to move over currrent version of the photo ---- ---- Before we move the file we must be sure to preserve the photos original format. if the photo was not recently reverted (if it was then we're saving out the original form so no need to backup) and the file has previously been saved and an orig file does not exist, we better backup the previously saved version quick If a photo has never been saved before, make sure to also move over any orig file if one exists. The presence of such a file indicates a photo was modified before it was ever saved, but the original form has been preseved and should be backed up at this time to allow a user to revert to the photos original form in the future. Definition at line 889 of file album.cpp. References copyFile(), exportSubalbumImages(), firstSubalbum, Photo::getEverSaved(), Subalbum::getFirst(), Photo::getImageFilename(), Photo::getInitialPhotoNumber(), Photo::getInitialSubalbumNumber(), getMD5(), Photo::getNeedsSavingVal(), Subalbum::getNext(), Photo::getNext(), Photo::getRecentlyReverted(), Photo::getSlideshowFilename(), Photo::getThumbnailFilename(), getTmpDir(), StatusWidget::incrementProgress(), moveFile(), oldSaveLocation, saveLocation, Photo::setEverSaved(), Photo::setImageChecksum(), Photo::setImageFilename(), Photo::setNeedsSavingVal(), Photo::setSlideshowChecksum(), Photo::setSlideshowFilename(), Photo::setThumbnailChecksum(), Photo::setThumbnailFilename(), status, and tmpDir. Referenced by exportSubalbumImages(), and exportToDisk().
|
|
Removes previously saved resources, copies over new resources.
Definition at line 1322 of file album.cpp. References copyFile(), exportThemeResources(), saveLocation, and THEMES_PATH. Referenced by exportThemeResources(), and exportToDisk().
|
|
Exports album in XML and HTML format, along with resized images, saves all files to the last saved directory, if none set returns.
Definition at line 506 of file album.cpp. References ALBUM_EXPORTED, exportSubalbumImages(), exportThemeResources(), exportToDisk(), exportTopLevelImages(), exportToXML(), firstSubalbum, Subalbum::getNext(), Subalbum::getNumPhotos(), getTmpDir(), modified, removeStagnantImages(), removeStagnantOrigFiles(), reorderSubalbumImages(), savedToDisk, saveLocation, StatusWidget::setStatus(), Subalbum::setSubalbumNumber(), StatusWidget::showProgressBar(), status, theme, and transformXMLtoHTML().
|
|
Exports album in XML and HTML format, along with resized images.
Definition at line 452 of file album.cpp. References ALBUM_EXPORTED, exportToDisk(), nextUniqueID, oldSaveLocation, saveLocation, status, theme, and tmpDir. Referenced by exportToDisk(), TitleWidget::saveAlbum(), and TitleWidget::saveAsAlbum().
|
|
Exports top level images.
Definition at line 853 of file album.cpp. References firstSubalbum, Subalbum::getNext(), Subalbum::getRepresentativeImage(), getRepresentativeImage(), LARGE, and saveLocation. Referenced by exportToDisk().
|
|
Exports album to XML.
Definition at line 801 of file album.cpp. References ALBUM_ERROR_OPEN_FILE, ALBUM_EXPORTED, author, creationDay, creationMonth, creationYear, description, Subalbum::exportToXML(), exportToXML(), firstSubalbum, fixXMLString(), Subalbum::getNext(), getRepresentativeImage(), LARGE, modificationDay, modificationMonth, modificationYear, name, SLIDESHOW_HEIGHT, SLIDESHOW_WIDTH, status, theme, THUMBNAIL_HEIGHT, THUMBNAIL_WIDTH, and updateModificationDate(). Referenced by exportCompressedWebAlbum(), exportToDisk(), and exportToXML().
|
|
Gets the album author.
Definition at line 126 of file album.cpp. References author. Referenced by TitleWidget::updateAlbumAnnotations().
|
|
Returnst he creation day.
Definition at line 122 of file album.cpp. References creationDay.
|
|
Returns the creation month.
Definition at line 121 of file album.cpp. References creationMonth.
|
|
Returns the creation year.
Definition at line 120 of file album.cpp. References creationYear.
|
|
Gets the album description.
Definition at line 125 of file album.cpp. References description. Referenced by TitleWidget::updateAlbumAnnotations().
|
|
Returns a pointer to the first Subalbum.
Definition at line 135 of file album.cpp. References firstSubalbum. Referenced by SlideshowWidget::advanceCollection(), AlbumStatistics::AlbumStatistics(), exportLargeImages(), TitleWidget::loadAlbum(), SubalbumsWidget::refreshCollectionsList(), and SlideshowWidget::showCoverPage().
|
|
Returns a pointer to the last Subalbum.
Definition at line 136 of file album.cpp. References lastSubalbum. Referenced by SlideshowWidget::backupCollection().
|
|
Returns the last modified day.
Definition at line 118 of file album.cpp. References modificationDay.
|
|
Returns the last modified month.
Definition at line 117 of file album.cpp. References modificationMonth.
|
|
Returns the last modified year.
Definition at line 116 of file album.cpp. References modificationYear.
|
|
Gets the album name.
Definition at line 124 of file album.cpp. References name. Referenced by TitleWidget::exportLargeImages(), TitleWidget::exportSmallWebGallery(), TitleWidget::loadAlbum(), TitleWidget::saveAlbum(), TitleWidget::saveAsAlbum(), and TitleWidget::updateAlbumAnnotations().
|
|
Returns the next unique photo id.
Definition at line 1420 of file album.cpp. References nextUniqueID. Referenced by Subalbum::addPhoto().
|
|
Returns the number of photos.
Definition at line 146 of file album.cpp. References firstSubalbum, Subalbum::getNext(), and Subalbum::getNumPhotos(). Referenced by exportCompressedWebAlbum(), TitleWidget::exportLargeImages(), exportLargeImages(), TitleWidget::exportSmallWebGallery(), TitleWidget::loadAlbum(), TitleWidget::saveAlbum(), and TitleWidget::saveAsAlbum().
|
|
Returns number of subalbums.
Definition at line 144 of file album.cpp. References numSubalbums. Referenced by SlideshowWidget::backupCollection(), SubalbumsWidget::createAction(), exportLargeImages(), and SlideshowWidget::paintOverlaidControls().
|
|
Returns the representative image.
Definition at line 128 of file album.cpp. References getRepresentativeImage(), LARGE, largeRepresentativeImage, SMALL, and smallRepresentativeImage. Referenced by exportCompressedWebAlbum(), exportTopLevelImages(), exportToXML(), getRepresentativeImage(), TitleWidget::setAlbumImage(), and TitleWidget::updateAlbumAnnotations().
|
|
Returns the current save location of all images.
Definition at line 141 of file album.cpp. References saveLocation. Referenced by TitleWidget::exportLargeImages(), TitleWidget::exportSmallWebGallery(), TitleWidget::loadAlbum(), Photo::originalImageFilename(), TitleWidget::revertToSaved(), TitleWidget::saveAlbum(), and TitleWidget::saveAsAlbum().
|
|
Returns currently selected theme.
Definition at line 143 of file album.cpp. References theme. Referenced by TitleWidget::saveAsAlbum().
|
|
Returns a list of the most up to date thumbnail filesnames.
Definition at line 1426 of file album.cpp. References firstSubalbum, Subalbum::getFirst(), Subalbum::getNext(), Photo::getNext(), and Photo::getThumbnailFilename(). Referenced by MosaicOptionsDialog::determineFilesList().
|
|
Returns the temporary directory for use when modifying and adding new images.
Definition at line 142 of file album.cpp. References tmpDir. Referenced by Album(), Photo::applyTransformation(), exportSubalbumImages(), exportToDisk(), TitleWidget::loadAlbum(), TitleWidget::newAlbum(), Photo::setImage(), and TitleWidget::TitleWidget().
|
|
Imports album from XML format, returning int indicates success or not.
Definition at line 295 of file album.cpp. References ALBUM_LOADED, ALBUM_READ_ERROR, ALBUM_XML_ERROR, appendSubalbum(), author, creationDay, creationMonth, creationYear, description, Subalbum::importFromDisk(), importFromDisk(), name, numLoadedSubalbums, numSubalbums, savedToDisk, saveLocation, setRepresentativeImages(), StatusWidget::setStatus(), StatusWidget::showProgressBar(), status, theme, and updateXML(). Referenced by importFromDisk(), and TitleWidget::loadAlbum().
|
|
Returns true if album previously saved to disk.
Definition at line 138 of file album.cpp. References savedToDisk. Referenced by TitleWidget::exportLargeImages(), TitleWidget::exportSmallWebGallery(), TitleWidget::saveAlbum(), and TitleWidget::saveAsAlbum().
|
|
Removes old stagnant images caused when photos are removed from album or moved from one subalbum to another.
Definition at line 1244 of file album.cpp. References firstSubalbum, Subalbum::getNext(), Subalbum::getNumPhotos(), numLoadedSubalbums, numSubalbums, Subalbum::resetNumLoadedPhotos(), and saveLocation. Referenced by exportToDisk().
|
|
Removes any _orig images for photos which have been recently reverted to their original form (and hence we can reduce disk usage but removing these effective duplicates).
Definition at line 1093 of file album.cpp. References firstSubalbum, Subalbum::getFirst(), Photo::getImageFilename(), Subalbum::getNext(), Photo::getNext(), Photo::getRecentlyReverted(), StatusWidget::incrementProgress(), Photo::originalImageFilename(), removeStagnantOrigFiles(), Photo::setRecentlyReverted(), status, and tmpDir. Referenced by exportToDisk(), and removeStagnantOrigFiles().
|
|
Removes a subalbum.
Definition at line 257 of file album.cpp. References firstSubalbum, Subalbum::getNext(), Subalbum::getPrev(), lastSubalbum, modified, numSubalbums, removeSubalbum(), Subalbum::setNext(), and Subalbum::setPrev(). Referenced by SubalbumsWidget::deleteAction(), and removeSubalbum().
|
|
Checks if images need to be moved and does so if necessary.
Definition at line 1126 of file album.cpp. References firstSubalbum, Subalbum::getFirst(), Photo::getInitialPhotoNumber(), Photo::getInitialSubalbumNumber(), Subalbum::getNext(), Photo::getNext(), StatusWidget::incrementProgress(), moveFile(), reorderSubalbumImages(), saveLocation, Photo::setImageFilename(), Photo::setInitialPhotoNumber(), Photo::setInitialSubalbumNumber(), Photo::setSlideshowFilename(), Photo::setThumbnailFilename(), status, and tmpDir. Referenced by exportToDisk(), and reorderSubalbumImages().
|
|
Sets the album author.
Definition at line 177 of file album.cpp. References author, modified, and setAuthor(). Referenced by setAuthor(), and TitleWidget::storeAnnotations().
|
|
Sets the album description.
Definition at line 168 of file album.cpp. References description, modified, and setDescription(). Referenced by setDescription(), and TitleWidget::storeAnnotations().
|
|
Sets the album as modified.
Definition at line 1418 of file album.cpp. References modified, and setModified(). Referenced by Subalbum::addPhoto(), Subalbum::lazyAddPhoto(), TitleWidget::loadAlbum(), TitleWidget::newAlbum(), Subalbum::photoMoved(), Subalbum::removePhoto(), Subalbum::setDescription(), Subalbum::setModified(), setModified(), Subalbum::setName(), Subalbum::setNext(), Subalbum::setPrev(), and Subalbum::setRepresentativeImage().
|
|
Sets the album name.
Definition at line 159 of file album.cpp. References modified, name, and setName(). Referenced by setName(), and TitleWidget::storeAnnotations().
|
|
Sets the representative image.
Definition at line 186 of file album.cpp. References calcScaledImageDimensions(), getImageSize(), largeRepresentativeImage, modified, REP_IMAGE_HEIGHT, scaleImage(), setRepresentativeImages(), and smallRepresentativeImage. Referenced by importFromDisk(), TitleWidget::setAlbumImage(), setRepresentativeImages(), and TitleWidget::unsetAlbumImage().
|
|
Syncs subalbum ordering with front end gui ordering.
Definition at line 1369 of file album.cpp. References firstSubalbum, Subalbum::getNext(), SubalbumPreviewWidget::getSubalbum(), lastSubalbum, Subalbum::setNext(), Subalbum::setPrev(), and syncSubalbumList(). Referenced by SubalbumsWidget::reorder(), and syncSubalbumList().
|
|
Updates the creation date to today's date.
Definition at line 277 of file album.cpp. References creationDay, creationMonth, and creationYear. Referenced by Album().
|
|
Updates the modification date to today's date.
Definition at line 286 of file album.cpp. References modificationDay, modificationMonth, and modificationYear. Referenced by Album(), and exportToXML().
|
|
Album Creator.
Definition at line 203 of file album.h. Referenced by Album(), exportToXML(), getAuthor(), importFromDisk(), and setAuthor(). |
|
Creation day.
Definition at line 231 of file album.h. Referenced by exportToXML(), getCreationDay(), importFromDisk(), and updateCreationDate(). |
|
Creation month.
Definition at line 228 of file album.h. Referenced by exportToXML(), getCreationMonth(), importFromDisk(), and updateCreationDate(). |
|
Creation year.
Definition at line 225 of file album.h. Referenced by exportToXML(), getCreationYear(), importFromDisk(), and updateCreationDate(). |
|
Longer description of album.
Definition at line 200 of file album.h. Referenced by Album(), exportToXML(), getDescription(), importFromDisk(), and setDescription(). |
|
Pointer to first Subalbum.
Definition at line 210 of file album.h. Referenced by Album(), appendSubalbum(), exportCompressedWebAlbum(), exportSubalbumImages(), exportToDisk(), exportTopLevelImages(), exportToXML(), getFirstSubalbum(), getNumPhotos(), getThumbnailFilenames(), removeStagnantImages(), removeStagnantOrigFiles(), removeSubalbum(), reorderSubalbumImages(), syncSubalbumList(), and ~Album(). |
|
Definition at line 207 of file album.h. Referenced by Album(), getRepresentativeImage(), setRepresentativeImages(), and ~Album(). |
|
Pointer to last Subalbum.
Definition at line 213 of file album.h. Referenced by Album(), appendSubalbum(), getLastSubalbum(), removeSubalbum(), and syncSubalbumList(). |
|
Last modification day.
Definition at line 222 of file album.h. Referenced by exportToXML(), getModificationDay(), and updateModificationDate(). |
|
Last modification month.
Definition at line 219 of file album.h. Referenced by exportToXML(), getModificationMonth(), and updateModificationDate(). |
|
Last modification year.
Definition at line 216 of file album.h. Referenced by exportToXML(), getModificationYear(), and updateModificationDate(). |
|
Modification status of the album.
Definition at line 252 of file album.h. Referenced by Album(), albumModified(), appendSubalbum(), exportToDisk(), removeSubalbum(), setAuthor(), setDescription(), setModified(), setName(), and setRepresentativeImages(). |
|
Short name for album.
Definition at line 197 of file album.h. Referenced by Album(), exportToXML(), getName(), importFromDisk(), and setName(). |
|
Next Unique ID for new photos. This counter is used to gerneate unique filenames before photos are saved. After saving we reset this counter to avoid wrap-around. Definition at line 260 of file album.h. Referenced by Album(), exportToDisk(), and getNextUniquePhotoID(). |
|
Number of loaded subalbums.
Definition at line 237 of file album.h. Referenced by Album(), importFromDisk(), and removeStagnantImages(). |
|
Number of subalbums.
Definition at line 234 of file album.h. Referenced by Album(), appendSubalbum(), getNumSubalbums(), importFromDisk(), removeStagnantImages(), and removeSubalbum(). |
|
Definition at line 246 of file album.h. Referenced by exportSubalbumImages(), and exportToDisk(). |
|
Set if album was loaded/has been saved to disk.
Definition at line 240 of file album.h. Referenced by Album(), exportToDisk(), importFromDisk(), and prevSave(). |
|
Directory album saved to.
Definition at line 243 of file album.h. Referenced by Album(), exportSubalbumImages(), exportThemeResources(), exportToDisk(), exportTopLevelImages(), getSaveLocation(), importFromDisk(), removeStagnantImages(), and reorderSubalbumImages(). |
|
Representative images.
Definition at line 206 of file album.h. Referenced by Album(), getRepresentativeImage(), setRepresentativeImages(), and ~Album(). |
|
Theme to save album with.
Definition at line 249 of file album.h. Referenced by Album(), exportCompressedWebAlbum(), exportToDisk(), exportToXML(), getTheme(), and importFromDisk(). |
|
Temporary directory for placing modified or new images before saving takes place.
Definition at line 255 of file album.h. Referenced by exportSubalbumImages(), exportToDisk(), getTmpDir(), removeStagnantOrigFiles(), reorderSubalbumImages(), and ~Album(). |