Subversion Repositories Scribus

Rev

Rev 21491 | Rev 21729 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
638 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
 ***************************************************************************/
14170 jghali 15
#include "scconfig.h"
19966 craig 16
#include "pdfexportdialog.h"
14170 jghali 17
 
13805 jghali 18
 
10372 cbradney 19
#include <QByteArray>
20
#include <QCheckBox>
19350 craig 21
#include <QFileDialog>
9877 fschmid 22
#include <QGridLayout>
23
#include <QGroupBox>
10372 cbradney 24
#include <QHBoxLayout>
9877 fschmid 25
#include <QLineEdit>
19828 jghali 26
#include <QListWidget>
10372 cbradney 27
#include <QMessageBox>
9877 fschmid 28
#include <QPushButton>
10372 cbradney 29
#include <QRadioButton>
9877 fschmid 30
#include <QSpacerItem>
10372 cbradney 31
#include <QToolButton>
10242 subik 32
#include <QToolTip>
10372 cbradney 33
#include <QVBoxLayout>
6278 subik 34
 
19093 craig 35
#include "commonstrings.h"
20185 craig 36
#include "iconmanager.h"
19093 craig 37
#include "pdfoptions.h"
38
#include "prefsfile.h"
39
#include "prefsmanager.h"
40
#include "scpaths.h"
41
#include "scribusdoc.h"
42
#include "scribusview.h"
43
#include "ui/customfdialog.h"
20185 craig 44
#include "ui/scmessagebox.h"
19093 craig 45
#include "ui/scrspinbox.h"
46
#include "units.h"
47
#include "util.h"
48
 
20185 craig 49
 
4260 craig 50
PDFExportDialog::PDFExportDialog( QWidget* parent, const QString & docFileName,
5387 avox 51
                                                                  const QMap<QString, int > & DocFonts,
4260 craig 52
                                                                  ScribusView *currView, PDFOptions & pdfOptions,
53
                                                                  const ProfilesL & PDFXProfiles, const SCFonts &AllFonts,
18326 jghali 54
                                                                  const ProfilesL & printerProfiles)
9877 fschmid 55
        : QDialog( parent ),
18326 jghali 56
        m_doc(currView->Doc),
57
        m_opts(pdfOptions),
58
        m_unitRatio(currView->Doc->unitRatio()),
59
        m_cmsDescriptor(""),
60
        m_components(3),
61
        m_printerProfiles(printerProfiles)
