Subversion Repositories Scribus

Rev

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

Rev Author Line No. Line
3 paul 1
#include "reformdoc.h"
2
#include "reformdoc.moc"
2965 cbradney 3
 
4
#include <qcolordialog.h>
5
#include <qcursor.h>
6
#include <qspinbox.h>
249 Franz 7
#include <qtooltip.h>
2965 cbradney 8
 
788 fschmid 9
#include "tabtypography.h"
2246 subik 10
#include "docinfo.h"
879 fschmid 11
#include "tabguides.h"
1194 fschmid 12
#include "tabtools.h"
1235 fschmid 13
#include "tabcheckdoc.h"
795 fschmid 14
#include "hysettings.h"
15
#include "cmsprefs.h"
806 cbradney 16
#include "units.h"
838 cbradney 17
#include "mspinbox.h"
18
#include "scribus.h"
1307 fschmid 19
#include "tabpdfoptions.h"
1321 fschmid 20
#include "fontprefs.h"
1542 cbradney 21
#include "units.h"
22
#include "pagesize.h"
1641 cbradney 23
#include "docitemattrprefs.h"
1684 cbradney 24
#include "tocindexprefs.h"
2769 fschmid 25
#include "marginWidget.h"
2834 cbradney 26
#include "prefsmanager.h"
2901 fschmid 27
#include "pagelayout.h"
2965 cbradney 28
#include "fontcombo.h"
29
#include "linecombo.h"
30
#include "arrowchooser.h"
31
#include "polygonwidget.h"
788 fschmid 32
 
3 paul 33
extern QPixmap loadIcon(QString nam);
795 fschmid 34
extern bool CMSavail;
3 paul 35
 
2965 cbradney 36
#ifdef HAVE_CMS
37
extern cmsHPROFILE CMSoutputProf;
38
extern cmsHPROFILE CMSprinterProf;
39
extern cmsHTRANSFORM stdTransG;
40
extern cmsHTRANSFORM stdProofG;
41
extern cmsHTRANSFORM stdTransImgG;
42
extern cmsHTRANSFORM stdProofImgG;
43
extern cmsHTRANSFORM stdTransCMYKG;
44
extern cmsHTRANSFORM stdProofCMYKG;
45
extern cmsHTRANSFORM stdTransRGBG;
3046 fschmid 46
extern cmsHTRANSFORM stdProofCMYKGCG;
47
extern cmsHTRANSFORM stdProofGCG;
2965 cbradney 48
extern bool BlackPoint;
49
extern bool SoftProofing;
50
extern bool Gamut;
51
extern bool CMSuse;
52
extern int IntentMonitor;
53
extern int IntentPrinter;
54
#endif
55
 
