Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Album Class Reference

#include <album.h>

Collaboration diagram for Album:

Collaboration graph
[legend]
List of all members.

Detailed Description

An album contains Subalbums.

Specific contents:

Definition at line 55 of file album.h.

Public Member Functions

 Album ()
 Sets default information.

 ~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 (QImage *val)
 Sets the representative image.

QPixmap * getRepresentativeImage (int size)
 Returns the representative image.

SubalbumgetFirstSubalbum ()
 Returns a pointer to the first Subalbum.

SubalbumgetLastSubalbum ()
 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.

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)
 Imports album from XML format, returning int indicates success or not.

int exportToDisk (StatusWidget *status, bool smallSave, QString dirName, QString themeName)
 Exports album in XML and HTML format, along with resized images.

int exportToDisk (StatusWidget *status, bool smallSave, 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.

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 getNumSubalbums ()
 Returns number of subalbums.

QString getTheme ()
 Returns currently selected theme.


Private Member Functions

int exportToXML ()
 Exports album to XML.

void exportTopLevelImages ()
 Exports top level images.

void exportSubalbumImages (StatusWidget *status, bool smallSave, bool forceSave)
 Exports subalbum images.

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
SubalbumfirstSubalbum
 Pointer to first Subalbum.

SubalbumlastSubalbum
 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 theme
 Theme to save album with.

bool modified
 Modification status of the album.


Constructor & Destructor Documentation

Album::Album  ) 
 

Sets default information.

Definition at line 44 of file album.cpp.

References author, description, firstSubalbum, IMAGE_PATH, largeRepresentativeImage, lastSubalbum, modified, name, numLoadedSubalbums, numSubalbums, savedToDisk, saveLocation, smallRepresentativeImage, theme, and updateCreationDate().

00045 {
00046   //set strings to default values
00047   name = "";
00048   description ="";
00049   author = "";
00050     
00051   theme = "Classic";
00052 
00053   //by default no representative image
00054   smallRepresentativeImage = new QPixmap( QString(IMAGE_PATH)+"notSpecified.png" );
00055   largeRepresentativeImage = NULL;
00056   
00057   //no Subalbums by default
00058   firstSubalbum = NULL;
00059   lastSubalbum = NULL;
00060 
00061   //set the creation date to today
00062   updateCreationDate();
00063   
00064   //no subalbums
00065   numSubalbums = 0;
00066   numLoadedSubalbums = 0;
00067   
00068   //not previously saved by default
00069   savedToDisk = false;
00070   
00071   //no interesting modifications yet
00072   modified = false;
00073   
00074   //construct temp directory to save images to
00075   QDir rootDir( QDir::homeDirPath() );
00076   if(!rootDir.exists( ".albumShaper" ))
00077   {
00078     rootDir.mkdir( ".albumShaper" );
00079   }
00080   rootDir.cd( ".albumShaper" );
00081   if(!rootDir.exists( "tmp" ))
00082   {
00083     rootDir.mkdir( "tmp" );
00084   }
00085   saveLocation = QDir::homeDirPath() + "/.albumShaper/tmp";  
00086 }

Album::~Album  ) 
 

Frees Subalbums.

Definition at line 89 of file album.cpp.

References firstSubalbum, Subalbum::getNext(), largeRepresentativeImage, and smallRepresentativeImage.

00090 {
00091   //delete representative image
00092   delete smallRepresentativeImage;
00093   delete largeRepresentativeImage;
00094   
00095   //delete subalbums  
00096   Subalbum* current = firstSubalbum;
00097   Subalbum* temp;
00098   while(current != NULL)
00099   {
00100     temp = current->getNext();
00101     delete current;
00102     current = temp;
00103   }
00104 } 


Member Function Documentation

bool Album::albumModified  ) 
 

Returns true if album has been modified since the last save operation.

Definition at line 1036 of file album.cpp.

References modified.

Referenced by Window::closeEvent(), TitleWidget::loadAlbum(), and TitleWidget::newAlbum().

01037 {
01038   return modified;
01039 }

void Album::appendSubalbum Subalbum val  ) 
 

Appends subalbum to end of linked list.

Definition at line 215 of file album.cpp.

References firstSubalbum, lastSubalbum, modified, numSubalbums, and Subalbum::setNext().

Referenced by SubalbumsWidget::createAction(), and importFromDisk().

00216 {
00217   numSubalbums++;
00218   
00219   //first subalbum
00220   if(firstSubalbum == NULL)
00221   {
00222     firstSubalbum = val;
00223     lastSubalbum = val;
00224   }
00225   //append to end of list
00226   else
00227   {
00228     lastSubalbum->setNext( val );
00229     lastSubalbum = val;
00230   }
00231 
00232   //set modified
00233   modified = true;
00234 }

void Album::exportSubalbumImages StatusWidget status,
bool  smallSave,
bool  forceSave
[private]
 

Exports subalbum images.

Definition at line 657 of file album.cpp.

References copyFile(), firstSubalbum, Subalbum::getFirst(), Photo::getImage(), Photo::getImageFilename(), Photo::getInitialPhotoNumber(), Photo::getInitialSubalbumNumber(), getMD5(), Photo::getNeedsSavingVal(), Subalbum::getNext(), Photo::getNext(), Photo::getSlideshowFilename(), StatusWidget::incrementProgress(), saveLocation, Photo::setImageChecksum(), Photo::setImageFilename(), Photo::setNeedsSavingVal(), Photo::setSlideshowChecksum(), Photo::setSlideshowFilename(), Photo::setThumbnailChecksum(), Photo::setThumbnailFilename(), and THUMBNAIL.

Referenced by exportToDisk().

