Subversion Repositories Scribus

Rev

Rev 8891 | 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
/***************************************************************************
8
 *                                                                         *
9
 *   This program is free software; you can redistribute it and/or modify  *
10
 *   it under the terms of the GNU General Public License as published by  *
11
 *   the Free Software Foundation; either version 2 of the License, or     *
12
 *   (at your option) any later version.                                   *
13
 *                                                                         *
14
 ***************************************************************************/
15
#include "tabpdfoptions.h"
16
#include "tabpdfoptions.moc"
17
 
18
#include <qpainter.h>
6657 cbradney 19
#include "createrange.h"
1972 craig 20
#include "pdfoptions.h"
2834 cbradney 21
#include "prefsmanager.h"
5880 jghali 22
#include "scribuscore.h"
2688 craig 23
#include "scconfig.h"
6657 cbradney 24
#include "units.h"
25
#include "usertaskstructs.h"
1307 fschmid 26
 
27
extern QPixmap loadIcon(QString nam);
5243 cbradney 28
#include "scribuscore.h"
1307 fschmid 29
 
4260 craig 30
TabPDFOptions::TabPDFOptions(   QWidget* parent, PDFOptions & Optionen,
31
                                const SCFonts &AllFonts,
32
                                const ProfilesL & PDFXProfiles,
5387 avox 33
                                const QMap<QString, int> & DocFonts,
4260 craig 34
                                const QValueList<PDFPresentationData> & Eff,
35
                                int unitIndex, double PageH, double PageB,
5881 jghali 36
                                ScribusDoc * mdoc, bool exporting )
4252 craig 37
        : QTabWidget( parent, "pdf" ),
4253 craig 38
        // Initialize all those darn pointer members so we catch unitialized
4255 craig 39
        // accesses. I (CR) use the following command to generate these based on
40
        // the header excerpt:
41
        //    !cut -d \* -f 2 | sed -r 's/ ?(.*);/\t\1\(0\),/g'
42
        // Public GUI member pointers:
4253 craig 43
        AddSec(0),
44
        Article(0),
45
        BleedBottom(0),
46
        BleedLeft(0),
47
        BleedRight(0),
48
        BleedTop(0),
49
        CheckBM(0),
50
        CheckBox1(0),
51
        CMethod(0),
4649 fschmid 52
        ClipMarg(0),
4253 craig 53
        ComboBind(0),
54
        Compression(0),
55
        continuousPages(0),
56
        CopySec(0),
57
        CQuality(0),
58
        doublePageLeft(0),
59
        doublePageRight(0),
60
        DSColor(0),
61
        EmbedProfs(0),
62
        EmbedProfs2(0),
63
        Encry(0),
64
        ImageP(0),
65
        IntendI(0),
66
        IntendS(0),
67
        MirrorH(0),
68
        MirrorV(0),
69
        ModifySec(0),
70
        NoEmbedded(0),
71
        OutCombo(0),
72
        Pages(0),
73
        PassOwner(0),
74
        PassUser(0),
75
        PDFVersionCombo(0),
4255 craig 76
        PrintProfC(0),
77
        PrintSec(0),
78
        Resolution(0),
79
        RotateDeg(0),
80
        singlePage(0),
81
        SolidPr(0),
82
        useBookmarks(0),
83
        useFullScreen(0),
84
        useLayers(0),
85
        useLayers2(0),
86
        UseLPI(0),
87
        useSpot(0),
5320 fschmid 88
        overprintMode(0),
4255 craig 89
        useThumbnails(0),
90
        ValC(0),
4258 craig 91
        // Protected members other than GUI member pointers
92
        // End GUI member pointers
4259 craig 93
        // Protected non-gui members
94
        PgSel(0),
95
        EffVal(Eff),
96
        // Protected GUI member pointers
97
        actionCombo(0),
98
        AllPages(0),
99
        CheckBox10(0),
100
        EDirection(0),
101
        EDirection_2(0),
102
        EDirection_2_2(0),
103
        EffectTime(0),
104
        EffectType(0),
105
        fitWindow(0),
106
        hideMenuBar(0),
107
        hideToolBar(0),
108
        InfoString(0),
109
        LPIangle(0),
110
        LPIfreq(0),
111
        LPIfunc(0),
112
        PageNr(0),
113
        PageTime(0),
114
        // End protected gui member pointers
115
        // Private member gui pointers
4255 craig 116
        actionLabel(0),
117
        AvailFlist(0),
118
        BleedGroup(0),
119
        BleedGroupLayout(0),
6921 fschmid 120
//      BleedIcon(0),
4255 craig 121
        CBox(0),
122
        CBoxLayout(0),
123
        ColorGroup(0),
124
        ColorGroupLayout(0),
125
        ColorText1(0),
126
        Effects(0),
127
        EffectsLayout(0),
128
        EmbedFonts(0),
129
        EmbedList(0),
130
        EonAllPg(0),
131
        FromEmbed(0),
7107 tsoots 132
        FromOutline(0),
4255 craig 133
        GroupBox1(0),
134
        GroupBox1Layout(0),
135
        GroupBox2Layout(0),
136
        GroupBox9(0),
137
        GroupBox9Layout(0),
138
        groupDisplay(0),
139
        groupDisplayLayout(0),
140
        GroupFont(0),
141
        GroupFontLayout(0),
142
        groupJava(0),
143
        groupJavaLayout(0),
144
        groupNavigation(0),
145
        groupNavigationLayout(0),
146
        GroupPass(0),
147
        GroupPassLayout(0),
148
        GroupSecSet(0),
149
        GroupSecSetLayout(0),
6921 fschmid 150
        Layout11(0),
6657 cbradney 151
        pageNumberSelectorLayout(0),
4255 craig 152
        Layout11a(0),
153
        Layout13(0),
154
        Layout2(0),
155
        Layout3(0),
156
        Layout4_2(0),
157
        Layout5_2(0),
158
        Layout5_2a(0),
159
        Layout6(0),
160
        LayoutSpecial(0),
161
        LPIcolor(0),
162
        LPIgroup(0),
163
        LPIgroupLayout(0),
164
        OnlySome(0),
165
        pageLayout(0),
166
        pageLayoutLayout(0),
167
        PagePrev(0),
4253 craig 168
        PDFX1(0),
169
        PDFX2(0),
170
        PrintSec2(0),
171
        ProfsGroup(0),
4255 craig 172
        ProfsGroupLayout(0),
4253 craig 173
        ProfsTxt1(0),
174
        ProfsTxt2(0),
175
        ProfsTxt3(0),
176
        ProfsTxt4(0),
177
        RangeGroup(0),
4255 craig 178
        RangeGroupLayout(0),
7107 tsoots 179
        OutlineFonts(0),
180
        OutlineList(0),
4253 craig 181
        tabColor(0),
4255 craig 182
        tabColorLayout(0),
4253 craig 183
        tabFonts(0),
184
        tabGeneral(0),
4255 craig 185
        tabLayout(0),
186
        tabLayout_3(0),
187
        tabLayout_5(0),
188
        tabOptionsGridLayout(0),
4253 craig 189
        tabPDFX(0),
4255 craig 190
        tabPDFXLayout(0),
4253 craig 191
        tabPresentation(0),
192
        tabSecurity(0),
4255 craig 193
        tabSecurityLayout(0),
4253 craig 194
        tabSpecial(0),
4255 craig 195
        tabSpecialLayout(0),
4253 craig 196
        TextCom1(0),
197
        TextCom2(0),
198
        TextFont1(0),
199
        TextFont1_2(0),
200
        TextFont1_2a(0),
201
        TextLabel1(0),
202
        TextLabel1e(0),
203
        TextLabel1x(0),
204
        TextLabel2(0),
205
        TextLabel2e(0),
206
        TextLabel3(0),
207
        TextLabel3e(0),
208
        TextLabel4e(0),
209
        TextLabel5e(0),
210
        TextLabel6e(0),
211
        textLPI1(0),
212
        textLPI2(0),
213
        textLPI3(0),
214
        TextSec1(0),
215
        TextSec2(0),
6657 cbradney 216
        pageNrButton(0),
4253 craig 217
        ToEmbed(0),
7107 tsoots 218
        ToOutline(0),
4253 craig 219
        useViewDefault(0),
220
        X3Group(0),
4259 craig 221
        X3GroupLayout(0),
4255 craig 222
        // end protected member gui pointers
4259 craig 223
        // Private members
224
        unit(unitGetSuffixFromIndex(unitIndex)),
225
        precision(unitGetPrecisionFromIndex(unitIndex)),
226
        unitRatio(unitGetRatioFromIndex(unitIndex)),
5882 mrdocs 227
        pdfExport(exporting),
5880 jghali 228
        doc(mdoc),
4260 craig 229
        AllFonts(AllFonts),
4259 craig 230
        Opts(Optionen),
231
        pageH(PageH),
232
        pageB(PageB),
233
        cms(false)
