Subversion Repositories Scribus

Rev

Rev 2046 | Rev 3079 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1972 craig 1
#ifndef PDFOPTIONS_H
2
#define PDFOPTIONS_H
3
 
4
/**
5
 * @file pdfoptions.h
6
 * @author Franz Schmidt
7
 * @author Craig Ringer
8
 * @brief Defines class PDFOptions, used for loading/saving/passing around PDF options
9
 */
10
 
11
#include "qstring.h"
12
#include "qmap.h"
13
#include "qvaluelist.h"
2969 craig 14
#include "scribusapi.h"
15
#include "scribusstructs.h"
1972 craig 16
 
17
/**
2036 craig 18
 * @brief PDF Options struture. Capable of verifying its self, but otherwise largely
19
 *        a dumb struct.
20
 *
2046 craig 21
 * If you change this class, please ensure that PDFOptionsIO is
22
 * updated to match and scribus/dtd/scribuspdfoptions.dtd is tweaked
23
 * if required.
24
 *
2036 craig 25
 * @sa PDFOptionsIO
1972 craig 26
 */
2969 craig 27
class SCRIBUS_API PDFOptions
1972 craig 28
{
29
public:
30
 
31
        enum VerifyResults
32
        {
33
                Verify_NoError = 0,
34
                Verify_OptionConflict,
35
                Verify_OptionOutOfRange,
36
                Verify_OtherError
37
        };
38
 
1973 craig 39
        enum PDFVersion
40
        {
41
                PDFVersion_13 = 13,
42
                PDFVersion_14 = 14,
43
                PDFVersion_15 = 15,
44
                PDFVersion_X3 = 12,
45
        };
46
 
1972 craig 47
        /**
48
         * @author Craig Ringer
49
         * @brief Sanity check the options defined.
50
         *
2036 craig 51
         * Unimplemented, always returns Verify_NoError
1972 craig 52
         *
53
         * Checks the PDF option structure for conflicts between mututally
54
         * exclusive options, ensures all options are within sane ranges,
55
         * and that there are no nonsensical options values set. If nothing
56
         * is wrong, returns Verify_NoError, otherwise returns error code from
57
         * PDFOptions::VerifyResults. If problemDescription is not NULL,
58
         * it will contain a human-readable description of the error on return.
59
         *
60
         * @warning DO NOT *EVER* TEST THE VALUE OF problemDescription. Rely on the
2036 craig 61
         *          return code instead. problemDescription is subject to
62
         *          translation and its contents may change without notice.
1972 craig 63
         *
64
         * @param problemDescription Error description
65
         * @return Verify_NoError for sane options, otherwise error code.
66
         */
67
        PDFOptions::VerifyResults verify(QString* problemDescription);
2030 craig 68
        PDFOptions::VerifyResults verify();
1972 craig 69
 
70
        bool Thumbnails;
71
        bool Articles;
72
        bool useLayers;
73
        bool Compress;
74
        int CompressMethod;
75
        int Quality;
76
        bool RecalcPic;
77
        bool Bookmarks;
78
        int PicRes;
1973 craig 79
        PDFVersion Version;
1972 craig 80
        int Resolution;
81
        int Binding;
82
        QValueList<QString> EmbedList;
83
        QValueList<QString> SubsetList;
84
        bool MirrorH;
85
        bool MirrorV;
86
        int RotateDeg;
87
        bool PresentMode;
88
        QValueList<PDFPresentationData> PresentVals;
89
        QString Datei;
90
        bool isGrayscale;
91
        bool UseRGB;
92
        bool UseProfiles;
93
        bool UseProfiles2;
94
        bool UseLPI;
95
        QMap<QString,LPIData> LPISettings;
96
        QString SolidProf;
97
        int SComp;
98
        QString ImageProf;
99
        bool EmbeddedI;
100
        int Intent2;
101
        QString PrintProf;
102
        QString Info;
103
        int Intent;
104
        double BleedTop;
105
        double BleedLeft;
106
        double BleedRight;
107
        double BleedBottom;
108
        bool Encrypt;
109
        QString PassOwner;
110
        QString PassUser;
111
        int Permissions;
112
};
113
 
114
#endif