1194 fschmid 56
ReformDoc::ReformDoc( QWidget* parent, ScribusDoc* doc ) : PrefsDialogBase( parent )
3 paul 57
{
2965 cbradney 58
        einheit = doc->unitIndex();
1694 cbradney 59
        currDoc = doc;
2965 cbradney 60
        ScApp = (ScribusApp*)parent;
61
        unitRatio = doc->unitRatio();
62
        QString ein = unitGetSuffixFromIndex(einheit);
63
        decimals = unitGetDecimalsFromIndex(einheit);
2142 cbradney 64
        pageWidth = doc->pageWidth * unitRatio;
65
        pageHeight = doc->pageHeight * unitRatio;
249 Franz 66
        setCaption( tr( "Document Setup" ) );
693 fschmid 67
        tabPage = new QWidget( prefsWidgets, "tab" );
788 fschmid 68
        reformDocLayout = new QVBoxLayout( tabPage );
1878 cbradney 69
        reformDocLayout->setSpacing( 5 );
70
        reformDocLayout->setMargin( 0 );
2880 fschmid 71
        reformDocLayout->setAlignment( Qt::AlignTop );
2901 fschmid 72
        dsLayout4p = new QHBoxLayout;
73
        dsLayout4p->setSpacing( 5 );
74
        dsLayout4p->setMargin( 0 );
3026 fschmid 75
        docLayout = new PageLayouts(tabPage, doc->pageSets);
3032 fschmid 76
        docLayout->selectItem(doc->currentPageLayout);
77
        docLayout->firstPage->setCurrentItem(doc->pageSets[doc->currentPageLayout].FirstPage);
2901 fschmid 78
        dsLayout4p->addWidget( docLayout );
79
 
80
        dsLayout4pv = new QVBoxLayout;
81
        dsLayout4pv->setSpacing( 5 );
82
        dsLayout4pv->setMargin( 0 );
693 fschmid 83
        dsGroupBox7 = new QGroupBox( tabPage, "GroupBox7" );
519 cbradney 84
        dsGroupBox7->setTitle( tr( "Page Size" ) );
85
        dsGroupBox7->setColumnLayout(0, Qt::Vertical );
86
        dsGroupBox7->layout()->setSpacing( 0 );
87
        dsGroupBox7->layout()->setMargin( 0 );
88
        dsGroupBox7Layout = new QHBoxLayout( dsGroupBox7->layout() );
89
        dsGroupBox7Layout->setAlignment( Qt::AlignTop );
90
        dsGroupBox7Layout->setSpacing( 0 );
91
        dsGroupBox7Layout->setMargin( 10 );
92
        dsLayout4 = new QGridLayout;
2901 fschmid 93
        dsLayout4->setSpacing( 5 );
519 cbradney 94
        dsLayout4->setMargin( 0 );
693 fschmid 95
        sizeQComboBox = new QComboBox( true, dsGroupBox7, "sizeQComboBox" );
2607 fschmid 96
        sizeQComboBox->setEditable(false);
693 fschmid 97
        sizeQLabel = new QLabel( sizeQComboBox, tr( "&Size:" ), dsGroupBox7, "sizeQLabel" );
1542 cbradney 98
 
99
        PageSize *ps=new PageSize(doc->PageSize);
2658 fschmid 100
        QStringList pageSizes=ps->getPageSizeList();
101
        sizeQComboBox->insertStringList(ps->getTrPageSizeList());
1542 cbradney 102
        sizeQComboBox->insertItem( tr( "Custom" ) );
2658 fschmid 103
        prefsPageSizeName=ps->getPageName();
2246 subik 104
 
1542 cbradney 105
        int sizeIndex=pageSizes.findIndex(ps->getPageText());
519 cbradney 106
        //set Custom if we dont have one already as old docs wont have this attribute
1542 cbradney 107
        if (sizeIndex!=-1)
108
                sizeQComboBox->setCurrentItem(sizeIndex);
109
        else
110
                sizeQComboBox->setCurrentItem(sizeQComboBox->count()-1);
2246 subik 111
 
693 fschmid 112
        dsLayout4->addWidget( sizeQLabel, 0, 0 );
113
        dsLayout4->addWidget( sizeQComboBox, 0, 1 );
114
        orientationQComboBox = new QComboBox( true, dsGroupBox7, "orientationQComboBox" );
115
        orientationQLabel = new QLabel( orientationQComboBox, tr( "Orie&ntation:" ), dsGroupBox7, "orientationQLabel" );
116
        orientationQComboBox->insertItem( tr( "Portrait" ) );
117
        orientationQComboBox->insertItem( tr( "Landscape" ) );
118
        orientationQComboBox->setCurrentItem(doc->PageOri);
2607 fschmid 119
        orientationQComboBox->setEditable(false);
693 fschmid 120
        dsLayout4->addWidget( orientationQLabel, 0, 2 );
519 cbradney 121
        dsLayout4->addWidget( orientationQComboBox, 0, 3 );
2582 cbradney 122
        widthMSpinBox = new MSpinBox( 1, 100000, dsGroupBox7, 2 );
693 fschmid 123
        widthQLabel = new QLabel( tr( "&Width:" ), dsGroupBox7, "widthLabel" );
124
        widthMSpinBox->setEnabled( false );
125
        widthMSpinBox->setSuffix(ein);
726 fschmid 126
        widthMSpinBox->setValue(pageWidth);
693 fschmid 127
        widthQLabel->setBuddy(widthMSpinBox);
128
        dsLayout4->addWidget( widthQLabel, 1, 0 );
129
        dsLayout4->addWidget( widthMSpinBox, 1, 1 );
2582 cbradney 130
        heightMSpinBox = new MSpinBox( 1, 100000, dsGroupBox7, 2 );
693 fschmid 131
        heightMSpinBox->setEnabled( false );
132
        heightMSpinBox->setSuffix(ein);
726 fschmid 133
        heightMSpinBox->setValue(pageHeight);
800 fschmid 134
        heightQLabel = new QLabel(heightMSpinBox,  tr( "&Height:" ), dsGroupBox7, "heightLabel" );
693 fschmid 135
        dsLayout4->addWidget( heightQLabel, 1, 2 );
136
        dsLayout4->addWidget( heightMSpinBox, 1, 3 );
2607 fschmid 137
        if (sizeQComboBox->currentText() == tr("Custom"))
138
        {
139
                heightMSpinBox->setEnabled( true );
140
                widthMSpinBox->setEnabled( true );
141
        }
800 fschmid 142
        unitCombo = new QComboBox( true, dsGroupBox7, "unitCombo" );
1525 cbradney 143
        unitCombo->insertStringList(unitGetTextUnitList());
800 fschmid 144
        unitCombo->setEditable(false);
2965 cbradney 145
        unitCombo->setCurrentItem(doc->unitIndex());
800 fschmid 146
        unitQLabel = new QLabel(unitCombo, tr( "&Unit:" ), dsGroupBox7, "unitQLabel" );
147
        dsLayout4->addWidget( unitQLabel, 2, 0 );
148
        dsLayout4->addWidget( unitCombo, 2, 1 );
519 cbradney 149
        dsGroupBox7Layout->addLayout( dsLayout4 );
2901 fschmid 150
        dsLayout4pv->addWidget( dsGroupBox7 );
2769 fschmid 151
 
152
        GroupRand = new MarginWidget(tabPage,  tr( "Margin Guides" ), &doc->pageMargins, decimals, unitRatio, ein );
153
        GroupRand->setPageHeight(pageHeight);
154
        GroupRand->setPageWidth(pageWidth);
2901 fschmid 155
        dsLayout4pv->addWidget( GroupRand );
156
        dsLayout4p->addLayout( dsLayout4pv );
157
        reformDocLayout->addLayout( dsLayout4p );
2880 fschmid 158
 
788 fschmid 159
        groupBox7a = new QGroupBox( tabPage, "groupBox7" );
2901 fschmid 160
        groupBox7a->setTitle( tr( "Options" ) );
788 fschmid 161
        groupBox7a->setColumnLayout(0, Qt::Vertical );
162
        groupBox7a->layout()->setSpacing( 0 );
163
        groupBox7a->layout()->setMargin( 0 );
164
        groupBox7aLayout = new QHBoxLayout( groupBox7a->layout() );
165
        groupBox7aLayout->setAlignment( Qt::AlignTop );
166
        groupBox7aLayout->setSpacing( 0 );
167
        groupBox7aLayout->setMargin( 10 );
168
        layout4a = new QGridLayout;
169
        layout4a->setSpacing( 6 );
170
        layout4a->setMargin( 0 );
2901 fschmid 171
        sizeAllPages = new QCheckBox( groupBox7a, "moveObjects" );
172
        sizeAllPages->setText( tr( "Apply size settings to all Pages" ) );
173
        sizeAllPages->setChecked( false );
174
        layout4a->addMultiCellWidget( sizeAllPages, 1, 1, 0, 1 );
175
        marginsForAllPages = new QCheckBox( groupBox7a, "moveObjects" );
176
        marginsForAllPages->setText( tr( "Apply margin settings to all Pages" ) );
177
        marginsForAllPages->setChecked( false );
178
        layout4a->addMultiCellWidget( marginsForAllPages, 1, 1, 2, 3 );
788 fschmid 179
        TextLabel1_3 = new QLabel( tr( "F&irst Page Number:" ), groupBox7a, "TextLabel1_3" );
2901 fschmid 180
        layout4a->addMultiCellWidget( TextLabel1_3, 0, 0, 0, 1 );
788 fschmid 181
        pageNumber = new QSpinBox( groupBox7a, "pageNumber" );
726 fschmid 182
        pageNumber->setMaxValue( 10000 );
183
        pageNumber->setMinValue( 1 );
184
        pageNumber->setValue(doc->FirstPnum);
2901 fschmid 185
        layout4a->addWidget( pageNumber, 0, 2, Qt::AlignRight );
726 fschmid 186
        TextLabel1_3->setBuddy(pageNumber);
788 fschmid 187
        groupBox7aLayout->addLayout( layout4a );
188
        reformDocLayout->addWidget( groupBox7a );
800 fschmid 189
        groupAutoSave = new QGroupBox( tabPage, "groupAutoSave" );
190
        groupAutoSave->setTitle( tr( "Autosave" ) );
191
        groupAutoSave->setCheckable( true );
192
        groupAutoSave->setChecked( doc->AutoSave );
193
        groupAutoSave->setColumnLayout(0, Qt::Vertical );
194
        groupAutoSave->layout()->setSpacing( 6 );
195
        groupAutoSave->layout()->setMargin( 11 );
196
        groupAutoSaveLayout = new QHBoxLayout( groupAutoSave->layout() );
197
        groupAutoSaveLayout->setAlignment( Qt::AlignTop );
198
        autoSaveTime = new QSpinBox( groupAutoSave, "autoSaveTime" );
199
        autoSaveTime->setMinValue( 1 );
200
        autoSaveTime->setMaxValue( 60 );
201
        autoSaveTime->setSuffix( " " + tr("min") );
202
        autoSaveTime->setValue(doc->AutoSaveTime / 1000 / 60);
203
        groupAutoSaveLayout->addWidget( autoSaveTime );
204
        textLabel1m = new QLabel(autoSaveTime, tr( "&Interval:" ), groupAutoSave, "textLabel1m" );
205
        groupAutoSaveLayout->addWidget( textLabel1m );
206
        reformDocLayout->addWidget( groupAutoSave );
207
        addItem( tr("Document"), loadIcon("page.png"), tabPage);
693 fschmid 208
 
2246 subik 209
        docInfos = new DocInfos(prefsWidgets, doc->documentInfo);
2397 cbradney 210
        addItem( tr("Document Information"), loadIcon("documentinfo32.png"), docInfos);
2246 subik 211
 
2889 cbradney 212
        tabGuides = new TabGuides(prefsWidgets, &doc->guidesSettings, &doc->typographicSettings, einheit);
2397 cbradney 213
        addItem( tr("Guides"), loadIcon("guides.png"), tabGuides);
693 fschmid 214
 
705 fschmid 215
        tabView = new QWidget( prefsWidgets, "tabView" );
1878 cbradney 216
        tabViewLayout = new QVBoxLayout( tabView, 0, 5, "tabViewLayout");
705 fschmid 217
        pageBackground = new QButtonGroup( tabView, "pageBackground" );
1195 fschmid 218
        pageBackground->setTitle( tr( "Page Display" ) );
705 fschmid 219
        pageBackground->setColumnLayout(0, Qt::Vertical );
220
        pageBackground->layout()->setSpacing( 5 );
221
        pageBackground->layout()->setMargin( 10 );
222
        pageBackgroundLayout = new QVBoxLayout( pageBackground->layout() );
223
        pageBackgroundLayout->setAlignment( Qt::AlignTop );
224
        layout10 = new QHBoxLayout( 0, 0, 5, "layout10");
225
        textLabel9 = new QLabel( pageBackground, "textLabel9" );
226
        textLabel9->setText( tr( "Color:" ) );
227
        layout10->addWidget( textLabel9 );
228
        backColor = new QPushButton( pageBackground, "backColor" );
229
        backColor->setMinimumSize( QSize( 60, 20 ) );
230
        backColor->setMaximumSize( QSize( 60, 20 ) );
231
        backColor->setFlat( false );
232
        backColor->setAutoDefault( false );
233
        QPixmap pm5 = QPixmap(54, 14);
234
        pm5.fill(doc->papColor);
235
        colorPaper = doc->papColor;
236
        backColor->setPixmap(pm5);
237
        backColor->setText( QString::null );
238
        layout10->addWidget( backColor );
1195 fschmid 239
        QSpacerItem* spacer3 = new QSpacerItem( 61, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
705 fschmid 240
        layout10->addItem( spacer3 );
241
        pageBackgroundLayout->addLayout( layout10 );
242
        checkUnprintable = new QCheckBox( pageBackground, "checkUnprintable" );
243
        checkUnprintable->setText( tr( "Display &Unprintable Area in Margin Color" ) );
244
        checkUnprintable->setAccel( QKeySequence( tr( "Alt+U" ) ) );
1065 cbradney 245
        checkUnprintable->setChecked( doc->marginColored );
705 fschmid 246
        pageBackgroundLayout->addWidget( checkUnprintable );
1195 fschmid 247
        checkPictures = new QCheckBox( pageBackground, "checkPictures" );
248
        checkPictures->setText( tr( "Show Pictures" ) );
249
        checkPictures->setChecked(doc->guidesSettings.showPic);
250
        pageBackgroundLayout->addWidget( checkPictures );
251
        checkLink = new QCheckBox( pageBackground, "checkLink" );
252
        checkLink->setText( tr( "Show Text Chains" ) );
253
        checkLink->setChecked(doc->guidesSettings.linkShown);
254
        pageBackgroundLayout->addWidget( checkLink );
2353 fschmid 255
        checkControl = new QCheckBox( pageBackground, "checkControl" );
256
        checkControl->setText( tr( "Show Text Control Characters" ) );
257
        checkControl->setChecked(doc->guidesSettings.showControls);
258
        pageBackgroundLayout->addWidget( checkControl );
1195 fschmid 259
        checkFrame = new QCheckBox( pageBackground, "checkFrame" );
260
        checkFrame->setText( tr( "Show Frames" ) );
261
        checkFrame->setChecked(doc->guidesSettings.framesShown);
262
        pageBackgroundLayout->addWidget( checkFrame );
2863 fschmid 263
        checkRuler = new QCheckBox( pageBackground, "checkRuler" );
264
        checkRuler->setText( tr( "Rulers relative to Page" ) );
265
        checkRuler->setChecked(doc->guidesSettings.rulerMode);
266
        pageBackgroundLayout->addWidget( checkRuler );
705 fschmid 267
        tabViewLayout->addWidget( pageBackground );
734 fschmid 268
 
269
        groupScratch = new QGroupBox( tabView, "GroupBox7" );
2863 fschmid 270
        groupScratch->setTitle( tr( "Minimum Scratch Space" ) );
734 fschmid 271
        groupScratch->setColumnLayout(0, Qt::Vertical );
272
        groupScratch->layout()->setSpacing( 0 );
273
        groupScratch->layout()->setMargin( 0 );
274
        groupScratchLayout = new QHBoxLayout( groupScratch->layout() );
275
        groupScratchLayout->setAlignment( Qt::AlignTop );
276
        groupScratchLayout->setSpacing( 0 );
277
        groupScratchLayout->setMargin( 10 );
788 fschmid 278
        layout4s = new QGridLayout;
279
        layout4s->setSpacing( 6 );
280
        layout4s->setMargin( 0 );
734 fschmid 281
        topScratch = new MSpinBox( groupScratch, 4 );
282
        topScratch->setSuffix( ein );
283
        topScratch->setDecimals( decimals );
284
        topScratch->setMaxValue(1000);
1843 cbradney 285
        topScratch->setValue(doc->ScratchTop * unitRatio);
788 fschmid 286
        layout4s->addWidget( topScratch, 0, 1 );
734 fschmid 287
        TextLabel5s = new QLabel(topScratch, tr( "&Top:" ), groupScratch, "TextLabel5" );
788 fschmid 288
        layout4s->addWidget( TextLabel5s, 0, 0 );
734 fschmid 289
        leftScratch = new MSpinBox( groupScratch, 4 );
290
        leftScratch->setSuffix( ein );
291
        leftScratch->setDecimals( decimals );
292
        leftScratch->setMaxValue(1000);
1843 cbradney 293
        leftScratch->setValue(doc->ScratchLeft * unitRatio);
788 fschmid 294
        layout4s->addWidget( leftScratch, 0, 3 );
734 fschmid 295
        Linkss = new QLabel(leftScratch, tr( "&Left:" ), groupScratch, "Links" );
788 fschmid 296
        layout4s->addWidget( Linkss, 0, 2 );
734 fschmid 297
        bottomScratch = new MSpinBox( groupScratch, 4 );
298
        bottomScratch->setSuffix( ein );
299
        bottomScratch->setDecimals( decimals );
300
        bottomScratch->setMaxValue(1000);
1843 cbradney 301
        bottomScratch->setValue(doc->ScratchBottom * unitRatio);
788 fschmid 302
        layout4s->addWidget( bottomScratch, 1, 1 );
734 fschmid 303
        TextLabel7s = new QLabel(bottomScratch, tr( "&Bottom:" ), groupScratch, "TextLabel7" );
788 fschmid 304
        layout4s->addWidget( TextLabel7s, 1, 0 );
734 fschmid 305
        rightScratch = new MSpinBox( groupScratch, 4 );
306
        rightScratch->setSuffix( ein );
307
        rightScratch->setDecimals( decimals );
308
        rightScratch->setMaxValue(1000);
1843 cbradney 309
        rightScratch->setValue(doc->ScratchRight * unitRatio);
788 fschmid 310
        layout4s->addWidget( rightScratch, 1, 3 );
734 fschmid 311
        Rechtss = new QLabel(rightScratch, tr( "&Right:" ), groupScratch, "Rechts" );
788 fschmid 312
        layout4s->addWidget( Rechtss, 1, 2 );
313
        groupScratchLayout->addLayout( layout4s );
734 fschmid 314
        tabViewLayout->addWidget( groupScratch );
2872 fschmid 315
 
316
        groupGap = new QGroupBox( tabView, "GroupBox7" );
317
        groupGap->setTitle( tr( "Gaps between Pages" ) );
318
        groupGap->setColumnLayout(0, Qt::Vertical );
319
        groupGap->layout()->setSpacing( 0 );
320
        groupGap->layout()->setMargin( 0 );
321
        groupGapLayout = new QHBoxLayout( groupGap->layout() );
322
        groupGapLayout->setAlignment( Qt::AlignTop );
323
        groupGapLayout->setSpacing( 0 );
324
        groupGapLayout->setMargin( 10 );
325
        layout4sg = new QGridLayout;
326
        layout4sg->setSpacing( 6 );
327
        layout4sg->setMargin( 0 );
328
        gapHorizontal = new MSpinBox( groupGap, 4 );
329
        gapHorizontal->setSuffix( ein );
330
        gapHorizontal->setDecimals( decimals );
331
        gapHorizontal->setMaxValue(1000);
3032 fschmid 332
        gapHorizontal->setValue(doc->pageSets[doc->currentPageLayout].GapHorizontal * unitRatio);
2872 fschmid 333
        layout4sg->addWidget( gapHorizontal, 0, 1 );
334
        TextLabel5sg = new QLabel(gapHorizontal, tr( "Horizontal:" ), groupGap, "TextLabel5" );
335
        layout4sg->addWidget( TextLabel5sg, 0, 0 );
336
        gapVertical = new MSpinBox( groupGap, 4 );
337
        gapVertical->setSuffix( ein );
338
        gapVertical->setDecimals( decimals );
339
        gapVertical->setMaxValue(1000);
3032 fschmid 340
        gapVertical->setValue(doc->pageSets[doc->currentPageLayout].GapVertical * unitRatio);
2872 fschmid 341
        layout4sg->addWidget( gapVertical, 0, 3 );
342
        TextLabel7sg = new QLabel(gapVertical, tr( "Vertical:" ), groupGap, "Links" );
343
        layout4sg->addWidget( TextLabel7sg, 0, 2 );
344
        groupGapLayout->addLayout( layout4sg );
345
        tabViewLayout->addWidget( groupGap );
715 fschmid 346
        addItem( tr("Display"), loadIcon("screen.png"), tabView);
347
 
2889 cbradney 348
        tabTypo = new TabTypograpy(  prefsWidgets, &doc->typographicSettings);
715 fschmid 349
        addItem( tr("Typography"), loadIcon("font.png"), tabTypo);
350
 
1790 cbradney 351
        tabTools = new TabTools(  prefsWidgets, &doc->toolSettings, einheit, doc);
726 fschmid 352
        addItem( tr("Tools"), loadIcon("tools.png"), tabTools);
353
 
2965 cbradney 354
        tabHyphenator = new HySettings(prefsWidgets, &ScApp->LangTransl);
1065 cbradney 355
        tabHyphenator->verbose->setChecked(!doc->docHyphenator->Automatic);
356
        tabHyphenator->input->setChecked(doc->docHyphenator->AutoCheck);
2965 cbradney 357
        tabHyphenator->language->setCurrentText(ScApp->LangTransl[doc->docHyphenator->Language]);
1065 cbradney 358
        tabHyphenator->wordLen->setValue(doc->docHyphenator->MinWordLen);
359
        tabHyphenator->maxCount->setValue(doc->docHyphenator->HyCount);
795 fschmid 360
        addItem( tr("Hyphenator"), loadIcon("hyphenate.png"), tabHyphenator);
2246 subik 361
 
2965 cbradney 362
        tabFonts = new FontPrefs(  prefsWidgets, PrefsManager::instance()->appPrefs.AvailFonts, true, ScApp->PrefsPfad, doc);
1321 fschmid 363
        addItem( tr("Fonts"), loadIcon("font.png"), tabFonts);
1235 fschmid 364
 
1261 fschmid 365
        tabDocChecker = new TabCheckDoc(  prefsWidgets, doc->checkerProfiles, doc->curCheckProfile);
2770 cbradney 366
        addItem( tr("Preflight Verifier"), loadIcon("checkdoc.png"), tabDocChecker);
2246 subik 367
 
2834 cbradney 368
        tabPDF = new TabPDFOptions( prefsWidgets, &doc->PDF_Options, PrefsManager::instance()->appPrefs.AvailFonts,
2965 cbradney 369
                                                                &ScApp->PDFXProfiles, doc->UsedFonts, doc->PDF_Options.PresentVals,
2142 cbradney 370
                                                                einheit, doc->pageHeight, doc->pageWidth, 0 );
1307 fschmid 371
        addItem( tr("PDF Export"), loadIcon("acroread.png"), tabPDF);
2246 subik 372
 
1641 cbradney 373
        tabDocItemAttributes = new DocumentItemAttributes( prefsWidgets);
1694 cbradney 374
        docAttributesList=tabDocItemAttributes->getDocAttributesNames();
1641 cbradney 375
        tabDocItemAttributes->setup(&doc->docItemAttributes);
376
        addItem( tr("Document Item Attributes"), loadIcon("docattributes.png"), tabDocItemAttributes);
1235 fschmid 377
 
1684 cbradney 378
        tabTOCIndexPrefs = new TOCIndexPrefs( prefsWidgets );
1701 cbradney 379
        tabTOCIndexPrefs->setupItemAttrs( docAttributesList );
380
        tabTOCIndexPrefs->setup(&(currDoc->docToCSetups), currDoc);
1694 cbradney 381
        connect( prefsWidgets, SIGNAL(aboutToShow(QWidget *)), this, SLOT(setTOCIndexData(QWidget *)));
1684 cbradney 382
        addItem( tr("Table of Contents and Indexes"), loadIcon("tabtocindex.png"), tabTOCIndexPrefs);
2246 subik 383
 
800 fschmid 384
        int cmsTab = 0;
795 fschmid 385
        if (CMSavail)
386
        {
2989 fschmid 387
                tabColorManagement = new CMSPrefs(prefsWidgets, &doc->CMSSettings, &ScApp->InputProfiles, &ScApp->InputProfilesCMYK, &ScApp->PrinterProfiles, &ScApp->MonitorProfiles);
800 fschmid 388
                cmsTab = addItem( tr("Color Management"), loadIcon("blend.png"), tabColorManagement);
795 fschmid 389
        }
390
 
3032 fschmid 391
        setDS(doc->currentPageLayout);
2658 fschmid 392
        pageWidth = widthMSpinBox->value() / unitRatio;
393
        pageHeight = heightMSpinBox->value() / unitRatio;
249 Franz 394
        //tooltips
3095 mrdocs 395
        QToolTip::add( checkLink, "<qt>" + tr("Enable or disable the display of linked text frames.") + "</qt>");
2598 cbradney 396
        QToolTip::add( checkControl, "<qt>" + tr("Display non-printing characters such as paragraph markers in text frames") + "</qt>");
2246 subik 397
        QToolTip::add( checkFrame, "<qt>" + tr("Turns the display of frames on or off") + "</qt>");
398
        QToolTip::add( checkPictures, "<qt>" + tr("Turns the display of pictures on or off") + "</qt>");
399
        QToolTip::add( backColor, "<qt>" + tr( "Color for paper" ) + "</qt>" );
400
        QToolTip::add( checkUnprintable, "<qt>" + tr( "Mask the area outside the margins in the margin color" ) + "</qt>" );
2901 fschmid 401
//      QToolTip::add( facingPages, "<qt>" + tr( "Enable single or spread based layout" ) + "</qt>" );
402
//      QToolTip::add( firstPage, "<qt>" + tr( "Make the first page the left page of the document" ) + "</qt>" );
3 paul 403
 
249 Franz 404
        // signals and slots connections
2901 fschmid 405
        connect(docLayout, SIGNAL( selectedLayout(int) ), this, SLOT( setDS(int) ) );
2607 fschmid 406
        connect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
407
        connect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
705 fschmid 408
        connect(backColor, SIGNAL(clicked()), this, SLOT(changePaperColor()));
734 fschmid 409
        connect(unitCombo, SIGNAL(activated(int)), this, SLOT(unitChange()));
1828 fschmid 410
        connect(backToDefaults, SIGNAL(clicked()), this, SLOT(restoreDefaults()));
2607 fschmid 411
        connect(orientationQComboBox, SIGNAL(activated(int)), this, SLOT(setOrien(int)));
2923 fschmid 412
        connect(sizeQComboBox, SIGNAL(activated(const QString &)), this, SLOT(setPageSize()));
731 fschmid 413
 
800 fschmid 414
        if (CMSavail)
1307 fschmid 415
        {
800 fschmid 416
                prefsWidgets->raiseWidget(cmsTab);
1307 fschmid 417
                connect(tabColorManagement, SIGNAL(cmsOn(bool )), this, SLOT(switchCMS(bool )));
418
        }
800 fschmid 419
        arrangeIcons();
693 fschmid 420
        resize( minimumSizeHint() );
421
        clearWState( WState_Polished );
1834 fschmid 422
        prefsSelection->setSelected(prefsSelection->firstItem(), true);
423
        itemSelected(prefsSelection->firstItem());
3 paul 424
}
425
 
1828 fschmid 426
void ReformDoc::restoreDefaults()
427
{
428
        QWidget* current = prefsWidgets->visibleWidget();
429
        if (current == tabPage)
430
        {
2965 cbradney 431
                unitCombo->setCurrentItem(currDoc->unitIndex());
1828 fschmid 432
                unitChange();
433
                autoSaveTime->setValue(currDoc->AutoSaveTime / 1000 / 60);
434
                groupAutoSave->setChecked( currDoc->AutoSave );
435
                pageNumber->setValue(currDoc->FirstPnum);
3032 fschmid 436
                docLayout->selectItem(currDoc->currentPageLayout);
437
                setDS(currDoc->currentPageLayout);
438
                docLayout->firstPage->setCurrentItem(currDoc->pageSets[currDoc->currentPageLayout].FirstPage);
2769 fschmid 439
                GroupRand->rightR->setValue(currDoc->pageMargins.Right * unitRatio);
440
                GroupRand->bottomR->setValue(currDoc->pageMargins.Bottom * unitRatio);
441
                GroupRand->leftR->setValue(currDoc->pageMargins.Left * unitRatio);
442
                GroupRand->topR->setValue(currDoc->pageMargins.Top * unitRatio);
443
                GroupRand->RandR = GroupRand->rightR->value() / unitRatio;
444
                GroupRand->RandL = GroupRand->leftR->value() / unitRatio;
445
                GroupRand->RandB = GroupRand->bottomR->value() / unitRatio;
446
                GroupRand->RandT = GroupRand->topR->value() / unitRatio;
1828 fschmid 447
        }
448
        else if (current == tabView)
449
        {
450
                QPixmap pm = QPixmap(54, 14);
451
                pm.fill(currDoc->papColor);
452
                colorPaper = currDoc->papColor;
453
                backColor->setPixmap(pm);
454
                checkUnprintable->setChecked( currDoc->marginColored );
455
                checkPictures->setChecked(currDoc->guidesSettings.showPic);
456
                checkLink->setChecked(currDoc->guidesSettings.linkShown);
457
                checkFrame->setChecked(currDoc->guidesSettings.framesShown);
2863 fschmid 458
                checkRuler->setChecked(currDoc->guidesSettings.rulerMode);
1828 fschmid 459
                topScratch->setValue(currDoc->ScratchTop * unitRatio);
460
                leftScratch->setValue(currDoc->ScratchLeft * unitRatio);
461
                bottomScratch->setValue(currDoc->ScratchBottom * unitRatio);
462
                rightScratch->setValue(currDoc->ScratchRight * unitRatio);
3032 fschmid 463
                gapHorizontal->setValue(currDoc->pageSets[currDoc->currentPageLayout].GapHorizontal * unitRatio);
464
                gapVertical->setValue(currDoc->pageSets[currDoc->currentPageLayout].GapVertical * unitRatio);
1828 fschmid 465
        }
466
        else if (current == tabHyphenator)
467
        {
468
                tabHyphenator->verbose->setChecked(!currDoc->docHyphenator->Automatic);
469
                tabHyphenator->input->setChecked(currDoc->docHyphenator->AutoCheck);
2965 cbradney 470
                tabHyphenator->language->setCurrentText(ScApp->LangTransl[currDoc->docHyphenator->Language]);
1828 fschmid 471
                tabHyphenator->wordLen->setValue(currDoc->docHyphenator->MinWordLen);
472
                tabHyphenator->maxCount->setValue(currDoc->docHyphenator->HyCount);
473
        }
474
        else if (current == tabGuides)
2889 cbradney 475
                tabGuides->restoreDefaults(&currDoc->guidesSettings, &currDoc->typographicSettings, einheit);
1828 fschmid 476
        else if (current == tabTypo)
2889 cbradney 477
                tabTypo->restoreDefaults(&currDoc->typographicSettings);
1828 fschmid 478
        else if (current == tabTools)
479
                tabTools->restoreDefaults();
480
        else if (current == tabFonts)
481
                tabFonts->restoreDefaults();
482
        else if (current == tabDocChecker)
483
                tabDocChecker->restoreDefaults();
484
        else if (current == tabPDF)
485
                tabPDF->restoreDefaults();
486
        else if (current == tabColorManagement)
487
                tabColorManagement->restoreDefaults();
2246 subik 488
        else if (current == docInfos)
489
                docInfos->restoreDefaults();
1828 fschmid 490
}
491
 
734 fschmid 492
void ReformDoc::unitChange()
493
{
2607 fschmid 494
        disconnect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
495
        disconnect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
734 fschmid 496
        int decimalsOld;
1790 cbradney 497
        double oldUnitRatio = unitRatio;
734 fschmid 498
        double oldMin, oldMax, val;
499
        QString einh;
500
        einheit = unitCombo->currentItem();
1790 cbradney 501
        unitRatio=unitGetRatioFromIndex(einheit);
1525 cbradney 502
        decimals=unitGetDecimalsFromIndex(einheit);
503
        einh=unitGetSuffixFromIndex(einheit);
781 cbradney 504
 
782 fschmid 505
        widthMSpinBox->setSuffix(einh);
506
        heightMSpinBox->setSuffix(einh);
879 fschmid 507
        tabGuides->minorSpace->setSuffix(einh);
508
        tabGuides->majorSpace->setSuffix(einh);
509
        tabGuides->snapDistance->setSuffix(einh);
1195 fschmid 510
        tabGuides->baseGrid->setSuffix(einh);
511
        tabGuides->baseOffset->setSuffix(einh);
1194 fschmid 512
        tabTools->gapText->setSuffix(einh);
782 fschmid 513
        topScratch->setSuffix(einh);
514
        bottomScratch->setSuffix(einh);
515
        leftScratch->setSuffix(einh);
516
        rightScratch->setSuffix(einh);
2872 fschmid 517
        gapVertical->setSuffix( einh );
518
        gapHorizontal->setSuffix( einh );
1307 fschmid 519
        tabPDF->BleedBottom->setSuffix(einh);
520
        tabPDF->BleedTop->setSuffix(einh);
521
        tabPDF->BleedRight->setSuffix(einh);
522
        tabPDF->BleedLeft->setSuffix(einh);
781 cbradney 523
 
1790 cbradney 524
        double invUnitConversion = 1.0 / oldUnitRatio * unitRatio;
781 cbradney 525
 
734 fschmid 526
        widthMSpinBox->getValues(&oldMin, &oldMax, &decimalsOld, &val);
2142 cbradney 527
        widthMSpinBox->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, currDoc->pageWidth * unitRatio);
734 fschmid 528
        heightMSpinBox->getValues(&oldMin, &oldMax, &decimalsOld, &val);
2142 cbradney 529
        heightMSpinBox->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, currDoc->pageHeight * unitRatio);