1307 fschmid 234
{
1792 cbradney 235
 
1307 fschmid 236
        tabGeneral = new QWidget( this, "tabGeneral" );
237
        tabLayout = new QVBoxLayout( tabGeneral );
238
        tabLayout->setSpacing( 5 );
6927 subik 239
        tabLayout->setMargin( 11 );
1307 fschmid 240
        Layout13 = new QHBoxLayout( 0, 0, 5, "Layout13");
241
        RangeGroup = new QButtonGroup( tabGeneral, "RangeGroup" );
242
        RangeGroup->setTitle( tr( "Export Range" ) );
243
        RangeGroup->setColumnLayout(0, Qt::Vertical );
244
        RangeGroup->layout()->setSpacing( 5 );
245
        RangeGroup->layout()->setMargin( 10 );
246
        RangeGroupLayout = new QVBoxLayout( RangeGroup->layout() );
247
        RangeGroupLayout->setAlignment( Qt::AlignTop );
248
        AllPages = new QRadioButton( tr( "&All Pages" ), RangeGroup, "AllPages" );
249
        RangeGroupLayout->addWidget( AllPages );
250
        Layout11 = new QGridLayout( 0, 1, 1, 0, 5, "Layout11");
251
        OnlySome = new QRadioButton( tr( "C&hoose Pages" ), RangeGroup, "OnlySome" );
252
        Layout11->addWidget( OnlySome, 0, 0 );
6657 cbradney 253
        pageNumberSelectorLayout = new QHBoxLayout( 0, 0, 5, "pageNumberSelectorLayout" );
1307 fschmid 254
        PageNr = new QLineEdit( RangeGroup, "PageNr" );
6657 cbradney 255
        pageNumberSelectorLayout->addWidget( PageNr );
256
        pageNrButton = new QPushButton( QString::fromUtf8("…"), RangeGroup, "PageNrButton" );
6662 cbradney 257
        pageNrButton->setPixmap(loadIcon("ellipsis.png"));
6657 cbradney 258
        pageNumberSelectorLayout->addWidget( pageNrButton );
259
        Layout11->addLayout( pageNumberSelectorLayout, 1, 0 );
1307 fschmid 260
        RangeGroupLayout->addLayout( Layout11 );
8471 cbradney 261
        RotationLayout = new QHBoxLayout( 0, 0, 5, "RotationLayout" );
1307 fschmid 262
        TextLabel3 = new QLabel( tr( "&Rotation:" ), RangeGroup, "TextLabel3" );
8471 cbradney 263
        RotationLayout->addWidget( TextLabel3 );
1307 fschmid 264
        RotateDeg = new QComboBox( true, RangeGroup, "RotateDeg" );
265
        RotateDeg->insertItem(QString::fromUtf8("0 °"));
266
        RotateDeg->insertItem(QString::fromUtf8("90 °"));
267
        RotateDeg->insertItem(QString::fromUtf8("180 °"));
268
        RotateDeg->insertItem(QString::fromUtf8("270 °"));
269
        RotateDeg->setEditable(false);
270
        TextLabel3->setBuddy(RotateDeg);
8471 cbradney 271
        RotationLayout->addWidget( RotateDeg );
272
        RangeGroupLayout->addLayout(RotationLayout);
1307 fschmid 273
        Layout11a = new QGridLayout( 0, 1, 1, 0, 5, "Layout11a");
274
        MirrorH = new QToolButton( RangeGroup, "MirrorH" );
8471 cbradney 275
        MirrorH->setPixmap(loadIcon("16/flip-object-horizontal.png"));
1307 fschmid 276
        MirrorH->setToggleButton( true );
277
        Layout11a->addWidget( MirrorH, 0, 0 );
278
        MirrorV = new QToolButton( RangeGroup, "MirrorH" );
8471 cbradney 279
        MirrorV->setPixmap(loadIcon("16/flip-object-vertical.png"));
1307 fschmid 280
        MirrorV->setToggleButton( true );
281
        Layout11a->addWidget( MirrorV, 0, 1 );
282
        RangeGroupLayout->addLayout( Layout11a );
4649 fschmid 283
        ClipMarg = new QCheckBox( tr( "Clip to Page Margins" ), RangeGroup, "ClipMarg" );
284
        RangeGroupLayout->addWidget( ClipMarg );
1307 fschmid 285
        Layout13->addWidget( RangeGroup );
286
 
287
        GroupBox1 = new QGroupBox( tr( "File Options" ), tabGeneral, "GroupBox1" );
288
        GroupBox1->setColumnLayout(0, Qt::Vertical );
289
        GroupBox1->layout()->setSpacing( 0 );
290
        GroupBox1->layout()->setMargin( 0 );
291
        GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
292
        GroupBox1Layout->setAlignment( Qt::AlignTop );
293
        GroupBox1Layout->setSpacing( 5 );
294
        GroupBox1Layout->setMargin( 10 );
295
        TextLabel1 = new QLabel( tr( "Compatibilit&y:" ), GroupBox1, "TextLabel1" );
296
        TextLabel1->setAlignment( static_cast<int>( QLabel::AlignVCenter | QLabel::AlignLeft ) );
297
        GroupBox1Layout->addWidget( TextLabel1, 0, 0 );
1973 craig 298
        PDFVersionCombo = new QComboBox( true, GroupBox1, "PDFVersionCombo" );
299
        PDFVersionCombo->setEditable(false);
300
        TextLabel1->setBuddy(PDFVersionCombo);
5839 cbradney 301
        PDFVersionCombo->insertItem("PDF 1.3 (Acrobat 4)");
302
        PDFVersionCombo->insertItem("PDF 1.4 (Acrobat 5)");
303
        PDFVersionCombo->insertItem("PDF 1.5 (Acrobat 6)");
5880 jghali 304
        cms = doc ? (ScCore->haveCMS() && doc->HasCMS) : false;
305
        if (cms && (!PDFXProfiles.isEmpty()))
1973 craig 306
                PDFVersionCombo->insertItem("PDF/X-3");
2439 cbradney 307
        GroupBox1Layout->addMultiCellWidget( PDFVersionCombo, 0, 0, 1, 2 );
1307 fschmid 308
        TextLabel1x = new QLabel( tr( "&Binding:" ), GroupBox1, "TextLabel1" );
309
        TextLabel1x->setAlignment( static_cast<int>( QLabel::AlignVCenter | QLabel::AlignLeft ) );
310
        GroupBox1Layout->addWidget( TextLabel1x, 1, 0 );
311
        ComboBind = new QComboBox( true, GroupBox1, "ComboBind" );
312
        ComboBind->insertItem( tr("Left Margin"));
313
        ComboBind->insertItem( tr("Right Margin"));
314
        ComboBind->setEditable(false);
315
        TextLabel1x->setBuddy(ComboBind);
2439 cbradney 316
        GroupBox1Layout->addMultiCellWidget( ComboBind, 1, 1, 1, 2 );
1307 fschmid 317
        CheckBox1 = new QCheckBox( tr( "Generate &Thumbnails" ), GroupBox1, "CheckBox1" );
318
        GroupBox1Layout->addMultiCellWidget( CheckBox1, 2, 2, 0, 2 );
319
        Article = new QCheckBox( tr( "Save &Linked Text Frames as PDF Articles" ), GroupBox1, "CheckBox1" );
320
        GroupBox1Layout->addMultiCellWidget( Article, 3, 3, 0, 2 );
321
        CheckBM = new QCheckBox( tr( "&Include Bookmarks" ), GroupBox1, "E" );
322
        GroupBox1Layout->addMultiCellWidget( CheckBM, 4, 4, 0, 2 );
4014 cbradney 323
        useLayers = new QCheckBox( tr( "Include La&yers" ), GroupBox1, "LI" );
1738 fschmid 324
        GroupBox1Layout->addMultiCellWidget( useLayers, 5, 5, 0, 2 );
1307 fschmid 325
        Resolution = new QSpinBox( GroupBox1, "Resolution" );
326
        Resolution->setMaxValue( 4000 );
327
        Resolution->setMinValue( 35 );
328
        Resolution->setSuffix( tr( " dpi" ) );
1799 cbradney 329
        TextLabel2 = new QLabel( Resolution, tr( "&Resolution for EPS Graphics:" ), GroupBox1, "TextLabel2" );
1307 fschmid 330
        TextLabel2->setAlignment( static_cast<int>( QLabel::AlignVCenter | QLabel::AlignLeft ) );
1738 fschmid 331
        GroupBox1Layout->addWidget( TextLabel2, 6, 0 );
332
        GroupBox1Layout->addWidget( Resolution, 6, 1, AlignLeft );
1307 fschmid 333
        Layout13->addWidget( GroupBox1 );
334
        tabLayout->addLayout( Layout13 );
335
        Compression = new QCheckBox( tr( "Com&press Text and Vector Graphics" ), tabGeneral, "Compression" );
336
        tabLayout->addWidget( Compression );
4824 mrdocs 337
        CBox = new QGroupBox( tr( "Image Compression Method" ), tabGeneral, "CBox" );
1307 fschmid 338
        CBox->setColumnLayout(0, Qt::Vertical );
339
        CBox->layout()->setSpacing( 5 );
340
        CBox->layout()->setMargin( 11 );
341
        CBoxLayout = new QGridLayout( CBox->layout() );
342
        CBoxLayout->setAlignment( Qt::AlignTop );
343
        CMethod = new QComboBox( true, CBox, "CMethod" );
344
        CMethod->clear();
345
        CMethod->insertItem( tr( "Automatic" ) );
4576 mrdocs 346
        CMethod->insertItem( tr( "Lossy - JPEG" ) );
347
        CMethod->insertItem( tr( "Lossless - Zip" ) );
1307 fschmid 348
        CMethod->insertItem( tr( "None" ) );
349
        CMethod->setEditable(false);
4014 cbradney 350
        TextCom1 = new QLabel( CMethod, tr( "Compression Metho&d:" ), CBox, "TextCom1" );
3849 subik 351
        CBoxLayout->addWidget( TextCom1, 0, 0 );
3798 cbradney 352
        CBoxLayout->addWidget( CMethod, 0, 1 );
1307 fschmid 353
        CQuality = new QComboBox( true, CBox, "CQuality" );
354
        CQuality->clear();
355
        CQuality->insertItem( tr( "Maximum" ) );
356
        CQuality->insertItem( tr( "High" ) );
357
        CQuality->insertItem( tr( "Medium" ) );
358
        CQuality->insertItem( tr( "Low" ) );
359
        CQuality->insertItem( tr( "Minimum" ) );
360
        CQuality->setEditable(false);
3798 cbradney 361
        TextCom2 = new QLabel( CQuality, tr( "Compression &Quality:" ), CBox, "TextCom2" );
362
        CBoxLayout->addWidget( TextCom2, 1, 0 );
1307 fschmid 363
        CBoxLayout->addWidget( CQuality, 1, 1 );
8406 fschmid 364
        DSColor = new QCheckBox( tr( "Maximum Image Resolution:" ), CBox, "DSColor" );
1307 fschmid 365
        CBoxLayout->addWidget( DSColor, 2, 0 );
366
        ValC = new QSpinBox( CBox, "ValC" );
367
        ValC->setSuffix( tr( " dpi" ) );
368
        ValC->setMaxValue( 4000 );
369
        ValC->setMinValue( 35 );
370
        CBoxLayout->addWidget( ValC, 2, 1, AlignLeft );
371
        tabLayout->addWidget( CBox );
372
        insertTab( tabGeneral, tr( "&General" ) );
5881 jghali 373
        if (doc != 0 && exporting)
1307 fschmid 374
        {
375
                tabFonts = new QWidget( this, "tabFonts" );
376
                tabLayout_3 = new QVBoxLayout( tabFonts );
377
                tabLayout_3->setSpacing( 5 );
7070 fschmid 378
                tabLayout_3->setMargin( 10 );
1307 fschmid 379
                GroupFont = new QGroupBox( tr( "Embedding" ), tabFonts, "GroupFont" );
380
                GroupFont->setColumnLayout(0, Qt::Vertical );
381
                GroupFont->layout()->setSpacing( 0 );
382
                GroupFont->layout()->setMargin( 0 );
383
                GroupFontLayout = new QHBoxLayout( GroupFont->layout() );
384
                GroupFontLayout->setAlignment( Qt::AlignTop );
385
                GroupFontLayout->setSpacing( 5 );
386
                GroupFontLayout->setMargin( 10 );
387
                Layout4_2 = new QVBoxLayout;
388
                Layout4_2->setSpacing( 5 );
389
                Layout4_2->setMargin( 0 );
390
                TextFont1 = new QLabel( tr( "Available Fonts:" ), GroupFont, "TextFont1" );
391
                Layout4_2->addWidget( TextFont1 );
392
                AvailFlist = new QListBox( GroupFont, "AvailFlist" );
393
                AvailFlist->setMinimumSize(QSize(150, 140));
394
                Layout4_2->addWidget( AvailFlist );
395
                GroupFontLayout->addLayout( Layout4_2 );
396
                Layout5_2 = new QVBoxLayout;
397
                Layout5_2->setSpacing( 5 );
398
                Layout5_2->setMargin( 0 );
1321 fschmid 399
                QSpacerItem* spacerS3a = new QSpacerItem( 20, 30, QSizePolicy::Minimum, QSizePolicy::Minimum );
400
                Layout5_2->addItem( spacerS3a );
8471 cbradney 401
                ToEmbed = new QPushButton( "", GroupFont, "ToEmbed" );
402
                ToEmbed->setPixmap(loadIcon("22/go-next.png"));
1307 fschmid 403
                Layout5_2->addWidget( ToEmbed );
8471 cbradney 404
                FromEmbed = new QPushButton( "", GroupFont, "FromEmbed" );
405
                FromEmbed->setPixmap(loadIcon("22/go-previous.png"));
1307 fschmid 406
                Layout5_2->addWidget( FromEmbed );
1321 fschmid 407
                QSpacerItem* spacerS3 = new QSpacerItem( 20, 30, QSizePolicy::Minimum, QSizePolicy::Expanding );
408
                Layout5_2->addItem( spacerS3 );
1307 fschmid 409
                GroupFontLayout->addLayout( Layout5_2 );
410
                Layout6 = new QVBoxLayout;
411
                Layout6->setSpacing( 5 );
412
                Layout6->setMargin( 0 );
413
                TextFont1_2 = new QLabel( tr( "Fonts to embed:" ), GroupFont, "TextFont1_2" );
414
                Layout6->addWidget( TextFont1_2 );
415
                EmbedList = new QListBox( GroupFont, "EmbedList" );
416
                EmbedList->setMinimumSize(QSize(150, 40));
417
                Layout6->addWidget( EmbedList );
3849 subik 418
 
1307 fschmid 419
                Layout5_2a = new QHBoxLayout;
420
                Layout5_2a->setSpacing( 5 );
421
                Layout5_2a->setMargin( 0 );
7070 fschmid 422
                EmbedFonts = new QPushButton( tr( "&Embed all" ), GroupFont, "EmbedFonts" );
423
                Layout5_2a->addWidget( EmbedFonts );
1307 fschmid 424
                QSpacerItem* spacerS1 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
425
                Layout5_2a->addItem( spacerS1 );
7107 tsoots 426
                ToOutline = new QPushButton( "", GroupFont, "ToOutline" );
8471 cbradney 427
                ToOutline->setPixmap(loadIcon("22/go-down.png"));
7107 tsoots 428
                Layout5_2a->addWidget( ToOutline );
429
                FromOutline = new QPushButton( "", GroupFont, "FromOutline" );
8471 cbradney 430
                FromOutline->setPixmap(loadIcon("22/go-up.png"));
7107 tsoots 431
                Layout5_2a->addWidget( FromOutline );
1307 fschmid 432
                QSpacerItem* spacerS2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
433
                Layout5_2a->addItem( spacerS2 );
434
                Layout6->addLayout( Layout5_2a );
7107 tsoots 435
                TextFont1_2a = new QLabel( tr( "Fonts to outline:" ), GroupFont, "TextFont1_2a" );
1307 fschmid 436
                Layout6->addWidget( TextFont1_2a );
7107 tsoots 437
                OutlineList = new QListBox( GroupFont, "OutlineList" );
438
                OutlineList->setMinimumSize(QSize(150, 40));
439
                Layout6->addWidget( OutlineList );
440
                OutlineFonts = new QPushButton( tr( "&Outline all" ), GroupFont, "OutlineFonts" );
441
                Layout6->addWidget( OutlineFonts );
1307 fschmid 442
                GroupFontLayout->addLayout( Layout6 );
443
                tabLayout_3->addWidget( GroupFont );
444
                insertTab( tabFonts, tr( "&Fonts" ) );
445
                tabPresentation = new QWidget( this, "tabPresentation" );
446
                tabLayout_5 = new QGridLayout( tabPresentation );
447
                tabLayout_5->setSpacing( 5 );
448
                tabLayout_5->setMargin( 11 );
449
                CheckBox10 = new QCheckBox( tr( "Enable &Presentation Effects" ), tabPresentation, "CheckBox10" );
450
                tabLayout_5->addMultiCellWidget( CheckBox10, 0, 0, 0, 1 );
451
                Pages = new QListBox( tabPresentation, "Pages" );
452
                Pages->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, Pages->sizePolicy().hasHeightForWidth() ) );
453
                tabLayout_5->addWidget( Pages, 1, 0 );
454
                PagePrev = new QCheckBox( tr( "Show Page Pre&views" ), tabPresentation, "CheckBox10" );
455
                tabLayout_5->addWidget( PagePrev, 2, 0 );
456
                Effects = new QGroupBox( tr( "Effects" ), tabPresentation, "Effects" );
457
                Effects->setColumnLayout(0, Qt::Vertical );
458
                Effects->layout()->setSpacing( 0 );
459
                Effects->layout()->setMargin( 0 );
460
                EffectsLayout = new QGridLayout( Effects->layout() );
461
                EffectsLayout->setAlignment( Qt::AlignTop );
462
                EffectsLayout->setSpacing( 5 );
463
                EffectsLayout->setMargin( 11 );
464
                TextLabel1e = new QLabel( tr( "&Display Duration:" ), Effects, "TextLabel1_2" );
465
                EffectsLayout->addWidget( TextLabel1e, 0, 0 );
466
                TextLabel2e = new QLabel( tr( "Effec&t Duration:" ), Effects, "TextLabel2_2" );
467
                EffectsLayout->addWidget( TextLabel2e, 1, 0 );
468
                TextLabel3e = new QLabel( tr( "Effect T&ype:" ), Effects, "TextLabel3_2" );
469
                EffectsLayout->addWidget( TextLabel3e, 2, 0 );
470
                TextLabel4e = new QLabel( tr( "&Moving Lines:" ), Effects, "TextLabel4_2" );
471
                EffectsLayout->addWidget( TextLabel4e, 3, 0 );
472
                TextLabel5e = new QLabel( tr( "F&rom the:" ), Effects, "TextLabel6" );
473
                EffectsLayout->addWidget( TextLabel5e, 4, 0 );
474
                TextLabel6e = new QLabel( tr( "D&irection:" ), Effects, "TextLabel5" );
475
                EffectsLayout->addWidget( TextLabel6e, 5, 0 );
476
                PageTime = new QSpinBox( Effects, "PageTime" );
477
                PageTime->setSuffix( tr( " sec" ) );
478
                PageTime->setMaxValue( 3600 );
4932 fschmid 479
                PageTime->setMinValue( 0 );
1307 fschmid 480
                TextLabel1e->setBuddy(PageTime);
481
                EffectsLayout->addWidget( PageTime, 0, 1 );
482
                EffectTime = new QSpinBox( Effects, "EffectTime" );
483
                EffectTime->setSuffix( tr( " sec" ) );
484
                EffectTime->setMaxValue( 3600 );
485
                EffectTime->setMinValue( 1 );
486
                TextLabel2e->setBuddy(EffectTime);
487
                EffectsLayout->addWidget( EffectTime, 1, 1 );
488
                EffectType = new QComboBox( true, Effects, "EffectType" );
489
                QString tmpc[] = { tr("No Effect"), tr("Blinds"), tr("Box"), tr("Dissolve"), tr("Glitter"), tr("Split"), tr("Wipe")};
490
                size_t ar = sizeof(tmpc) / sizeof(*tmpc);
491
                for (uint a = 0; a < ar; ++a)
492
                        EffectType->insertItem(tmpc[a]);
493
                EffectType->setEditable(false);
494
                TextLabel3e->setBuddy(EffectType);
495
                EffectsLayout->addWidget( EffectType, 2, 1 );
496
                EDirection = new QComboBox( true, Effects, "EDirection" );
497
                EDirection->insertItem( tr( "Horizontal" ) );
498
                EDirection->insertItem( tr( "Vertical" ) );
499
                EDirection->setEditable(false);
500
                TextLabel4e->setBuddy(EDirection);
501
                EffectsLayout->addWidget( EDirection, 3, 1 );
502
                EDirection_2 = new QComboBox( true, Effects, "EDirection_2" );
503
                EDirection_2->insertItem( tr( "Inside" ) );
504
                EDirection_2->insertItem( tr( "Outside" ) );
505
                EDirection_2->setEditable(false);
506
                TextLabel5e->setBuddy(EDirection_2);
507
                EffectsLayout->addWidget( EDirection_2, 4, 1 );
508
                EDirection_2_2 = new QComboBox( true, Effects, "EDirection_2_2" );
509
                QString tmp_ed[] = { tr("Left to Right"), tr("Top to Bottom"), tr("Bottom to Top"), tr("Right to Left"),
4197 fschmid 510
                                     tr("Top-left to Bottom-Right")};