00658 {  
00659   //iterate over all subalbums
00660   int subalbumNumber=0;
00661   Subalbum* currentSubalbum = firstSubalbum;
00662   while(currentSubalbum != NULL)
00663   {
00664     subalbumNumber++;    
00665     
00666     //iterate over all photos in this subalbum
00667     int photoNumber=0;    
00668     Photo* currentPhoto = currentSubalbum->getFirst();
00669     while(currentPhoto != NULL)
00670     {
00671       photoNumber++;
00672       //---------------------------------------
00673       //if the current photo does not need to be saved then move on
00674       if( !forceSave && !currentPhoto->getNeedsSavingVal() )
00675       {
00676         currentPhoto = currentPhoto->getNext();
00677         status->incrementProgress();
00678         qApp->processEvents();
00679         continue;
00680       }
00681       //---------------------------------------
00682       //construct a QDir object for the tmp folder
00683       QDir rootDir;
00684       //---------------------------------------
00685       //get initial photo # and subalbum #, used for saving      
00686       int initPhotoNumber = currentPhoto->getInitialPhotoNumber();
00687       int initSubalbumNumber = currentPhoto->getInitialSubalbumNumber();
00688       //---------------------------------------
00689       //export thumbnail image
00690       QString fileName = QString(saveLocation + "/img/%1/%2_thumb.jpg" ).arg(initSubalbumNumber).arg(initPhotoNumber);
00691       currentPhoto->getImage(THUMBNAIL)->save(fileName, "JPEG", 100);
00692 
00693       //compute and store md5 for thumbnail     
00694       std::ifstream thumbnailFile(fileName.ascii());
00695       if(thumbnailFile.is_open())
00696       {
00697         currentPhoto->setThumbnailChecksum( getMD5(thumbnailFile) ); 
00698         thumbnailFile.close();
00699       }
00700       //---------------------------------------
00701       //export slideshow image
00702       QString oldName = currentPhoto->getSlideshowFilename();
00703       QString newName = QString(saveLocation + "/img/%1/%2_slideshow.jpg" ).arg(initSubalbumNumber).arg(initPhotoNumber);
00704 
00705       //if file has been modified move from current location to final location
00706       if( currentPhoto->getNeedsSavingVal() )
00707       {
00708         //attempt to rename file, if fails do explicit copy, then delete prev file
00709          if(!rootDir.rename( oldName, newName))
00710          {
00711            copyFile(oldName, newName);
00712            rootDir.remove(oldName);
00713          }
00714       }
00715       //If file has not been modified we must be doing a save-as and saving has been forced. In this case
00716       //COPY file from current location to final location, DON'T delete previous copy!!!
00717        else
00718        {
00719          copyFile(oldName, newName);
00720        }
00721              
00722       //compute and store md5 for slideshow image
00723       std::ifstream file(newName.ascii());
00724       if(file.is_open())
00725       {
00726         currentPhoto->setSlideshowChecksum( getMD5(file) ); 
00727         file.close();
00728       }
00729       //---------------------------------------
00730       //export full size image, skip is doing small save
00731       if(!smallSave) 
00732       {
00733         oldName = currentPhoto->getImageFilename();   
00734         newName = QString(saveLocation + "/img/%1/%2.jpg" ).arg(initSubalbumNumber).arg(initPhotoNumber);
00735       
00736         //if file has been modified move from current location to final location
00737         if( currentPhoto->getNeedsSavingVal() )
00738         {
00739           //attempt to rename file, if fails do explicit copy, then delete prev file
00740            if(!rootDir.rename( oldName, newName))
00741            {
00742              copyFile(oldName, newName);
00743              rootDir.remove(oldName);
00744            }
00745         }
00746         //If file has not been modified we must be doing a save-as and saving has been forced. In this case
00747         //COPY file from current location to final location, DON'T delete previous copy!!!
00748         else
00749         {
00750           copyFile(oldName, newName);
00751         }
00752             
00753         //compute and store md5 for image
00754         std::ifstream imageFile(newName.ascii());
00755         if(imageFile.is_open())
00756         {
00757           currentPhoto->setImageChecksum( getMD5(imageFile) ); 
00758           imageFile.close();
00759         }
00760       }
00761       //---------------------------------------
00762       //set new storage locations of files (skip if doing small save since large photo not exported)
00763       if(!smallSave)
00764       {
00765         currentPhoto->setImageFilename( QString(saveLocation + "/img/%1/%2.jpg").arg(initSubalbumNumber).arg(initPhotoNumber) );
00766         currentPhoto->setSlideshowFilename( QString(saveLocation + "/img/%1/%2_slideshow.jpg").arg(initSubalbumNumber).arg(initPhotoNumber) );
00767         currentPhoto->setThumbnailFilename( QString(saveLocation + "/img/%1/%2_thumb.jpg").arg(initSubalbumNumber).arg(initPhotoNumber) );
00768       }
00769       //---------------------------------------
00770       //set image as not needing saving (skip if doing small save since large photo not exported)
00771       if(!smallSave)
00772         currentPhoto->setNeedsSavingVal(false);
00773       //---------------------------------------
00774       //update progress bar
00775       status->incrementProgress();
00776       qApp->processEvents();
00777       //---------------------------------------   
00778       //move on to next photo in subalbum
00779       currentPhoto = currentPhoto->getNext();
00780       //---------------------------------------
00781     }
00782     //---------------------------------------
00783     //move on to next subalbum
00784     currentSubalbum = currentSubalbum->getNext();  
00785   }
00786 }

void Album::exportThemeResources QString  theme  )  [private]
 

Removes previously saved resources, copies over new resources.

Definition at line 1006 of file album.cpp.

References copyFile(), saveLocation, and THEMES_PATH.

Referenced by exportToDisk().

01007 {
01008   //create resources directory if it doesn't exist
01009   QDir localDir(saveLocation);
01010   localDir.mkdir("resources");
01011   localDir.setPath(saveLocation + "/resources");
01012     
01013   //remove all files in this directory from previous saves with other themes
01014   QStringList list = localDir.entryList( QDir::Files );
01015   QStringList::Iterator file;
01016   for ( file = list.begin(); file != list.end(); ++file ) 
01017   {
01018     localDir.remove( saveLocation + "/resources/" + *file );
01019   }
01020     
01021   //copy resource files over from theme's resources directory
01022   localDir.setPath(THEMES_PATH + theme + "/resources");
01023   list = localDir.entryList( QDir::Files );
01024   for ( file = list.begin(); file != list.end(); ++file ) 
01025   {
01026     copyFile( THEMES_PATH + theme + "/resources/" + *file,
01027                   saveLocation + "/resources/" + *file);
01028   } 
01029 }

int Album::exportToDisk StatusWidget status,
bool  smallSave,
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.

Definition at line 482 of file album.cpp.

References ALBUM_EXPORTED, exportSubalbumImages(), exportThemeResources(), exportTopLevelImages(), exportToXML(), firstSubalbum, Subalbum::getNext(), Subalbum::getNumPhotos(), modified, numSubalbums, removeStagnantImages(), reorderSubalbumImages(), savedToDisk, saveLocation, StatusWidget::setStatus(), StatusWidget::showProgressBar(), theme, and transformXMLtoHTML().

