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