Subversion Repositories Scribus

Rev

Rev 7076 | Details | Compare with Previous | Last modification | View Log | RSS feed

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