3 paul 62
{
9877 fschmid 63
        setModal(true);
64
        setWindowTitle( tr( "Save as PDF" ) );
20185 craig 65
        setWindowIcon(IconManager::instance()->loadIcon("AppIcon.png"));
9877 fschmid 66
        PDFExportLayout = new QVBoxLayout( this );
4259 craig 67
        PDFExportLayout->setSpacing( 5 );
68
        PDFExportLayout->setMargin( 10 );
10553 fschmid 69
        Name = new QGroupBox( this );
3082 fschmid 70
        Name->setTitle( tr( "O&utput to File:" ) );
9905 fschmid 71
        NameLayout = new QGridLayout( Name );
9877 fschmid 72
        NameLayout->setSpacing( 5 );
73
        NameLayout->setMargin( 10 );
3082 fschmid 74
        NameLayout->setAlignment( Qt::AlignTop );
10553 fschmid 75
        fileNameLineEdit = new QLineEdit( Name );
2727 cbradney 76
        fileNameLineEdit->setMinimumSize( QSize( 268, 22 ) );
18326 jghali 77
        if (!m_opts.fileName.isEmpty())
78
                fileNameLineEdit->setText( QDir::toNativeSeparators(m_opts.fileName) );
167 Franz 79
        else
80
        {
6717 fschmid 81
                QFileInfo fi(docFileName);
17720 jghali 82
                QString completeBaseName = fi.completeBaseName();
83
                if (completeBaseName.endsWith(".sla", Qt::CaseInsensitive))
84
                        if (completeBaseName.length() > 4) completeBaseName.chop(4);
85
                if (completeBaseName.endsWith(".gz", Qt::CaseInsensitive))
86
                        if (completeBaseName.length() > 3) completeBaseName.chop(3);
6717 fschmid 87
                if (fi.exists())
7117 jghali 88
                {
17720 jghali 89
                        QString fileName(fi.path() + "/" + completeBaseName + ".pdf");
11949 jghali 90
                        fileNameLineEdit->setText( QDir::toNativeSeparators(fileName) );
7117 jghali 91
                }
6717 fschmid 92
                else
93
                {
94
                        PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
10553 fschmid 95
                        QString pdfdir = dirs->get("pdf", fi.path());
6717 fschmid 96
                        if (pdfdir.right(1) != "/")
97
                                pdfdir += "/";
17720 jghali 98
                        QString fileName(pdfdir + completeBaseName + ".pdf");
11949 jghali 99
                        fileNameLineEdit->setText( QDir::toNativeSeparators(fileName) );
6717 fschmid 100
                }
167 Franz 101
        }
3082 fschmid 102
        NameLayout->addWidget( fileNameLineEdit, 0, 0 );
19351 craig 103
        changeButton = new QPushButton( Name );
104
        changeButton->setText( tr( "Cha&nge..." ) );
105
        changeButton->setMinimumSize( QSize( 88, 24 ) );
106
        NameLayout->addWidget( changeButton, 0, 1 );
10553 fschmid 107
        multiFile = new QCheckBox( tr( "Output one file for eac&h page" ), Name );
18326 jghali 108
        multiFile->setChecked(m_opts.doMultiFile);
3082 fschmid 109
        NameLayout->addWidget( multiFile, 1, 0 );
15130 cbradney 110
        openAfterExportCheckBox = new QCheckBox( tr( "Open PDF after Export" ), Name );
18326 jghali 111
        openAfterExportCheckBox->setChecked(m_opts.openAfterExport);
15130 cbradney 112
        NameLayout->addWidget( openAfterExportCheckBox, 2, 0 );
4259 craig 113
        PDFExportLayout->addWidget( Name );
15130 cbradney 114
 
19829 jghali 115
        Options = new TabPDFOptions( this, pdfOptions, AllFonts, PDFXProfiles, DocFonts, currView->Doc );
4259 craig 116
        PDFExportLayout->addWidget( Options );
9877 fschmid 117
        Layout7 = new QHBoxLayout;
245 Franz 118
        Layout7->setSpacing( 5 );
119
        Layout7->setMargin( 0 );
9877 fschmid 120
        QSpacerItem* spacer_2 = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum );
245 Franz 121
        Layout7->addItem( spacer_2 );
19351 craig 122
        okButton = new QPushButton( tr( "&Save" ), this );
123
        okButton->setAutoDefault( true );
124
        okButton->setDefault( true );
125
        Layout7->addWidget( okButton );
126
        cancelButton = new QPushButton( CommonStrings::tr_Cancel, this );
127
        Layout7->addWidget( cancelButton );
4259 craig 128
        PDFExportLayout->addLayout( Layout7 );
18326 jghali 129
        if ((m_opts.Version == PDFOptions::PDFVersion_X3) && (Options->InfoString->text().isEmpty()))
19351 craig 130
                okButton->setEnabled(false);
338 Franz 131
        resize(sizeHint());
132
//      setMaximumSize( sizeHint() );
3085 mrdocs 133
//tooltips
10397 cbradney 134
        multiFile->setToolTip( "<qt>" + tr( "This enables exporting one individually named PDF file for each page in the document. Page numbers are added automatically. This is most useful for imposing PDF for commercial printing.") + "</qt>" );
20272 craig 135
        openAfterExportCheckBox->setToolTip( "<qt>" + tr( "Open the exported PDF with the PDF viewer as set in External Tools preferences, when not exporting to a multi-file export destination") + "</qt>" );
136
        okButton->setToolTip( "<qt>" + tr( "The save button will be disabled if you are trying to export PDF/X and the info string is missing from the PDF/X tab") + "</qt>" );
245 Franz 137
        // signals and slots connections
19351 craig 138
        connect( changeButton, SIGNAL( clicked() ), this, SLOT( ChangeFile() ) );
139
        connect( okButton, SIGNAL( clicked() ), this, SLOT( DoExport() ) );
140
        connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
11307 cbradney 141
        connect( fileNameLineEdit, SIGNAL( editingFinished() ), this, SLOT( fileNameChanged() ) );