1307 fschmid 511
                size_t ar_ed = sizeof(tmp_ed) / sizeof(*tmp_ed);
512
                for (uint a = 0; a < ar_ed; ++a)
513
                        EDirection_2_2->insertItem(tmp_ed[a]);
514
                EDirection_2_2->setEditable(false);
515
                TextLabel6e->setBuddy(EDirection_2_2);
516
                EffectsLayout->addWidget( EDirection_2_2, 5, 1 );
517
                EonAllPg = new QPushButton( tr( "&Apply Effect on all Pages" ), Effects, "Eon" );
518
                EffectsLayout->addMultiCellWidget( EonAllPg, 6, 6, 0, 1 );
519
                tabLayout_5->addMultiCellWidget( Effects, 1, 2, 1, 1 );
520
                insertTab( tabPresentation, tr( "E&xtras" ) );
4256 craig 521
                tabSpecial = new QWidget( this, "tabSpecial" );
522
                tabSpecialLayout = new QVBoxLayout( tabSpecial, 11, 6, "tabSpecialLayout");
523
                groupDisplay = new QGroupBox( tabSpecial, "groupDisplay" );
524
                groupDisplay->setTitle( tr( "Display Settings" ) );
525
                groupDisplay->setColumnLayout(0, Qt::Vertical );
526
                groupDisplay->layout()->setSpacing( 5 );
527
                groupDisplay->layout()->setMargin( 10 );
528
                groupDisplayLayout = new QVBoxLayout( groupDisplay->layout() );
529
                groupDisplayLayout->setAlignment( Qt::AlignTop );
530
                LayoutSpecial = new QHBoxLayout( 0, 0, 5, "LayoutSpecial");
531
                pageLayout = new QButtonGroup( groupDisplay, "pageLayout" );
7552 mrdocs 532
                pageLayout->setTitle( tr( "Document Layout" ) );
4256 craig 533
                pageLayout->setColumnLayout(0, Qt::Vertical );
534
                pageLayout->layout()->setSpacing( 5 );
535
                pageLayout->layout()->setMargin( 10 );
536
                pageLayoutLayout = new QVBoxLayout( pageLayout->layout() );
537
                pageLayoutLayout->setAlignment( Qt::AlignTop );
538
                singlePage = new QRadioButton( pageLayout, "singlePage" );
539
                singlePage->setText( tr( "Single Page" ) );
540
                pageLayoutLayout->addWidget( singlePage );
541
                continuousPages = new QRadioButton( pageLayout, "continuousPages" );
542
                continuousPages->setText( tr( "Continuous" ) );
543
                pageLayoutLayout->addWidget( continuousPages );
544
                doublePageLeft = new QRadioButton( pageLayout, "doublePageLeft" );
545
                doublePageLeft->setText( tr( "Double Page Left" ) );
546
                pageLayoutLayout->addWidget( doublePageLeft );
547
                doublePageRight = new QRadioButton( pageLayout, "doublePageRight" );
548
                doublePageRight->setText( tr( "Double Page Right" ) );
549
                pageLayoutLayout->addWidget( doublePageRight );
550
                LayoutSpecial->addWidget( pageLayout );
551
                groupNavigation = new QButtonGroup( groupDisplay, "groupNavigation" );
6063 fschmid 552
                groupNavigation->setRadioButtonExclusive(true);
4256 craig 553
                groupNavigation->setTitle( tr( "Visual Appearance" ) );
554
                groupNavigation->setColumnLayout(0, Qt::Vertical );
555
                groupNavigation->layout()->setSpacing( 5 );
556
                groupNavigation->layout()->setMargin( 10 );
557
                groupNavigationLayout = new QVBoxLayout( groupNavigation->layout() );
558
                groupNavigationLayout->setAlignment( Qt::AlignTop );
559
                useViewDefault = new QRadioButton( groupNavigation, "useViewDefault" );
560
                useViewDefault->setText( tr( "Use Viewers Defaults" ) );
561
                groupNavigationLayout->addWidget( useViewDefault );
562
                useFullScreen = new QRadioButton( groupNavigation, "useFullScreen" );
563
                useFullScreen->setText( tr( "Use Full Screen Mode" ) );
564
                groupNavigationLayout->addWidget( useFullScreen );
565
                useBookmarks = new QRadioButton( groupNavigation, "useBookmarks" );
566
                useBookmarks->setText( tr( "Display Bookmarks Tab" ) );
567
                groupNavigationLayout->addWidget( useBookmarks );
568
                useThumbnails = new QRadioButton( groupNavigation, "useThumbnails" );
569
                useThumbnails->setText( tr( "Display Thumbnails" ) );
570
                groupNavigationLayout->addWidget( useThumbnails );
571
                useLayers2 = new QRadioButton( groupNavigation, "useLayers" );
572
                useLayers2->setText( tr( "Display Layers Tab" ) );
573
                groupNavigationLayout->addWidget( useLayers2 );
574
                hideToolBar = new QCheckBox( tr( "Hide Viewers Toolbar" ), groupNavigation, "hideToolBar" );
575
                groupNavigationLayout->addWidget( hideToolBar );
576
                hideMenuBar = new QCheckBox( tr( "Hide Viewers Menubar" ), groupNavigation, "hideMenuBar" );
577
                groupNavigationLayout->addWidget( hideMenuBar );
578
                fitWindow = new QCheckBox( tr( "Zoom Pages to fit Viewer Window" ), groupNavigation, "fitWindow" );
579
                groupNavigationLayout->addWidget( fitWindow );
6063 fschmid 580
                groupNavigation->setRadioButtonExclusive(true);
4256 craig 581
                LayoutSpecial->addWidget( groupNavigation );
582
                groupDisplayLayout->addLayout( LayoutSpecial );
583
                tabSpecialLayout->addWidget( groupDisplay );
584
                groupJava = new QGroupBox( tabSpecial, "groupJava" );
585
                groupJava->setTitle( tr( "Special Actions" ) );
586
                groupJava->setColumnLayout(0, Qt::Vertical );
587
                groupJava->layout()->setSpacing( 5 );
588
                groupJava->layout()->setMargin( 10 );
589
                groupJavaLayout = new QHBoxLayout( groupJava->layout() );
590
                groupJavaLayout->setAlignment( Qt::AlignTop );
591
                actionLabel = new QLabel( groupJava, "actionLabel" );
4810 mrdocs 592
                actionLabel->setText( tr( "Javascript to be executed\nwhen PDF document is opened:" ) );
4256 craig 593
                groupJavaLayout->addWidget( actionLabel );
594
                actionCombo = new QComboBox( true, groupJava, "actionCombo" );
595
                actionCombo->setEditable(false);
596
                actionCombo->insertItem( tr("No Script"));
597
                groupJavaLayout->addWidget( actionCombo );
598
                tabSpecialLayout->addWidget( groupJava );
599
                insertTab( tabSpecial, tr("Viewer") );
1307 fschmid 600
        }
4197 fschmid 601
 
1307 fschmid 602
        tabSecurity = new QWidget( this, "tabSecurity" );
603
        tabSecurityLayout = new QVBoxLayout( tabSecurity, 11, 5, "tabSecurityLayout");
604
        Encry = new QCheckBox( tr( "&Use Encryption" ), tabSecurity, "Enc" );
605
        tabSecurityLayout->addWidget( Encry );
606
        GroupPass = new QGroupBox( tr( "Passwords" ), tabSecurity, "GroupPass" );
607
        GroupPass->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0,
608
                                               GroupPass->sizePolicy().hasHeightForWidth() ) );
609
        GroupPass->setColumnLayout(0, Qt::Vertical );
610
        GroupPass->layout()->setSpacing( 5 );
611
        GroupPass->layout()->setMargin( 10 );
612
        GroupPassLayout = new QGridLayout( GroupPass->layout() );
613
        GroupPassLayout->setAlignment( Qt::AlignTop );
614
        TextSec2 = new QLabel( tr( "&User:" ), GroupPass, "TextSec2" );
615
        GroupPassLayout->addWidget( TextSec2, 1, 0 );
616
        TextSec1 = new QLabel( tr( "&Owner:" ), GroupPass, "TextSec1" );
617
        GroupPassLayout->addWidget( TextSec1, 0, 0 );
618
        PassOwner = new QLineEdit( GroupPass, "PassOwner" );
619
        PassOwner->setEchoMode( QLineEdit::Password );
620
        TextSec1->setBuddy(PassOwner);
621
        GroupPassLayout->addWidget( PassOwner, 0, 1 );
622
        PassUser = new QLineEdit( GroupPass, "PassUser" );
623
        PassUser->setEchoMode( QLineEdit::Password );
624
        TextSec2->setBuddy(PassUser);
625
        GroupPassLayout->addWidget( PassUser, 1, 1 );
626
        tabSecurityLayout->addWidget( GroupPass );
627
 
628
        GroupSecSet = new QGroupBox( tr( "Settings" ), tabSecurity, "GroupSecSet" );
629
        GroupSecSet->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0,
630
                                    GroupSecSet->sizePolicy().hasHeightForWidth() ) );
631
        GroupSecSet->setColumnLayout(0, Qt::Vertical );
632
        GroupSecSet->layout()->setSpacing( 5 );
633
        GroupSecSet->layout()->setMargin( 10 );
634
        GroupSecSetLayout = new QVBoxLayout( GroupSecSet->layout() );
635
        GroupSecSetLayout->setAlignment( Qt::AlignTop );
636
        PrintSec = new QCheckBox( tr( "Allow &Printing the Document" ), GroupSecSet, "PrintSec" );
637
        GroupSecSetLayout->addWidget( PrintSec );
638
        ModifySec = new QCheckBox( tr( "Allow &Changing the Document" ), GroupSecSet, "ModifySec" );
639
        GroupSecSetLayout->addWidget( ModifySec );
640
        CopySec = new QCheckBox( tr( "Allow Cop&ying Text and Graphics" ), GroupSecSet, "CopySec" );
641
        GroupSecSetLayout->addWidget( CopySec );
642
        AddSec = new QCheckBox( tr( "Allow Adding &Annotations and Fields" ), GroupSecSet, "AddSec" );
643
        GroupSecSetLayout->addWidget( AddSec );
644
        tabSecurityLayout->addWidget( GroupSecSet );
645
        insertTab( tabSecurity, tr( "S&ecurity" ) );
646
 
647
        tabColor = new QWidget( this, "tabColor" );
648
        tabColorLayout = new QVBoxLayout( tabColor, 11, 5, "tabColorLayout");
649
        ColorGroup = new QGroupBox( tr( "General" ), tabColor, "ColorGroup" );
650
        ColorGroup->setColumnLayout(0, Qt::Vertical );
651
        ColorGroup->layout()->setSpacing( 5 );
652
        ColorGroup->layout()->setMargin( 10 );
653
        ColorGroupLayout = new QHBoxLayout( ColorGroup->layout() );
654
        ColorGroupLayout->setAlignment( Qt::AlignTop );
655
        ColorText1 = new QLabel( tr( "Output &Intended For:" ), ColorGroup, "ColorText1" );
656
        ColorGroupLayout->addWidget( ColorText1 );
657
        OutCombo = new QComboBox( true, ColorGroup, "OutCombo" );
658
        OutCombo->insertItem( tr( "Screen / Web" ) );
659
        OutCombo->insertItem( tr( "Printer" ) );
1476 fschmid 660
        OutCombo->insertItem( tr( "Grayscale" ) );
1307 fschmid 661
        OutCombo->setEditable(false);
662
        ColorText1->setBuddy(OutCombo);
663
        ColorGroupLayout->addWidget( OutCombo );
664
        tabColorLayout->addWidget( ColorGroup );
665
 
3079 fschmid 666
        useSpot = new QCheckBox( tr( "Convert Spot Colors to Process Colors" ), tabColor, "useSpot" );
667
        tabColorLayout->addWidget( useSpot );
668
 
5320 fschmid 669
        overprintMode = new QCheckBox( tr( "Force Overprint Mode" ), tabColor, "overprintMode" );
670
        tabColorLayout->addWidget( overprintMode );
671
 
1307 fschmid 672
        UseLPI = new QCheckBox( tr( "&Use Custom Rendering Settings" ), tabColor, "UseLPI" );
673
        tabColorLayout->addWidget( UseLPI );
674
        LPIgroup = new QGroupBox( tr( "Rendering Settings" ), tabColor, "LPIgroup" );
675
        LPIgroup->setColumnLayout(0, Qt::Vertical );
676
        LPIgroup->layout()->setSpacing( 5 );
677
        LPIgroup->layout()->setMargin( 10 );
678
        LPIgroupLayout = new QGridLayout( LPIgroup->layout() );
679
        LPIgroupLayout->setAlignment( Qt::AlignTop );
680
        LPIcolor = new QComboBox( true, LPIgroup, "LPIcolor" );
681
        LPIcolor->setEditable(false);
682
        LPIgroupLayout->addWidget( LPIcolor, 0, 0 );
683
        textLPI1 = new QLabel( tr( "Fre&quency:" ), LPIgroup, "textLPI1" );
684
        LPIgroupLayout->addWidget( textLPI1, 0, 1 );
685
        LPIfreq = new QSpinBox( LPIgroup, "LPIfreq" );
686
        LPIfreq->setMinValue(10);
687
        LPIfreq->setMaxValue(1000);
688
        textLPI1->setBuddy(LPIfreq);
689
        LPIgroupLayout->addWidget( LPIfreq, 0, 2 );
690
        textLPI2 = new QLabel( tr( "&Angle:" ), LPIgroup, "textLPI2" );
691
        LPIgroupLayout->addWidget( textLPI2, 1, 1 );
692
        LPIangle = new QSpinBox( LPIgroup, "LPIangle" );
693
        LPIangle->setSuffix( QString::fromUtf8(" °"));
694
        LPIangle->setMinValue(-180);
695
        LPIangle->setMaxValue(180);
696
        textLPI2->setBuddy(LPIangle);
697
        LPIgroupLayout->addWidget( LPIangle, 1, 2 );
698
        textLPI3 = new QLabel( tr( "S&pot Function:" ), LPIgroup, "textLPI3" );
699
        LPIgroupLayout->addWidget( textLPI3, 2, 1 );
700
        LPIfunc = new QComboBox( true, LPIgroup, "LPIfunc" );
701
        LPIfunc->setEditable(false);
702
        LPIfunc->insertItem( tr( "Simple Dot" ) );
703
        LPIfunc->insertItem( tr( "Line" ) );
704
        LPIfunc->insertItem( tr( "Round" ) );
705
        LPIfunc->insertItem( tr( "Ellipse" ) );
706
        textLPI3->setBuddy(LPIfunc);
707
        LPIgroupLayout->addWidget( LPIfunc, 2, 2 );
708
        tabColorLayout->addWidget( LPIgroup );
709
        SelLPIcolor = LPIcolor->currentText();
710
 
711
        GroupBox9 = new QGroupBox( tr( "Solid Colors:" ), tabColor, "GroupBox9" );
712
        GroupBox9->setColumnLayout(0, Qt::Vertical );
713
        GroupBox9->layout()->setSpacing( 5 );
714
        GroupBox9->layout()->setMargin( 10 );
715
        GroupBox9Layout = new QGridLayout( GroupBox9->layout() );
716
        GroupBox9Layout->setAlignment( Qt::AlignTop );