00485 {
00486   //------------------------------------------
00487   //create subdirs
00488   QDir localDir(saveLocation);
00489   //img dirs
00490   localDir.mkdir("img");
00491   //subalbum dirs
00492   localDir.setPath(saveLocation + "/img");
00493   int i;
00494   for(i=1; i <= numSubalbums; i++)
00495   {
00496     QString dirName = QString("%1") .arg(i);
00497     localDir.mkdir(dirName);
00498   }
00499   //------------------------------------------    
00500   //checks worked, go ahead with export
00501   
00502   //count number of photos
00503   int totalPhotos=0;
00504   Subalbum* current = firstSubalbum;
00505   while(current != NULL)
00506   {
00507     totalPhotos+=current->getNumPhotos();
00508     current = current->getNext();  
00509   }  
00510 
00511   //setup progress bar
00512   status->showProgressBar( "Saving:", 3*totalPhotos );
00513   qApp->processEvents();
00514 
00515   //copy over theme resources
00516   exportThemeResources( theme );
00517     
00518   //export album cover image, subalbum thumbnails
00519   exportTopLevelImages();
00520   
00521   //export subalbum images (thumbnail, slideshow, and full versions of all images)
00522   exportSubalbumImages(status, smallSave, forceSave);
00523   
00524   //apply reordering to all images
00525   reorderSubalbumImages(status);
00526   
00527   //remove old images that nolonger belong
00528   removeStagnantImages();
00529   
00530   //remove previous html files
00531   localDir.setPath(saveLocation);
00532   QStringList list = localDir.entryList( QDir::Files );
00533   QStringList::Iterator file;
00534   for ( file = list.begin(); file != list.end(); ++file ) 
00535   {
00536     if((*file).endsWith(".html"))
00537     localDir.remove( saveLocation + "/" + *file );
00538   }
00539   
00540   //export xml structure of album
00541   if(!smallSave)
00542   {
00543     int result = exportToXML();
00544     if(result != ALBUM_EXPORTED)
00545       return result;
00546   }
00547   
00548   //export various html pages using selected theme
00549   transformXMLtoHTML( saveLocation, theme );
00550   
00551   //------------------------------------------
00552   //remove files from temp folder
00553   QDir tmpDir(QDir::homeDirPath() + "/.albumShaper/tmp" );
00554   QStringList strLst = tmpDir.entryList();
00555   QStringList::iterator it;
00556   for(it = strLst.begin(); it != strLst.end(); it++)
00557   {
00558       tmpDir.remove(*it);
00559   }
00560   //------------------------------------------
00561   savedToDisk = true;
00562   
00563   //just saved so no modifications since last save
00564   modified = false;
00565   
00566   //hide progress bar
00567   status->setStatus( "Album saved." );
00568   //------------------------------------------
00569   return ALBUM_EXPORTED;
00570 }

int Album::exportToDisk StatusWidget status,
bool  smallSave,
QString  dirName,
QString  themeName
 

Exports album in XML and HTML format, along with resized images.

Definition at line 465 of file album.cpp.

References saveLocation, and theme.

Referenced by TitleWidget::saveAlbum(), and TitleWidget::saveAsAlbum().

00469 {
00470   //check to see if save location has actually changed, if not don't force save images
00471   //this occurs when user blindly selects the same old spot, or is just changing the theme used by default
00472   bool forceSave = true;
00473   
00474   if(saveLocation == dirName)
00475    forceSave = false;
00476    
00477   saveLocation = dirName;
00478   theme = themeName;
00479   return exportToDisk(status, smallSave, forceSave);
00480 }

void Album::exportTopLevelImages  )  [private]
 

Exports top level images.

Definition at line 621 of file album.cpp.

References firstSubalbum, Subalbum::getNext(), Subalbum::getRepresentativeImage(), getRepresentativeImage(), LARGE, and saveLocation.

Referenced by exportToDisk().

00622 {
00623   //if image set export it
00624   if(getRepresentativeImage(LARGE) != NULL)
00625   {
00626     getRepresentativeImage(LARGE)->save(saveLocation + "/img/album.jpg", "JPEG", 100);
00627   }
00628   //else make sure any previously set images are removed
00629   else
00630   {
00631     QDir rootDir(saveLocation + "/img/");
00632     rootDir.remove("album.jpg");
00633   }
00634   
00635   //export subalbum thumbs
00636   int n=0;
00637   Subalbum* current = firstSubalbum;
00638   while(current != NULL)
00639   {
00640     n++;
00641     //if subalbum has representative image export it
00642     if(current->getRepresentativeImage(LARGE) != NULL )
00643     {
00644       QString fileName = QString(saveLocation + "/img/%1_thumb.jpg" ).arg(n);
00645       current->getRepresentativeImage(LARGE)->save(fileName, "JPEG", 100);
00646     }
00647     //otherwise make sure anyprevious set images are removed
00648     else
00649     {
00650       QDir rootDir(saveLocation + "/img/");
00651       rootDir.remove( QString("%1_thumb.jpg").arg(n) );
00652     }
00653     current = current->getNext();
00654   }  
00655 }

int Album::exportToXML  )  [private]
 

Exports album to XML.

Definition at line 572 of file album.cpp.

References ALBUM_ERROR_OPEN_FILE, ALBUM_EXPORTED, author, creationDay, creationMonth, creationYear, description, Subalbum::exportToXML(), firstSubalbum, fixXMLString(), Subalbum::getNext(), getRepresentativeImage(), LARGE, modificationDay, modificationMonth, modificationYear, name, saveLocation, SLIDESHOW_HEIGHT, SLIDESHOW_WIDTH, theme, THUMBNAIL_HEIGHT, THUMBNAIL_WIDTH, and updateModificationDate().

Referenced by exportToDisk().