879 fschmid 530
        tabGuides->minorSpace->getValues(&oldMin, &oldMax, &decimalsOld, &val);
531
        tabGuides->minorSpace->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
532
        tabGuides->majorSpace->getValues(&oldMin, &oldMax, &decimalsOld, &val);
533
        tabGuides->majorSpace->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
534
        tabGuides->snapDistance->getValues(&oldMin, &oldMax, &decimalsOld, &val);
535
        tabGuides->snapDistance->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
1195 fschmid 536
        tabGuides->baseGrid->getValues(&oldMin, &oldMax, &decimalsOld, &val);
537
        tabGuides->baseGrid->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
538
        tabGuides->baseOffset->getValues(&oldMin, &oldMax, &decimalsOld, &val);
539
        tabGuides->baseOffset->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
1194 fschmid 540
        tabTools->gapText->getValues(&oldMin, &oldMax, &decimalsOld, &val);
541
        tabTools->gapText->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
2285 fschmid 542
        tabTools->gapTab->getValues(&oldMin, &oldMax, &decimalsOld, &val);
543
        tabTools->gapTab->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
734 fschmid 544
        topScratch->getValues(&oldMin, &oldMax, &decimalsOld, &val);
781 cbradney 545
        topScratch->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
734 fschmid 546
        bottomScratch->getValues(&oldMin, &oldMax, &decimalsOld, &val);
