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