00573 {
00574   //update modification date
00575   updateModificationDate();
00576   
00577   //create/open xml file
00578   QFile* xml = new QFile(saveLocation + "/Album.xml");
00579   if(xml->open(IO_WriteOnly))
00580   {
00581     QTextStream stream( xml );
00582    
00583     //write album information
00584     stream << "<?xml version=\"1.0\"?>\n";
00585     stream << "<album version=\"1.1\">\n";
00586     stream << "  <name>" << fixXMLString(name) << "</name>\n";
00587     stream << "  <description>" << fixXMLString(description) << "</description>\n";
00588     stream << "  <author>" << fixXMLString(author) << "</author>\n";  
00589     stream << "  <created>" << creationYear << " " << creationMonth << " " << creationDay << "</created>\n";
00590     stream << "  <modified>" << modificationYear << " " << modificationMonth << " " << modificationDay << "</modified>\n";
00591     stream << "  <theme>" << theme << "</theme>\n";
00592     stream << "  <thumbnailDimensions>" << THUMBNAIL_WIDTH << " " << THUMBNAIL_HEIGHT << "</thumbnailDimensions>\n";
00593     stream << "  <slideshowDimensions>" << SLIDESHOW_WIDTH << " " << SLIDESHOW_HEIGHT << "</slideshowDimensions>\n";
00594     
00595     //if album has a represenatative image save it's path
00596     if(getRepresentativeImage(LARGE) != NULL )
00597     {
00598       stream << "  <thumb path=\"img/album.jpg\"/>\n"; 
00599     }  
00600     
00601     //write subalbums
00602     Subalbum* current = firstSubalbum;
00603     while(current != NULL)
00604     {
00605       current->exportToXML(stream);
00606       current = current->getNext();
00607     }
00608   
00609     //end album
00610     stream << "</album>\n";    
00611     xml->close(); 
00612     
00613     return ALBUM_EXPORTED;
00614   }
00615   else
00616   {
00617     return ALBUM_ERROR_OPEN_FILE;
00618   }
00619 }

QString Album::getAuthor  ) 
 

Gets the album author.

Definition at line 149 of file album.cpp.

References author.

Referenced by TitleWidget::refresh().

00150 {
00151   return QString(author);
00152 }

QString Album::getDescription  ) 
 

Gets the album description.

Definition at line 133 of file album.cpp.

References description.

Referenced by TitleWidget::refresh().

00134 {
00135   return QString(description);
00136 }

Subalbum * Album::getFirstSubalbum  ) 
 

Returns a pointer to the first Subalbum.

Definition at line 204 of file album.cpp.

References firstSubalbum.

Referenced by AlbumStatistics::AlbumStatistics(), and SubalbumsWidget::refresh().

00205 {
00206   return firstSubalbum;
00207 }

Subalbum * Album::getLastSubalbum  ) 
 

Returns a pointer to the last Subalbum.

Definition at line 210 of file album.cpp.

References lastSubalbum.

00211 {
00212   return lastSubalbum;
00213 }

int Album::getModificationDay  ) 
 

Returns the last modified day.

Definition at line 286 of file album.cpp.

References modificationDay.

00287 {
00288   return modificationDay;
00289 }

int Album::getModificationMonth  ) 
 

Returns the last modified month.

Definition at line 280 of file album.cpp.

References modificationMonth.

00281 {
00282   return modificationMonth;
00283 }

int Album::getModificationYear  ) 
 

Returns the last modified year.

Definition at line 274 of file album.cpp.

References modificationYear.

00275 {
00276   return modificationYear;
00277 }

QString Album::getName  ) 
 

Gets the album name.

Definition at line 117 of file album.cpp.

References name.

Referenced by TitleWidget::refresh(), and TitleWidget::saveAsAlbum().

00118 {
00119   return QString(name);
00120 }

int Album::getNumSubalbums  ) 
 

Returns number of subalbums.

Definition at line 1071 of file album.cpp.

References numSubalbums.

Referenced by SubalbumsWidget::createAction().

01072 {
01073   return numSubalbums;
01074 }

QPixmap * Album::getRepresentativeImage int  size  ) 
 

Returns the representative image.

Definition at line 193 of file album.cpp.

References LARGE, largeRepresentativeImage, SMALL, and smallRepresentativeImage.

Referenced by exportTopLevelImages(), exportToXML(), TitleWidget::refresh(), TitleWidget::setImageAction(), and TitleWidget::TitleWidget().

00194 {
00195   if(size == SMALL)
00196     return smallRepresentativeImage;
00197   else if(size == LARGE)
00198     return largeRepresentativeImage;
00199   else
00200     return NULL;
00201 }

QString Album::getSaveLocation  ) 
 

Returns the current save location of all images.

Definition at line 1066 of file album.cpp.

References saveLocation.

Referenced by TitleWidget::saveAsAlbum().

01067 {
01068   return saveLocation;
01069 }

QString Album::getTheme  ) 
 

Returns currently selected theme.

Definition at line 1076 of file album.cpp.

References theme.

Referenced by TitleWidget::saveAsAlbum().

01077 {
01078   return QString(theme);
01079 }

int Album::importFromDisk StatusWidget status,
QString  fileName
 

Imports album from XML format, returning int indicates success or not.

Definition at line 311 of file album.cpp.

References ALBUM_LOADED, ALBUM_READ_ERROR, ALBUM_XML_ERROR, appendSubalbum(), author, creationDay, creationMonth, creationYear, description, Subalbum::importFromDisk(), name, numLoadedSubalbums, numSubalbums, savedToDisk, saveLocation, setRepresentativeImages(), StatusWidget::setStatus(), StatusWidget::showProgressBar(), theme, and updateXML().

Referenced by TitleWidget::loadAlbum().