781 cbradney 547
        bottomScratch->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
734 fschmid 548
        leftScratch->getValues(&oldMin, &oldMax, &decimalsOld, &val);
781 cbradney 549
        leftScratch->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
734 fschmid 550
        rightScratch->getValues(&oldMin, &oldMax, &decimalsOld, &val);
781 cbradney 551
        rightScratch->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
2872 fschmid 552
        gapVertical->getValues(&oldMin, &oldMax, &decimalsOld, &val);
553
        gapVertical->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
554
        gapHorizontal->getValues(&oldMin, &oldMax, &decimalsOld, &val);
555
        gapHorizontal->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
1307 fschmid 556
        tabPDF->BleedBottom->getValues(&oldMin, &oldMax, &decimalsOld, &val);
557
        tabPDF->BleedBottom->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
558
        tabPDF->BleedTop->getValues(&oldMin, &oldMax, &decimalsOld, &val);
559
        tabPDF->BleedTop->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
560
        tabPDF->BleedRight->getValues(&oldMin, &oldMax, &decimalsOld, &val);
561
        tabPDF->BleedRight->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
562
        tabPDF->BleedLeft->getValues(&oldMin, &oldMax, &decimalsOld, &val);
563
        tabPDF->BleedLeft->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
1790 cbradney 564
        tabPDF->unitRatio = unitRatio;
