13#ifndef BACKEND_ALBUM_H
14#define BACKEND_ALBUM_H
23#define ALBUM_READ_ERROR 2
24#define ALBUM_XML_ERROR 3
25#define ALBUM_EXPORTED 1
26#define ALBUM_ERROR_OPEN_FILE 2
58 Album( QString
tmpDir,
bool createSubalbum =
true );
135 QString exportLocation,
136 QString exportMessage);
An album contains Subalbums.
bool modified
Modification status of the album.
int getModificationDay()
Returns the last modified day.
QPixmap * largeRepresentativeImage
void exportSubalbumImages(StatusWidget *status, bool forceSave)
Exports subalbum images.
QString author
Album Creator.
Subalbum * getFirstSubalbum()
Returns a pointer to the first Subalbum.
void updateModificationDate()
Updates the modification date to today's date.
void setRepresentativeImages(QString imageFilename)
Sets the representative image.
int creationDay
Creation day.
QString description
Longer description of album.
int nextUniqueID
Next Unique ID for new photos.
void appendSubalbum(Subalbum *val)
Appends subalbum to end of linked list.
void setAuthor(QString val)
Sets the album author.
int getCreationDay()
Returnst he creation day.
QString theme
Theme to save album with.
int getModificationYear()
Returns the last modified year.
void removeStagnantOrigFiles(StatusWidget *status)
Removes any _orig images for photos which have been recently reverted to their original form (and hen...
int importFromDisk(StatusWidget *status, QString fileName, bool disableCheckPhotoMods)
Imports album from XML format, returning int indicates success or not.
QString getDescription()
Gets the album description.
Album(QString tmpDir, bool createSubalbum=true)
Sets default information and create temporary directory as necessary.
int getNextUniquePhotoID()
Returns the next unique photo id.
void reorderSubalbumImages(StatusWidget *status)
Checks if images need to be moved and does so if necessary.
QString saveLocation
Directory album saved to.
int getNumSubalbums()
Returns number of subalbums.
int exportLargeImages(StatusWidget *status, QString exportPath, QString exportMessage)
Export fullsize images (excludes slideshow and thumbnail images, album and collection iamges,...
void exportTopLevelImages()
Exports top level images.
void removeSubalbum(Subalbum *val)
Removes a subalbum.
int exportToDisk(StatusWidget *status, QString dirName, QString themeName)
Exports album in XML and HTML format, along with resized images.
int creationMonth
Creation month.
QString name
Short name for album.
void setName(QString val)
Sets the album name.
int numLoadedSubalbums
Number of loaded subalbums.
int exportCompressedWebAlbum(StatusWidget *status, QString exportLocation, QString exportMessage)
Export a compressed web album (excludes full size images and xml data)
int exportToXML(StatusWidget *status, QString exportPath)
Exports album to XML.
QPixmap * smallRepresentativeImage
Representative images.
void setModified(bool val=true)
Sets the album as modified.
int getModificationMonth()
Returns the last modified month.
QString getTmpDir()
Returns the temporary directory for use when modifying and adding new images.
int getCreationMonth()
Returns the creation month.
bool savedToDisk
Set if album was loaded/has been saved to disk.
Subalbum * lastSubalbum
Pointer to last Subalbum.
int modificationMonth
Last modification month.
void syncSubalbumList(SubalbumPreviewWidget *item)
Syncs subalbum ordering with front end gui ordering.
int getNumPhotos()
Returns the number of photos.
QString getTheme()
Returns currently selected theme.
void exportThemeResources(QString theme)
Removes previously saved resources, copies over new resources.
QString getAuthor()
Gets the album author.
int modificationDay
Last modification day.
void setDescription(QString val)
Sets the album description.
void removeStagnantImages()
Removes old stagnant images caused when photos are removed from album or moved from one subalbum to a...
QString getSaveLocation()
Returns the current save location of all images.
Subalbum * getLastSubalbum()
Returns a pointer to the last Subalbum.
bool prevSave()
Returns true if album previously saved to disk.
int numSubalbums
Number of subalbums.
int getCreationYear()
Returns the creation year.
int modificationYear
Last modification year.
QStringList getThumbnailFilenames()
Returns a list of the most up to date thumbnail filesnames.
bool albumModified()
Returns true if album has been modified since the last save operation.
int creationYear
Creation year.
Subalbum * firstSubalbum
Pointer to first Subalbum.
QString tmpDir
Temporary directory for placing modified or new images before saving takes place.
QString getName()
Gets the album name.
void updateCreationDate()
Updates the creation date to today's date.
QPixmap * getRepresentativeImage(int size)
Returns the representative image.
A subalbum contains photos.