Logo Search packages:      
Sourcecode: albumshaper version File versions  Download package

Album::Album ( QString  tmpDir,
bool  createSubalbum = true 
)

Sets default information and create temporary directory as necessary.

Sets default information.

Definition at line 41 of file album.cpp.

References appendSubalbum(), author, description, firstSubalbum, getTmpDir(), lastSubalbum, modified, name, nextUniqueID, numLoadedSubalbums, numSubalbums, savedToDisk, saveLocation, smallRepresentativeImage, theme, updateCreationDate(), and updateModificationDate().

{
  //set strings to default values
  name = "";
  description ="";
  author = ""; 
  theme = "Slick";
  this->tmpDir = tmpDir;

  //by default no representative image
  smallRepresentativeImage = NULL;
  largeRepresentativeImage = NULL;

  //no Subalbums by default
  firstSubalbum = NULL;
  lastSubalbum = NULL;

  //set the creation/modification date to today
  updateCreationDate();
  updateModificationDate();

  //no subalbums
  numSubalbums = 0;
  numLoadedSubalbums = 0;

  //not previously saved by default
  savedToDisk = false;

  //set default save location (where images are placed before saving) to the tmp directory
  saveLocation = getTmpDir();

  if(createSubalbum)
  {
    Subalbum* s = new Subalbum( this, 1 );
    appendSubalbum( s );
  }
  
  //no interesting modifications yet
  modified = false;

  nextUniqueID = 0;
}


Generated by  Doxygen 1.6.0   Back to index