2607 fschmid 565
        pageWidth = widthMSpinBox->value() / unitRatio;
566
        pageHeight = heightMSpinBox->value() / unitRatio;
2769 fschmid 567
        GroupRand->unitChange(unitRatio, decimals, einh);
568
        GroupRand->setPageHeight(pageHeight);
569
        GroupRand->setPageWidth(pageWidth);
2607 fschmid 570
        connect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
571
        connect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
734 fschmid 572
}
573
 
705 fschmid 574
void ReformDoc::changePaperColor()
575
{
576
        QColor neu = QColor();
577
        neu = QColorDialog::getColor(colorPaper, this);
578
        if (neu.isValid())
579
        {
580
                QPixmap pm = QPixmap(54, 14);
581
                pm.fill(neu);
582
                colorPaper = neu;
583
                backColor->setPixmap(pm);
584
        }
585
}
586
 
2901 fschmid 587
void ReformDoc::setDS(int layout)
3 paul 588
{
2901 fschmid 589
        GroupRand->setFacingPages(!(layout == singlePage));
590
        choosenLayout = layout;
3016 fschmid 591
        docLayout->firstPage->setCurrentItem(currDoc->pageSets[choosenLayout].FirstPage);
592
        gapHorizontal->setValue(currDoc->pageSets[choosenLayout].GapHorizontal * unitRatio);
593
        gapVertical->setValue(currDoc->pageSets[choosenLayout].GapVertical * unitRatio);
348 Franz 594
}
1307 fschmid 595
 
2607 fschmid 596
void ReformDoc::setPageWidth(int)
597
{
598
        pageWidth = widthMSpinBox->value() / unitRatio;
2769 fschmid 599
        GroupRand->setPageWidth(pageWidth);
2607 fschmid 600
}
601
 
602
void ReformDoc::setPageHeight(int)
603
{
604
        pageHeight = heightMSpinBox->value() / unitRatio;
2769 fschmid 605
        GroupRand->setPageHeight(pageHeight);
2607 fschmid 606
}
607
 
2923 fschmid 608
void ReformDoc::setPageSize()
609
{
610
        setOrien(orientationQComboBox->currentItem());
611
}
612
 
2607 fschmid 613
void ReformDoc::setSize(const QString & gr)
614
{
615
        pageWidth = widthMSpinBox->value() / unitRatio;
616
        pageHeight = heightMSpinBox->value() / unitRatio;
617
        widthMSpinBox->setEnabled(false);
618
        heightMSpinBox->setEnabled(false);
619
        PageSize *ps2=new PageSize(gr);
620
        prefsPageSizeName=ps2->getPageName();
621
        if (gr == tr("Custom"))
622
        {
623
                widthMSpinBox->setEnabled(true);
624
                heightMSpinBox->setEnabled(true);
625
        }
626
        else
627
        {
628
                pageWidth = ps2->getPageWidth();
629
                pageHeight = ps2->getPageHeight();
630
        }
631
        disconnect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
632
        disconnect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
633
        widthMSpinBox->setValue(pageWidth * unitRatio);
634
        heightMSpinBox->setValue(pageHeight * unitRatio);
2769 fschmid 635
        GroupRand->setPageHeight(pageHeight);
636
        GroupRand->setPageWidth(pageWidth);
2607 fschmid 637
        connect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
638
        connect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
639
        delete ps2;
640
}
641
 
642
void ReformDoc::setOrien(int ori)
643
{
644
        double br;
645
        setSize(sizeQComboBox->currentText());
646
        disconnect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
647
        disconnect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
648
        if (ori == 0)
649
        {
650
                if (sizeQComboBox->currentText() == tr("Custom"))
651
                {
652
                        br = widthMSpinBox->value();
653
                        widthMSpinBox->setValue(heightMSpinBox->value());
654
                        heightMSpinBox->setValue(br);
655
                }
656
        }
657
        else
658
        {
659
                br = widthMSpinBox->value();
660
                widthMSpinBox->setValue(heightMSpinBox->value());
661
                heightMSpinBox->setValue(br);
662
        }
663
        pageWidth = widthMSpinBox->value() / unitRatio;
664
        pageHeight = heightMSpinBox->value() / unitRatio;
665
        connect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
666
        connect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
667
}
668
 
1307 fschmid 669
void ReformDoc::switchCMS(bool enable)
670
{
671
        tabPDF->enableCMS(enable);
672
}
1694 cbradney 673
 
674
void ReformDoc::setTOCIndexData(QWidget *widgetToShow)
675
{
2246 subik 676
        //Update the attributes list in TOC setup
1694 cbradney 677
        if (widgetToShow==tabTOCIndexPrefs)
678
                tabTOCIndexPrefs->setupItemAttrs( tabDocItemAttributes->getDocAttributesNames() );
679
}
2965 cbradney 680
 
