home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / pdfoptions.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-09-24  |  3.5 KB  |  159 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. #ifndef PDFOPTIONS_H
  8. #define PDFOPTIONS_H
  9.  
  10. /**
  11.  * @file pdfoptions.h
  12.  * @author Franz Schmid
  13.  * @author Craig Ringer
  14.  * @brief Defines class PDFOptions, used for loading/saving/passing around PDF options
  15.  */
  16.  
  17. #include "qstring.h"
  18. #include "qmap.h"
  19. #include "QList"
  20. #include "scribusapi.h"
  21. #include "scribusstructs.h"
  22.  
  23. struct PDFPresentationData;
  24. struct LPIData;
  25. class  MarginStruct;
  26.  
  27. /**
  28.  * @brief PDF Options struture. Capable of verifying its self, but otherwise largely
  29.  *        a dumb struct.
  30.  *
  31.  * If you change this class, please ensure that PDFOptionsIO is
  32.  * updated to match and scribus/dtd/scribuspdfoptions.dtd is tweaked
  33.  * if required.
  34.  *
  35.  * @sa PDFOptionsIO
  36.  */
  37. class SCRIBUS_API PDFOptions
  38. {
  39. public:
  40.  
  41.     enum VerifyResults
  42.     {
  43.         Verify_NoError = 0,
  44.         Verify_OptionConflict,
  45.         Verify_OptionOutOfRange,
  46.         Verify_OtherError
  47.     };
  48.  
  49.     enum PDFVersion
  50.     {
  51.         PDFVersion_13 = 13,
  52.         PDFVersion_14 = 14,
  53.         PDFVersion_15 = 15,
  54.         PDFVersion_X3 = 12,
  55.     };
  56.  
  57.     enum PDFPageLayout
  58.     {
  59.         SinglePage = 0,
  60.         OneColumn,
  61.         TwoColumnLeft,
  62.         TwoColumnRight
  63.     };
  64.  
  65.     enum PDFCompression
  66.     {
  67.         Compression_Auto = 0,
  68.         Compression_JPEG = 1,
  69.         Compression_ZIP  = 2,
  70.         Compression_None = 3
  71.     };
  72.  
  73.     /**
  74.      * @author Craig Ringer
  75.      * @brief Sanity check the options defined.
  76.      *
  77.      * Unimplemented, always returns Verify_NoError
  78.      *
  79.      * Checks the PDF option structure for conflicts between mututally
  80.      * exclusive options, ensures all options are within sane ranges,
  81.      * and that there are no nonsensical options values set. If nothing
  82.      * is wrong, returns Verify_NoError, otherwise returns error code from
  83.      * PDFOptions::VerifyResults. If problemDescription is not NULL,
  84.      * it will contain a human-readable description of the error on return.
  85.      *
  86.      * @warning DO NOT *EVER* TEST THE VALUE OF problemDescription. Rely on the
  87.      *          return code instead. problemDescription is subject to
  88.      *          translation and its contents may change without notice.
  89.      *
  90.      * @param problemDescription Error description
  91.      * @return Verify_NoError for sane options, otherwise error code.
  92.      */
  93.     PDFOptions::VerifyResults verify(QString* problemDescription);
  94.     PDFOptions::VerifyResults verify();
  95.  
  96.     bool firstUse;
  97.     bool Thumbnails;
  98.     bool Articles;
  99.     bool useLayers;
  100.     bool Compress;
  101.     PDFCompression CompressMethod;
  102.     int  Quality;
  103.     bool RecalcPic;
  104.     bool Bookmarks;
  105.     int  PicRes;
  106.     bool embedPDF;
  107.     PDFVersion Version;
  108.     int  Resolution;
  109.     int  Binding;
  110.     QList<QString> EmbedList;
  111.     QList<QString> SubsetList;
  112.     bool MirrorH;
  113.     bool MirrorV;
  114.     bool doClip;
  115.     int  RotateDeg;
  116.     bool PresentMode;
  117.     QList<PDFPresentationData> PresentVals;
  118.     QString fileName;
  119.     bool isGrayscale;
  120.     bool UseRGB;
  121.     bool UseProfiles;
  122.     bool UseProfiles2;
  123.     bool UseLPI;
  124.     bool UseSpotColors;
  125.     bool doMultiFile;
  126.     QMap<QString,LPIData> LPISettings;
  127.     QString SolidProf;
  128.     int  SComp;
  129.     QString ImageProf;
  130.     bool EmbeddedI;
  131.     int  Intent2;
  132.     QString PrintProf;
  133.     QString Info;
  134.     int  Intent;
  135.     MarginStruct bleeds;
  136.     bool Encrypt;
  137.     QString PassOwner;
  138.     QString PassUser;
  139.     int  Permissions;
  140.     int  PageLayout;
  141.     bool displayBookmarks;
  142.     bool displayThumbs;
  143.     bool displayLayers;
  144.     bool displayFullscreen;
  145.     bool hideToolBar;
  146.     bool hideMenuBar;
  147.     bool fitWindow;
  148.     bool cropMarks;
  149.     bool bleedMarks;
  150.     bool registrationMarks;
  151.     bool colorMarks;
  152.     bool docInfoMarks;
  153.     bool useDocBleeds;
  154.     double markOffset;
  155.     QString openAction;
  156. };
  157.  
  158. #endif
  159.