00312 {
00313   //update file
00314   updateXML( QFileInfo(fileName).dirPath(TRUE) );
00315   
00316   //open file
00317   QFile albumFile( fileName );
00318   
00319   //unable ot open xml file? alert user
00320   if( !albumFile.open( IO_ReadOnly ) )
00321     return ALBUM_READ_ERROR;
00322     
00323   //parse dom
00324   QDomDocument albumDom;
00325   if( !albumDom.setContent( &albumFile ) )
00326     return ALBUM_XML_ERROR;
00327 
00328   //close file
00329   albumFile.close();
00330 
00331   //get main directory all other files and subdirectories are in  
00332   QString rootDir = QFileInfo(albumFile).dirPath(TRUE);
00333   saveLocation = rootDir + "/img";
00334   
00335   
00336   //if representative image exists load
00337   QImage repImage(rootDir + "/img/album.jpg");
00338   if(!repImage.isNull())
00339   {
00340     setRepresentativeImages(&repImage);  
00341   }  
00342 
00343   //count number of photos in album, needed for showing loading progress
00344   int numPhotos = 0;
00345   QDomElement root = albumDom.documentElement();
00346   QDomNode node = root.firstChild();
00347   while( !node.isNull() )
00348   {
00349     if( node.isElement() && node.nodeName() == "subalbum" )
00350     {
00351       QDomNode childNode = node.firstChild();
00352       while( !childNode.isNull() )
00353       {
00354         if( childNode.isElement() && childNode.nodeName() == "photo" )
00355           numPhotos++;
00356         childNode = childNode.nextSibling();      
00357       }
00358     }
00359     node = node.nextSibling();
00360   }
00361     
00362   //setup progress bar
00363   status->showProgressBar( "Loading:", numPhotos );
00364   qApp->processEvents();
00365   
00366   int subalbumNum = 0;
00367   
00368   //get root node and start parsing DOM
00369   root = albumDom.documentElement();
00370   node = root.firstChild();
00371   QDomText val;  
00372   while( !node.isNull() )
00373   {
00374     //------------------------------------------------------------
00375     //album name
00376     if( node.isElement() && node.nodeName() == "name" )
00377     { 
00378       val = node.firstChild().toText();
00379       if(!val.isNull())
00380         name = val.nodeValue();
00381     }
00382     //------------------------------------------------------------
00383     //album description
00384     else if( node.isElement() && node.nodeName() == "description" )
00385     { 
00386       val = node.firstChild().toText();
00387       if(!val.isNull())
00388         description = val.nodeValue();
00389     }
00390     //------------------------------------------------------------
00391     //album author
00392     else if( node.isElement() && node.nodeName() == "author" )
00393     { 
00394       val = node.firstChild().toText();
00395       if(!val.isNull())
00396         author = val.nodeValue();
00397     }
00398     //------------------------------------------------------------
00399     //album theme
00400     else if( node.isElement() && node.nodeName() == "theme" )
00401     { 
00402       val = node.firstChild().toText();
00403       if(!val.isNull())
00404         theme = val.nodeValue();
00405     }
00406     //------------------------------------------------------------
00407     //album creation date
00408     else if( node.isElement() && node.nodeName() == "created" )
00409     {     
00410       val = node.firstChild().toText();
00411           
00412       //split value based on spaces, should be 7 fields
00413       QStringList vals = QStringList::split( QRegExp(" "), val.nodeValue() );
00414       int i=0;
00415       int intVals[3];
00416       QStringList::Iterator it;
00417       for ( it = vals.begin(); it != vals.end(); ++it ) 
00418       {
00419         intVals[i] = QString(*it).toInt();
00420         i++;
00421         //only read first 3 entires, year/month/day, don't overwrite 
00422         //buffer on addition entries if xml messed up
00423         if(i > 2)
00424           break;
00425       }    
00426       creationYear = intVals[0];
00427       creationMonth = intVals[1];
00428       creationDay = intVals[2];
00429     }
00430     //------------------------------------------------------------
00431     //subalbum
00432     else if( node.isElement() && node.nodeName() == "subalbum" )
00433     {
00434       //increase counter    
00435       subalbumNum++;
00436 
00437       //create new subalbum
00438       Subalbum* salbum = new Subalbum(this, numSubalbums+1);
00439       
00440       //populate it
00441       salbum->importFromDisk( &node, subalbumNum, status, (rootDir + "/") );
00442       
00443       //append it to list of subalbums
00444       appendSubalbum(salbum);
00445     }
00446     //------------------------------------------------------------
00447     //advance to next node   
00448     node = node.nextSibling();
00449     //------------------------------------------------------------
00450   }
00451 
00452   //reset number of loaded subalbums  
00453   numLoadedSubalbums = numSubalbums;
00454 
00455   //hide progress bar
00456   status->setStatus( "Album loaded." );
00457   
00458   //save load directory name and loaded/saved bit
00459   saveLocation = rootDir;
00460   savedToDisk = true;
00461   
00462   return ALBUM_LOADED;
00463 }

bool Album::prevSave  ) 
 

Returns true if album previously saved to disk.

Definition at line 1031 of file album.cpp.

References savedToDisk.

Referenced by TitleWidget::saveAlbum(), and TitleWidget::saveAsAlbum().

01032 {
01033   return savedToDisk;
01034 }

void Album::removeStagnantImages  )  [private]
 

Removes old stagnant images caused when photos are removed from album or moved from one subalbum to another.

Definition at line 944 of file album.cpp.

References firstSubalbum, Subalbum::getNext(), Subalbum::getNumLoadedPhotos(), Subalbum::getNumPhotos(), numLoadedSubalbums, numSubalbums, Subalbum::resetNumLoadedPhotos(), and saveLocation.

Referenced by exportToDisk().

00945 {
00946   QDir rootDir(saveLocation + "/img/");
00947   //---------------------------------
00948   //remove stagnant photos in existing subalbums
00949   int subalbumNumber=0;
00950   Subalbum* currentSubalbum = firstSubalbum;
00951   while(currentSubalbum != NULL)
00952   {
00953     subalbumNumber++;    
00954 
00955     int i;
00956     for(i=currentSubalbum->getNumPhotos() + 1;
00957         i <= currentSubalbum->getNumLoadedPhotos();
00958         i++)
00959     {
00960       QString thumbString = QString(saveLocation + "/img/%1/%2_thumb.jpg" ).arg(subalbumNumber).arg(i);
00961       QString slideshowString = QString(saveLocation + "/img/%1/%2_slideshow.jpg" ).arg(subalbumNumber).arg(i);
00962       QString imageString = QString(saveLocation + "/img/%1/%2.jpg" ).arg(subalbumNumber).arg(i);
00963       rootDir.remove(thumbString);
00964       rootDir.remove(slideshowString);
00965       rootDir.remove(imageString);
00966     }
00967     
00968     //reset number of loaded photos since old photos removed now
00969     currentSubalbum->resetNumLoadedPhotos();
00970     
00971     //move on to next subalbum
00972     currentSubalbum = currentSubalbum->getNext();  
00973   }
00974   //---------------------------------
00975   //remove stagnant subalbums and all their contents
00976   int i;
00977   for(i=numSubalbums+1; i<=numLoadedSubalbums; i++)
00978   {
00979     //get filelist for directory
00980     QDir imageDir(  QString(saveLocation + "/img/%1/").arg(i) );
00981     QStringList list = imageDir.entryList( QDir::Files );
00982     
00983     //remove each file in directory
00984     QStringList::Iterator file;
00985     for ( file = list.begin(); file != list.end(); ++file ) 
00986     {
00987       rootDir.remove( QString(saveLocation + "/img/%1/" + *file).arg(i) );
00988     }
00989     
00990     //remove directory
00991     rootDir.rmdir( QString("%1").arg(i) );
00992     
00993     //remove thumbnail image
00994     rootDir.remove( QString(saveLocation + "/img/%1_thumb.jpg").arg(i) );
00995     
00996     //remove slideshow and thumbnail html pages
00997     rootDir.remove( QString(saveLocation + "/subalbum_%1_thumbs.html").arg(i) );    
00998     rootDir.remove( QString(saveLocation + "/subalbum_%1_slideshow.html").arg(i) );        
00999   }
01000   
01001   //reset number of loaded subalbums since stagnant directories removed now
01002   numLoadedSubalbums = numSubalbums;
01003   //---------------------------------
01004 }  

