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

kallery_def.h

/***************************************************************************
                          kallery_def.h  -  description
                             -------------------
    begin                : Mon Oct 22 2001
    copyright            : (C) 2001 by Mantia Andras
    email                : amantia@kdewebdev.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
#ifndef KALLERY_DEF_H
#define KALLERY_DEF_H

#include <qstring.h>
#include <qstringlist.h>
#include <qcolor.h>
#include <qtextstream.h>


/** @short
 * Strutcture describing the options to generate the gallery.
*/
00029 struct OptionType
{
  /** Thumbnail settings */
00032   enum ThumbSettings
  {
00034     NoThumbnails = 0, ///< do not use thumbnails
00035     GenerateThumbnails, ///< generate thumbnails
00036     LoadThumbnails ///< use a set of images as thumbnails
  };

  /** Description settings */
00040   enum DescSettings
  {
00042     NoDescriptions = 0, ///< do not use descriptions
00043     LoadImageInfo, ///<load the descriptions from the info part of the images (if available)        
00044     LoadDescriptions, ///< load the descriptions from a text filename
00045     EnterDescriptions, ///< enter now the descriptions
  };
  
  /** Imagge information loading settings */
00049   enum ImageInfoSettings
  {
00051     ImageInfoFileName = 1, ///<include the file name in the description
00052     ImageInfoFileSize = 2, ///<include the file size in the description
00053     ImageInfoDimensions = 4, ///<include the image dimensions in the description
00054     ImageInfoComment = 8, ///<include the image comment in the description
00055     ImageInfoShootingDate = 16, ///<include the image creation in the description
00056     ImageInfoExposure =32 ///<include the exposure information in the description
  };

  /** Convertion settings */
00060   enum ConvertMode
  {
00062     NoCopyConvert = 0, ///< do not copy or convert the images, use from their original location
00063     CopyOnly, ///< copy the images to the destination without converting
00064     Convert, ///< convert the images and copy to the destination
00065     UseExisting ///< assume the images are already in the destination folder
  };
  
  /** @short
   * Structure for image descriptions 
  */
00071   struct Description
  {
00073     QString fileSize; ///< holds the size of the image file in bytes
00074     QString comment; ///< the image comment
00075     QString shootingDate; ///< when was the image created
00076     QString dimension; ///< the dimensions in pixels
00077     QString exposureInfo; ///< camera, shutter time, aperture information
    
    /** Combine the important informations in one string */
00080     QString full() {
      QString s;
      if (!comment.isEmpty())
       s = comment + "<br>";
      if (!shootingDate.isEmpty())
       s += shootingDate + "<br>";
      if (!dimension.isEmpty())
       s += dimension + "<br>";
      if (!exposureInfo.isEmpty())
       s += exposureInfo;
      return s;
    }
  };
  
  QString galleryTitle;
  QString galleryFile;
  QStringList imageList;
  QStringList thumbList;
  QValueList<Description> descList;
  QString descFile;
  QString imageDestDir;
  QString thumbDestDir;
  bool relativePaths;
00103   ThumbSettings thumbSetting; ///< thumbnail settings
00104   DescSettings descSetting; ///< description settings
  uint infoSetting; 

00107   ConvertMode convertImages; ///< convertion settings
  bool resize;
  bool keepRatio;
  bool onlyLarger;
  uint thumbWidth,thumbHeight;
  uint fullWidth,fullHeight;
  QString fullFormat;
  QString thumbFormat;
  uint quality;
  bool insertCopyright;
  QString copyright;

  int columnNum;
  bool useHtmlImages;
  //These option are valid only if UseHtmlImages is true
00122   bool textButtons;     ///<if false, then use pictures for buttons
00123   QString nextStr;      ///<Valid if TextButtons == true
00124   QString prevStr;      ///<Valid if TextButtons == true
00125   QString backStr;      ///<Valid if TextButtons == true
00126   QString nextPic;      ///<Name of the Next picture. Valid if TextButtons == false
00127   QString prevPic;      ///<Name of the Previous picture. Valid if TextButtons == false
00128   QString backPic;      ///<Name of the Back picture. Valid if TextButtons == false
  QColor imageBackColor;
  QColor imageTextColor;
  QColor imageVisitedColor;
  // End of options, when UseHtmlImages is true
  QColor backColor;
  QColor tableColor;
  QColor textColor;
  QColor visitedColor;
  QString galleryCSSFile;
  QString beforeHtmlFile;
  QString afterHtmlFile;
  QString imageCSSFile;

  // Template options
00143   QString galleryTemplate;        ///<The description of the current gallery template. This is saved
00144   QString fullsizeTemplate;       ///<The description of the current fullsize template. This is saved
00145   QString fullsizeTemplateFile;   ///<The path and name to the template file used for html generation for each image
00146   QString galleryTemplateFile;    ///<The path and name of the gallery template file
  QString language;
  QString encoding;
  bool  useFrames;

00151   QString projectFileName;        ///<The name of the original project
00152   QString fileName;               ///<The name of the current file
00153   bool printToStdOut;             ///< Print the created file list to stdout or not.
};

#endif //KALLERY_DEF_H

Generated by  Doxygen 1.6.0   Back to index