681
const int ReformDoc::getSelectedUnit()
682
{
683
        return unitCombo->currentItem();
684
}
685
 
686
const bool ReformDoc::colorManagementSettingsChanged()
687
{
688
        return tabColorManagement->changed;
689
}
690
 
691
const bool ReformDoc::imageResolutionChanged()
692
{
693
        return viewToRecalcPictureRes;
694
}
695
 
696
void ReformDoc::updateDocumentSettings()
697
{
698
        double tpr2, lr2, rr2, br2;
699
        tpr2 = GroupRand->RandT;
700
        br2 = GroupRand->RandB;
701
        lr2 = GroupRand->RandL;
702
        rr2 = GroupRand->RandR;
703
        int fp = choosenLayout;
3016 fschmid 704
        currDoc->pageSets[fp].FirstPage = docLayout->firstPage->currentItem();
705
        currDoc->pageSets[fp].GapHorizontal = gapHorizontal->value() / currDoc->unitRatio();
706
        currDoc->pageSets[fp].GapVertical = gapVertical->value() / currDoc->unitRatio();
2965 cbradney 707
        currDoc->FirstPnum = pageNumber->value();
708
        currDoc->resetPage(tpr2, lr2, rr2, br2, fp);
709
        currDoc->PageOri = orientationQComboBox->currentItem();
710
        currDoc->PageSize = prefsPageSizeName;
711
        currDoc->pageWidth = pageWidth;
712
        currDoc->pageHeight = pageHeight;
713
        for (uint p = 0; p < currDoc->Pages.count(); ++p)
714
        {
715
                Page *pp = currDoc->Pages.at(p);
716
                if (sizeAllPages->isChecked())
717
                {
718
                        pp->initialWidth = currDoc->pageWidth;
719
                        pp->initialHeight = currDoc->pageHeight;
720
                }
721
                if (marginsForAllPages->isChecked())
722
                {
723
                        pp->initialMargins.Left = lr2;
724
                        pp->initialMargins.Right = rr2;
725
                        pp->initialMargins.Top = tpr2;
726
                        pp->initialMargins.Bottom = br2;
727
                }
728
        }
729
        for (uint p = 0; p < currDoc->MasterPages.count(); ++p)
730
        {
731
                Page *pp = currDoc->MasterPages.at(p);
732
                if (sizeAllPages->isChecked())
733
                {
734
                        pp->initialWidth = currDoc->pageWidth;
735
                        pp->initialHeight = currDoc->pageHeight;
736
                }
737
                if (marginsForAllPages->isChecked())
738
                {
739
                        pp->initialMargins.Left = lr2;
740
                        pp->initialMargins.Right = rr2;
741
                        pp->initialMargins.Top = tpr2;
742
                        pp->initialMargins.Bottom = br2;
743
                }
744
        }
745
        currDoc->guidesSettings.before = tabGuides->inBackground->isChecked();
746
        currDoc->marginColored = checkUnprintable->isChecked();
747
        currDoc->papColor = colorPaper;
748
        currDoc->guidesSettings.marginsShown = tabGuides->marginBox->isChecked();
749
        currDoc->guidesSettings.framesShown = checkFrame->isChecked();
750
        currDoc->guidesSettings.gridShown = tabGuides->checkGrid->isChecked();
751
        currDoc->guidesSettings.guidesShown = tabGuides->guideBox->isChecked();
752
        currDoc->guidesSettings.baseShown = tabGuides->baselineBox->isChecked();
753
        currDoc->guidesSettings.showPic = checkPictures->isChecked();
754
        currDoc->guidesSettings.linkShown = checkLink->isChecked();
755
        currDoc->guidesSettings.showControls = checkControl->isChecked();
756
        currDoc->guidesSettings.rulerMode = checkRuler->isChecked();
757
        currDoc->guidesSettings.grabRad = tabGuides->grabDistance->value();
758
        currDoc->guidesSettings.guideRad = tabGuides->snapDistance->value() / currDoc->unitRatio();
759
        currDoc->guidesSettings.minorGrid = tabGuides->minorSpace->value() / currDoc->unitRatio();
760
        currDoc->guidesSettings.majorGrid = tabGuides->majorSpace->value() / currDoc->unitRatio();
761
        currDoc->guidesSettings.minorColor = tabGuides->colorMinorGrid;
762
        currDoc->guidesSettings.majorColor = tabGuides->colorMajorGrid;
763
        currDoc->guidesSettings.margColor = tabGuides->colorMargin;
764
        currDoc->guidesSettings.guideColor = tabGuides->colorGuides;
765
        currDoc->guidesSettings.baseColor = tabGuides->colorBaselineGrid;
766
        currDoc->checkerProfiles = tabDocChecker->checkerProfile;
767
        currDoc->curCheckProfile = tabDocChecker->curCheckProfile->currentText();
768
        currDoc->typographicSettings.valueSuperScript = tabTypo->superDisplacement->value();
769
        currDoc->typographicSettings.scalingSuperScript = tabTypo->superScaling->value();
770
        currDoc->typographicSettings.valueSubScript = tabTypo->subDisplacement->value();
771
        currDoc->typographicSettings.scalingSubScript = tabTypo->subScaling->value();
772
        currDoc->typographicSettings.valueSmallCaps = tabTypo->capsScaling->value();
773
        currDoc->typographicSettings.autoLineSpacing = tabTypo->autoLine->value();
774
        currDoc->typographicSettings.valueBaseGrid = tabGuides->baseGrid->value() / currDoc->unitRatio();
775
        currDoc->typographicSettings.offsetBaseGrid = tabGuides->baseOffset->value() / currDoc->unitRatio();
776
        currDoc->typographicSettings.valueUnderlinePos = qRound(tabTypo->underlinePos->value() * 10);
777
        currDoc->typographicSettings.valueUnderlineWidth = qRound(tabTypo->underlineWidth->value() * 10);
778
        currDoc->typographicSettings.valueStrikeThruPos = qRound(tabTypo->strikethruPos->value() * 10);
779
        currDoc->typographicSettings.valueStrikeThruWidth = qRound(tabTypo->strikethruWidth->value() * 10);
780
        currDoc->toolSettings.defFont = tabTools->fontComboText->currentText();
781
        currDoc->toolSettings.defSize = tabTools->sizeComboText->currentText().left(2).toInt() * 10;
782
        currDoc->toolSettings.dStrokeText = tabTools->colorComboStrokeText->currentText();
783
        switch (tabTools->tabFillCombo->currentItem())
784
        {
785
                case 0:
786
                        currDoc->toolSettings.tabFillChar = "";
787
                        break;
788
                case 1:
789
                        currDoc->toolSettings.tabFillChar = ".";
790
                        break;
791
                case 2:
792
                        currDoc->toolSettings.tabFillChar = "-";
793
                        break;
794
                case 3:
795
                        currDoc->toolSettings.tabFillChar = "_";
796
                        break;
797
                case 4:
798
                        currDoc->toolSettings.tabFillChar = tabTools->tabFillCombo->currentText().right(1);
799
                        break;
800
        }
2995 fschmid 801
        // TODO fix these tr("None") things
2965 cbradney 802
        if (currDoc->toolSettings.dStrokeText == tr("None"))
803
                currDoc->toolSettings.dStrokeText = "None";
804
        currDoc->toolSettings.dPenText = tabTools->colorComboText->currentText();
805
        if (currDoc->toolSettings.dPenText == tr("None"))
806
                currDoc->toolSettings.dPenText = "None";
3093 fschmid 807
        currDoc->toolSettings.dTextBackGround = tabTools->colorComboTextBackground->currentText();
808
        if (currDoc->toolSettings.dTextBackGround == tr("None"))
809
                currDoc->toolSettings.dTextBackGround = "None";
810
        currDoc->toolSettings.dTextLineColor = tabTools->colorComboTextLine->currentText();
811
        if (currDoc->toolSettings.dTextLineColor == tr("None"))
812
                currDoc->toolSettings.dTextLineColor = "None";
813
        currDoc->toolSettings.dTextBackGroundShade = tabTools->shadingTextBack->value();
814
        currDoc->toolSettings.dTextLineShade = tabTools->shadingTextLine->value();
815
        currDoc->toolSettings.dTextPenShade = tabTools->shadingText->value();
816
        currDoc->toolSettings.dTextStrokeShade = tabTools->shadingTextStroke->value();
2965 cbradney 817
        currDoc->toolSettings.dCols = tabTools->columnsText->value();
818
        currDoc->toolSettings.dGap = tabTools->gapText->value() / currDoc->unitRatio();
819
        currDoc->toolSettings.dTabWidth = tabTools->gapTab->value() / currDoc->unitRatio();
820
        currDoc->toolSettings.dPen = tabTools->colorComboLineShape->currentText();
821
        if (currDoc->toolSettings.dPen == tr("None"))
822
                currDoc->toolSettings.dPen = "None";
823
        currDoc->toolSettings.dBrush = tabTools->comboFillShape->currentText();
824
        if (currDoc->toolSettings.dBrush == tr("None"))
825
                currDoc->toolSettings.dBrush = "None";
826
        currDoc->toolSettings.dShade = tabTools->shadingFillShape->value();
827
        currDoc->toolSettings.dShade2 = tabTools->shadingLineShape->value();
828
        switch (tabTools->comboStyleShape->currentItem())
829
        {
830
        case 0:
831
                currDoc->toolSettings.dLineArt = SolidLine;
832
                break;
833
        case 1:
834
                currDoc->toolSettings.dLineArt = DashLine;
835
                break;
836
        case 2:
837
                currDoc->toolSettings.dLineArt = DotLine;
838
                break;
839
        case 3:
840
                currDoc->toolSettings.dLineArt = DashDotLine;
841
                break;
842
        case 4:
843
                currDoc->toolSettings.dLineArt = DashDotDotLine;
844
                break;
845
        }
846
        currDoc->toolSettings.dWidth = tabTools->lineWidthShape->value();
847
        currDoc->toolSettings.dStartArrow = tabTools->startArrow->currentItem();
848
        currDoc->toolSettings.dEndArrow = tabTools->endArrow->currentItem();
849
        currDoc->toolSettings.magMin = tabTools->minimumZoom->value();
850
        currDoc->toolSettings.magMax = tabTools->maximumZoom->value();
851
        currDoc->toolSettings.magStep = tabTools->zoomStep->value();
852
        currDoc->toolSettings.dPenLine = tabTools->colorComboLine->currentText();
853
        if (currDoc->toolSettings.dPenLine == tr("None"))
854
                currDoc->toolSettings.dPenLine = "None";
855
        currDoc->toolSettings.dShadeLine = tabTools->shadingLine->value();
856
        switch (tabTools->comboStyleLine->currentItem())
857
        {
858
        case 0:
859
                currDoc->toolSettings.dLstyleLine = SolidLine;
860
                break;
861
        case 1:
862
                currDoc->toolSettings.dLstyleLine = DashLine;
863
                break;
864
        case 2:
865
                currDoc->toolSettings.dLstyleLine = DotLine;
866
                break;
867
        case 3:
868
                currDoc->toolSettings.dLstyleLine = DashDotLine;
869
                break;
870
        case 4:
871
                currDoc->toolSettings.dLstyleLine = DashDotDotLine;
872
                break;
873
        }
874
        currDoc->toolSettings.dWidthLine = tabTools->lineWidthLine->value();
875
        currDoc->toolSettings.dBrushPict = tabTools->comboFillImage->currentText();
876
        if (currDoc->toolSettings.dBrushPict == tr("None"))
877
                currDoc->toolSettings.dBrushPict = "None";
878
        currDoc->toolSettings.shadePict = tabTools->shadingFillImage->value();
879
        currDoc->toolSettings.scaleX = static_cast<double>(tabTools->scalingHorizontal->value()) / 100.0;
880
        currDoc->toolSettings.scaleY = static_cast<double>(tabTools->scalingVertical->value()) / 100.0;
881
        currDoc->toolSettings.scaleType = tabTools->buttonGroup3->isChecked();
882
        currDoc->toolSettings.aspectRatio = tabTools->checkRatioImage->isChecked();
883
        currDoc->toolSettings.useEmbeddedPath = tabTools->embeddedPath->isChecked();
884
        int haRes = 0;
885
        if (tabTools->checkFullRes->isChecked())
886
                haRes = 0;
887
        if (tabTools->checkNormalRes->isChecked())
888
                haRes = 1;
889
        if (tabTools->checkHalfRes->isChecked())
890
                haRes = 2;
891
        if (currDoc->toolSettings.lowResType != haRes)
892
        {
893
                currDoc->toolSettings.lowResType = haRes;
894
                viewToRecalcPictureRes=true;
895
        }
896
        else
897
                viewToRecalcPictureRes=false;
898
        tabTools->polyWidget->getValues(&currDoc->toolSettings.polyC, &currDoc->toolSettings.polyFd, &currDoc->toolSettings.polyF, &currDoc->toolSettings.polyS, &currDoc->toolSettings.polyR);
899
        currDoc->ScratchBottom = bottomScratch->value() / currDoc->unitRatio();
900
        currDoc->ScratchLeft = leftScratch->value() / currDoc->unitRatio();
901
        currDoc->ScratchRight = rightScratch->value() / currDoc->unitRatio();
902
        currDoc->ScratchTop = topScratch->value() / currDoc->unitRatio();
903
        currDoc->AutoSave = groupAutoSave->isChecked();
904
        currDoc->AutoSaveTime = autoSaveTime->value() * 60 * 1000;
905
        if (currDoc->AutoSave)
906
        {
907
                currDoc->autoSaveTimer->stop();
908
                currDoc->autoSaveTimer->start(currDoc->AutoSaveTime);
909
        }
910
        currDoc->docHyphenator->slotNewDict(tabHyphenator->language->currentText());
911
        currDoc->docHyphenator->slotNewSettings(tabHyphenator->wordLen->value(),
912
                                                                                                                                !tabHyphenator->verbose->isChecked(),
913
                                                                                                                                tabHyphenator->input->isChecked(),
914
                                                                                                                                tabHyphenator->maxCount->value());
915
        if (CMSavail)
916
        {
3051 fschmid 917
                bool oldCM = currDoc->CMSSettings.CMSinUse;
2965 cbradney 918
                tabColorManagement->setValues();
919
                if (tabColorManagement->changed)
920
                {
921
                        ScApp->mainWindowStatusLabel->setText( tr("Adjusting Colors"));
922
                        ScApp->mainWindowProgressBar->reset();
923
                        int cc = currDoc->PageColors.count() + ScApp->view->CountElements();
924
                        ScApp->mainWindowProgressBar->setTotalSteps(cc);
925
#ifdef HAVE_CMS
926
                        currDoc->HasCMS = currDoc->CMSSettings.CMSinUse;
927
                        currDoc->SoftProofing = currDoc->CMSSettings.SoftProofOn;
928
                        currDoc->Gamut = currDoc->CMSSettings.GamutCheck;
929
                        currDoc->IntentPrinter = currDoc->CMSSettings.DefaultIntentPrinter;
930
                        currDoc->IntentMonitor = currDoc->CMSSettings.DefaultIntentMonitor;
931
                        CMSuse = currDoc->CMSSettings.CMSinUse;
932
                        SoftProofing = currDoc->CMSSettings.SoftProofOn;
933
                        Gamut = currDoc->CMSSettings.GamutCheck;
934
                        BlackPoint = currDoc->CMSSettings.BlackPoint;
935
                        IntentPrinter = currDoc->CMSSettings.DefaultIntentPrinter;
936
                        IntentMonitor = currDoc->CMSSettings.DefaultIntentMonitor;
937
                        qApp->setOverrideCursor(QCursor(waitCursor), true);
3051 fschmid 938
                        bool newCM = currDoc->CMSSettings.CMSinUse;
939
                        currDoc->CMSSettings.CMSinUse = oldCM;
2965 cbradney 940
                        currDoc->CloseCMSProfiles();
3051 fschmid 941
                        currDoc->CMSSettings.CMSinUse = newCM;
2965 cbradney 942
                        currDoc->OpenCMSProfiles(ScApp->InputProfiles, ScApp->MonitorProfiles, ScApp->PrinterProfiles);
943
                        stdProofG = currDoc->stdProof;
944
                        stdTransG = currDoc->stdTrans;
945
                        stdProofImgG = currDoc->stdProofImg;
946
                        stdTransImgG = currDoc->stdTransImg;
947
                        stdProofCMYKG = currDoc->stdProofCMYK;
948
                        stdTransCMYKG = currDoc->stdTransCMYK;
3046 fschmid 949
                        stdProofGCG = currDoc->stdProofGC;
950
                        stdProofCMYKGCG = currDoc->stdProofCMYKGC;
2965 cbradney 951
                        stdTransRGBG = currDoc->stdTransRGB;
952
                        CMSoutputProf = currDoc->DocOutputProf;
953
                        CMSprinterProf = currDoc->DocPrinterProf;
954
                        if (static_cast<int>(cmsGetColorSpace(currDoc->DocInputProf)) == icSigRgbData)
955
                                currDoc->CMSSettings.ComponentsInput2 = 3;
956
                        if (static_cast<int>(cmsGetColorSpace(currDoc->DocInputProf)) == icSigCmykData)
957
                                currDoc->CMSSettings.ComponentsInput2 = 4;
958
                        if (static_cast<int>(cmsGetColorSpace(currDoc->DocInputProf)) == icSigCmyData)
959
                                currDoc->CMSSettings.ComponentsInput2 = 3;
960
                        if (static_cast<int>(cmsGetColorSpace(currDoc->DocPrinterProf)) == icSigRgbData)
961
                                currDoc->CMSSettings.ComponentsPrinter = 3;
962
                        if (static_cast<int>(cmsGetColorSpace(currDoc->DocPrinterProf)) == icSigCmykData)
963
                                currDoc->CMSSettings.ComponentsPrinter = 4;
964
                        if (static_cast<int>(cmsGetColorSpace(currDoc->DocPrinterProf)) == icSigCmyData)
965
                                currDoc->CMSSettings.ComponentsPrinter = 3;
966
                        currDoc->PDF_Options.SComp = currDoc->CMSSettings.ComponentsInput2;
2984 fschmid 967
                        currDoc->PDF_Options.SolidProf = currDoc->CMSSettings.DefaultSolidColorProfile;
968
                        currDoc->PDF_Options.ImageProf = currDoc->CMSSettings.DefaultImageRGBProfile;
2965 cbradney 969
                        currDoc->PDF_Options.PrintProf = currDoc->CMSSettings.DefaultPrinterProfile;
970
                        currDoc->PDF_Options.Intent = currDoc->CMSSettings.DefaultIntentMonitor;
971
                        ScApp->RecalcColors(ScApp->mainWindowProgressBar);
972
                        ScApp->view->RecalcPictures(&ScApp->InputProfiles, ScApp->mainWindowProgressBar);
973
#endif
974
                        ScApp->mainWindowProgressBar->setProgress(cc);
975
                        qApp->setOverrideCursor(QCursor(arrowCursor), true);
976
                        ScApp->mainWindowStatusLabel->setText("");
977
                        ScApp->mainWindowProgressBar->reset();
978
                }
979
        }
980
        PrefsManager* prefsManager=PrefsManager::instance();
981
        SCFontsIterator it(prefsManager->appPrefs.AvailFonts);
982
        for ( ; it.current() ; ++it)
983
        {
984
                it.current()->EmbedPS = tabFonts->fontFlags[it.currentKey()].FlagPS;
985
                it.current()->UseFont = tabFonts->fontFlags[it.currentKey()].FlagUse;
986
                it.current()->Subset = tabFonts->fontFlags[it.currentKey()].FlagSub;
987
        }
988
        uint a = 0;
989
        prefsManager->appPrefs.GFontSub.clear();
990
        QMap<QString,QString>::Iterator itfsu;
991
        QMap<QString,QString>::Iterator itfsuend=tabFonts->RList.end();
992
        for (itfsu = tabFonts->RList.begin(); itfsu != itfsuend; ++itfsu)
993
                prefsManager->appPrefs.GFontSub[itfsu.key()] = tabFonts->FlagsRepl.at(a++)->currentText();
994
        QStringList uf = currDoc->UsedFonts.keys();
995
        QMap<QString,QFont>::Iterator it3;
996
        for (it3 = currDoc->UsedFonts.begin(); it3 != currDoc->UsedFonts.end(); ++it3)
997
                FT_Done_Face(currDoc->FFonts[it3.key()]);
998
        currDoc->UsedFonts.clear();
999
        QStringList::Iterator it3a;
1000
        QStringList::Iterator it3aend=uf.end();
1001
        for (it3a = uf.begin(); it3a != it3aend; ++it3a)
1002
                currDoc->AddFont((*it3a), prefsManager->appPrefs.AvailFonts[(*it3a)]->Font);
1003
 
1004
        currDoc->PDF_Options.Thumbnails = tabPDF->CheckBox1->isChecked();
1005
        currDoc->PDF_Options.Compress = tabPDF->Compression->isChecked();
1006
        currDoc->PDF_Options.CompressMethod = tabPDF->CMethod->currentItem();
1007
        currDoc->PDF_Options.Quality = tabPDF->CQuality->currentItem();
1008
        currDoc->PDF_Options.Resolution = tabPDF->Resolution->value();
1009
        currDoc->PDF_Options.RecalcPic = tabPDF->DSColor->isChecked();
1010
        currDoc->PDF_Options.PicRes = tabPDF->ValC->value();
1011
        currDoc->PDF_Options.Bookmarks = tabPDF->CheckBM->isChecked();
1012
        currDoc->PDF_Options.Binding = tabPDF->ComboBind->currentItem();
1013
        currDoc->PDF_Options.MirrorH = tabPDF->MirrorH->isOn();
1014
        currDoc->PDF_Options.MirrorV = tabPDF->MirrorV->isOn();
1015
        currDoc->PDF_Options.RotateDeg = tabPDF->RotateDeg->currentItem() * 90;
1016
        currDoc->PDF_Options.Articles = tabPDF->Article->isChecked();
1017
        currDoc->PDF_Options.Encrypt = tabPDF->Encry->isChecked();
1018
        currDoc->PDF_Options.UseLPI = tabPDF->UseLPI->isChecked();
1019
        currDoc->PDF_Options.useLayers = tabPDF->useLayers->isChecked();
3079 fschmid 1020
        currDoc->PDF_Options.UseSpotColors = !tabPDF->useSpot->isChecked();
1021
        currDoc->PDF_Options.doMultiFile = false;
2965 cbradney 1022
        currDoc->PDF_Options.BleedBottom = tabPDF->BleedBottom->value() / currDoc->unitRatio();
1023
        currDoc->PDF_Options.BleedTop = tabPDF->BleedTop->value() / currDoc->unitRatio();
1024
        currDoc->PDF_Options.BleedLeft = tabPDF->BleedLeft->value() / currDoc->unitRatio();
1025
        currDoc->PDF_Options.BleedRight = tabPDF->BleedRight->value() / currDoc->unitRatio();
1026
        if (tabPDF->Encry->isChecked())
1027
        {
1028
                int Perm = -64;
1029
                if (tabPDF->PDFVersionCombo->currentItem() == 1)
1030
                        Perm &= ~0x00240000;
1031
                if (tabPDF->PrintSec->isChecked())
1032
                        Perm += 4;
1033
                if (tabPDF->ModifySec->isChecked())
1034
                        Perm += 8;
1035
                if (tabPDF->CopySec->isChecked())
1036
                        Perm += 16;
1037
                if (tabPDF->AddSec->isChecked())
1038
                        Perm += 32;
1039
                currDoc->PDF_Options.Permissions = Perm;
1040
                currDoc->PDF_Options.PassOwner = tabPDF->PassOwner->text();
1041
                currDoc->PDF_Options.PassUser = tabPDF->PassUser->text();
1042
        }
1043
        if (tabPDF->PDFVersionCombo->currentItem() == 0)
1044
                currDoc->PDF_Options.Version = PDFOptions::PDFVersion_13;
1045
        if (tabPDF->PDFVersionCombo->currentItem() == 1)
1046
                currDoc->PDF_Options.Version = PDFOptions::PDFVersion_14;
1047
        if (tabPDF->PDFVersionCombo->currentItem() == 2)
1048
                currDoc->PDF_Options.Version = PDFOptions::PDFVersion_15;
1049
        if (tabPDF->PDFVersionCombo->currentItem() == 3)
1050
                currDoc->PDF_Options.Version = PDFOptions::PDFVersion_X3;
1051
        if (tabPDF->OutCombo->currentItem() == 0)
1052
        {
1053
                currDoc->PDF_Options.isGrayscale = false;
1054
                currDoc->PDF_Options.UseRGB = true;
1055
                currDoc->PDF_Options.UseProfiles = false;
1056
                currDoc->PDF_Options.UseProfiles2 = false;
1057
        }
1058
        else
1059
        {
1060
                if (tabPDF->OutCombo->currentItem() == 3)
1061
                {
1062
                        currDoc->PDF_Options.isGrayscale = true;
1063
                        currDoc->PDF_Options.UseRGB = false;
1064
                        currDoc->PDF_Options.UseProfiles = false;
1065
                        currDoc->PDF_Options.UseProfiles2 = false;
1066
                }
1067
                else
1068
                {
1069
                        currDoc->PDF_Options.isGrayscale = false;
1070
                        currDoc->PDF_Options.UseRGB = false;
1071
#ifdef HAVE_CMS
1072
                        if (CMSuse)
1073
                        {
1074
                                currDoc->PDF_Options.UseProfiles = tabPDF->EmbedProfs->isChecked();
1075
                                currDoc->PDF_Options.UseProfiles2 = tabPDF->EmbedProfs2->isChecked();
1076
                                currDoc->PDF_Options.Intent = tabPDF->IntendS->currentItem();
1077
                                currDoc->PDF_Options.Intent2 = tabPDF->IntendI->currentItem();
1078
                                currDoc->PDF_Options.EmbeddedI = tabPDF->NoEmbedded->isChecked();
1079
                                currDoc->PDF_Options.SolidProf = tabPDF->SolidPr->currentText();
1080
                                currDoc->PDF_Options.ImageProf = tabPDF->ImageP->currentText();
1081
                                currDoc->PDF_Options.PrintProf = tabPDF->PrintProfC->currentText();
1082
                        }
1083
#endif
1084
                }
1085
        }
1086
 
1087
        currDoc->documentInfo = docInfos->getDocInfo();
1088
        currDoc->docItemAttributes = *(tabDocItemAttributes->getNewAttributes());
1089
        currDoc->docToCSetups = *(tabTOCIndexPrefs->getNewToCs());
1090
 
1091
        uint itemCount=currDoc->Items.count();
1092
        for (uint b=0; b<itemCount; ++b)
1093
        {
1094
                if (currDoc->Items.at(b)->itemType() == PageItem::ImageFrame)
1095
                        currDoc->Items.at(b)->PicArt = currDoc->guidesSettings.showPic;
1096
        }
1097
}