717
        EmbedProfs = new QCheckBox( GroupBox9, "EmbedProfs" );
718
        EmbedProfs->setText( tr( "Use ICC Profile" ) );
719
        GroupBox9Layout->addMultiCellWidget( EmbedProfs, 0, 0, 0, 1 );
720
        ProfsTxt1 = new QLabel(GroupBox9, "ProfsTxt1");
721
        ProfsTxt1->setText( tr( "Profile:" ) );
722
        GroupBox9Layout->addWidget( ProfsTxt1, 1, 0 );
723
        ProfsTxt2 = new QLabel( GroupBox9, "ProfsTxt2_2" );
724
        ProfsTxt2->setText( tr( "Rendering-Intent:" ) );
725
        GroupBox9Layout->addWidget( ProfsTxt2, 1, 1 );
726
        SolidPr = new QComboBox(true, GroupBox9, "SolidPr" );
727
        SolidPr->setEditable(false);
728
        GroupBox9Layout->addWidget( SolidPr, 2, 0 );
729
        IntendS = new QComboBox( true, GroupBox9, "IntendS" );
730
        QString tmp_ip[] = { tr("Perceptual"), tr("Relative Colorimetric"), tr("Saturation"), tr("Absolute Colorimetric")};
731
        size_t ar_ip = sizeof(tmp_ip) / sizeof(*tmp_ip);
732
        for (uint a = 0; a < ar_ip; ++a)
733
                IntendS->insertItem(tmp_ip[a]);
734
        IntendS->setEditable(false);
735
        GroupBox9Layout->addWidget( IntendS, 2, 1 );
736
        tabColorLayout->addWidget( GroupBox9 );
737
        ProfsGroup = new QGroupBox( tr( "Images:" ), tabColor, "ProfsGroup" );
738
        ProfsGroup->setColumnLayout(0, Qt::Vertical );
739
        ProfsGroup->layout()->setSpacing( 5 );
740
        ProfsGroup->layout()->setMargin( 10 );
741
        ProfsGroupLayout = new QGridLayout( ProfsGroup->layout() );
742
        ProfsGroupLayout->setAlignment( Qt::AlignTop );
743
        EmbedProfs2 = new QCheckBox( tr( "Use ICC Profile" ), ProfsGroup, "EmbedProfs" );
744
        ProfsGroupLayout->addMultiCellWidget( EmbedProfs2, 0, 0, 0, 1 );
745
        NoEmbedded = new QCheckBox( ProfsGroup, "NoEmbedded" );
746
        NoEmbedded->setText( tr( "Don't use embedded ICC profiles" ) );
747
        ProfsGroupLayout->addMultiCellWidget( NoEmbedded, 1, 1, 0, 1 );
748
        ProfsTxt3 = new QLabel( ProfsGroup, "ProfsTxt3" );
749
        ProfsTxt3->setText( tr( "Profile:" ) );
750
        ProfsGroupLayout->addWidget( ProfsTxt3, 2, 0 );
751
        ProfsTxt4 = new QLabel( ProfsGroup, "ProfsTxt2_2" );
752
        ProfsTxt4->setText( tr( "Rendering-Intent:" ) );
753
        ProfsGroupLayout->addWidget( ProfsTxt4, 2, 1 );
754
        ImageP = new QComboBox( true, ProfsGroup, "ImageP" );
755
        ImageP->setEditable(false);
756
        ProfsGroupLayout->addWidget( ImageP, 3, 0 );
757
        IntendI = new QComboBox( true, ProfsGroup, "IntendS" );
758
        for (uint a = 0; a < ar_ip; ++a)
759
                IntendI->insertItem(tmp_ip[a]);
760
        IntendI->setEditable(false);
761
        ProfsGroupLayout->addWidget( IntendI, 3, 1 );
762
        tabColorLayout->addWidget( ProfsGroup );
763
 
764
        QSpacerItem* spacerCG = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
765
        tabColorLayout->addItem( spacerCG );
766
        insertTab( tabColor, tr( "C&olor" ) );
767
 
768
        tabPDFX = new QWidget( this, "tabPDFX" );
6921 fschmid 769
        tabPDFXLayout = new QVBoxLayout( tabPDFX, 10, 5, "tabPDFXLayout");
770
 
771
        MarkGroup = new QGroupBox( tabPDFX, "MarkGroup" );
772
        MarkGroup->setTitle( tr( "Printer Marks" ) );
773
        MarkGroup->setColumnLayout(0, Qt::Vertical );
774
        MarkGroup->layout()->setSpacing( 5 );
775
        MarkGroup->layout()->setMargin( 10 );
776
        MarkGroupLayout = new QGridLayout( MarkGroup->layout() );
777
        MarkGroupLayout->setAlignment( Qt::AlignTop );
778
        cropMarks = new QCheckBox( tr( "Crop Marks" ), MarkGroup, "cropMarks" );
779
        MarkGroupLayout->addWidget( cropMarks, 0, 0 );
780
        bleedMarks = new QCheckBox( tr( "Bleed Marks" ), MarkGroup, "bleedMarks" );
781
        MarkGroupLayout->addWidget( bleedMarks, 1, 0 );
782
        registrationMarks = new QCheckBox( tr( "Registration Marks" ), MarkGroup, "registrationMarks" );
783
        MarkGroupLayout->addWidget( registrationMarks, 2, 0 );
784
        colorMarks = new QCheckBox( tr( "Color Bars" ), MarkGroup, "colorMarks" );
785
        MarkGroupLayout->addMultiCellWidget( colorMarks, 0, 0, 1, 2 );
786
        docInfoMarks = new QCheckBox( tr( "Page Information" ), MarkGroup, "docInfoMarks" );
787
        MarkGroupLayout->addMultiCellWidget( docInfoMarks, 1, 1, 1, 2 );
788
        MarkTxt1 = new QLabel( MarkGroup, "MarkTxt1" );
789
        MarkTxt1->setText( tr( "Offset:" ) );
790
        MarkGroupLayout->addWidget( MarkTxt1, 2, 1 );
791
        markOffset = new MSpinBox( MarkGroup, precision );
792
        MarkGroupLayout->addWidget( markOffset, 2, 2 );
793
        markOffset->setSuffix( unit );
794
        markOffset->setMinValue(0);
795
        markOffset->setMaxValue(3000 * unitRatio);
796
        tabPDFXLayout->addWidget( MarkGroup );
797
 
798
        BleedGroup = new QGroupBox( tabPDFX, "BleedGroup" );
799
        BleedGroup->setTitle( tr( "Bleed Settings" ) );
800
        BleedGroup->setColumnLayout(0, Qt::Vertical );
801
        BleedGroup->layout()->setSpacing( 5 );
802
        BleedGroup->layout()->setMargin( 10 );
803
        BleedGroupLayout = new QGridLayout( BleedGroup->layout() );
804
        BleedGroupLayout->setAlignment( Qt::AlignTop );
805
        BleedTxt1 = new QLabel( BleedGroup, "BleedTxt1" );
806
        BleedTxt1->setText( tr( "Top:" ) );
807
        BleedGroupLayout->addWidget( BleedTxt1, 0, 0 );
808
        BleedTop = new MSpinBox( BleedGroup, precision );
809
        BleedGroupLayout->addWidget( BleedTop, 0, 1 );
810
        BleedTxt2 = new QLabel( BleedGroup, "BleedTxt2" );
811
        BleedTxt2->setText( tr( "Bottom:" ) );
812
        BleedGroupLayout->addWidget( BleedTxt2, 1, 0 );
813
        BleedBottom = new MSpinBox( BleedGroup, precision );
814
        BleedGroupLayout->addWidget( BleedBottom, 1, 1 );
815
        BleedTxt3 = new QLabel( BleedGroup, "BleedTxt3" );
816
        BleedTxt3->setText( tr( "Left:" ) );
817
        BleedGroupLayout->addWidget( BleedTxt3, 0, 2 );
7069 fschmid 818
        BleedLeft = new MSpinBox( BleedGroup, precision );
819
        BleedGroupLayout->addWidget( BleedLeft, 0, 3 );
6921 fschmid 820
        BleedTxt4 = new QLabel( BleedGroup, "BleedTxt4" );
821
        BleedTxt4->setText( tr( "Right:" ) );
822
        BleedGroupLayout->addWidget( BleedTxt4, 1, 2 );
7069 fschmid 823
        BleedRight = new MSpinBox( BleedGroup, precision );
824
        BleedGroupLayout->addWidget( BleedRight, 1, 3 );
6944 fschmid 825
        docBleeds = new QCheckBox( tr( "Use Document Bleeds" ), BleedGroup, "docBleeds" );
826
        BleedGroupLayout->addMultiCellWidget( docBleeds, 2, 2, 0, 3 );
6921 fschmid 827
        tabPDFXLayout->addWidget( BleedGroup );
828
 
1307 fschmid 829
        X3Group = new QGroupBox( tabPDFX, "X3Group" );
830
        X3Group->setTitle( tr( "PDF/X-3 Output Intent" ) );
831
        X3Group->setColumnLayout(0, Qt::Vertical );
832
        X3Group->layout()->setSpacing( 5 );
833
        X3Group->layout()->setMargin( 10 );
834
        X3GroupLayout = new QGridLayout( X3Group->layout() );
835
        X3GroupLayout->setAlignment( Qt::AlignTop );
836
        PrintProfC = new QComboBox( true, X3Group, "PrintProfC" );
837
        PrintProfC->setEditable(false);
838
        X3GroupLayout->addWidget( PrintProfC, 0, 1 );
839
        InfoString = new QLineEdit( X3Group, "InfoString" );
840
        X3GroupLayout->addWidget( InfoString, 1, 1 );
841
        PDFX2 = new QLabel( InfoString, tr( "&Info String:" ), X3Group, "PDFX2" );
842
        X3GroupLayout->addWidget( PDFX2, 1, 0 );
843
        PDFX1 = new QLabel( PrintProfC, tr( "Output &Profile:" ), X3Group, "PDFX1" );
844
        X3GroupLayout->addWidget( PDFX1, 0, 0 );
845
        tabPDFXLayout->addWidget( X3Group );
6921 fschmid 846
 
847
        QSpacerItem* spacerPX2 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
848
        tabPDFXLayout->addItem( spacerPX2 );
849
 
6928 fschmid 850
        insertTab( tabPDFX, tr( "Pre-Press" ) );
1307 fschmid 851
        BleedTop->setSuffix( unit );
852
        BleedTop->setMinValue(0);
6921 fschmid 853
        BleedTop->setMaxValue(3000*unitRatio);
1307 fschmid 854
        BleedBottom->setSuffix( unit );
855
        BleedBottom->setMinValue(0);
6921 fschmid 856
        BleedBottom->setMaxValue(3000*unitRatio);
1307 fschmid 857
        BleedRight->setSuffix( unit );
858
        BleedRight->setMinValue(0);
6921 fschmid 859
        BleedRight->setMaxValue(3000*unitRatio);
1307 fschmid 860
        BleedLeft->setSuffix( unit );
861
        BleedLeft->setMinValue(0);
6921 fschmid 862
        BleedLeft->setMaxValue(3000*unitRatio);
5711 subik 863
 
6921 fschmid 864
        restoreDefaults(Optionen, AllFonts, PDFXProfiles, DocFonts, Eff, unitIndex, PageH, PageB, doc, pdfExport);
5711 subik 865
 
5881 jghali 866
        if (doc != 0 && exporting)
1307 fschmid 867
        {
868
                connect(EmbedFonts, SIGNAL(clicked()), this, SLOT(EmbedAll()));
869
                connect(AvailFlist, SIGNAL(clicked(QListBoxItem*)), this, SLOT(SelAFont(QListBoxItem*)));
870
                connect(EmbedList, SIGNAL(clicked(QListBoxItem*)), this, SLOT(SelEFont(QListBoxItem*)));
871
                connect(ToEmbed, SIGNAL(clicked()), this, SLOT(PutToEmbed()));
872
                connect(FromEmbed, SIGNAL(clicked()), this, SLOT(RemoveEmbed()));
7107 tsoots 873
                connect(OutlineFonts, SIGNAL(clicked()), this, SLOT(OutlineAll()));
874
                connect(OutlineList, SIGNAL(clicked(QListBoxItem*)), this, SLOT(SelSFont(QListBoxItem*)));
875
                connect(ToOutline, SIGNAL(clicked()), this, SLOT(PutToOutline()));
876
                connect(FromOutline, SIGNAL(clicked()), this, SLOT(RemoveOutline()));
1307 fschmid 877
                connect(PagePrev, SIGNAL(clicked()), this, SLOT(PagePr()));
878
                connect(Pages, SIGNAL(highlighted(int)), this, SLOT(SetPgEff(int)));
879
                connect(EffectType, SIGNAL(activated(int)), this, SLOT(SetEffOpts(int)));
880
                connect(EDirection_2_2, SIGNAL(activated(int)), this, SLOT(ValidDI(int)));
881
                connect(CheckBox10, SIGNAL(clicked()), this, SLOT(DoEffects()));
882
                connect(EonAllPg, SIGNAL(clicked()), this, SLOT(EffectOnAll()));
3388 fschmid 883
                connect(InfoString, SIGNAL(textChanged(const QString &)), this, SLOT(checkInfo()));
884
                connect(InfoString, SIGNAL(returnPressed()), this, SLOT(checkInfo()));
885
                connect(InfoString, SIGNAL(lostFocus()), this, SLOT(checkInfo()));
6944 fschmid 886
                connect(docBleeds, SIGNAL(clicked()), this, SLOT(doDocBleeds()));
3849 subik 887
                QToolTip::add( EmbedFonts, "<qt>" + tr( "Embed fonts into the PDF. Embedding the fonts will preserve the layout and appearance of your document." ) + "</qt>");
4824 mrdocs 888
                QToolTip::add( CheckBox10, "<qt>" + tr( "Enables presentation effects when using Adobe&#174; Reader&#174; and other PDF viewers which support this in full screen mode." ) + "</qt>");
3849 subik 889
                QToolTip::add( PagePrev, "<qt>" + tr( "Show page previews of each page listed above." ) + "</qt>");
4964 cbradney 890
                QToolTip::add( PageTime, "<qt>" + tr( "Length of time the page is shown before the presentation starts on the selected page. Setting 0 will disable automatic page transition." ) + "</qt>" );
3849 subik 891
                QToolTip::add( EffectTime, "<qt>" + tr( "Length of time the effect runs. A shorter time will speed up the effect, a longer one will slow it down." ) + "</qt>" );
892
                QToolTip::add( EffectType, "<qt>" + tr( "Type of the display effect." ) + "</qt>" );
893
                QToolTip::add( EDirection, "<qt>" + tr( "Direction of the effect of moving lines for the split and blind effects." ) + "</qt>" );
894
                QToolTip::add( EDirection_2, "<qt>" + tr( "Starting position for the box and split effects." ) + "</qt>" );
895
                QToolTip::add( EDirection_2_2, "<qt>" + tr( "Direction of the glitter or wipe effects." ) + "</qt>" );
896
                QToolTip::add( EonAllPg, "<qt>" + tr( "Apply the selected effect to all pages." ) + "</qt>" );
7109 fschmid 897
                QToolTip::add(OutlineFonts, "<qt>" + tr("Convert all glyphs in the document to outlines.") + "</qt>");
8854 fschmid 898
                //Viewer tab
8862 mrdocs 899
                // FIXME QToolTip::add( tabSpecial, "<qt>" + tr( "These options include instructions on how the PDF viewer should display when opening the document. They may not be supported in all viewers, nor for all versions of PDF." ) + "</qt>" );
8863 cbradney 900
                QToolTip::add( singlePage, "<qt>" + tr( "Show the document in single page mode" ) + "</qt>" );
901
                QToolTip::add( continuousPages, "<qt>" + tr( "Show the document in single page mode with the pages displayed continuously end to end like a scroll" ) + "</qt>" );
902
                QToolTip::add( doublePageLeft, "<qt>" + tr( "Show the document with facing pages, starting with the first page displayed on the left" ) + "</qt>" );
903
                QToolTip::add( doublePageRight, "<qt>" + tr( "Show the document with facing pages, starting with the first page displayed on the right" ) + "</qt>" );
904
                QToolTip::add( useViewDefault, "<qt>" + tr( "Use the viewer's defaults or the user's preferences if set differently from the viewer defaults" ) + "</qt>" );
905
                QToolTip::add( useFullScreen, "<qt>" + tr( "Enables viewing the document in full screen" ) + "</qt>" );
906
                QToolTip::add( useBookmarks, "<qt>" + tr( "Display the bookmarks upon opening" ) + "</qt>" );
907
                QToolTip::add( useThumbnails, "<qt>" + tr( "Display the page thumbnails upon opening" ) + "</qt>" );
908
                QToolTip::add( useLayers2, "<qt>" + tr( "Forces the displaying of layers. Useful only for PDF 1.5+." ) + "</qt>" );
909
                QToolTip::add( hideToolBar, "<qt>" + tr( "Hides the Tool Bar which has selection and other editing capabilities" ) + "</qt>" );
910
                QToolTip::add( hideMenuBar, "<qt>" + tr( "Hides the Menu Bar for the viewer, the PDF will display in a plain window. " ) + "</qt>" );
911
                QToolTip::add( fitWindow, "<qt>" + tr( "Fit the document page or pages to the available space in the viewer window." ) + "</qt>" );
1307 fschmid 912
        }
