Subversion Repositories Scribus

Rev

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