3388 fschmid 142
        connect( Options, SIGNAL(noInfo()), this, SLOT(disableSave()));
143
        connect( Options, SIGNAL(hasInfo()), this, SLOT(enableSave()));
3 paul 144
}
145
 
4259 craig 146
void PDFExportDialog::enableSave()
3388 fschmid 147
{
19351 craig 148
        okButton->setEnabled(true);
3388 fschmid 149
}
150
 
4259 craig 151
void PDFExportDialog::disableSave()
3388 fschmid 152
{
19351 craig 153
        okButton->setEnabled(false);
3388 fschmid 154
}
155
 
4259 craig 156
void PDFExportDialog::DoExport()
248 Franz 157
{
20486 jghali 158
        // Check the page ranges
159
        bool hasInvalidPageRange = false;
160
        QString pageString(this->getPagesString());
161
        std::vector<int> pageNumbers;
162
 
163
        parsePagesString(pageString, &pageNumbers, m_doc->DocPages.count());
164
        for (size_t i = 0; i < pageNumbers.size(); ++i)
165
        {
166
                int pageNumber = pageNumbers[i];
167
                if (pageNumber < 1 || pageNumber > m_doc->DocPages.count())
168
                {
169
                        hasInvalidPageRange = true;
170
                        break;
171
                }
172
        }
173
 
174
        if ((pageNumbers.size() == 0) || hasInvalidPageRange)
175
        {
176
                ScMessageBox::warning(this, CommonStrings::trWarning, tr("The range of pages to export is invalid.\nPlease check it and try again."));
177
                return;
178
        }
179
 
180
        // Checking if the path exists
12416 jghali 181
        bool createPath = false;
11639 jghali 182
        QString fn = QDir::fromNativeSeparators(fileNameLineEdit->text());
6280 jghali 183
        QFileInfo fi(fn);
11949 jghali 184
        QString dirPath = QDir::toNativeSeparators(fi.absolutePath());
10553 fschmid 185
        if (!QFile::exists(fi.absolutePath()))
6280 jghali 186
        {
19605 jghali 187
                if (ScMessageBox::question(this, tr( "Save as PDF" ),
6285 jghali 188
                                                                        tr("%1 does not exists and will be created, continue?").arg(dirPath),
19605 jghali 189
                                                                        QMessageBox::Ok | QMessageBox::Cancel,
190
                                                                        QMessageBox::NoButton// GUI default
191
                                                                        QMessageBox::Ok)        // batch default
9422 fschmid 192
                                  == QMessageBox::Cancel)
6282 subik 193
                {
6280 jghali 194
                        return;
6282 subik 195
                }
12416 jghali 196
                createPath = true;
6280 jghali 197
        }
12416 jghali 198
 
6278 subik 199
        // NOTE: Qt4 contains QDir::mkpath()
200
        QDir d(fn);
12416 jghali 201
        if (createPath)
6278 subik 202
        {
12416 jghali 203
                if (!d.mkpath(fi.absolutePath()))
6278 subik 204
                {
19605 jghali 205
                        ScMessageBox::warning(this,
12416 jghali 206
                                                                 CommonStrings::trWarning,
19605 jghali 207
                                                                 tr("Cannot create directory: \n%1").arg(dirPath));
12416 jghali 208
                        return;
6278 subik 209
                }
12416 jghali 210
        }
6278 subik 211
 
5965 fschmid 212
        bool doIt = false;
213
        if (multiFile->isChecked())
214
                doIt = true;
215
        else
216
                doIt = overwrite(this, fn);
20486 jghali 217
        if (!doIt) return;
218
 
219
        int pageIndex = (Options->Pages->currentRow() >= 0) ? Options->Pages->currentRow() : 0;
220
        m_presEffects = Options->EffVal;
221
        m_presEffects[pageIndex].pageViewDuration = Options->PageTime->value();
222
        m_presEffects[pageIndex].pageEffectDuration = Options->EffectTime->value();
223
        m_presEffects[pageIndex].effectType = Options->EffectType->currentIndex();
224
        m_presEffects[pageIndex].Dm = Options->EDirection->currentIndex();
225
        m_presEffects[pageIndex].M = Options->EDirection_2->currentIndex();
226
        m_presEffects[pageIndex].Di = Options->EDirection_2_2->currentIndex();
227
        m_opts.LPISettings[Options->SelLPIcolor].Frequency = Options->LPIfreq->value();
228
        m_opts.LPISettings[Options->SelLPIcolor].Angle = Options->LPIangle->value();
229
        m_opts.LPISettings[Options->SelLPIcolor].SpotFunc = Options->LPIfunc->currentIndex();
230
        accept();
248 Franz 231
}
232
 