6944 fschmid 913
        else
914
                docBleeds->hide();
1307 fschmid 915
        connect(AllPages, SIGNAL(toggled(bool)), this, SLOT(SelRange(bool)));
6657 cbradney 916
        connect(pageNrButton, SIGNAL(clicked()), this, SLOT(createPageNumberRange()));
1307 fschmid 917
        connect(DSColor, SIGNAL(clicked()), this, SLOT(DoDownsample()));
918
        connect(MirrorH, SIGNAL(clicked()), this, SLOT(PDFMirror()));
919
        connect(MirrorV, SIGNAL(clicked()), this, SLOT(PDFMirror()));
920
        connect(RotateDeg, SIGNAL(activated(int)), this, SLOT(Rotation(int)));
921
        connect(OutCombo, SIGNAL(activated(int)), this, SLOT(EnablePr(int)));
922
        connect(EmbedProfs, SIGNAL(clicked()), this, SLOT(EnablePG()));
923
        connect(EmbedProfs2, SIGNAL(clicked()), this, SLOT(EnablePGI()));
924
        connect(NoEmbedded, SIGNAL(clicked()), this, SLOT(EnablePGI2()));
1973 craig 925
        connect(PDFVersionCombo, SIGNAL(activated(int)), this, SLOT(EnablePDFX(int)));
1307 fschmid 926
        connect(Encry, SIGNAL(clicked()), this, SLOT(ToggleEncr()));
927
        connect(UseLPI, SIGNAL(clicked()), this, SLOT(EnableLPI2()));
928
        connect(LPIcolor, SIGNAL(activated(int)), this, SLOT(SelLPIcol(int)));
8862 mrdocs 929
        //tooltips the ones commented out do work ar desired FIXME
930
        //QToolTip::add( tabColor,"<qt>" + tr( "This tab controls the color model choices and color management options for export." ) + "</qt>" );
931
        //QToolTip::add( tabSecurity,"<qt>" + tr( "This tab controls the encryption options for export." ) + "</qt>" );
932
        //QToolTip::add( tabGeneral,"<qt>" + tr( "This tab controls the basic options for export including PDF level and compression." ) + "</qt>" );
933
        //QToolTip::add( tabFonts,"<qt>" + tr( "This tab controls the font embedding options for export including options to convert fonts to vector outlines." ) + "</qt>" );
934
 
3849 subik 935
        QToolTip::add( AllPages, "<qt>" + tr( "Export all pages to PDF" ) + "</qt>" );
936
        QToolTip::add( OnlySome, "<qt>" + tr( "Export a range of pages to PDF" ) );
937
        QToolTip::add( PageNr, "<qt>" + tr( "Insert a comma separated list of tokens where "
4197 fschmid 938
                                                    "a token can be * for all the pages, 1-5 for "
939
                                                    "a range of pages or a single page number.") + "</qt>" );
1307 fschmid 940
 
5839 cbradney 941
        QToolTip::add( PDFVersionCombo, "<qt>" + tr( "Determines the PDF compatibility.<br/>The default is <b>PDF 1.3</b> which gives the widest compatibility.<br/>Choose <b>PDF 1.4</b> if your file uses features such as transparency or you require 128 bit encryption.<br/><b>PDF 1.5</b> is necessary when you wish to preserve objects in separate layers within the PDF.<br/><b>PDF/X-3</b> is for exporting the PDF when you want color managed RGB for commercial printing and is selectable when you have activated color management. Use only when advised by your printer or in some cases printing to a 4 color digital color laser printer." ) + "</qt>");
3849 subik 942
        QToolTip::add( ComboBind, "<qt>" + tr( "Determines the binding of pages in the PDF. Unless you know you need to change it leave the default choice - Left." ) + "</qt>" );
943
        QToolTip::add( CheckBox1, "<qt>" + tr( "Generates thumbnails of each page in the PDF. Some viewers can use the thumbnails for navigation." ) + "</qt>" );
944
        QToolTip::add( Article, "<qt>" + tr( "Generate PDF Articles, which is useful for navigating linked articles in a PDF." ) + "</qt>" );
4810 mrdocs 945
        QToolTip::add( useLayers, "<qt>" + tr( "Layers in your document are exported to the PDF Only available if PDF 1.5 is chosen." ) + "</qt>" );
3849 subik 946
        QToolTip::add( CheckBM, "<qt>" + tr( "Embed the bookmarks you created in your document. These are useful for navigating long PDF documents." ) + "</qt>" );
947
        QToolTip::add( Resolution, "<qt>" + tr( "Export resolution of text and vector graphics. This does not affect the resolution of bitmap images like photos." ) + "</qt>" );
948
        QToolTip::add( Compression, "<qt>" + tr( "Enables lossless compression of text and graphics. Unless you have a reason, leave this checked. This reduces PDF file size." ) + "</qt>" );
6778 mrdocs 949
        QToolTip::add( CMethod, "<qt>" + tr( "Method of compression to use for images. Automatic allows Scribus to choose the best method. ZIP is lossless and good for images with solid colors. JPEG is better at creating smaller PDF files which have many photos (with slight image quality loss possible). Leave it set to Automatic unless you have a need for special compression options." ) + "</qt>");
950
        QToolTip::add( CQuality, "<qt>" + tr( "Compression quality levels for lossy compression methods: Minimum (25%), Low (50%), Medium (75%), High (85%), Maximum (95%). Note that a quality level does not directly determine the size of the resulting image - both size and quality loss vary from image to image at any given quality level. Even with Maximum selected, there is always some quality loss with jpeg." ) + "</qt>");
8406 fschmid 951
        QToolTip::add( DSColor, "<qt>" + tr( "Limits the resolution of your bitmap images to the selected DPI. Images with a lower resolution will be left untouched. Leaving this unchecked will render them at their native resolution. Enabling this will increase memory usage and slow down export." ) + "</qt>" );
3849 subik 952
        QToolTip::add( ValC, "<qt>" + tr( "DPI (Dots Per Inch) for image export.") + "</qt>" );
953
        QToolTip::add( Encry, "<qt>" + tr( "Enable the security features in your exported PDF. If you selected PDF 1.3, the PDF will be protected by 40 bit encryption. If you selected PDF 1.4, the PDF will be protected by 128 bit encryption. Disclaimer: PDF encryption is not as reliable as GPG or PGP encryption and does have some limitations." ) + "</qt>" );
954
        QToolTip::add( PassOwner, "<qt>" + tr( "Choose a master password which enables or disables all the security features in your exported PDF" ) + "</qt>" );
955
        QToolTip::add( PassUser, "<qt>" + tr( "Choose a password for users to be able to read your PDF." ) + "</qt>" );
956
        QToolTip::add( PrintSec, "<qt>" + tr( "Allow printing of the PDF. If un-checked, printing is prevented. " ) + "</qt>" );
957
        QToolTip::add( ModifySec, "<qt>" + tr( "Allow modifying of the PDF. If un-checked, modifying the PDF is prevented." ) + "</qt>" );
3798 cbradney 958
        QToolTip::add( CopySec, "<qt>" + tr( "Allow copying of text or graphics from the PDF. If unchecked, text and graphics cannot be copied." ) + "</qt>" );
959
        QToolTip::add( AddSec, "<qt>" + tr( "Allow adding annotations and fields to the PDF. If unchecked, editing annotations and fields is prevented." ) + "</qt>" );
4810 mrdocs 960
        QToolTip::add( OutCombo, "<qt>" + tr( "Color model for the output of your PDF. Choose Screen/Web for PDFs which are used for screen display and for printing on typical inkjets. Choose Printer when printing to a true 4 color CMYK printer. Choose Grayscale when you want a grey scale PDF." ) + "</qt>" );
3849 subik 961
        QToolTip::add( UseLPI, "<qt>" + tr( "This is an advanced setting which is not enabled by default. This should only be enabled when specifically requested by your printer and they have given you the exact details needed. Otherwise, your exported PDF may not print properly and is truly not portable across systems." ) + "</qt>" );
962
        QToolTip::add( EmbedProfs, "<qt>" + tr( "Embed a color profile for solid colors" ) + "</qt>" );
963
        QToolTip::add( SolidPr, "<qt>" + tr( "Color profile for solid colors" ) + "</qt>" );
964
        QToolTip::add( IntendS, "<qt>" + tr( "Rendering intent for solid colors" ) + "</qt>" );
965
        QToolTip::add( EmbedProfs2, "<qt>" + tr( "Embed a color profile for images" ) + "</qt>" );
966
        QToolTip::add( NoEmbedded, "<qt>" + tr( "Do not use color profiles that are embedded in source images" ) + "</qt>" );
967
        QToolTip::add( ImageP, "<qt>" + tr( "Color profile for images" ) + "</qt>" );
968
        QToolTip::add( IntendI, "<qt>" + tr( "Rendering intent for images" ) + "</qt>" );
969
        QToolTip::add( MirrorH, "<qt>" + tr( "Mirror Page(s) horizontally" ) + "</qt>" );
970
        QToolTip::add( MirrorV, "<qt>" + tr( "Mirror Page(s) vertically" ) + "</qt>" );
5320 fschmid 971
        QToolTip::add(overprintMode, "<qt>"+ tr("Enables global Overprint Mode for this document, overrides object settings") + "<qt>");
4197 fschmid 972
        QToolTip::add( useSpot,"<qt>" + tr( "Enables Spot Colors to be converted to composite colors. Unless you are planning to print spot colors at a commercial printer, this is probably best left enabled." ) + "</qt>");
4836 cbradney 973
        QToolTip::add( ClipMarg, "<qt>" + tr( "Do not show objects outside the margins in the exported file" ) + "</qt>" );
8802 cbradney 974
        //PrePress tab 
8862 mrdocs 975
        QToolTip::add( cropMarks, "<qt>" + tr( "This creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing." ) + "</qt>" );
8894 cbradney 976
        QToolTip::add( bleedMarks, "<qt>" + tr( "This creates bleed marks which are indicated by  _ . _ and show the bleed limit" ) + "</qt>" );
8863 cbradney 977
        QToolTip::add( registrationMarks, "<qt>" + tr( "Add registration marks which are added to each separation" ) + "</qt>" );
978
        QToolTip::add( colorMarks, "<qt>" + tr( "Add color calibration bars" ) + "</qt>" );
979
        QToolTip::add( docInfoMarks, "<qt>" + tr( "Add document information which includes the document title and page numbers" ) + "</qt>" );
980
        QToolTip::add( markOffset, "<qt>" + tr( "Indicate the distance offset for the registration marks" ) + "</qt>" );
8802 cbradney 981
        QToolTip::add( BleedTop, "<qt>" + tr( "Distance for bleed from the top of the physical page" ) + "</qt>" );
982
        QToolTip::add( BleedBottom, "<qt>" + tr( "Distance for bleed from the bottom of the physical page" ) + "</qt>" );
983
        QToolTip::add( BleedLeft, "<qt>" + tr( "Distance for bleed from the left of the physical page" ) + "</qt>" );
984
        QToolTip::add( BleedRight, "<qt>" + tr( "Distance for bleed from the right of the physical page" )  + "</qt>");
8863 cbradney 985
        QToolTip::add( docBleeds, "<qt>" + tr( "Use the existing bleed settings from the document preferences" ) + "</qt>" );
8802 cbradney 986
        QToolTip::add( PrintProfC, "<qt>" + tr( "Output profile for printing. If possible, get some guidance from your printer on profile selection." ) + "</qt>" );
987
        QToolTip::add( InfoString, "<qt>" + tr( "Mandatory string for PDF/X-3 or the PDF will fail PDF/X-3 conformance. We recommend you use the title of the document." ) + "</qt>" );
1307 fschmid 988
}
989
 
5553 subik 990
void TabPDFOptions::restoreDefaults(PDFOptions & Optionen,
991
                                                                        const SCFonts &AllFonts,
992
                                                                        const ProfilesL & PDFXProfiles,
993
                                                                        const QMap<QString, int> & DocFonts,
994
                                                                        const QValueList<PDFPresentationData> & Eff,
995
                                                                        int unitIndex, double PageH, double PageB,
5881 jghali 996
                                                                        ScribusDoc * mdoc, bool exporting)
