Subversion Repositories Scribus

Rev

Rev 4197 | Rev 4430 | 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
 
4197 fschmid 47
        enum PDFPageLayout
48
        {
49
                SinglePage = 0,
50
                OneColumn,
51
                TwoColumnLeft,
52
                TwoColumnRight
53
        };
54
 
1972 craig 55
        /**
56
         * @author Craig Ringer
57
         * @brief Sanity check the options defined.
58
         *
2036 craig 59
         * Unimplemented, always returns Verify_NoError
1972 craig 60
         *
61
         * Checks the PDF option structure for conflicts between mututally
62
         * exclusive options, ensures all options are within sane ranges,
63
         * and that there are no nonsensical options values set. If nothing
64
         * is wrong, returns Verify_NoError, otherwise returns error code from
65
         * PDFOptions::VerifyResults. If problemDescription is not NULL,
66
         * it will contain a human-readable description of the error on return.
67
         *
68
         * @warning DO NOT *EVER* TEST THE VALUE OF problemDescription. Rely on the
2036 craig 69
         *          return code instead. problemDescription is subject to
70
         *          translation and its contents may change without notice.
1972 craig 71
         *
72
         * @param problemDescription Error description
73
         * @return Verify_NoError for sane options, otherwise error code.
74
         */
75
        PDFOptions::VerifyResults verify(QString* problemDescription);
2030 craig 76
        PDFOptions::VerifyResults verify();
1972 craig 77
 
78
        bool Thumbnails;
79
        bool Articles;
80
        bool useLayers;
81
        bool Compress;
82
        int CompressMethod;
83
        int Quality;
84
        bool RecalcPic;
85
        bool Bookmarks;
86
        int PicRes;
1973 craig 87
        PDFVersion Version;
1972 craig 88
        int Resolution;
89
        int Binding;
90
        QValueList<QString> EmbedList;
91
        QValueList<QString> SubsetList;
92
        bool MirrorH;
93
        bool MirrorV;
94
        int RotateDeg;
95
        bool PresentMode;
96
        QValueList<PDFPresentationData> PresentVals;
97
        QString Datei;
98
        bool isGrayscale;
99
        bool UseRGB;
100
        bool UseProfiles;
101
        bool UseProfiles2;
102
        bool UseLPI;
3079 fschmid 103
        bool UseSpotColors;
104
        bool doMultiFile;
1972 craig 105
        QMap<QString,LPIData> LPISettings;
106
        QString SolidProf;
107
        int SComp;
108
        QString ImageProf;
109
        bool EmbeddedI;
110
        int Intent2;
111
        QString PrintProf;
112
        QString Info;
113
        int Intent;
114
        double BleedTop;
115
        double BleedLeft;
116
        double BleedRight;
117
        double BleedBottom;
118
        bool Encrypt;
119
        QString PassOwner;
120
        QString PassUser;
121
        int Permissions;
4197 fschmid 122
        int PageLayout;
123
        bool displayBookmarks;
124
        bool displayThumbs;
125
        bool displayLayers;
126
        bool displayFullscreen;
4201 fschmid 127
        bool hideToolBar;
128
        bool hideMenuBar;
129
        bool fitWindow;
4197 fschmid 130
        QString openAction;
1972 craig 131
};
132
 
133
#endif