void Album::removeSubalbum Subalbum val  ) 
 

Removes a subalbum.

Definition at line 236 of file album.cpp.

References firstSubalbum, Subalbum::getNext(), lastSubalbum, modified, numSubalbums, and Subalbum::setNext().

Referenced by SubalbumsWidget::deleteAction().

00237 {
00238   //search through linked list and remove item
00239   Subalbum* prev = NULL;
00240   Subalbum* current = firstSubalbum;
00241   while(current != NULL)
00242   {
00243     //found it! remove it
00244     if(current == val)
00245     { 
00246       //update first pointer
00247       if(firstSubalbum == val)
00248         firstSubalbum = val->getNext();
00249       
00250       //update last pointer
00251       if(lastSubalbum == val) 
00252         lastSubalbum = prev;
00253 
00254       //update next pointer
00255       if(prev != NULL)
00256         prev->setNext( current->getNext() );
00257             
00258       //delete object
00259       delete val;
00260       val = NULL;
00261       numSubalbums--;
00262       return;
00263     }
00264     
00265     prev = current;
00266     current = current->getNext();
00267   }
00268 
00269   //set modified
00270   modified = true;
00271 }

void Album::reorderSubalbumImages StatusWidget status  )  [private]
 

Checks if images need to be moved and does so if necessary.

Definition at line 788 of file album.cpp.

References copyFile(), firstSubalbum, Subalbum::getFirst(), Photo::getInitialPhotoNumber(), Photo::getInitialSubalbumNumber(), Subalbum::getNext(), Photo::getNext(), StatusWidget::incrementProgress(), saveLocation, Photo::setImageFilename(), Photo::setInitialPhotoNumber(), Photo::setInitialSubalbumNumber(), Photo::setSlideshowFilename(), and Photo::setThumbnailFilename().

Referenced by exportToDisk().

00789 {
00790   //--------------------------------------------------------
00791   //--------------------------------------------------------
00792   //first pass over all photos, those whose initial and current numbers don't match up
00793   //rename slightly so we don't overwrte them the second time around
00794   //--------------------------------------------------------
00795   //--------------------------------------------------------
00796   //iterate over all subalbums
00797   int subalbumNumber=0;
00798   Subalbum* currentSubalbum = firstSubalbum;
00799   while(currentSubalbum != NULL)
00800   {
00801     subalbumNumber++;    
00802     
00803     //iterate over all photos in this subalbum
00804     int photoNumber=0;    
00805     Photo* currentPhoto = currentSubalbum->getFirst();
00806     while(currentPhoto != NULL)
00807     {
00808       photoNumber++;
00809       //---------------------------------------
00810       //get initial photo # and subalbum #, used for checks and moving
00811       int initPhotoNumber = currentPhoto->getInitialPhotoNumber();
00812       int initSubalbumNumber = currentPhoto->getInitialSubalbumNumber();
00813       //---------------------------------------
00814       //if the current photo has not moved then move on
00815       if( initPhotoNumber == photoNumber &&
00816           initSubalbumNumber == subalbumNumber)
00817       {
00818         currentPhoto = currentPhoto->getNext();
00819         status->incrementProgress();
00820         qApp->processEvents();
00821         continue;
00822       }
00823       //---------------------------------------
00824       //rename full image, slideshow image, and thumbnail image     
00825       QDir rootDir;
00826       QString oldName = QString(saveLocation + "/img/%1/%2.jpg" ).arg(initSubalbumNumber).arg(initPhotoNumber);
00827       QString newName = QString(saveLocation + "/img/%1/%2_moved.jpg" ).arg(initSubalbumNumber).arg(initPhotoNumber);     
00828       if(!rootDir.rename( oldName, newName))
00829       {
00830         copyFile(oldName, newName);      
00831         rootDir.remove( oldName );
00832       }
00833       //-----
00834       oldName = QString(saveLocation + "/img/%1/%2_slideshow.jpg" ).arg(initSubalbumNumber).arg(initPhotoNumber);
00835       newName = QString(saveLocation + "/img/%1/%2_slideshow_moved.jpg" ).arg(initSubalbumNumber).arg(initPhotoNumber);      
00836       if(!rootDir.rename( oldName, newName))
00837       {
00838         copyFile(oldName, newName);      
00839         rootDir.remove( oldName );
00840       }
00841       //-----
00842       oldName = QString(saveLocation + "/img/%1/%2_thumb.jpg" ).arg(initSubalbumNumber).arg(initPhotoNumber);
00843       newName = QString(saveLocation + "/img/%1/%2_thumb_moved.jpg" ).arg(initSubalbumNumber).arg(initPhotoNumber);      
00844       if(!rootDir.rename( oldName, newName))
00845       {
00846         copyFile(oldName, newName);      
00847         rootDir.remove( oldName );
00848       }
00849       //---------------------------------------
00850       //update progress bar
00851       status->incrementProgress();
00852       qApp->processEvents();
00853       //---------------------------------------   
00854       //move on to next photo in subalbum
00855       currentPhoto = currentPhoto->getNext();
00856       //---------------------------------------
00857     }
00858     //---------------------------------------
00859     //move on to next subalbum
00860     currentSubalbum = currentSubalbum->getNext();  
00861   }
00862 
00863   //--------------------------------------------------------
00864   //--------------------------------------------------------
00865   //second pass over all photos, those whose initial and current numbers don't match up
00866   //rename to their final names and reset initial photo and subalbum numbers
00867   //--------------------------------------------------------
00868   //--------------------------------------------------------
00869   //iterate over all subalbums
00870   subalbumNumber=0;
00871   currentSubalbum = firstSubalbum;
00872   while(currentSubalbum != NULL)
00873   {
00874     subalbumNumber++;    
00875     
00876     //iterate over all photos in this subalbum
00877     int photoNumber=0;    
00878     Photo* currentPhoto = currentSubalbum->getFirst();
00879     while(currentPhoto != NULL)
00880     {
00881       photoNumber++;
00882       //---------------------------------------
00883       //get initial photo # and subalbum #, used for checks and moving
00884       int initPhotoNumber = currentPhoto->getInitialPhotoNumber();
00885       int initSubalbumNumber = currentPhoto->getInitialSubalbumNumber();
00886       //---------------------------------------
00887       //if the current photo has not moved then move on
00888       if( initPhotoNumber == photoNumber &&
00889           initSubalbumNumber == subalbumNumber)
00890       {
00891         currentPhoto = currentPhoto->getNext();
00892         status->incrementProgress();
00893         qApp->processEvents();
00894         continue;
00895       }
00896       //---------------------------------------
00897       //rename full image, slideshow image, and thumbnail image to their final names
00898       QDir rootDir;
00899       QString oldName = QString(saveLocation + "/img/%1/%2_moved.jpg" ).arg(initSubalbumNumber).arg(initPhotoNumber);
00900       QString newName = QString(saveLocation + "/img/%1/%2.jpg" ).arg(subalbumNumber).arg(photoNumber);     
00901       if(!rootDir.rename( oldName, newName))
00902       {
00903         copyFile(oldName, newName);      
00904         rootDir.remove( oldName );
00905       }
00906       //-----
00907       oldName = QString(saveLocation + "/img/%1/%2_slideshow_moved.jpg" ).arg(initSubalbumNumber).arg(initPhotoNumber);
00908       newName = QString(saveLocation + "/img/%1/%2_slideshow.jpg" ).arg(subalbumNumber).arg(photoNumber);      
00909       if(!rootDir.rename( oldName, newName))
00910       {
00911         copyFile(oldName, newName);      
00912         rootDir.remove( oldName );
00913       }
00914       //-----
00915       oldName = QString(saveLocation + "/img/%1/%2_thumb_moved.jpg" ).arg(initSubalbumNumber).arg(initPhotoNumber);
00916       newName = QString(saveLocation + "/img/%1/%2_thumb.jpg" ).arg(subalbumNumber).arg(photoNumber);      
00917       if(!rootDir.rename( oldName, newName))
00918       {
00919         copyFile(oldName, newName);      
00920         rootDir.remove( oldName );
00921       }
00922       //---------------------------------------
00923       //reset initial photo and subalbum numbers, and filenames
00924       currentPhoto->setInitialPhotoNumber(photoNumber);
00925       currentPhoto->setInitialSubalbumNumber(subalbumNumber);      
00926       currentPhoto->setImageFilename( QString(saveLocation + "/img/%1/%2.jpg").arg(subalbumNumber).arg(photoNumber) );
00927       currentPhoto->setSlideshowFilename( QString(saveLocation + "/img/%1/%2_slideshow.jpg").arg(subalbumNumber).arg(photoNumber) );
00928       currentPhoto->setThumbnailFilename( QString(saveLocation + "/img/%1/%2_thumb.jpg").arg(subalbumNumber).arg(photoNumber) );
00929       //---------------------------------------
00930       //update progress bar
00931       status->incrementProgress();
00932       qApp->processEvents();
00933       //---------------------------------------   
00934       //move on to next photo in subalbum
00935       currentPhoto = currentPhoto->getNext();
00936       //---------------------------------------
00937     }
00938     //---------------------------------------
00939     //move on to next subalbum
00940     currentSubalbum = currentSubalbum->getNext();  
00941   }
00942 }