5553 subik 997
{
998
        AllPages->setChecked( true );
999
        PageNr->setEnabled(false);
6657 cbradney 1000
        pageNrButton->setEnabled(false);
5553 subik 1001
        RotateDeg->setCurrentItem(Opts.RotateDeg / 90);
1002
        MirrorH->setOn(Opts.MirrorH);
1003
        MirrorV->setOn(Opts.MirrorV);
1004
        ClipMarg->setChecked(Opts.doClip);
5880 jghali 1005
        bool cmsUse = mdoc ? (ScCore->haveCMS() && mdoc->HasCMS) : false;
1006
        if (cmsUse)
5553 subik 1007
        {
1008
                if (Opts.Version == PDFOptions::PDFVersion_X3)
1009
                        PDFVersionCombo->setCurrentItem(3);
1010
        }
1011
        else
1012
                PDFVersionCombo->setCurrentItem(0);
1013
        if (Opts.Version == PDFOptions::PDFVersion_13)
1014
                PDFVersionCombo->setCurrentItem(0);
1015
        if (Opts.Version == PDFOptions::PDFVersion_14)
1016
                PDFVersionCombo->setCurrentItem(1);
1017
        if (Opts.Version == PDFOptions::PDFVersion_15)
1018
                PDFVersionCombo->setCurrentItem(2);
1019
        ComboBind->setCurrentItem(Opts.Binding);
1020
        CheckBox1->setChecked(Opts.Thumbnails);
1021
        Article->setChecked(Opts.Articles);
1022
        CheckBM->setChecked(Opts.Bookmarks);
1023
        useLayers->setChecked(Opts.useLayers);
1024
        if (Opts.Version == 15)
1025
                useLayers->setEnabled(true);
1026
        else
1027
                useLayers->setEnabled(false);
1028
        Resolution->setValue(Opts.Resolution);
1029
        Compression->setChecked( Opts.Compress );
1030
        CMethod->setCurrentItem(Opts.CompressMethod);
1031
        CQuality->setCurrentItem(Opts.Quality);
1032
        DSColor->setChecked(Opts.RecalcPic);
1033
        ValC->setValue(Opts.PicRes);
1034
        ValC->setEnabled(DSColor->isChecked() ? true : false);
5881 jghali 1035
        if (mdoc != 0 && exporting)
5553 subik 1036
        {
8468 fschmid 1037
//      Build a list of all Fonts used in Annotations;
1038
                PageItem *pgit;
1039
                for (uint c = 0; c < doc->FrameItems.count(); ++c)
1040
                {
1041
                        pgit = doc->FrameItems.at(c);
1042
                        if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()))
1043
                                AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
1044
                }
1045
                for (uint c = 0; c < doc->MasterItems.count(); ++c)
1046
                {
1047
                        pgit = doc->MasterItems.at(c);
1048
                        if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()))
1049
                                AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
1050
                }
1051
                for (uint c = 0; c < doc->DocItems.count(); ++c)
1052
                {
1053
                        pgit = doc->DocItems.at(c);
1054
                        if (((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText)) && (pgit->isAnnotation()))
1055
                                AnnotationFonts.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), "");
1056
                }
5553 subik 1057
                QMap<QString,int>::const_iterator it;
1058
                AvailFlist->clear();
1059
                for (it = DocFonts.constBegin(); it != DocFonts.constEnd(); ++it)
1060
                {
8716 avox 1061
                        if (AllFonts[it.key()].isReplacement())
1062
                                AvailFlist->insertItem(loadIcon("font_subst16.png"), it.key());
1063
                        else if (AllFonts[it.key()].type() == ScFace::TYPE1)
5553 subik 1064
                                AvailFlist->insertItem(loadIcon("font_type1_16.png"), it.key());
5980 avox 1065
                        else if (AllFonts[it.key()].type() == ScFace::TTF)
5553 subik 1066
                                AvailFlist->insertItem(loadIcon("font_truetype16.png"), it.key());
5980 avox 1067
                        else if (AllFonts[it.key()].type() == ScFace::OTF)
5553 subik 1068
                                AvailFlist->insertItem(loadIcon("font_otf16.png"), it.key());
1069
                }
1070
                ToEmbed->setEnabled(false);
1071
                FromEmbed->setEnabled(false);
7107 tsoots 1072
                ToOutline->setEnabled(false);
1073
                FromOutline->setEnabled(false);
6493 fschmid 1074
                if ((Opts.EmbedList.count() == 0) && (Opts.SubsetList.count() == 0) && (Opts.firstUse))
5553 subik 1075
                        EmbedAll();
1076
                else
1077
                {
1078
                        EmbedList->clear();
1079
                        FontsToEmbed.clear();
1080
                        for (uint fe = 0; fe < Opts.EmbedList.count(); ++fe)
1081
                        {
1082
                                EmbedList->insertItem(Opts.EmbedList[fe]);
1083
                                FontsToEmbed.append(Opts.EmbedList[fe]);
1084
                        }
6493 fschmid 1085
                        if (Opts.SubsetList.count() != 0)
5553 subik 1086
                        {
7107 tsoots 1087
                                OutlineList->clear();
1088
                                FontsToOutline.clear();
6493 fschmid 1089
                                for (uint fe = 0; fe < Opts.SubsetList.count(); ++fe)
1090
                                {
7107 tsoots 1091
                                        OutlineList->insertItem(Opts.SubsetList[fe]);
1092
                                        FontsToOutline.append(Opts.SubsetList[fe]);
6493 fschmid 1093
                                }
5553 subik 1094
                        }
8468 fschmid 1095
                        QMap<QString, QString>::Iterator itAnn;
1096
                        for (itAnn = AnnotationFonts.begin(); itAnn != AnnotationFonts.end(); ++itAnn)
1097
                        {
1098
                                if (FontsToEmbed.contains(itAnn.key()) == 0)
1099
                                {
1100
                                        EmbedList->insertItem(itAnn.key());
1101
                                        EmbedList->item(EmbedList->count()-1)->setSelectable(false);
1102
                                        FontsToEmbed.append(itAnn.key());
1103
                                }
1104
                                if (FontsToOutline.contains(itAnn.key()) != 0)
1105
                                {
1106
                                        FontsToOutline.remove(itAnn.key());
1107
                                        OutlineList->removeItem(OutlineList->index(OutlineList->findItem(itAnn.key())));
1108
                                }
1109
                        }
5553 subik 1110
                }
1111
                CheckBox10->setChecked(Opts.PresentMode);
1112
                QString tmp;
1113
                struct PDFPresentationData ef;
1114
                Pages->clear();
1115
                EffVal.clear();
1116
                if (EffVal.count() != 0)
1117
                {
5880 jghali 1118
                        for (uint pg2 = 0; pg2 < doc->Pages->count(); ++pg2)
5553 subik 1119
                        {
1120
                                Pages->insertItem( tr("Page")+" "+tmp.setNum(pg2+1));
1121
                                if (EffVal.count()-1 < pg2)
1122
                                {
1123
                                        ef.pageEffectDuration = 1;
1124
                                        ef.pageViewDuration = 1;
1125
                                        ef.effectType = 0;
1126
                                        ef.Dm = 0;
1127
                                        ef.M = 0;
1128
                                        ef.Di = 0;
1129
                                        EffVal.append(ef);
1130
                                }
1131
                        }
1132
                }
1133
                else
1134
                {
5880 jghali 1135
                        for (uint pg = 0; pg < doc->Pages->count(); ++pg)
5553 subik 1136
                        {
1137
                                Pages->insertItem( tr("Page")+" "+tmp.setNum(pg+1));
1138
                                ef.pageEffectDuration = 1;
1139
                                ef.pageViewDuration = 1;
1140
                                ef.effectType = 0;
1141
                                ef.Dm = 0;
1142
                                ef.M = 0;
1143
                                ef.Di = 0;
1144
                                EffVal.append(ef);
1145
                        }
1146
                }
1147
                PagePrev->setChecked(false);
1148
                PageTime->setValue(EffVal[0].pageViewDuration);
1149
                EffectTime->setValue(EffVal[0].pageEffectDuration);
1150
                bool df = true;
1151
                if ((Opts.displayBookmarks) || (Opts.displayFullscreen) || (Opts.displayLayers) || (Opts.displayThumbs))
1152
                        df = false;
6063 fschmid 1153
                if (df)
1154
                        useViewDefault->setChecked(df);
5553 subik 1155
                useFullScreen->setChecked(Opts.displayFullscreen);
1156
                useBookmarks->setChecked(Opts.displayBookmarks);
1157
                useThumbnails->setChecked(Opts.displayThumbs);
1158
                useLayers2->setChecked(Opts.displayLayers);
1159
                hideToolBar->setChecked(Opts.hideToolBar);
1160
                hideMenuBar->setChecked(Opts.hideMenuBar);
1161
                fitWindow->setChecked(Opts.fitWindow);
1162
                QMap<QString,QString>::Iterator itja;
1163
                actionCombo->clear();
8256 fschmid 1164
                actionCombo->insertItem( tr("No Script"));
5880 jghali 1165
                for (itja = doc->JavaScripts.begin(); itja != doc->JavaScripts.end(); ++itja)
5553 subik 1166
                        actionCombo->insertItem(itja.key());
5880 jghali 1167
                if (doc->JavaScripts.contains(Opts.openAction))
5553 subik 1168
                        actionCombo->setCurrentText(Opts.openAction);
1169
                if (Opts.PageLayout == PDFOptions::SinglePage)
1170
                        singlePage->setChecked(true);
1171
                else if (Opts.PageLayout == PDFOptions::OneColumn)
1172
                        continuousPages->setChecked(true);
1173
                else if (Opts.PageLayout == PDFOptions::TwoColumnLeft)
1174
                        doublePageLeft->setChecked(true);
1175
                else if (Opts.PageLayout == PDFOptions::TwoColumnRight)
1176
                        doublePageRight->setChecked(true);
1177
                if (Opts.Version == 15)
1178
                        useLayers2->setEnabled(true);
1179
                else
1180
                        useLayers2->setEnabled(false);
1181
        }
1828 fschmid 1182
 
5553 subik 1183
        Encry->setChecked( Opts.Encrypt );
1184
        PassOwner->setText(Opts.PassOwner);
1185
        PassUser->setText(Opts.PassUser);
1186
        PrintSec->setChecked( Opts.Permissions & 4 );
1187
        ModifySec->setChecked( Opts.Permissions & 8 );
1188
        CopySec->setChecked( Opts.Permissions & 16 );
1189
        AddSec->setChecked( Opts.Permissions & 32 );
1190
        if (!Encry->isChecked())
1191
        {
1192
                GroupSecSet->setEnabled(false);
1193
                GroupPass->setEnabled(false);
1194
        }
1195
 
1196
        if (Opts.UseRGB)
1197
                OutCombo->setCurrentItem(0);
1198
        else
1199
        {
1200
                if (Opts.isGrayscale)
1201
                        OutCombo->setCurrentItem(2);
1202
                else
1203
                        OutCombo->setCurrentItem(1);
1204
        }
1205
        useSpot->setChecked(!Opts.UseSpotColors);
1206
        overprintMode->setChecked(Opts.doOverprint);
1207
        UseLPI->setChecked(Opts.UseLPI);
1208
        QMap<QString,LPIData>::Iterator itlp;
1209
        LPIcolor->clear();
1210
        for (itlp = Opts.LPISettings.begin(); itlp != Opts.LPISettings.end(); ++itlp)
1211
                LPIcolor->insertItem( itlp.key() );
1212
        LPIcolor->setCurrentItem(0);
5711 subik 1213
 
5553 subik 1214
        LPIfreq->setValue(Opts.LPISettings[LPIcolor->currentText()].Frequency);
1215
        LPIangle->setValue(Opts.LPISettings[LPIcolor->currentText()].Angle);
1216
        LPIfunc->setCurrentItem(Opts.LPISettings[LPIcolor->currentText()].SpotFunc);
1217
        EmbedProfs->setChecked(Opts.UseProfiles);
1218
        EmbedProfs2->setChecked(Opts.UseProfiles2);
1219
        NoEmbedded->setChecked(Opts.EmbeddedI);
1220
        if ((Opts.UseRGB) || (Opts.isGrayscale))
1221
        {
1222
                ProfsGroup->setEnabled(false);
1223
                GroupBox9->setEnabled(false);
1224
                EnablePr(0);
1225
        }
1226
        else
1227
                EnablePr(1);
1228
        EnablePG();
1229
        EnablePGI();
1230
        QString tp = Opts.SolidProf;
1231
        if (!ScCore->InputProfiles.contains(tp))
1232
        {
5881 jghali 1233
                if (mdoc != 0 && exporting)
5880 jghali 1234
                        tp = mdoc->CMSSettings.DefaultSolidColorRGBProfile;
5553 subik 1235
                else
1236
                        tp = PrefsManager::instance()->appPrefs.DCMSset.DefaultSolidColorRGBProfile;
1237
        }
1238
        ProfilesL::Iterator itp;
1239
        ProfilesL::Iterator itpend=ScCore->InputProfiles.end();
1240
        SolidPr->clear();
1241
        for (itp = ScCore->InputProfiles.begin(); itp != itpend; ++itp)
1242
        {
1243
                SolidPr->insertItem(itp.key());
1244
                if (itp.key() == tp)
1245
                {
5880 jghali 1246
                        if (cmsUse)
5553 subik 1247
                                SolidPr->setCurrentItem(SolidPr->count()-1);
1248
                }
1249
        }
5880 jghali 1250
        if (cmsUse)
5553 subik 1251
                IntendS->setCurrentItem(Opts.Intent);
1252
        QString tp1 = Opts.ImageProf;
1253
        if (!ScCore->InputProfiles.contains(tp1))
1254
        {
5881 jghali 1255
                if (mdoc != 0 && exporting)
5880 jghali 1256
                        tp1 = mdoc->CMSSettings.DefaultSolidColorRGBProfile;
5553 subik 1257
                else
1258
                        tp1 = PrefsManager::instance()->appPrefs.DCMSset.DefaultSolidColorRGBProfile;
1259
        }
1260
        ProfilesL::Iterator itp2;
1261
        ProfilesL::Iterator itp2end=ScCore->InputProfiles.end();
1262
        ImageP->clear();
1263
        for (itp2 = ScCore->InputProfiles.begin(); itp2 != itp2end; ++itp2)
1264
        {
1265
                ImageP->insertItem(itp2.key());
1266
                if (itp2.key() == tp1)
1267
                {
5880 jghali 1268
                        if (cmsUse)
5553 subik 1269
                                ImageP->setCurrentItem(ImageP->count()-1);
1270
                }
1271
        }
5880 jghali 1272
        if (cmsUse)
5553 subik 1273
                IntendI->setCurrentItem(Opts.Intent2);
5880 jghali 1274
        if (!cmsUse)
5553 subik 1275
        {
1276
                GroupBox9->hide();
1277
                ProfsGroup->hide();
1278
        }
1279
 
1280
        ProfilesL::const_iterator itp3;
1281
        QString tp3 = Opts.PrintProf;
1282
        if (!PDFXProfiles.contains(tp3))
1283
        {
5881 jghali 1284
                if (mdoc != 0 && exporting)
5880 jghali 1285
                        tp3 = mdoc->CMSSettings.DefaultPrinterProfile;
5553 subik 1286
                else
1287
                        tp3 = PrefsManager::instance()->appPrefs.DCMSset.DefaultPrinterProfile;
1288
        }
1289
        PrintProfC->clear();
1290
        for (itp3 = PDFXProfiles.constBegin(); itp3 != PDFXProfiles.constEnd(); ++itp3)
1291
        {
1292
                PrintProfC->insertItem(itp3.key());
1293
                if (itp3.key() == tp3)
1294
                        PrintProfC->setCurrentItem(PrintProfC->count()-1);
1295
        }
1296
        InfoString->setText(Opts.Info);
7225 cbradney 1297
        BleedTop->setValue(Opts.bleeds.Top*unitRatio);
1298
        BleedBottom->setValue(Opts.bleeds.Bottom*unitRatio);
1299
        BleedRight->setValue(Opts.bleeds.Right*unitRatio);
1300
        BleedLeft->setValue(Opts.bleeds.Left*unitRatio);
