Subversion Repositories Scribus

Rev

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