void Album::setAuthor QString  val  ) 
 

Sets the album author.

Definition at line 139 of file album.cpp.

References author, and modified.

Referenced by TitleWidget::updateAuthor().

00140 {
00141   if(author != val)
00142   {
00143     author = val;
00144     modified = true;
00145   }
00146 }

void Album::setDescription QString  val  ) 
 

Sets the album description.

Definition at line 123 of file album.cpp.

References description, and modified.

Referenced by TitleWidget::updateDescription().

00124 {
00125   if(description != val)
00126   {
00127     description = val;
00128     modified = true;
00129   }
00130 }

void Album::setModified bool  val = true  ) 
 

Sets the album as modified.

Definition at line 1081 of file album.cpp.

References modified.

Referenced by Subalbum::addPhoto(), Subalbum::lazyAddPhoto(), TitleWidget::loadAlbum(), TitleWidget::newAlbum(), Subalbum::photoMoved(), Subalbum::removePhoto(), Subalbum::setDescription(), Subalbum::setModified(), Subalbum::setName(), Subalbum::setNext(), and Subalbum::setRepresentativeImages().

01082 {
01083   modified = val;
01084 }

void Album::setName QString  val  ) 
 

Sets the album name.

Definition at line 107 of file album.cpp.

References modified, and name.

Referenced by TitleWidget::updateName().

00108 {
00109   if(name != val)
00110   {
00111     name = val;
00112     modified = true;
00113   }
00114 }

void Album::setRepresentativeImages QImage *  val  ) 
 

Sets the representative image.

Definition at line 155 of file album.cpp.

References largeRepresentativeImage, modified, resizeImage(), and smallRepresentativeImage.

Referenced by importFromDisk(), and TitleWidget::setImageAction().

00156 {
00157   //---------------------------------------------------------    
00158   //delete representative images
00159   delete smallRepresentativeImage;
00160   delete largeRepresentativeImage;
00161   //---------------------------------------------------------    
00162   //compute representative image sizes
00163   int smallRepWidth = 0;
00164   int smallRepHeight = 0;
00165   int largeRepWidth = 0;
00166   int largeRepHeight = 0;
00167   resizeImage( rawImage->width(), rawImage->height(),
00168                107, 80,
00169                smallRepWidth, smallRepHeight);
00170   resizeImage( rawImage->width(), rawImage->height(),
00171                500, 320,
00172                largeRepWidth, largeRepHeight);
00173   //---------------------------------------------------------    
00174   //create various representative images
00175   //---------------------------------------------------------    
00176   //copy and scale small version
00177   QImage thumbnailSmall = rawImage->smoothScale( smallRepWidth, smallRepHeight );
00178   thumbnailSmall.setAlphaBuffer(true);
00179   smallRepresentativeImage = new QPixmap( smallRepWidth, smallRepHeight );
00180   smallRepresentativeImage->convertFromImage( thumbnailSmall );  
00181 
00182   //copy and scale large version
00183   QImage thumbnailLarge = rawImage->smoothScale( largeRepWidth, largeRepHeight );
00184   thumbnailLarge.setAlphaBuffer(true);
00185   largeRepresentativeImage = new QPixmap( largeRepWidth, largeRepHeight );
00186   largeRepresentativeImage->convertFromImage( thumbnailLarge );  
00187 
00188   //set modified
00189   modified = true;
00190 }