7076 fschmid 1301
        if (mdoc != 0 && exporting)
1302
        {
1303
                docBleeds->setChecked(Opts.useDocBleeds);
1304
                doDocBleeds();
1305
        }
6921 fschmid 1306
        markOffset->setValue(Opts.markOffset*unitRatio);
1307
        cropMarks->setChecked(Opts.cropMarks);
1308
        bleedMarks->setChecked(Opts.bleedMarks);
1309
        registrationMarks->setChecked(Opts.registrationMarks);
1310
        colorMarks->setChecked(Opts.colorMarks);
1311
        docInfoMarks->setChecked(Opts.docInfoMarks);
5880 jghali 1312
        if (!cmsUse)
6921 fschmid 1313
                X3Group->setEnabled(false);
5880 jghali 1314
        if (cmsUse && (Opts.Version == 12) && (!PDFXProfiles.isEmpty()))
5553 subik 1315
                EnablePDFX(3);
1316
        else
6921 fschmid 1317
                X3Group->setEnabled(false);
5881 jghali 1318
        if (mdoc != 0  && exporting)
5553 subik 1319
        {
1320
                PgSel = 0;
1321
                Pages->setCurrentItem(0);
1322
                SetEffOpts(0);
1323
                Pages->setEnabled(false);
1324
                Effects->setEnabled(false);
1325
                PagePrev->setEnabled(false);
1326
                DoEffects();
1327
                if (CheckBox10->isChecked())
1328
                {
1329
                        PageTime->setValue(EffVal[0].pageViewDuration);
1330
                        EffectTime->setValue(EffVal[0].pageEffectDuration);
1331
                        EffectType->setCurrentItem(EffVal[0].effectType);
1332
                        EDirection->setCurrentItem(EffVal[0].Dm);
1333
                        EDirection_2->setCurrentItem(EffVal[0].M);
1334
                        EDirection_2_2->setCurrentItem(EffVal[0].Di);
1335
                        SetEffOpts(EffectType->currentItem());
1336
                }
6921 fschmid 1337
                if (mdoc->currentPageLayout != 0)
1338
                {
1339
                        BleedTxt3->setText( tr( "Inside:" ) );
1340
                        BleedTxt4->setText( tr( "Outside:" ) );
1341
                }
5553 subik 1342
 
1343
        }
1344
}
1345
 
6944 fschmid 1346
void TabPDFOptions::doDocBleeds()
1347
{
1348
        if (docBleeds->isChecked())
1349
        {
7225 cbradney 1350
                Opts.bleeds.Top = BleedTop->value() / unitRatio;
1351
                Opts.bleeds.Bottom = BleedBottom->value() / unitRatio;
1352
                Opts.bleeds.Right = BleedRight->value() / unitRatio;
1353
                Opts.bleeds.Left = BleedLeft->value() / unitRatio;
1354
                BleedTop->setValue(doc->bleeds.Top*unitRatio);
1355
                BleedBottom->setValue(doc->bleeds.Bottom*unitRatio);
1356
                BleedRight->setValue(doc->bleeds.Right*unitRatio);
1357
                BleedLeft->setValue(doc->bleeds.Left*unitRatio);
6944 fschmid 1358
                BleedTop->setEnabled(false);
1359
                BleedBottom->setEnabled(false);
1360
                BleedRight->setEnabled(false);
1361
                BleedLeft->setEnabled(false);
1362
        }
1363
        else
1364
        {
7225 cbradney 1365
                BleedTop->setValue(Opts.bleeds.Top*unitRatio);
1366
                BleedBottom->setValue(Opts.bleeds.Bottom*unitRatio);
1367
                BleedRight->setValue(Opts.bleeds.Right*unitRatio);
1368
                BleedLeft->setValue(Opts.bleeds.Left*unitRatio);
6944 fschmid 1369
                BleedTop->setEnabled(true);
1370
                BleedBottom->setEnabled(true);
1371
                BleedRight->setEnabled(true);
1372
                BleedLeft->setEnabled(true);
1373
        }
1374
}
1375
 
3388 fschmid 1376
void TabPDFOptions::checkInfo()
1377
{
1378
        if ((PDFVersionCombo->currentItem() == 3) && (InfoString->text().isEmpty()))
1379
                emit noInfo();
1380
        else
1381
                emit hasInfo();
1382
}
1383
 
1307 fschmid 1384
void TabPDFOptions::ToggleEncr()
1385
{
1386
        bool setter = Encry->isChecked() ? true : false;
1387
        GroupSecSet->setEnabled(setter);
1388
        GroupPass->setEnabled(setter);
1389
}
6922 fschmid 1390
 
1307 fschmid 1391
void TabPDFOptions::enableCMS(bool enable)
1392
{
1973 craig 1393
        disconnect(PDFVersionCombo, SIGNAL(activated(int)), this, SLOT(EnablePDFX(int)));
1394
        int a = PDFVersionCombo->currentItem();
1395
        PDFVersionCombo->clear();
5840 cbradney 1396
        PDFVersionCombo->insertItem("PDF 1.3 (Acrobat 4)");
1397
        PDFVersionCombo->insertItem("PDF 1.4 (Acrobat 5)");
1398
        PDFVersionCombo->insertItem("PDF 1.5 (Acrobat 6)");
1843 cbradney 1399
        cms=enable;
1307 fschmid 1400
        if (enable)
1973 craig 1401
                PDFVersionCombo->insertItem("PDF/X-3");
1307 fschmid 1402
        else
1738 fschmid 1403
                a = QMIN(a, 3);
1973 craig 1404
        PDFVersionCombo->setCurrentItem(a);
1307 fschmid 1405
        EnablePr(1);
1973 craig 1406
        connect(PDFVersionCombo, SIGNAL(activated(int)), this, SLOT(EnablePDFX(int)));
1307 fschmid 1407
}
1408
 
1409
void TabPDFOptions::EnablePDFX(int a)
1410
{
1843 cbradney 1411
        useLayers->setEnabled(a == 2);
4252 craig 1412
        if (useLayers2)
1413
                useLayers2->setEnabled(a == 2);
1738 fschmid 1414
        if (a != 3)
1307 fschmid 1415
        {
6921 fschmid 1416
                X3Group->setEnabled(false);
1307 fschmid 1417
                setTabEnabled(tabSecurity, true);
1418
                OutCombo->setEnabled(true);
1419
                EmbedProfs2->setEnabled(true);
3564 fschmid 1420
                emit hasInfo();
5880 jghali 1421
                if (doc != 0 && pdfExport)
1307 fschmid 1422
                {
1423
                        CheckBox10->setEnabled(true);
1424
                        EmbedFonts->setEnabled(true);
1781 fschmid 1425
                        if (EmbedList->count() != 0)
1426
                                FromEmbed->setEnabled(true);
1427
                        ToEmbed->setEnabled(true);
1307 fschmid 1428
                }
1429
                return;
1430
        }
1431
        disconnect(OutCombo, SIGNAL(activated(int)), this, SLOT(EnablePr(int)));
1432
        OutCombo->setCurrentItem(1);
1433
        OutCombo->setEnabled(false);
1434
        EnablePr(1);
1435
        EmbedProfs2->setChecked(true);
1436
        EmbedProfs2->setEnabled(false);
5880 jghali 1437
        if (doc != 0 && pdfExport)
1307 fschmid 1438
        {
7070 fschmid 1439
//              EmbedFonts->setChecked(true);
1307 fschmid 1440
                EmbedAll();
1441
                CheckBox10->setChecked(false);
1442
                CheckBox10->setEnabled(false);
7070 fschmid 1443
//              EmbedFonts->setEnabled(false);
1781 fschmid 1444
                FromEmbed->setEnabled(false);
1445
                ToEmbed->setEnabled(false);
3388 fschmid 1446
                if (InfoString->text().isEmpty())
1447
                        emit noInfo();
1448
                else
1449
                        emit hasInfo();
1307 fschmid 1450
        }
1451
        EnablePGI();
6921 fschmid 1452
        X3Group->setEnabled(true);
1307 fschmid 1453
        setTabEnabled(tabSecurity, false);
1454
        connect(OutCombo, SIGNAL(activated(int)), this, SLOT(EnablePr(int)));
1455
}
1456
 
1457
void TabPDFOptions::EnablePGI()
1458
{
1459
        if (EmbedProfs2->isChecked())
1460
        {
1461
                NoEmbedded->setEnabled(true);
1462
                bool setter = NoEmbedded->isChecked() ? true : false;
1463
                ProfsTxt3->setEnabled(setter);
1464
                ProfsTxt4->setEnabled(setter);
1465
                ImageP->setEnabled(setter);
1466
                IntendI->setEnabled(setter);
1467
        }
1468
        else
1469
        {
1470
                ProfsTxt3->setEnabled(false);
1471
                ProfsTxt4->setEnabled(false);
1472
                ImageP->setEnabled(false);
1473
                IntendI->setEnabled(false);
1474
                NoEmbedded->setEnabled(false);
1475
        }
1476
}
1477
 
1478
void TabPDFOptions::EnablePGI2()
1479
{
1480
        bool setter = NoEmbedded->isChecked() ? true : false;
1481
        ProfsTxt3->setEnabled(setter);
1482
        ProfsTxt4->setEnabled(setter);
1483
        ImageP->setEnabled(setter);
1484
        IntendI->setEnabled(setter);
1485
}
1486
 
1487
void TabPDFOptions::EnablePG()
1488
{
1489
        bool setter = EmbedProfs->isChecked() ? true : false;
1490
        ProfsTxt1->setEnabled(setter);
1491
        ProfsTxt2->setEnabled(setter);
1492
        SolidPr->setEnabled(setter);
1493
        IntendS->setEnabled(setter);
1494
}
1495
 
1496
void TabPDFOptions::EnablePr(int a)
1497
{
1498
        EnableLPI(a);
1499
        bool setter = a == 1 ? true : false;
1500
        GroupBox9->setEnabled(setter);
1501
        ProfsGroup->setEnabled(setter);
1502
}
1503
 
1504
void TabPDFOptions::EnableLPI(int a)
1505
{
1506
        if (a == 1)
1507
        {
4260 craig 1508
                QString tp = Opts.SolidProf;
5243 cbradney 1509
                if (!ScCore->InputProfiles.contains(tp))
1307 fschmid 1510
                {
5880 jghali 1511
                        if (doc != 0)
1512
                                tp = doc->CMSSettings.DefaultSolidColorRGBProfile;
1307 fschmid 1513
                        else
5345 mrdocs 1514
                                tp = PrefsManager::instance()->appPrefs.DCMSset.DefaultSolidColorRGBProfile;
1307 fschmid 1515
                }
2891 cbradney 1516
                SolidPr->clear();
1307 fschmid 1517
                ProfilesL::Iterator itp;
5243 cbradney 1518
                ProfilesL::Iterator itpend=ScCore->InputProfiles.end();
1519
                for (itp = ScCore->InputProfiles.begin(); itp != itpend; ++itp)
1307 fschmid 1520
                {
1521
                        SolidPr->insertItem(itp.key());
1522
                        if (itp.key() == tp)
1523
                        {
1524
                                if (cms)
1525
                                        SolidPr->setCurrentItem(SolidPr->count()-1);
1526
                        }
1527
                }
1528
                if (cms)
4260 craig 1529
                        IntendS->setCurrentItem(Opts.Intent);
1530
                QString tp1 = Opts.ImageProf;
5243 cbradney 1531
                if (!ScCore->InputProfiles.contains(tp1))
1307 fschmid 1532
                {
5880 jghali 1533
                        if (doc != 0)
1534
                                tp1 = doc->CMSSettings.DefaultSolidColorRGBProfile;
1307 fschmid 1535
                        else
5345 mrdocs 1536
                                tp1 = PrefsManager::instance()->appPrefs.DCMSset.DefaultSolidColorRGBProfile;
1307 fschmid 1537
                }
1538
                ImageP->clear();
2891 cbradney 1539
                ProfilesL::Iterator itp2;
5243 cbradney 1540
                ProfilesL::Iterator itp2end=ScCore->InputProfiles.end();
1541
                for (itp2 = ScCore->InputProfiles.begin(); itp2 != itp2end; ++itp2)
1307 fschmid 1542
                {
1543
                        ImageP->insertItem(itp2.key());
1544
                        if (itp2.key() == tp1)
1545
                        {
1546
                                if (cms)
1547
                                        ImageP->setCurrentItem(ImageP->count()-1);
1548
                        }
1549
                }
1550
                if (cms)
4260 craig 1551
                        IntendI->setCurrentItem(Opts.Intent2);
1307 fschmid 1552
                if (cms)
1553
                {
1554
                        GroupBox9->show();
1555
                        ProfsGroup->show();
1556
                }
1557
                else
1558
                {
1559
                        GroupBox9->hide();
1560
                        ProfsGroup->hide();
1561
                }
6239 fschmid 1562
                useSpot->show();
1563
                overprintMode->show();
1564
                UseLPI->show();
1565
                if (UseLPI->isChecked())
1566
                        LPIgroup->show();
1567
                else
1568
                        LPIgroup->hide();
1307 fschmid 1569
        }
1570
        else
1571
        {
3079 fschmid 1572
                useSpot->hide();
5320 fschmid 1573
                overprintMode->hide();
1307 fschmid 1574
                UseLPI->hide();
1575
                LPIgroup->hide();
1576
        }
1577
}
1578
 
1579
void TabPDFOptions::EnableLPI2()
1580
{
1581
        if (UseLPI->isChecked())
1582
                LPIgroup->show();
1583
        else
1584
                LPIgroup->hide();
1585
}
1586
 
1587
void TabPDFOptions::SelLPIcol(int c)
1588
{
4260 craig 1589
        // XXX Optionen or Opts changed here
1590
        Opts.LPISettings[SelLPIcolor].Frequency = LPIfreq->value();
1591
        Opts.LPISettings[SelLPIcolor].Angle = LPIangle->value();
1592
        Opts.LPISettings[SelLPIcolor].SpotFunc = LPIfunc->currentItem();
1593
        LPIfreq->setValue(Opts.LPISettings[LPIcolor->text(c)].Frequency);
1594
        LPIangle->setValue(Opts.LPISettings[LPIcolor->text(c)].Angle);
1595
        LPIfunc->setCurrentItem(Opts.LPISettings[LPIcolor->text(c)].SpotFunc);
1307 fschmid 1596
        SelLPIcolor = LPIcolor->text(c);
1597
}
1598
 
1599
void TabPDFOptions::SelRange(bool e)
1600
{
1601
        bool setter = e ? false : true;
1602
        PageNr->setEnabled( setter );
6657 cbradney 1603
        pageNrButton->setEnabled( setter );
1307 fschmid 1604
        if (setter == false)
1605
                CheckBM->setChecked(false);
1606
}
1607
 
1608
void TabPDFOptions::EffectOnAll()
1609
{
5880 jghali 1610
        for (uint pg = 0; pg < doc->Pages->count(); ++pg)
1307 fschmid 1611
        {
1612
                EffVal[pg].pageViewDuration = PageTime->value();
1613
                EffVal[pg].pageEffectDuration = EffectTime->value();
1614
                EffVal[pg].effectType = EffectType->currentItem();
1615
                EffVal[pg].Dm = EDirection->currentItem();
1616
                EffVal[pg].M = EDirection_2->currentItem();
1617
                EffVal[pg].Di = EDirection_2_2->currentItem();
1618
        }
1619
}
1620
 
