Subversion Repositories Scribus

Rev

Rev 5851 | Rev 5881 | Go to most recent revision | 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
*/
1307 fschmid 7
#ifndef TABPDF_OPTS_H
8
#define TABPDF_OPTS_H
2969 craig 9
 
1307 fschmid 10
#include <qtabwidget.h>
11
#include <qwidget.h>
12
#include <qlayout.h>
13
#include <qtooltip.h>
14
#include <qlistbox.h>
15
#include <qmap.h>
16
#include <qvaluelist.h>
17
#include <qbuttongroup.h>
18
#include <qgroupbox.h>
19
#include <qcheckbox.h>
20
#include <qcombobox.h>
21
#include <qradiobutton.h>
22
#include <qspinbox.h>
23
#include <qtabwidget.h>
24
#include <qwidget.h>
25
#include <qpushbutton.h>
26
#include <qtoolbutton.h>
27
#include <qlineedit.h>
28
#include <qlabel.h>
2969 craig 29
 
30
#include "scribusapi.h"
1307 fschmid 31
#include "bookmwin.h"
32
#include "mspinbox.h"
33
 
1972 craig 34
class PDFOptions;
4259 craig 35
class PDFExportDialog;
5880 jghali 36
class ScribusDoc;
1972 craig 37
 
2969 craig 38
class SCRIBUS_API TabPDFOptions : public QTabWidget
1307 fschmid 39
{
40
        Q_OBJECT
41
 
42
public:
4260 craig 43
        TabPDFOptions(  QWidget* parent, PDFOptions & Optionen,
44
                        const SCFonts &AllFonts,
45
                        const ProfilesL & PDFXProfiles,
5387 avox 46
                        const QMap<QString, int> & DocFonts,
4260 craig 47
                        const QValueList<PDFPresentationData> & Eff,
48
                        int unitIndex, double PageH, double PageB,
5880 jghali 49
                        ScribusDoc *mdoc = 0, bool export = false);
1307 fschmid 50
        ~TabPDFOptions() {};
5553 subik 51
        void restoreDefaults(PDFOptions & Optionen,
52
                                                 const SCFonts &AllFonts,
53
                                                 const ProfilesL & PDFXProfiles,
54
                                                 const QMap<QString, int> & DocFonts,
55
                                                 const QValueList<PDFPresentationData> & Eff,
56
                                                 int unitIndex, double PageH, double PageB,
5880 jghali 57
                                                 ScribusDoc *mdoc, bool export);
1307 fschmid 58
 
5851 subik 59
        void unitChange(QString unit, int docUnitIndex, int decimals, double invUnitConversion);
4256 craig 60
 
4253 craig 61
        // GUI member pointers
62
        // Remember to initialize these in the initializer list of the ctor when
63
        // you add new ones. Add them in the same order here and in the initalizer
64
        // list. To help out, the members are sorted alphabetically by name.
65
        QCheckBox* AddSec;
1307 fschmid 66
        QCheckBox* Article;
4253 craig 67
        MSpinBox* BleedBottom;
68
        MSpinBox* BleedLeft;
69
        MSpinBox* BleedRight;
70
        MSpinBox* BleedTop;
71
        QCheckBox* CheckBM;
72
        QCheckBox* CheckBox1;
1307 fschmid 73
        QComboBox* CMethod;
4649 fschmid 74
        QCheckBox* ClipMarg;
1307 fschmid 75
        QComboBox* ComboBind;
4253 craig 76
        QCheckBox* Compression;
77
        QRadioButton* continuousPages;
78
        QCheckBox* CopySec;
79
        QComboBox* CQuality;
80
        QRadioButton* doublePageLeft;
81
        QRadioButton* doublePageRight;
82
        QCheckBox* DSColor;
83
        QCheckBox* EmbedProfs;
84
        QCheckBox* EmbedProfs2;
85
        QCheckBox* Encry;
1307 fschmid 86
        QComboBox* ImageP;
4253 craig 87
        QComboBox* IntendI;
88
        QComboBox* IntendS;
89
        QToolButton* MirrorH;
90
        QToolButton* MirrorV;
91
        QCheckBox* ModifySec;
1307 fschmid 92
        QCheckBox* NoEmbedded;
4253 craig 93
        QComboBox* OutCombo;
94
        QListBox* Pages;
1307 fschmid 95
        QLineEdit* PassOwner;
96
        QLineEdit* PassUser;
4253 craig 97
        QComboBox* PDFVersionCombo;
98
        QComboBox* PrintProfC;
1307 fschmid 99
        QCheckBox* PrintSec;
4253 craig 100
        QSpinBox* Resolution;
101
        QComboBox* RotateDeg;
102
        QRadioButton* singlePage;
103
        QComboBox* SolidPr;
104
        QRadioButton* useBookmarks;
4197 fschmid 105
        QRadioButton* useFullScreen;
4253 craig 106
        QCheckBox* useLayers;
107
        QRadioButton* useLayers2;
108
        QCheckBox* UseLPI;
109
        QCheckBox* useSpot;
5320 fschmid 110
        QCheckBox* overprintMode;
4197 fschmid 111
        QRadioButton* useThumbnails;
4253 craig 112
        QSpinBox* ValC;
113
        // End GUI member pointers
114
 
3388 fschmid 115
signals:
116
        void noInfo();
117
        void hasInfo();
118
 
1307 fschmid 119
public slots:
120
        void ToggleEncr();
121
        void BleedChanged();
122
        void EnablePDFX(int a);
123
        void DoDownsample();
124
        void RemoveEmbed();
125
        void PutToEmbed();
126
        void RemoveSubset();
127
        void PutToSubset();
128
        void SelAFont(QListBoxItem*);
129
        void SelEFont(QListBoxItem*);
130
        void SelSFont(QListBoxItem*);
131
        void EmbedAll();
132
        void SubsetAll();
133
        void PagePr();
134
        void SetPgEff(int nr);
135
        void SetEffOpts(int nr);
136
        void ValidDI(int nr);
137
        void PDFMirror();
138
        void Rotation(int value);
139
        void DoEffects();
140
        void EffectOnAll();
141
        void SelRange(bool e);
142
        void EnablePr(int a);
143
        void EnablePG();
144
        void EnablePGI();
145
        void EnablePGI2();
146
        void EnableLPI(int a);
147
        void EnableLPI2();
148
        void SelLPIcol(int);
149
        void enableCMS(bool enable);
3388 fschmid 150
        void checkInfo();
1307 fschmid 151
 
152
protected:
4259 craig 153
        // PDFExportDialog should really privately inherit from us, but it can't
154
        // since it needs to be a dialog not a tab widget. Allow it access to
155
        // protected and private members instead. If we ever clean up the direct
156
        // widget access in this class, it might be able to privately inheirit and
157
        // be added to a very thin dialog class instead.
158
        friend class PDFExportDialog;
159
        int PgSel;
160
        QValueList<PDFPresentationData> EffVal;
161
        QString SelLPIcolor;
162
        QValueList<QString> FontsToEmbed;
163
        QValueList<QString> FontsToSubset;
4258 craig 164
 
4259 craig 165
        // PDFExportDialog needs access to these GUI members
166
        // but they don't need to be exposed to the rest of Scribus.
167
        QComboBox* actionCombo;
168
        QRadioButton* AllPages;
169
        QCheckBox* CheckBox10;
170
        QComboBox* EDirection;
171
        QComboBox* EDirection_2;
172
        QComboBox* EDirection_2_2;
173
        QSpinBox* EffectTime;
174
        QComboBox* EffectType;
175
        QCheckBox* fitWindow;
176
        QCheckBox* hideMenuBar;
177
        QCheckBox* hideToolBar;
178
        QLineEdit* InfoString;
179
        QSpinBox* LPIangle;
180
        QSpinBox* LPIfreq;
181
        QComboBox* LPIfunc;
182
        QLineEdit* PageNr;
183
        QSpinBox* PageTime;
184
 
185
private:
186
        // Private GUI member pointers, should not be used outside the class its
187
        // self.  Please ry to keep members here genuinely private, ie don't use
188
        // them even from friends. If you need to access it from a friend like
189
        // PDFExportDialog please move it to the protected section.
190
 
4255 craig 191
        QLabel* actionLabel;
192
        QListBox* AvailFlist;
193
        QGroupBox* BleedGroup;
194
        QGridLayout* BleedGroupLayout;
195
        QLabel* BleedIcon;
196
        QGroupBox* CBox;
1307 fschmid 197
        QGridLayout* CBoxLayout;
4255 craig 198
        QGroupBox* ColorGroup;
199
        QHBoxLayout* ColorGroupLayout;
200
        QLabel* ColorText1;
201
        QGroupBox* Effects;
202
        QGridLayout* EffectsLayout;
203
        QCheckBox* EmbedFonts;
204
        QListBox* EmbedList;
205
        QPushButton* EonAllPg;
206
        QPushButton* FromEmbed;
207
        QPushButton* FromSubset;
208
        QGroupBox* GroupBox1;
209
        QGridLayout* GroupBox1Layout;
210
        QGridLayout* GroupBox2Layout;
211
        QGroupBox* GroupBox9;
212
        QGridLayout* GroupBox9Layout;
213
        QGroupBox* groupDisplay;
214
        QVBoxLayout* groupDisplayLayout;
215
        QGroupBox* GroupFont;
216
        QHBoxLayout* GroupFontLayout;
217
        QGroupBox* groupJava;
218
        QHBoxLayout* groupJavaLayout;
219
        QButtonGroup* groupNavigation;
220
        QVBoxLayout* groupNavigationLayout;
221
        QGroupBox* GroupPass;
222
        QGridLayout* GroupPassLayout;
223
        QGroupBox* GroupSecSet;
224
        QVBoxLayout* GroupSecSetLayout;
225
        QGridLayout* Layout11;
226
        QGridLayout* Layout11a;
227
        QHBoxLayout* Layout13;
228
        QHBoxLayout* Layout2;
1307 fschmid 229
        QVBoxLayout* Layout3;
230
        QVBoxLayout* Layout4_2;
231
        QVBoxLayout* Layout5_2;
232
        QHBoxLayout* Layout5_2a;
233
        QVBoxLayout* Layout6;
4255 craig 234
        QHBoxLayout* LayoutSpecial;
235
        QComboBox* LPIcolor;
236
        QGroupBox* LPIgroup;
237
        QGridLayout* LPIgroupLayout;
238
        QRadioButton* OnlySome;
239
        QButtonGroup* pageLayout;
240
        QVBoxLayout* pageLayoutLayout;
241
        QCheckBox* PagePrev;
242
        QLabel* PDFX1;
243
        QLabel* PDFX2;
244
        QCheckBox* PrintSec2;
245
        QGroupBox* ProfsGroup;
246
        QGridLayout* ProfsGroupLayout;
247
        QLabel* ProfsTxt1;
248
        QLabel* ProfsTxt2;
249
        QLabel* ProfsTxt3;
250
        QLabel* ProfsTxt4;
251
        QButtonGroup* RangeGroup;
252
        QVBoxLayout* RangeGroupLayout;
253
        QCheckBox* SubsetFonts;
254
        QListBox* SubsetList;
255
        QWidget* tabColor;
256
        QVBoxLayout* tabColorLayout;
257
        QWidget* tabFonts;
258
        QWidget* tabGeneral;
259
        QVBoxLayout* tabLayout;
260
        QVBoxLayout* tabLayout_3;
1307 fschmid 261
        QGridLayout* tabLayout_5;
262
        QGridLayout* tabOptionsGridLayout;
4255 craig 263
        QWidget* tabPDFX;
1307 fschmid 264
        QVBoxLayout* tabPDFXLayout;
4255 craig 265
        QWidget* tabPresentation;
266
        QWidget* tabSecurity;
1307 fschmid 267
        QVBoxLayout* tabSecurityLayout;
4255 craig 268
        QWidget* tabSpecial;
4197 fschmid 269
        QVBoxLayout* tabSpecialLayout;
4255 craig 270
        QLabel* TextCom1;
271
        QLabel* TextCom2;
272
        QLabel* TextFont1;
273
        QLabel* TextFont1_2;
274
        QLabel* TextFont1_2a;
275
        QLabel* TextLabel1;
276
        QLabel* TextLabel1e;
277
        QLabel* TextLabel1x;
278
        QLabel* TextLabel2;
279
        QLabel* TextLabel2e;
280
        QLabel* TextLabel3;
281
        QLabel* TextLabel3e;
282
        QLabel* TextLabel4e;
283
        QLabel* TextLabel5e;
284
        QLabel* TextLabel6e;
285
        QLabel* textLPI1;
286
        QLabel* textLPI2;
287
        QLabel* textLPI3;
288
        QLabel* TextSec1;
289
        QLabel* TextSec2;
290
        QPushButton* ToEmbed;
291
        QPushButton* ToSubset;
292
        QRadioButton* useViewDefault;
293
        QGroupBox* X3Group;
294
        QGridLayout* X3GroupLayout;
295
        // end protected GUI member pointers
4197 fschmid 296
 
4259 craig 297
        // Non-GUI protected members
298
        QString unit;
299
        int precision;
300
        double unitRatio;
5880 jghali 301
        bool pdfExport;
302
        ScribusDoc* const doc;
4260 craig 303
        const SCFonts & AllFonts;
304
        PDFOptions & Opts;
4259 craig 305
        double pageH;
306
        double pageB;
307
        bool cms;
308
 
1307 fschmid 309
};
310
#endif