4259 craig 233
void PDFExportDialog::ChangeFile()
3 paul 234
{
2856 cbradney 235
        PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
415 Franz 236
        QString wdir = dirs->get("pdf", ".");
19350 craig 237
        QString d = QFileDialog::getSaveFileName(this, tr("Save As"), wdir, tr("PDF Files (*.pdf);;All Files (*)"), 0, QFileDialog::DontConfirmOverwrite);
238
        if (d.length()>0)
11949 jghali 239
        {
19351 craig 240
                QString fn(QDir::fromNativeSeparators(d));
10427 cbradney 241
                dirs->set("pdf", fn.left(fn.lastIndexOf("/")));
21728 jghali 242
                fileNameLineEdit->setText(QDir::toNativeSeparators(d));
11949 jghali 243
        }      
3 paul 244
}
2725 cbradney 245
 
4259 craig 246
void PDFExportDialog::fileNameChanged()
2725 cbradney 247
{
7117 jghali 248
        QString fileName = checkFileExtension(fileNameLineEdit->text(),"pdf");
11949 jghali 249
        fileNameLineEdit->setText( QDir::toNativeSeparators(fileName) );
2725 cbradney 250
}
3059 cbradney 251
 
4259 craig 252
void PDFExportDialog::updateDocOptions()
3059 cbradney 253
{
18326 jghali 254
        m_opts.fileName = QDir::fromNativeSeparators(fileNameLineEdit->text());
255
        m_opts.doMultiFile = multiFile->isChecked();
256
        m_opts.openAfterExport = openAfterExportCheckBox->isChecked();
257
        m_opts.Thumbnails = Options->CheckBox1->isChecked();
258
        m_opts.Compress = Options->Compression->isChecked();
259
        m_opts.CompressMethod = (PDFOptions::PDFCompression) Options->CMethod->currentIndex();
260
        m_opts.Quality = Options->CQuality->currentIndex();
261
        m_opts.Resolution = Options->Resolution->value();
20122 jghali 262
        m_opts.FontEmbedding = Options->fontEmbeddingMode();
19828 jghali 263
        m_opts.EmbedList = Options->fontsToEmbed();
20103 avox 264
        m_opts.SubsetList = Options->fontsToSubset();
20122 jghali 265
        m_opts.OutlineList = Options->fontsToOutline();
18326 jghali 266
        m_opts.RecalcPic = Options->DSColor->isChecked();
267
        m_opts.PicRes = Options->ValC->value();
268
        m_opts.embedPDF = Options->EmbedPDF->isChecked();
269
        m_opts.Bookmarks = Options->CheckBM->isChecked();
270
        m_opts.Binding = Options->ComboBind->currentIndex();
271
        m_opts.MirrorH = Options->MirrorH->isChecked();
272
        m_opts.MirrorV = Options->MirrorV->isChecked();
273
        m_opts.doClip = Options->ClipMarg->isChecked();
274
        m_opts.RotateDeg = Options->RotateDeg->currentIndex() * 90;
275
        m_opts.pageRangeSelection = Options->AllPages->isChecked() ? 0 : 1;
276
        m_opts.pageRangeString = Options->PageNr->text();
277
        m_opts.PresentMode = Options->CheckBox10->isChecked();
18394 fschmid 278
        if (m_opts.PresentMode)
279
        {
280
                for (int pg = 0; pg < m_doc->Pages->count(); ++pg)
281
                {
282
                        m_doc->Pages->at(pg)->PresentVals = m_presEffects[pg];
283
                }
284
        }
18326 jghali 285
        m_opts.Articles = Options->Article->isChecked();
286
        m_opts.Encrypt = Options->Encry->isChecked();
287
        m_opts.UseLPI = Options->UseLPI->isChecked();
288
        m_opts.useLayers = Options->useLayers->isChecked();
289
        m_opts.UseSpotColors = !Options->useSpot->isChecked();
290
        m_opts.displayBookmarks = Options->useBookmarks->isChecked();
291
        m_opts.displayFullscreen = Options->useFullScreen->isChecked();
292
        m_opts.displayLayers = Options->useLayers2->isChecked();
293
        m_opts.displayThumbs = Options->useThumbnails->isChecked();
294
        m_opts.hideMenuBar = Options->hideMenuBar->isChecked();
295
        m_opts.hideToolBar = Options->hideToolBar->isChecked();
296
        m_opts.fitWindow = Options->fitWindow->isChecked();
297
        m_opts.useDocBleeds = Options->docBleeds->isChecked();
7076 fschmid 298
        if (!Options->docBleeds->isChecked())
299
        {
19831 craig 300
                m_opts.bleeds.setTop(Options->BleedTop->value() / m_unitRatio);
301
                m_opts.bleeds.setLeft(Options->BleedLeft->value() / m_unitRatio);
302
                m_opts.bleeds.setRight(Options->BleedRight->value() / m_unitRatio);
303
                m_opts.bleeds.setBottom(Options->BleedBottom->value()/ m_unitRatio);
7076 fschmid 304
        }
18326 jghali 305
        m_opts.markLength = Options->markLength->value() / m_unitRatio;
306
        m_opts.markOffset = Options->markOffset->value() / m_unitRatio;
307
        m_opts.cropMarks = Options->cropMarks->isChecked();
308
        m_opts.bleedMarks = Options->bleedMarks->isChecked();
309
        m_opts.registrationMarks = Options->registrationMarks->isChecked();
310
        m_opts.colorMarks = Options->colorMarks->isChecked();
311
        m_opts.docInfoMarks = Options->docInfoMarks->isChecked();
4197 fschmid 312
        int pgl = PDFOptions::SinglePage;
313
        if (Options->singlePage->isChecked())
314
                pgl = PDFOptions::SinglePage;
315
        else if (Options->continuousPages->isChecked())
316
                pgl = PDFOptions::OneColumn;
21491 craig 317
        else if (Options->facingPagesLeft->isChecked())
4197 fschmid 318
                pgl = PDFOptions::TwoColumnLeft;
21491 craig 319
        else if (Options->facingPagesRight->isChecked())
4197 fschmid 320
                pgl = PDFOptions::TwoColumnRight;
18326 jghali 321
        m_opts.PageLayout = pgl;
10553 fschmid 322
        if (Options->actionCombo->currentIndex() != 0)
18326 jghali 323
                m_opts.openAction = Options->actionCombo->currentText();
4197 fschmid 324
        else
18326 jghali 325
                m_opts.openAction = "";
3059 cbradney 326
        if (Options->Encry->isChecked())
327
        {
328
                int Perm = -64;
10553 fschmid 329
                if (Options->PDFVersionCombo->currentIndex() == 1)
3059 cbradney 330
                        Perm &= ~0x00240000;
331
                if (Options->PrintSec->isChecked())
332
                        Perm += 4;
333
                if (Options->ModifySec->isChecked())
334
                        Perm += 8;
335
                if (Options->CopySec->isChecked())
336
                        Perm += 16;
337
                if (Options->AddSec->isChecked())
338
                        Perm += 32;
18326 jghali 339
                m_opts.Permissions = Perm;
340
                m_opts.PassOwner = Options->PassOwner->text();
341
                m_opts.PassUser = Options->PassUser->text();
3059 cbradney 342
        }
10553 fschmid 343
        if (Options->PDFVersionCombo->currentIndex() == 0)
18326 jghali 344
                m_opts.Version = PDFOptions::PDFVersion_13;
10553 fschmid 345
        if (Options->PDFVersionCombo->currentIndex() == 1)
18326 jghali 346
                m_opts.Version = PDFOptions::PDFVersion_14;
10553 fschmid 347
        if (Options->PDFVersionCombo->currentIndex() == 2)
18326 jghali 348
                m_opts.Version = PDFOptions::PDFVersion_15;
10553 fschmid 349
        if (Options->PDFVersionCombo->currentIndex() == 3)
18326 jghali 350
                m_opts.Version = PDFOptions::PDFVersion_X1a;
14043 jghali 351
        if (Options->PDFVersionCombo->currentIndex() == 4)
18326 jghali 352
                m_opts.Version = PDFOptions::PDFVersion_X3;
14043 jghali 353
        if (Options->PDFVersionCombo->currentIndex() == 5)
18326 jghali 354
                m_opts.Version = PDFOptions::PDFVersion_X4;
10553 fschmid 355
        if (Options->OutCombo->currentIndex() == 0)
3059 cbradney 356
        {
18326 jghali 357
                m_opts.UseRGB = true;
358
                m_opts.isGrayscale = false;
359
                m_opts.UseProfiles = false;
360
                m_opts.UseProfiles2 = false;
3059 cbradney 361
        }
362
        else
363
        {
10553 fschmid 364
                if (Options->OutCombo->currentIndex() == 2)
3059 cbradney 365
                {
18326 jghali 366
                        m_opts.isGrayscale = true;
367
                        m_opts.UseRGB = false;
368
                        m_opts.UseProfiles = false;
369
                        m_opts.UseProfiles2 = false;
3059 cbradney 370
                }
371
                else
372
                {
18326 jghali 373
                        m_opts.isGrayscale = false;
374
                        m_opts.UseRGB = false;
375
                        if (m_doc->HasCMS)
3059 cbradney 376
                        {
18326 jghali 377
                                m_opts.UseProfiles = Options->EmbedProfs->isChecked();
378
                                m_opts.UseProfiles2 = Options->EmbedProfs2->isChecked();
379
                                if (m_opts.Version != PDFOptions::PDFVersion_X1a)
14043 jghali 380
                                {
18326 jghali 381
                                        m_opts.Intent = Options->IntendS->currentIndex();
382
                                        m_opts.Intent2 = Options->IntendI->currentIndex();
383
                                        m_opts.EmbeddedI = Options->NoEmbedded->isChecked();
384
                                        m_opts.SolidProf = Options->SolidPr->currentText();
385
                                        m_opts.ImageProf = Options->ImageP->currentText();
14043 jghali 386
                                }
18326 jghali 387
                                m_opts.PrintProf = Options->PrintProfC->currentText();
388
                                if ((m_opts.Version == PDFOptions::PDFVersion_X3) || (m_opts.Version == PDFOptions::PDFVersion_X1a) || (m_opts.Version == PDFOptions::PDFVersion_X4))
3059 cbradney 389
                                {
18326 jghali 390
                                        ScColorProfile hIn = m_doc->colorEngine.openProfileFromFile( m_printerProfiles[m_opts.PrintProf] );
391
                                        m_cmsDescriptor = hIn.productDescription();
14772 jghali 392
                                        if (hIn.colorSpace() == ColorSpace_Rgb)
18326 jghali 393
                                                m_components = 3;
14772 jghali 394
                                        if (hIn.colorSpace() == ColorSpace_Cmyk)
18326 jghali 395
                                                m_components = 4;
14772 jghali 396
                                        if (hIn.colorSpace() == ColorSpace_Cmy)
18326 jghali 397
                                                m_components = 3;
398
                                        m_opts.Info = Options->InfoString->text();
399
                                        m_opts.Encrypt = false;
400
                                        m_opts.MirrorH = false;
401
                                        m_opts.MirrorV = false;
13804 jghali 402
                                        //#8306 : PDF/X-3 export ignores rotation setting
18326 jghali 403
                                        //m_opts.RotateDeg = 0;
404
                                        m_opts.PresentMode = false;
3059 cbradney 405
                                }
406
                        }
407
                        else
408
                        {
18326 jghali 409
                                m_opts.UseProfiles = false;
410
                                m_opts.UseProfiles2 = false;
3059 cbradney 411
                        }
412
                }
413
        }
414
}
415
 
4259 craig 416
const QString PDFExportDialog::cmsDescriptor()
3059 cbradney 417
{
18326 jghali 418
        return m_cmsDescriptor;
3059 cbradney 419
}
420
 
4259 craig 421
const int PDFExportDialog::colorSpaceComponents()
3059 cbradney 422
{
18326 jghali 423
        return m_components;
3059 cbradney 424
}
3062 cbradney 425
 
4259 craig 426
const QString PDFExportDialog::getPagesString()
3062 cbradney 427
{
428
        if (Options->AllPages->isChecked())
429
                return "*";
430
        return Options->PageNr->text();
431
}