void Album::syncSubalbumList SubalbumPreviewWidget item  ) 
 

Syncs subalbum ordering with front end gui ordering.

Definition at line 1041 of file album.cpp.

References firstSubalbum, SubalbumPreviewWidget::getSubalbum(), lastSubalbum, and Subalbum::setNext().

Referenced by SubalbumsWidget::reorder().

01042 {
01043   //base case, no items
01044   if(item == NULL)
01045   {
01046     firstSubalbum = NULL;
01047     lastSubalbum = NULL;
01048     return;
01049   }
01050   
01051   //set first and last pointers
01052   firstSubalbum = item->getSubalbum();
01053   firstSubalbum->setNext(NULL);
01054   lastSubalbum = firstSubalbum;
01055     
01056   //set all next pointers
01057   while(item->nextItem() != NULL)
01058   {
01059     item->getSubalbum()->setNext( ((SubalbumPreviewWidget*)item->nextItem())->getSubalbum() );
01060     item = (SubalbumPreviewWidget*)item->nextItem();
01061     lastSubalbum = item->getSubalbum();
01062     lastSubalbum->setNext(NULL);
01063   }
01064 }

void Album::updateCreationDate  ) 
 

Updates the creation date to today's date.

Definition at line 292 of file album.cpp.

References creationDay, creationMonth, and creationYear.

Referenced by Album().

00293 {
00294   //set creation date to today
00295   QDate date = QDate::currentDate();
00296   creationYear = date.year();
00297   creationMonth = date.month();
00298   creationDay = date.day();
00299 }

void Album::updateModificationDate  ) 
 

Updates the modification date to today's date.

Definition at line 302 of file album.cpp.

References modificationDay, modificationMonth, and modificationYear.

Referenced by exportToXML().

00303 {
00304   //set last modification date to today
00305   QDate date = QDate::currentDate();
00306   modificationYear = date.year();
00307   modificationMonth = date.month();
00308   modificationDay = date.day();
00309 }


Member Data Documentation

QString Album::author [private]
 

Album Creator.

Definition at line 180 of file album.h.

Referenced by Album(), exportToXML(), getAuthor(), importFromDisk(), and setAuthor().

int Album::creationDay [private]
 

Creation day.

Definition at line 208 of file album.h.

Referenced by exportToXML(), importFromDisk(), and updateCreationDate().

int Album::creationMonth [private]
 

Creation month.

Definition at line 205 of file album.h.

Referenced by exportToXML(), importFromDisk(), and updateCreationDate().

int Album::creationYear [private]
 

Creation year.

Definition at line 202 of file album.h.

Referenced by exportToXML(), importFromDisk(), and updateCreationDate().

QString Album::description [private]
 

Longer description of album.

Definition at line 177 of file album.h.

Referenced by Album(), exportToXML(), getDescription(), importFromDisk(), and setDescription().

Subalbum* Album::firstSubalbum [private]
 

Pointer to first Subalbum.

Definition at line 187 of file album.h.

Referenced by Album(), appendSubalbum(), exportSubalbumImages(), exportToDisk(), exportTopLevelImages(), exportToXML(), getFirstSubalbum(), removeStagnantImages(), removeSubalbum(), reorderSubalbumImages(), syncSubalbumList(), and ~Album().

QPixmap* Album::largeRepresentativeImage [private]
 

Definition at line 184 of file album.h.

Referenced by Album(), getRepresentativeImage(), setRepresentativeImages(), and ~Album().

Subalbum* Album::lastSubalbum [private]
 

Pointer to last Subalbum.

Definition at line 190 of file album.h.

Referenced by Album(), appendSubalbum(), getLastSubalbum(), removeSubalbum(), and syncSubalbumList().

int Album::modificationDay [private]
 

Last modification day.

Definition at line 199 of file album.h.

Referenced by exportToXML(), getModificationDay(), and updateModificationDate().

int Album::modificationMonth [private]
 

Last modification month.

Definition at line 196 of file album.h.

Referenced by exportToXML(), getModificationMonth(), and updateModificationDate().

int Album::modificationYear [private]
 

Last modification year.

Definition at line 193 of file album.h.

Referenced by exportToXML(), getModificationYear(), and updateModificationDate().

bool Album::modified [private]
 

Modification status of the album.

Definition at line 226 of file album.h.

Referenced by Album(), albumModified(), appendSubalbum(), exportToDisk(), removeSubalbum(), setAuthor(), setDescription(), setModified(), setName(), and setRepresentativeImages().

QString Album::name [private]
 

Short name for album.

Definition at line 174 of file album.h.

Referenced by Album(), exportToXML(), getName(), importFromDisk(), and setName().

int Album::numLoadedSubalbums [private]
 

Number of loaded subalbums.

Definition at line 214 of file album.h.

Referenced by Album(), importFromDisk(), and removeStagnantImages().

int Album::numSubalbums [private]
 

Number of subalbums.

Definition at line 211 of file album.h.

Referenced by Album(), appendSubalbum(), exportToDisk(), getNumSubalbums(), importFromDisk(), removeStagnantImages(), and removeSubalbum().

bool Album::savedToDisk [private]
 

Set if album was loaded/has been saved to disk.

Definition at line 217 of file album.h.

Referenced by Album(), exportToDisk(), importFromDisk(), and prevSave().

QString Album::saveLocation [private]
 

Directory album saved to.

Definition at line 220 of file album.h.

Referenced by Album(), exportSubalbumImages(), exportThemeResources(), exportToDisk(), exportTopLevelImages(), exportToXML(), getSaveLocation(), importFromDisk(), removeStagnantImages(), and reorderSubalbumImages().

QPixmap* Album::smallRepresentativeImage [private]
 

Representative images.

Definition at line 183 of file album.h.

Referenced by Album(), getRepresentativeImage(), setRepresentativeImages(), and ~Album().

QString Album::theme [private]
 

Theme to save album with.

Definition at line 223 of file album.h.

Referenced by Album(), exportToDisk(), exportToXML(), getTheme(), and importFromDisk().


The documentation for this class was generated from the following files:
Generated on Thu Nov 13 00:11:06 2003 for AlbumShaper by doxygen 1.3.4