1621
void TabPDFOptions::PDFMirror()
1622
{
4260 craig 1623
        // XXX Optionen or Opts changed here
1624
        Opts.MirrorH = MirrorH->isOn();
1625
        Opts.MirrorV = MirrorV->isOn();
1307 fschmid 1626
}
1627
 
1628
void TabPDFOptions::Rotation( int value )
1629
{
4260 craig 1630
        Opts.RotateDeg = value * 90;
1307 fschmid 1631
}
1632
 
1633
void TabPDFOptions::DoEffects()
1634
{
1635
        bool setter = CheckBox10->isChecked() ? true : false;
1636
        Pages->setEnabled(setter);
1637
        Effects->setEnabled(setter);
1638
        PagePrev->setEnabled(setter);
1639
}
1640
 
1641
void TabPDFOptions::ValidDI(int nr)
1642
{
1643
        if (!EDirection_2_2->listBox()->item(nr)->isSelectable())
1644
                EDirection_2_2->setCurrentItem(0);
1645
}
1646
 
1647
void TabPDFOptions::SetPgEff(int nr)
1648
{
1649
        if (nr < 0)
1650
                return;
1651
        EffVal[PgSel].pageViewDuration = PageTime->value();
1652
        EffVal[PgSel].pageEffectDuration = EffectTime->value();
1653
        EffVal[PgSel].effectType = EffectType->currentItem();
1654
        EffVal[PgSel].Dm = EDirection->currentItem();
1655
        EffVal[PgSel].M = EDirection_2->currentItem();
1656
        EffVal[PgSel].Di = EDirection_2_2->currentItem();
1657
        SetEffOpts(EffVal[nr].effectType);
1658
        PageTime->setValue(EffVal[nr].pageViewDuration);
1659
        EffectTime->setValue(EffVal[nr].pageEffectDuration);
1660
        EffectType->setCurrentItem(EffVal[nr].effectType);
1661
        EDirection->setCurrentItem(EffVal[nr].Dm);
1662
        EDirection_2->setCurrentItem(EffVal[nr].M);
1663
        EDirection_2_2->setCurrentItem(EffVal[nr].Di);
1664
        PgSel = nr;
1665
}
1666
 
1667
void TabPDFOptions::SetEffOpts(int nr)
1668
{
1669
        EDirection_2_2->listBox()->item(2)->setSelectable(false);
1670
        EDirection_2_2->listBox()->item(3)->setSelectable(false);
1671
        EDirection_2_2->listBox()->item(4)->setSelectable(false);
1672
        switch (nr)
1673
        {
1674
        case 0:
1675
        case 3:
1676
                EDirection->setEnabled(false);
1677
                EDirection_2->setEnabled(false);
1678
                EDirection_2_2->setEnabled(false);
1679
                break;
1680
        case 1:
1681
                EDirection->setEnabled(true);
1682
                EDirection_2->setEnabled(false);
1683
                EDirection_2_2->setEnabled(false);
1684
                break;
1685
        case 2:
1686
                EDirection->setEnabled(false);
1687
                EDirection_2->setEnabled(true);
1688
                EDirection_2_2->setEnabled(false);
1689
                break;
1690
        case 4:
1691
        case 6:
1692
                EDirection->setEnabled(false);
1693
                EDirection_2->setEnabled(false);
1694
                EDirection_2_2->setEnabled(true);
1695
                if (nr == 6)
1696
                {
1697
                        EDirection_2_2->listBox()->item(2)->setSelectable(true);
1698
                        EDirection_2_2->listBox()->item(3)->setSelectable(true);
1699
                }
1700
                else
1701
                        EDirection_2_2->listBox()->item(4)->setSelectable(true);
1702
                break;
1703
        case 5:
1704
                EDirection->setEnabled(true);
1705
                EDirection_2->setEnabled(true);
1706
                EDirection_2_2->setEnabled(false);
1707
                break;
1708
        }
1709
}
1710
 
1711
void TabPDFOptions::PagePr()
1712
{
1713
        disconnect(Pages, SIGNAL(highlighted(int)), this, SLOT(SetPgEff(int)));
1714
        QString tmp;
1815 fschmid 1715
        QPixmap pm;
1307 fschmid 1716
        int ci = Pages->currentItem();
1717
        if (PagePrev->isChecked())
1718
        {
5880 jghali 1719
                for (uint pg = 0; pg < doc->Pages->count(); ++pg)
1815 fschmid 1720
                {
5880 jghali 1721
                        pm.convertFromImage(doc->view()->PageToPixmap(pg, 70));
1815 fschmid 1722
                        Pages->changeItem(pm, tr("Page")+" "+tmp.setNum(pg+1), pg);
1723
                }
1307 fschmid 1724
        }
1725
        else
1726
        {
5880 jghali 1727
                for (uint pg = 0; pg < doc->Pages->count(); ++pg)
1307 fschmid 1728
                        Pages->changeItem( tr("Page")+" "+tmp.setNum(pg+1), pg);
1729
        }
1730
        if (ci != -1)
1731
        {
1732
                PgSel = ci;
1733
                Pages->setCurrentItem(ci);
1734
        }
1735
        else
1736
        {
1737
                PgSel = 0;
1738
                Pages->clearSelection();
1739
        }
1740
        connect(Pages, SIGNAL(highlighted(int)), this, SLOT(SetPgEff(int)));
1741
}
1742
 
1743
void TabPDFOptions::DoDownsample()
1744
{
1745
        if (DSColor->isChecked())
1746
        {
1747
                ValC->setEnabled(true);
1748
                if (ValC->value() > Resolution->value())
1749
                        ValC->setValue(Resolution->value());
1750
                ValC->setMaxValue(Resolution->value());
1751
                ValC->setMinValue(35);
1752
        }
1753
        else
1754
                ValC->setEnabled(false);
1755
}
1756
 
1757
void TabPDFOptions::RemoveEmbed()
1758
{
1759
        FontsToEmbed.remove(EmbedList->currentText());
1760
        EmbedList->removeItem(EmbedList->currentItem());
1761
        EmbedList->clearSelection();
1762
        if (EmbedList->count() == 0)
1763
        {
1764
                FromEmbed->setEnabled(false);
7107 tsoots 1765
                ToOutline->setEnabled(false);
1307 fschmid 1766
        }
8468 fschmid 1767
        else
1768
        {
1769
                if (!EmbedList->item(EmbedList->currentItem())->isSelectable())
1770
                {
1771
                        FromEmbed->setEnabled(false);
1772
                        ToOutline->setEnabled(false);
1773
                }
1774
        }
1307 fschmid 1775
}
1776
 
1777
void TabPDFOptions::PutToEmbed()
1778
{
1779
        if (EmbedList->count() != 0)
1780
        {
5980 avox 1781
                if (!AllFonts[AvailFlist->currentText()].subset())
1307 fschmid 1782
                {
3633 fschmid 1783
                        if (EmbedList->findItem(AvailFlist->currentText()) == NULL)
1784
                        {
1785
                                FontsToEmbed.append(AvailFlist->currentText());
1786
                                EmbedList->insertItem(AvailFlist->currentText());
8468 fschmid 1787
                                if (AnnotationFonts.contains(AvailFlist->currentText()))
1788
                                        EmbedList->item(EmbedList->count()-1)->setSelectable(false);
3633 fschmid 1789
                        }
1307 fschmid 1790
                }
3633 fschmid 1791
                else
1792
                {
7107 tsoots 1793
                        if (OutlineList->count() != 0)
3633 fschmid 1794
                        {
7107 tsoots 1795
                                if (OutlineList->findItem(AvailFlist->currentText()) == NULL)
3633 fschmid 1796
                                {
7107 tsoots 1797
                                        FontsToOutline.append(AvailFlist->currentText());
1798
                                        OutlineList->insertItem(AvailFlist->currentText());
3633 fschmid 1799
                                }
1800
                        }
1801
                        else
1802
                        {
7107 tsoots 1803
                                FontsToOutline.append(AvailFlist->currentText());
1804
                                OutlineList->insertItem(AvailFlist->currentText());
3633 fschmid 1805
                        }
1806
                }
1307 fschmid 1807
        }
1808
        else
1809
        {
7089 fschmid 1810
                if ((AllFonts[AvailFlist->currentText()].type() != ScFace::OTF) && (!AllFonts[AvailFlist->currentText()].subset()))
3633 fschmid 1811
                {
1812
                        FontsToEmbed.append(AvailFlist->currentText());
1813
                        EmbedList->insertItem(AvailFlist->currentText());
8468 fschmid 1814
                        if (AnnotationFonts.contains(AvailFlist->currentText()))
1815
                                EmbedList->item(EmbedList->count()-1)->setSelectable(false);
3633 fschmid 1816
                }
1817
                else
1818
                {
7107 tsoots 1819
                        if (OutlineList->count() != 0)
3633 fschmid 1820
                        {
7107 tsoots 1821
                                if (OutlineList->findItem(AvailFlist->currentText()) == NULL)
3633 fschmid 1822
                                {
7107 tsoots 1823
                                        FontsToOutline.append(AvailFlist->currentText());
1824
                                        OutlineList->insertItem(AvailFlist->currentText());
3633 fschmid 1825
                                }
1826
                        }
1827
                        else
1828
                        {
7107 tsoots 1829
                                FontsToOutline.append(AvailFlist->currentText());
1830
                                OutlineList->insertItem(AvailFlist->currentText());
3633 fschmid 1831
                        }
1832
                }
1307 fschmid 1833
        }
1834
}
1835
 
7107 tsoots 1836
void TabPDFOptions::RemoveOutline()
1307 fschmid 1837
{
7107 tsoots 1838
        FontsToOutline.remove(OutlineList->currentText());
1839
        if ((AllFonts[OutlineList->currentText()].type() != ScFace::OTF) && (!AllFonts[OutlineList->currentText()].subset()))
3633 fschmid 1840
        {
7107 tsoots 1841
                FontsToEmbed.append(OutlineList->currentText());
1842
                EmbedList->insertItem(OutlineList->currentText());
3633 fschmid 1843
        }
7107 tsoots 1844
        OutlineList->removeItem(OutlineList->currentItem());
1845
        OutlineList->clearSelection();
1846
        if (OutlineList->count() == 0)
1847
                FromOutline->setEnabled(false);
1307 fschmid 1848
}
1849
 
7107 tsoots 1850
void TabPDFOptions::PutToOutline()
1307 fschmid 1851
{
7107 tsoots 1852
        if (OutlineList->count() != 0)
1307 fschmid 1853
        {
7107 tsoots 1854
                if (OutlineList->findItem(EmbedList->currentText()) == NULL)
1307 fschmid 1855
                {
7107 tsoots 1856
                        FontsToOutline.append(EmbedList->currentText());
1857
                        OutlineList->insertItem(EmbedList->currentText());
1307 fschmid 1858
                }
1859
        }
1860
        else
1861
        {
7107 tsoots 1862
                FontsToOutline.append(EmbedList->currentText());
1863
                OutlineList->insertItem(EmbedList->currentText());
1307 fschmid 1864
        }
1865
        FontsToEmbed.remove(EmbedList->currentText());
1866
        EmbedList->removeItem(EmbedList->currentItem());
1867
        EmbedList->clearSelection();
1868
        if (EmbedList->count() == 0)
1869
        {
1870
                FromEmbed->setEnabled(false);
7107 tsoots 1871
                ToOutline->setEnabled(false);
1307 fschmid 1872
        }
8468 fschmid 1873
        else
1874
        {
1875
                if (!EmbedList->item(EmbedList->currentItem())->isSelectable())
1876
                {
1877
                        FromEmbed->setEnabled(false);
1878
                        ToOutline->setEnabled(false);
1879
                }
1880
        }
1307 fschmid 1881
}
1882
 
1883
void TabPDFOptions::SelAFont(QListBoxItem *c)
1884
{
7089 fschmid 1885
        if (c != NULL)
1307 fschmid 1886
        {
1887
                FromEmbed->setEnabled(false);
1888
                if (c->isSelectable())
1889
                        ToEmbed->setEnabled(true);
7107 tsoots 1890
                ToOutline->setEnabled(false);
1891
                FromOutline->setEnabled(false);
1307 fschmid 1892
                EmbedList->clearSelection();
7107 tsoots 1893
                OutlineList->clearSelection();
1307 fschmid 1894
        }
1895
}
1896
 
1897
void TabPDFOptions::SelEFont(QListBoxItem *c)
1898
{
7089 fschmid 1899
        if (c != NULL)
1307 fschmid 1900
        {
8468 fschmid 1901
                if ((PDFVersionCombo->currentItem() != 3) && (c->isSelectable()))
1781 fschmid 1902
                        FromEmbed->setEnabled(true);
7091 fschmid 1903
                else
1904
                        FromEmbed->setEnabled(false);
1307 fschmid 1905
                ToEmbed->setEnabled(false);
8468 fschmid 1906
                if (c->isSelectable())
1907
                        ToOutline->setEnabled(true);
7107 tsoots 1908
                FromOutline->setEnabled(false);
1307 fschmid 1909
                AvailFlist->clearSelection();
7107 tsoots 1910
                OutlineList->clearSelection();
1307 fschmid 1911
        }
1912
}
1913
 
1914
void TabPDFOptions::SelSFont(QListBoxItem *c)
1915
{
7089 fschmid 1916
        if (c != NULL)
1307 fschmid 1917
        {
7091 fschmid 1918
                if (PDFVersionCombo->currentItem() == 3)
1919
                {
7092 fschmid 1920
                        if ((AllFonts[c->text()].type() == ScFace::OTF) || (AllFonts[c->text()].subset()))
7107 tsoots 1921
                                FromOutline->setEnabled(false);
7091 fschmid 1922
                        else
7107 tsoots 1923
                                FromOutline->setEnabled(true);
7091 fschmid 1924
                }
1925
                else
7107 tsoots 1926
                        FromOutline->setEnabled(true);
1927
                ToOutline->setEnabled(false);
1307 fschmid 1928
                ToEmbed->setEnabled(false);
1929
                FromEmbed->setEnabled(false);
1930
                EmbedList->clearSelection();
1931
                AvailFlist->clearSelection();
1932
        }
1933
}
1934
 
1935
void TabPDFOptions::EmbedAll()
1936
{
7089 fschmid 1937
        EmbedList->clear();
1938
        FontsToEmbed.clear();
7107 tsoots 1939
        OutlineList->clear();
1940
        FontsToOutline.clear();
7089 fschmid 1941
        FromEmbed->setEnabled(false);
1942
        ToEmbed->setEnabled(false);
7107 tsoots 1943
        ToOutline->setEnabled(false);
1944
        FromOutline->setEnabled(false);
7089 fschmid 1945
        for (uint a=0; a < AvailFlist->count(); ++a)
1946
        {
1947
                if (AvailFlist->item(a)->isSelectable())
1307 fschmid 1948
                {
7089 fschmid 1949
                        if (!AllFonts[AvailFlist->item(a)->text()].subset())
1307 fschmid 1950
                        {
7089 fschmid 1951
                                FontsToEmbed.append(AvailFlist->item(a)->text());
1952
                                EmbedList->insertItem(AvailFlist->item(a)->text());