Subversion Repositories Scribus

Rev

Rev 12589 | 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
*/
10977 cbradney 7
 
8
#include <QList>
9
#include <QPixmap>
10
#include <QStackedWidget>
11
 
12
#include "arrowchooser.h"
1641 cbradney 13
#include "cmsprefs.h"
10977 cbradney 14
#include "colorcombo.h"
15
#include "commonstrings.h"
1641 cbradney 16
#include "docitemattrprefs.h"
2873 cbradney 17
#include "fontcombo.h"
10977 cbradney 18
#include "fontprefs.h"
19
#include "hyphenator.h"
20
#include "hysettings.h"
21
#include "langmgr.h"
2873 cbradney 22
#include "linecombo.h"
11103 cbradney 23
#include "marginwidget.h"
2901 fschmid 24
#include "pagelayout.h"
10977 cbradney 25
#include "pagesize.h"
26
#include "pagestructs.h"
3213 craig 27
#include "pluginmanager.h"
3207 craig 28
#include "pluginmanagerprefsgui.h"
10977 cbradney 29
#include "polygonwidget.h"
30
#include "prefs.h"
7880 fschmid 31
#include "prefsfile.h"
10977 cbradney 32
#include "prefsmanager.h"
33
#include "sccombobox.h"
10601 mrdocs 34
#include "scpaths.h"
3213 craig 35
#include "scplugin.h"
5342 cbradney 36
#include "scribusapp.h"
5243 cbradney 37
#include "scribuscore.h"
10977 cbradney 38
#include "scribusdoc.h"
39
#include "scribusstructs.h"
40
#include "tabcheckdoc.h"
41
#include "tabdisplay.h"
42
#include "tabdocument.h"
43
#include "tabexternaltoolswidget.h"
44
#include "tabgeneral.h"
5326 cbradney 45
#include "tabguides.h"
5352 cbradney 46
#include "tabkeyboardshortcutswidget.h"
5851 subik 47
#include "tabmiscellaneous.h"
10977 cbradney 48
#include "tabpdfoptions.h"
49
#include "tabprinter.h"
5851 subik 50
#include "tabscrapbook.h"
10977 cbradney 51
#include "tabtools.h"
52
#include "tabtypography.h"
53
#include "tocindexprefs.h"
54
#include "undomanager.h"
55
#include "units.h"
56
#include "units.h"
10200 cbradney 57
#include "util_icon.h"
3213 craig 58
 
1641 cbradney 59
using namespace std;
60
 
5342 cbradney 61
extern ScribusQApp* ScQApp;
1641 cbradney 62
 
2834 cbradney 63
Preferences::Preferences( QWidget* parent) : PrefsDialogBase( parent )
1641 cbradney 64
{
2834 cbradney 65
        prefsManager=PrefsManager::instance();
66
        ApplicationPrefs* prefsData=&(prefsManager->appPrefs);
4026 craig 67
        ap = (ScribusMainWindow*)parent;
1641 cbradney 68
        docUnitIndex = prefsData->docUnitIndex;
1790 cbradney 69
        unitRatio = unitGetRatioFromIndex(docUnitIndex);
1641 cbradney 70
 
10977 cbradney 71
 
10495 cbradney 72
        setWindowTitle( tr( "Preferences" ) );
1641 cbradney 73
 
5851 subik 74
        tabGeneral = new TabGeneral( prefsWidgets, "tabGeneral" );
12654 malex 75
        addItem( tr("General"), loadIcon("scribus.png"), tabGeneral);
1641 cbradney 76
 
5851 subik 77
        tabDocument = new TabDocument( prefsWidgets, "tabDocument" );
5507 subik 78
        addItem( tr("Document"), loadIcon("scribusdoc.png"), tabDocument);
1641 cbradney 79
 
2889 cbradney 80
        tabGuides = new TabGuides(prefsWidgets, &prefsData->guidesSettings, &prefsData->typographicSettings, docUnitIndex);
1641 cbradney 81
        addItem( tr("Guides"), loadIcon("guides.png"), tabGuides);
5763 subik 82
 
9899 fschmid 83
        tabTypo = new TabTypograpy(prefsWidgets, &prefsData->typographicSettings);
3504 avox 84
        addItem( tr("Typography"), loadIcon("typography.png"), tabTypo);
5763 subik 85
 
5898 subik 86
        tabTools = new TabTools(prefsWidgets, &prefsData->toolSettings, docUnitIndex, ap->doc);
1641 cbradney 87
        addItem( tr("Tools"), loadIcon("tools.png"), tabTools);
88
 
89
        tabHyphenator = new HySettings(prefsWidgets, &ap->LangTransl);
90
        addItem( tr("Hyphenator"), loadIcon("hyphenate.png"), tabHyphenator);
91
 
5890 subik 92
        tabFonts = new FontPrefs(prefsWidgets, false, prefsManager->preferencesLocation(), ap->doc);
1641 cbradney 93
        addItem( tr("Fonts"), loadIcon("font.png"), tabFonts);
9981 subik 94
 
7109 fschmid 95
        tabPrinter = new TabPrinter(prefsWidgets, "tabPrinter");
96
        addItem( tr("Printer"), loadIcon("printer.png"), tabPrinter);
1641 cbradney 97
 
9899 fschmid 98
        tabDocChecker = new TabCheckDoc(prefsWidgets, prefsData->checkerProfiles, prefsData->curCheckProfile);
2770 cbradney 99
        addItem( tr("Preflight Verifier"), loadIcon("checkdoc.png"), tabDocChecker);
1641 cbradney 100
 
5880 jghali 101
        if (ScCore->haveCMS())
1641 cbradney 102
        {
5243 cbradney 103
                tabColorManagement = new CMSPrefs(prefsWidgets, &prefsData->DCMSset, &ScCore->InputProfiles, &ScCore->InputProfilesCMYK, &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
1641 cbradney 104
                addItem( tr("Color Management"), loadIcon("blend.png"), tabColorManagement);
105
        }
5763 subik 106
 
5387 avox 107
        QMap<QString, int> DocFonts;
1641 cbradney 108
        DocFonts.clear();
109
        tabPDF = new TabPDFOptions( prefsWidgets,
4260 craig 110
                                                                prefsData->PDF_Options,
2834 cbradney 111
                                                                prefsData->AvailFonts,
5243 cbradney 112
                                                                ScCore->PDFXProfiles,
1641 cbradney 113
                                                                DocFonts,
114
                                                                prefsData->PDF_Options.PresentVals,
1790 cbradney 115
                                                                docUnitIndex,
1641 cbradney 116
                                                                prefsData->PageHeight,
117
                                                                prefsData->PageWidth,
118
 
9532 cbradney 119
        addItem( tr("PDF Export"), loadIcon("acroread32.png"), tabPDF);
1644 cbradney 120
 
9899 fschmid 121
        tabDefaultItemAttributes = new DocumentItemAttributes(prefsWidgets);
5851 subik 122
        QStringList defaultAttributesList=tabDefaultItemAttributes->getDocAttributesNames();
1641 cbradney 123
        tabDefaultItemAttributes->setup(&prefsData->defaultItemAttributes);
124
        addItem( tr("Document Item Attributes"), loadIcon("docattributes.png"), tabDefaultItemAttributes);
1701 cbradney 125
 
9899 fschmid 126
        tabDefaultTOCIndexPrefs = new TOCIndexPrefs(prefsWidgets );
1701 cbradney 127
        tabDefaultTOCIndexPrefs->setupItemAttrs( defaultAttributesList );
128
        tabDefaultTOCIndexPrefs->setup(&prefsData->defaultToCSetups, NULL);
129
        addItem( tr("Table of Contents and Indexes"), loadIcon("tabtocindex.png"), tabDefaultTOCIndexPrefs);
2784 subik 130
 
5352 cbradney 131
        tabKeyboardShortcuts = new TabKeyboardShortcutsWidget(prefsData->KeyActions, prefsWidgets);
5356 cbradney 132
        addItem( tr("Keyboard Shortcuts"), loadIcon("key_bindings.png"), tabKeyboardShortcuts);
5763 subik 133
 
10398 cbradney 134
        tabScrapbook = new TabScrapbook( prefsWidgets );
5851 subik 135
        addItem(  tr("Scrapbook"), loadIcon("scrap.png"), tabScrapbook);
5787 fschmid 136
 
5851 subik 137
        tabView = new TabDisplay(prefsWidgets, "tabView");
1641 cbradney 138
        addItem( tr("Display"), loadIcon("screen.png"), tabView);
5763 subik 139
 
5326 cbradney 140
        tabExtTools = new TabExternalToolsWidget( prefsData, prefsWidgets );
141
        addItem(  tr("External Tools"), loadIcon("externaltools.png"), tabExtTools);
5763 subik 142
 
10430 cbradney 143
        tabMiscellaneous = new TabMiscellaneous(prefsWidgets);
5507 subik 144
        addItem(  tr("Miscellaneous"), loadIcon("misc.png"), tabMiscellaneous);
5851 subik 145
 
1641 cbradney 146
        // plugin manager. pv.
5556 subik 147
        pluginManagerPrefsGui = new PluginManagerPrefsGui(prefsWidgets);
3213 craig 148
        addItem( tr("Plugins"), loadIcon("plugins.png"), pluginManagerPrefsGui );
5851 subik 149
 
5711 subik 150
        setupGui();
3213 craig 151
        addPlugins();
152
 
2901 fschmid 153
        setDS(prefsData->FacingPages);
1641 cbradney 154
 
155
        resize( minimumSizeHint() );
9899 fschmid 156
        prefsSelection->arrangeIcons();
157
        prefsSelection->item(0)->setSelected(true);
158
        itemSelected(prefsSelection->item(0));
1641 cbradney 159
}
160
 
5763 subik 161
void Preferences::enableSignals(bool on)
162
{
163
        if (on)
164
        {
5851 subik 165
                connect(tabDocument->unitCombo, SIGNAL(activated(int)), this, SLOT(unitChange()));
166
                connect(tabDocument->docLayout, SIGNAL( selectedLayout(int) ), this, SLOT( setDS(int) ) );
5763 subik 167
                connect(buttonOk, SIGNAL(clicked()), this, SLOT(setActionHistoryLength()));
5880 jghali 168
                if (ScCore->haveCMS())
5763 subik 169
                        connect(tabColorManagement, SIGNAL(cmsOn(bool )), this, SLOT(switchCMS(bool )));
170
                connect(applyChangesButton, SIGNAL(clicked()), this, SLOT(applyChangesButton_clicked()));
171
                connect(backToDefaults, SIGNAL(clicked()), this, SLOT(backToDefaults_clicked()));
9900 fschmid 172
                connect(this, SIGNAL(aboutToShow(QWidget *)), this, SLOT(showWidgetInStack(QWidget *)));
5851 subik 173
                connect(this, SIGNAL(accepted()), pluginManagerPrefsGui, SLOT(apply()));
5763 subik 174
        }
175
        else
176
        {
5851 subik 177
                disconnect(tabDocument->unitCombo, SIGNAL(activated(int)), this, SLOT(unitChange()));
178
                disconnect(tabDocument->docLayout, SIGNAL( selectedLayout(int) ), this, SLOT( setDS(int) ) );
5763 subik 179
                disconnect(buttonOk, SIGNAL(clicked()), this, SLOT(setActionHistoryLength()));
5880 jghali 180
                if (ScCore->haveCMS())
5763 subik 181
                        disconnect(tabColorManagement, SIGNAL(cmsOn(bool )), this, SLOT(switchCMS(bool )));
182
                disconnect(applyChangesButton, SIGNAL(clicked()), this, SLOT(applyChangesButton_clicked()));
183
                disconnect(backToDefaults, SIGNAL(clicked()), this, SLOT(backToDefaults_clicked()));
9900 fschmid 184
                disconnect(this, SIGNAL(aboutToShow(QWidget *)), this, SLOT(showWidgetInStack(QWidget *)));
5851 subik 185
                disconnect(this, SIGNAL(accepted()), pluginManagerPrefsGui, SLOT(apply()));
5763 subik 186
        }
187
}
188
 
5507 subik 189
void Preferences::restoreDefaults()
190
{
191
        prefsManager->initDefaults();
5562 subik 192
        setupGui();
193
}
194
 
195
void Preferences::setupGui()
196
{
5763 subik 197
        enableSignals(false);
5507 subik 198
        ApplicationPrefs* prefsData=&(prefsManager->appPrefs);
199
 
5851 subik 200
        tabGeneral->restoreDefaults(prefsData);
201
        tabDocument->restoreDefaults(prefsData);
7109 fschmid 202
        tabPrinter->restoreDefaults(prefsData);
8012 cbradney 203
        tabView->restoreDefaults(prefsData, prefsData->guidesSettings, prefsData->pageSets, prefsData->FacingPages, prefsData->scratch);
11355 fschmid 204
        tabView->gapHorizontal->setValue(prefsData->GapHorizontal); // * unitRatio);
205
        tabView->gapVertical->setValue(prefsData->GapVertical); // * unitRatio);
5851 subik 206
        tabScrapbook->restoreDefaults(prefsData);
207
        tabHyphenator->restoreDefaults(prefsData);
5562 subik 208
        tabGuides->restoreDefaults(&prefsData->guidesSettings, &prefsData->typographicSettings, docUnitIndex);
209
        tabTypo->restoreDefaults(&prefsData->typographicSettings);
5851 subik 210
        tabTools->restoreDefaults(&prefsData->toolSettings, docUnitIndex);
211
        // main performance issue in availFonts->GetFonts(HomeP)!
212
        // no prefsData here
5562 subik 213
        tabFonts->restoreDefaults();
214
        tabDocChecker->restoreDefaults(&prefsData->checkerProfiles, prefsData->curCheckProfile);
5851 subik 215
 
5562 subik 216
        QMap<QString, int> DocFonts;
217
        DocFonts.clear();
218
        tabPDF->restoreDefaults(prefsData->PDF_Options,
219
                                                        prefsData->AvailFonts,
220
                                                        ScCore->PDFXProfiles,
221
                                                        DocFonts,
222
                                                        prefsData->PDF_Options.PresentVals,
223
                                                        docUnitIndex,
224
                                                        prefsData->PageHeight,
225
                                                        prefsData->PageWidth,
5880 jghali 226
                                                        0, false);
5851 subik 227
 
9528 avox 228
        if (ScCore->haveCMS())
229
                tabColorManagement->restoreDefaults(&prefsData->DCMSset, &ScCore->InputProfiles,
5711 subik 230
                                                                                 &ScCore->InputProfilesCMYK,
231
                                                                                 &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
5851 subik 232
        QStringList defaultAttributesList=tabDefaultItemAttributes->getDocAttributesNames();
5562 subik 233
        tabDefaultItemAttributes->setup(&prefsData->defaultItemAttributes);
234
        tabDefaultTOCIndexPrefs->setupItemAttrs( defaultAttributesList );
235
        tabDefaultTOCIndexPrefs->setup(&prefsData->defaultToCSetups, NULL);
236
        tabKeyboardShortcuts->restoreDefaults();
237
        tabExtTools->restoreDefaults(prefsData);
5851 subik 238
        tabMiscellaneous->restoreDefaults(prefsData);
5763 subik 239
        enableSignals(true);
240
        unitChange();
5507 subik 241
}
242
 
3213 craig 243
void Preferences::addPlugins()
244
{
245
        // Scan for plugins that provide a prefs widget, and add it to the
246
        // prefs dialog.
3383 craig 247
        // For each plugin, enabled or not:
7176 subik 248
        ScPlugin* plugin = 0;
249
        PrefsPanel* panel = 0;
250
        QString panelCaption;
251
        QPixmap panelIcon;
252
 
3213 craig 253
        PluginManager& pluginManager = PluginManager::instance();
8618 subik 254
        QStringList pluginNames(pluginManager.pluginNames(true));
7176 subik 255
 
8618 subik 256
        foreach (QString pName, pluginManager.pluginNames(true))
3213 craig 257
        {
3214 craig 258
                // Ask the plugin manager for a plugin (skipping disabled plugins).
8618 subik 259
                plugin = pluginManager.getPlugin(pName, false);
3214 craig 260
                // If we got a plugin (which we know is enabled):
261
                if (plugin)
3213 craig 262
                {
3214 craig 263
                        // Ask the plugin for a prefs widget
9899 fschmid 264
                        bool wantPanel = plugin->newPrefsPanelWidget(prefsWidgets, panel, panelCaption, panelIcon);
3214 craig 265
                        // If it gave us one...
266
                        if (wantPanel)
267
                        {
268
                                // Ensure that we got sane return values
269
                                Q_ASSERT(panel);
270
                                Q_ASSERT(!panelIcon.isNull());
271
                                Q_ASSERT(!panelCaption.isNull());
272
                                // plug it in to the dialog,
273
                                addItem(panelCaption, panelIcon, panel);
274
                                // and connect a signal to tell it to save its
275
                                // settings.
276
                                connect(this, SIGNAL(accepted()), panel, SLOT(apply()));
277
                        }
3213 craig 278
                }
279
        }
280
}
281
 
282
void Preferences::accept()
283
{
284
        emit accepted();
285
        return PrefsDialogBase::accept();
286
}
287
 
2901 fschmid 288
void Preferences::setDS(int layout)
1641 cbradney 289
{
5851 subik 290
        tabDocument->marginGroup->setFacingPages(!(layout == singlePage));
291
        tabDocument->choosenLayout = layout;
10553 fschmid 292
        tabDocument->docLayout->firstPage->setCurrentIndex(prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].FirstPage);
11349 fschmid 293
//      tabView->gapHorizontal->setValue(prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].GapHorizontal * unitRatio);
294
//      tabView->gapVertical->setValue(prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].GapBelow * unitRatio);
295
//      tabView->gapHorizontal->setValue(prefsManager->appPrefs.GapHorizontal * unitRatio);
296
//      tabView->gapVertical->setValue(prefsManager->appPrefs.GapVertical * unitRatio);
1641 cbradney 297
}
298
 
299
void Preferences::unitChange()
300
{
1790 cbradney 301
        double oldUnitRatio = unitRatio;
10553 fschmid 302
        docUnitIndex = tabDocument->unitCombo->currentIndex();
1790 cbradney 303
        unitRatio = unitGetRatioFromIndex(docUnitIndex);
5851 subik 304
        QString suffix = unitGetSuffixFromIndex(docUnitIndex);
1790 cbradney 305
        double invUnitConversion = 1.0 / oldUnitRatio * unitRatio;
5851 subik 306
 
5876 subik 307
        tabDocument->unitChange();
9703 fschmid 308
        tabGuides->unitChange(suffix, docUnitIndex, invUnitConversion);
309
        tabView->unitChange(docUnitIndex);
310
        tabTools->unitChange(docUnitIndex);
311
        tabPDF->unitChange(suffix, docUnitIndex, invUnitConversion);
312
        tabPrinter->unitChange(suffix, docUnitIndex, invUnitConversion);
1641 cbradney 313
}
314
 
315
 
316
void Preferences::setActionHistoryLength()
317
{
7880 fschmid 318
        PrefsContext *undoPrefs = PrefsManager::instance()->prefsFile->getContext("undo");
319
        bool isEnabled = tabDocument->urGroup->isChecked();
320
        if (!isEnabled)
321
                UndoManager::instance()->clearStack();
322
        UndoManager::instance()->setUndoEnabled(isEnabled);
323
        undoPrefs->set("enabled", isEnabled);
324
        UndoManager::instance()->setAllHistoryLengths(tabDocument->urSpinBox->value());
1641 cbradney 325
}
326
 
327
void Preferences::switchCMS(bool enable)
328
{
329
        tabPDF->enableCMS(enable);
330
}
331
 
5851 subik 332
void Preferences::showWidgetInStack(QWidget *widgetToShow)
1701 cbradney 333
{
2784 subik 334
        //Update the attributes list in TOC setup
1701 cbradney 335
        if (widgetToShow==tabDefaultTOCIndexPrefs)
336
                tabDefaultTOCIndexPrefs->setupItemAttrs( tabDefaultItemAttributes->getDocAttributesNames() );
5851 subik 337
        if (widgetToShow == tabTools)
338
                tabTools->enableFontPreview(true);
1701 cbradney 339
}
2873 cbradney 340
 
341
void Preferences::updatePreferences()
342
{
10553 fschmid 343
        double prefsUnitRatio = unitGetRatioFromIndex(tabDocument->unitCombo->currentIndex());
5851 subik 344
 
345
        prefsManager->appPrefs.AppFontSize = tabGeneral->GFsize->value();
346
        prefsManager->appPrefs.PaletteFontSize = tabGeneral->GTFsize->value();
6338 cbradney 347
        ScQApp->neverSplash(!tabGeneral->showSplashCheckBox->isChecked());
348
        prefsManager->appPrefs.showStartupDialog = tabGeneral->startUpDialog->isChecked();
5851 subik 349
        prefsManager->appPrefs.Wheelval = tabGeneral->wheelJumpSpin->value();
5912 fschmid 350
        prefsManager->appPrefs.moveTimeout = tabGeneral->spinTimeout->value();
5851 subik 351
        prefsManager->appPrefs.RecentDCount = tabGeneral->recentDocs->value();
11639 jghali 352
        prefsManager->appPrefs.DocDir = QDir::fromNativeSeparators( tabGeneral->Docs->text() );
353
        prefsManager->appPrefs.ProfileDir = QDir::fromNativeSeparators( tabGeneral->ProPfad->text() );
354
        prefsManager->appPrefs.ScriptDir = QDir::fromNativeSeparators( tabGeneral->ScriptPfad->text() );
355
        prefsManager->appPrefs.documentTemplatesDir = QDir::fromNativeSeparators( tabGeneral->DocumentTemplateDir->text() );
5851 subik 356
        prefsManager->appPrefs.guiLanguage=tabGeneral->selectedGUILang;
357
        prefsManager->appPrefs.GUI = tabGeneral->GUICombo->currentText();
10225 subik 358
        prefsManager->appPrefs.useSmallWidgets = tabGeneral->useSmallWidgetsCheck->isChecked();
5851 subik 359
 
11349 fschmid 360
//      prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].GapHorizontal = tabView->gapHorizontal->value() / prefsUnitRatio;
361
//      prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].GapBelow = tabView->gapVertical->value() / prefsUnitRatio;
362
        prefsManager->appPrefs.GapHorizontal = tabView->gapHorizontal->value() / prefsUnitRatio;
363
        prefsManager->appPrefs.GapVertical = tabView->gapVertical->value() / prefsUnitRatio;
5851 subik 364
        prefsManager->appPrefs.marginColored = tabView->checkUnprintable->isChecked();
8012 cbradney 365
        prefsManager->appPrefs.scratch.Bottom = tabView->bottomScratch->value() / prefsUnitRatio;
366
        prefsManager->appPrefs.scratch.Left = tabView->leftScratch->value() / prefsUnitRatio;
367
        prefsManager->appPrefs.scratch.Right = tabView->rightScratch->value() / prefsUnitRatio;
368
        prefsManager->appPrefs.scratch.Top = tabView->topScratch->value() / prefsUnitRatio;
6337 cbradney 369
        // GUI colors
12476 cbradney 370
        prefsManager->appPrefs.showPageShadow = tabView->checkShowPageShadow->isChecked();
5851 subik 371
        prefsManager->appPrefs.DpapColor = tabView->colorPaper;
6337 cbradney 372
        prefsManager->appPrefs.DFrameColor = tabView->colorFrame;
373
        prefsManager->appPrefs.DFrameNormColor = tabView->colorFrameNorm;
374
        prefsManager->appPrefs.DFrameGroupColor = tabView->colorFrameGroup;
375
        prefsManager->appPrefs.DFrameLockColor = tabView->colorFrameLocked;
376
        prefsManager->appPrefs.DFrameLinkColor = tabView->colorFrameLinked;
377
        prefsManager->appPrefs.DFrameAnnotationColor = tabView->colorFrameAnnotation;
378
        prefsManager->appPrefs.DPageBorderColor = tabView->colorPageBorder;
379
        prefsManager->appPrefs.DControlCharColor = tabView->colorControlChars;
380
        // Guides
381
 
5851 subik 382
        prefsManager->appPrefs.guidesSettings.framesShown = tabView->checkFrame->isChecked();
7051 fschmid 383
        prefsManager->appPrefs.guidesSettings.showBleed = tabView->checkBleed->isChecked();
5851 subik 384
        prefsManager->appPrefs.guidesSettings.layerMarkersShown = tabView->checkLayerM->isChecked();
385
        prefsManager->appPrefs.guidesSettings.rulerMode = tabView->checkRuler->isChecked();
386
        prefsManager->appPrefs.guidesSettings.showPic = tabView->checkPictures->isChecked();
387
        prefsManager->appPrefs.guidesSettings.linkShown = tabView->checkLink->isChecked();
388
        prefsManager->appPrefs.guidesSettings.showControls = tabView->checkControl->isChecked();
389
        prefsManager->appPrefs.DisScale = tabView->DisScale;
390
 
391
        prefsManager->appPrefs.doCopyToScrapbook = tabScrapbook->useScrapBookasExtension->isChecked();
392
        prefsManager->appPrefs.persistentScrapbook = tabScrapbook->persistentScrapbook->isChecked();
393
        prefsManager->appPrefs.numScrapbookCopies = tabScrapbook->numScrapCopies->value();
394
 
2873 cbradney 395
        tabTools->polyWidget->getValues(&prefsManager->appPrefs.toolSettings.polyC, &prefsManager->appPrefs.toolSettings.polyFd, &prefsManager->appPrefs.toolSettings.polyF, &prefsManager->appPrefs.toolSettings.polyS, &prefsManager->appPrefs.toolSettings.polyR);
5851 subik 396
 
397
        prefsManager->appPrefs.pageSize = tabDocument->prefsPageSizeName;
10553 fschmid 398
        prefsManager->appPrefs.pageOrientation = tabDocument->pageOrientationComboBox->currentIndex();
5876 subik 399
        prefsManager->appPrefs.PageWidth = tabDocument->pageW;
400
        prefsManager->appPrefs.PageHeight = tabDocument->pageH;
5851 subik 401
 
7225 cbradney 402
        prefsManager->appPrefs.margins.Top = tabDocument->marginGroup->top();
403
        prefsManager->appPrefs.margins.Bottom = tabDocument->marginGroup->bottom();
404
        prefsManager->appPrefs.margins.Left = tabDocument->marginGroup->left();
405
        prefsManager->appPrefs.margins.Right = tabDocument->marginGroup->right();
12334 fschmid 406
        prefsManager->appPrefs.marginPreset = tabDocument->marginGroup->getMarginPreset();
5851 subik 407
        prefsManager->appPrefs.FacingPages  = tabDocument->choosenLayout;
7225 cbradney 408
        prefsManager->appPrefs.bleeds.Bottom = tabDocument->marginGroup->bottomBleed();
409
        prefsManager->appPrefs.bleeds.Top = tabDocument->marginGroup->topBleed();
410
        prefsManager->appPrefs.bleeds.Left = tabDocument->marginGroup->leftBleed();
411
        prefsManager->appPrefs.bleeds.Right = tabDocument->marginGroup->rightBleed();
10553 fschmid 412
        prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].FirstPage = tabDocument->docLayout->firstPage->currentIndex();
5851 subik 413
 
5326 cbradney 414
        prefsManager->setImageEditorExecutable(tabExtTools->newImageTool());
5418 cbradney 415
        prefsManager->setExtBrowserExecutable(tabExtTools->newExtBrowserTool());
5326 cbradney 416
        prefsManager->appPrefs.gs_AntiAliasGraphics = tabExtTools->newAntialiasGraphics();
417
        prefsManager->appPrefs.gs_AntiAliasText = tabExtTools->newAntialiasText();
418
        prefsManager->setGhostscriptExecutable(tabExtTools->newPSTool());
419
        prefsManager->appPrefs.gs_Resolution = tabExtTools->newPSToolResolution();
10228 avox 420
 
421
        prefsManager->appPrefs.latexResolution = tabExtTools->newLatexToolResolution();
422
        prefsManager->appPrefs.latexForceDpi = tabExtTools->newLatexForceDpi();
10618 cbradney 423
        prefsManager->appPrefs.latexStartWithEmptyFrames = tabExtTools->newLatexStartWithEmptyFrames();
11506 mrdocs 424
        prefsManager->setLatexConfigs(tabExtTools->newLatexConfigs());
10228 avox 425
        prefsManager->setLatexEditorExecutable(tabExtTools->newLatexEditor());
5851 subik 426
 
2873 cbradney 427
        prefsManager->appPrefs.guidesSettings.before = tabGuides->inBackground->isChecked();
5851 subik 428
 
429
        prefsManager->appPrefs.askBeforeSubstituite = tabMiscellaneous->AskForSubs->isChecked();
430
        prefsManager->appPrefs.haveStylePreview = tabMiscellaneous->stylePreview->isChecked();
2873 cbradney 431
        // lorem ipsum
5851 subik 432
        prefsManager->appPrefs.useStandardLI = tabMiscellaneous->useStandardLI->isChecked();
433
        prefsManager->appPrefs.paragraphsLI = tabMiscellaneous->paragraphsLI->value();
3849 subik 434
 
10553 fschmid 435
        prefsManager->appPrefs.docUnitIndex = tabDocument->unitCombo->currentIndex();
5851 subik 436
 
2873 cbradney 437
        prefsManager->appPrefs.toolSettings.defFont = tabTools->fontComboText->currentText();
438
        prefsManager->appPrefs.toolSettings.defSize = tabTools->sizeComboText->currentText().left(2).toInt() * 10;
5851 subik 439
 
2873 cbradney 440
        prefsManager->appPrefs.guidesSettings.marginsShown = tabGuides->marginBox->isChecked();
441
        prefsManager->appPrefs.guidesSettings.gridShown = tabGuides->checkGrid->isChecked();
442
        prefsManager->appPrefs.guidesSettings.guidesShown = tabGuides->guideBox->isChecked();
443
        prefsManager->appPrefs.guidesSettings.baseShown = tabGuides->baselineBox->isChecked();
444
        prefsManager->appPrefs.guidesSettings.grabRad = tabGuides->grabDistance->value();
7417 fschmid 445
        prefsManager->appPrefs.guidesSettings.guideRad = tabGuides->snapDistance->value();
2873 cbradney 446
        prefsManager->appPrefs.guidesSettings.minorGrid = tabGuides->minorSpace->value() / prefsUnitRatio;
447
        prefsManager->appPrefs.guidesSettings.majorGrid = tabGuides->majorSpace->value() / prefsUnitRatio;
448
        prefsManager->appPrefs.guidesSettings.minorColor = tabGuides->colorMinorGrid;
449
        prefsManager->appPrefs.guidesSettings.majorColor = tabGuides->colorMajorGrid;
450
        prefsManager->appPrefs.guidesSettings.margColor = tabGuides->colorMargin;
451
        prefsManager->appPrefs.guidesSettings.guideColor = tabGuides->colorGuides;
452
        prefsManager->appPrefs.guidesSettings.baseColor = tabGuides->colorBaselineGrid;
453
        prefsManager->appPrefs.checkerProfiles = tabDocChecker->checkerProfile;
454
        prefsManager->appPrefs.curCheckProfile = tabDocChecker->curCheckProfile->currentText();
2889 cbradney 455
        prefsManager->appPrefs.typographicSettings.valueSuperScript = tabTypo->superDisplacement->value();
456
        prefsManager->appPrefs.typographicSettings.scalingSuperScript = tabTypo->superScaling->value();
457
        prefsManager->appPrefs.typographicSettings.valueSubScript = tabTypo->subDisplacement->value();
458
        prefsManager->appPrefs.typographicSettings.scalingSubScript = tabTypo->subScaling->value();
459
        prefsManager->appPrefs.typographicSettings.valueSmallCaps = tabTypo->capsScaling->value();
460
        prefsManager->appPrefs.typographicSettings.autoLineSpacing = tabTypo->autoLine->value();
11311 fschmid 461
        prefsManager->appPrefs.typographicSettings.valueBaseGrid = tabGuides->baseGrid->value(); // / prefsUnitRatio;
462
        prefsManager->appPrefs.typographicSettings.offsetBaseGrid = tabGuides->baseOffset->value(); // / prefsUnitRatio;
2889 cbradney 463
        prefsManager->appPrefs.typographicSettings.valueUnderlinePos = qRound(tabTypo->underlinePos->value() * 10);
464
        prefsManager->appPrefs.typographicSettings.valueUnderlineWidth = qRound(tabTypo->underlineWidth->value() * 10);
465
        prefsManager->appPrefs.typographicSettings.valueStrikeThruPos = qRound(tabTypo->strikethruPos->value() * 10);
466
        prefsManager->appPrefs.typographicSettings.valueStrikeThruWidth = qRound(tabTypo->strikethruWidth->value() * 10);
3093 fschmid 467
        prefsManager->appPrefs.toolSettings.dTextBackGround = tabTools->colorComboTextBackground->currentText();
8439 cbradney 468
        if (prefsManager->appPrefs.toolSettings.dTextBackGround == CommonStrings::tr_NoneColor)
4546 subik 469
                prefsManager->appPrefs.toolSettings.dTextBackGround = CommonStrings::None;
3093 fschmid 470
        prefsManager->appPrefs.toolSettings.dTextLineColor = tabTools->colorComboTextLine->currentText();
8439 cbradney 471
        if (prefsManager->appPrefs.toolSettings.dTextLineColor == CommonStrings::tr_NoneColor)
4546 subik 472
                prefsManager->appPrefs.toolSettings.dTextLineColor = CommonStrings::None;
3093 fschmid 473
        prefsManager->appPrefs.toolSettings.dTextBackGroundShade = tabTools->shadingTextBack->value();
474
        prefsManager->appPrefs.toolSettings.dTextLineShade = tabTools->shadingTextLine->value();
475
        prefsManager->appPrefs.toolSettings.dTextPenShade = tabTools->shadingText->value();
476
        prefsManager->appPrefs.toolSettings.dTextStrokeShade = tabTools->shadingTextStroke->value();
2873 cbradney 477
        prefsManager->appPrefs.toolSettings.dPen = tabTools->colorComboLineShape->currentText();
8439 cbradney 478
        if (prefsManager->appPrefs.toolSettings.dPen == CommonStrings::tr_NoneColor)
4546 subik 479
                prefsManager->appPrefs.toolSettings.dPen = CommonStrings::None;
2873 cbradney 480
        prefsManager->appPrefs.toolSettings.dPenText = tabTools->colorComboText->currentText();
8439 cbradney 481
        if (prefsManager->appPrefs.toolSettings.dPenText == CommonStrings::tr_NoneColor)
4546 subik 482
                prefsManager->appPrefs.toolSettings.dPenText = CommonStrings::None;
2873 cbradney 483
        prefsManager->appPrefs.toolSettings.dStrokeText = tabTools->colorComboStrokeText->currentText();
8439 cbradney 484
        if (prefsManager->appPrefs.toolSettings.dStrokeText == CommonStrings::tr_NoneColor)
4546 subik 485
                prefsManager->appPrefs.toolSettings.dStrokeText = CommonStrings::None;
2873 cbradney 486
        prefsManager->appPrefs.toolSettings.dCols = tabTools->columnsText->value();
487
        prefsManager->appPrefs.toolSettings.dGap = tabTools->gapText->value() / prefsUnitRatio;
488
        prefsManager->appPrefs.toolSettings.dTabWidth = tabTools->gapTab->value() / prefsUnitRatio;
489
        prefsManager->appPrefs.toolSettings.dBrush = tabTools->comboFillShape->currentText();
8439 cbradney 490
        if (prefsManager->appPrefs.toolSettings.dBrush == CommonStrings::tr_NoneColor)
4546 subik 491
                prefsManager->appPrefs.toolSettings.dBrush = CommonStrings::None;
2873 cbradney 492
        prefsManager->appPrefs.toolSettings.dShade = tabTools->shadingFillShape->value();
493
        prefsManager->appPrefs.toolSettings.dShade2 = tabTools->shadingLineShape->value();
10553 fschmid 494
        switch (tabTools->tabFillCombo->currentIndex())
2873 cbradney 495
        {
496
                case 0:
497
                        prefsManager->appPrefs.toolSettings.tabFillChar = "";
498
                        break;
499
                case 1:
500
                        prefsManager->appPrefs.toolSettings.tabFillChar = ".";
501
                        break;
502
                case 2:
503
                        prefsManager->appPrefs.toolSettings.tabFillChar = "-";
504
                        break;
505
                case 3:
506
                        prefsManager->appPrefs.toolSettings.tabFillChar = "_";
507
                        break;
508
                case 4:
509
                        prefsManager->appPrefs.toolSettings.tabFillChar = tabTools->tabFillCombo->currentText().right(1);
510
                        break;
511
        }
10988 fschmid 512
        prefsManager->appPrefs.toolSettings.dLineArt = static_cast<Qt::PenStyle>(tabTools->comboStyleShape->currentIndex()) + 1;
2873 cbradney 513
        prefsManager->appPrefs.toolSettings.dWidth = tabTools->lineWidthShape->value();
514
        prefsManager->appPrefs.toolSettings.dPenLine = tabTools->colorComboLine->currentText();
8439 cbradney 515
        if (prefsManager->appPrefs.toolSettings.dPenLine == CommonStrings::tr_NoneColor)
4546 subik 516
                prefsManager->appPrefs.toolSettings.dPenLine = CommonStrings::None;
2873 cbradney 517
        prefsManager->appPrefs.toolSettings.dShadeLine = tabTools->shadingLine->value();
10988 fschmid 518
        prefsManager->appPrefs.toolSettings.dLstyleLine = static_cast<Qt::PenStyle>(tabTools->comboStyleLine->currentIndex()) + 1;
2873 cbradney 519
        prefsManager->appPrefs.toolSettings.dWidthLine = tabTools->lineWidthLine->value();
10553 fschmid 520
        prefsManager->appPrefs.toolSettings.dStartArrow = tabTools->startArrow->currentIndex();
521
        prefsManager->appPrefs.toolSettings.dEndArrow = tabTools->endArrow->currentIndex();
2873 cbradney 522
        prefsManager->appPrefs.toolSettings.magMin = tabTools->minimumZoom->value();
523
        prefsManager->appPrefs.toolSettings.magMax = tabTools->maximumZoom->value();
524
        prefsManager->appPrefs.toolSettings.magStep = tabTools->zoomStep->value();
525
        prefsManager->appPrefs.toolSettings.dBrushPict = tabTools->comboFillImage->currentText();
8439 cbradney 526
        if (prefsManager->appPrefs.toolSettings.dBrushPict == CommonStrings::tr_NoneColor)
4546 subik 527
                prefsManager->appPrefs.toolSettings.dBrushPict = CommonStrings::None;
2873 cbradney 528
        prefsManager->appPrefs.toolSettings.shadePict = tabTools->shadingFillImage->value();
529
        prefsManager->appPrefs.toolSettings.scaleX = static_cast<double>(tabTools->scalingHorizontal->value()) / 100.0;
530
        prefsManager->appPrefs.toolSettings.scaleY = static_cast<double>(tabTools->scalingVertical->value()) / 100.0;
531
        prefsManager->appPrefs.toolSettings.scaleType = tabTools->buttonGroup3->isChecked();
532
        prefsManager->appPrefs.toolSettings.aspectRatio = tabTools->checkRatioImage->isChecked();
533
        prefsManager->appPrefs.toolSettings.useEmbeddedPath = tabTools->embeddedPath->isChecked();
534
        int haRes = 0;
535
        if (tabTools->checkFullRes->isChecked())
536
                haRes = 0;
537
        if (tabTools->checkNormalRes->isChecked())
538
                haRes = 1;
539
        if (tabTools->checkHalfRes->isChecked())
540
                haRes = 2;
541
        prefsManager->appPrefs.toolSettings.lowResType = haRes;
6606 fschmid 542
        prefsManager->appPrefs.toolSettings.dispX = tabTools->genDispX->value();
543
        prefsManager->appPrefs.toolSettings.dispY = tabTools->genDispY->value();
6618 fschmid 544
        prefsManager->appPrefs.toolSettings.constrain = tabTools->genRot->value();
5851 subik 545
        prefsManager->appPrefs.AutoSave = tabDocument->GroupAS->isChecked();
546
        prefsManager->appPrefs.AutoSaveTime = tabDocument->ASTime->value() * 60 * 1000;
10170 fschmid 547
        prefsManager->appPrefs.MinWordLen = tabHyphenator->getWordLen();
548
        prefsManager->appPrefs.Language = ScCore->primaryMainWindow()->GetLang(tabHyphenator->getLanguage());
549
        prefsManager->appPrefs.Automatic = !tabHyphenator->getVerbose();
550
        prefsManager->appPrefs.AutoCheck = tabHyphenator->getInput();
551
        prefsManager->appPrefs.HyCount = tabHyphenator->getMaxCount();
552
        prefsManager->appPrefs.ignoredWords = tabHyphenator->getIgnoreList();
553
        prefsManager->appPrefs.specialWords = tabHyphenator->getExceptionList();
5880 jghali 554
        if (ScCore->haveCMS())
2873 cbradney 555
                tabColorManagement->setValues();
11234 subik 556
        // not required propably as it's done already in the dialog prefsManager->appPrefs.AvailFonts == get fonts from fontprefs
2873 cbradney 557
        uint a = 0;
558
        QMap<QString,QString>::Iterator itfsuend=tabFonts->RList.end();
559
        prefsManager->appPrefs.GFontSub.clear();
560
        for (QMap<QString,QString>::Iterator itfsu = tabFonts->RList.begin(); itfsu != itfsuend; ++itfsu)
561
                prefsManager->appPrefs.GFontSub[itfsu.key()] = tabFonts->FlagsRepl.at(a++)->currentText();
562
        prefsManager->appPrefs.PDF_Options.Thumbnails = tabPDF->CheckBox1->isChecked();
563
        prefsManager->appPrefs.PDF_Options.Compress = tabPDF->Compression->isChecked();
11446 jghali 564
        prefsManager->appPrefs.PDF_Options.CompressMethod = (PDFOptions::PDFCompression) tabPDF->CMethod->currentIndex();
10553 fschmid 565
        prefsManager->appPrefs.PDF_Options.Quality = tabPDF->CQuality->currentIndex();
2873 cbradney 566
        prefsManager->appPrefs.PDF_Options.Resolution = tabPDF->Resolution->value();
567
        prefsManager->appPrefs.PDF_Options.RecalcPic = tabPDF->DSColor->isChecked();
568
        prefsManager->appPrefs.PDF_Options.PicRes = tabPDF->ValC->value();
569
        prefsManager->appPrefs.PDF_Options.Bookmarks = tabPDF->CheckBM->isChecked();
10553 fschmid 570
        prefsManager->appPrefs.PDF_Options.Binding = tabPDF->ComboBind->currentIndex();
571
        prefsManager->appPrefs.PDF_Options.MirrorH = tabPDF->MirrorH->isChecked();
572
        prefsManager->appPrefs.PDF_Options.MirrorV = tabPDF->MirrorV->isChecked();
573
        prefsManager->appPrefs.PDF_Options.RotateDeg = tabPDF->RotateDeg->currentIndex() * 90;
2873 cbradney 574
        prefsManager->appPrefs.PDF_Options.Articles = tabPDF->Article->isChecked();
575
        prefsManager->appPrefs.PDF_Options.Encrypt = tabPDF->Encry->isChecked();
576
        prefsManager->appPrefs.PDF_Options.UseLPI = tabPDF->UseLPI->isChecked();
12589 fschmid 577
        prefsManager->appPrefs.PDF_Options.UseSpotColors = !tabPDF->useSpot->isChecked();
3079 fschmid 578
        prefsManager->appPrefs.PDF_Options.doMultiFile = false;
7225 cbradney 579
        prefsManager->appPrefs.PDF_Options.bleeds.Bottom = tabPDF->BleedBottom->value() / prefsUnitRatio;
580
        prefsManager->appPrefs.PDF_Options.bleeds.Top = tabPDF->BleedTop->value() / prefsUnitRatio;
581
        prefsManager->appPrefs.PDF_Options.bleeds.Left = tabPDF->BleedLeft->value() / prefsUnitRatio;
582
        prefsManager->appPrefs.PDF_Options.bleeds.Right = tabPDF->BleedRight->value() / prefsUnitRatio;
4649 fschmid 583
        prefsManager->appPrefs.PDF_Options.doClip = tabPDF->ClipMarg->isChecked();
2873 cbradney 584
        if (tabPDF->Encry->isChecked())
585
        {
586
                int Perm = -64;
10553 fschmid 587
                if (tabPDF->PDFVersionCombo->currentIndex() == 1)
2873 cbradney 588
                        Perm &= ~0x00240000;
589
                if (tabPDF->PrintSec->isChecked())
590
                        Perm += 4;
591
                if (tabPDF->ModifySec->isChecked())
592
                        Perm += 8;
593
                if (tabPDF->CopySec->isChecked())
594
                        Perm += 16;
595
                if (tabPDF->AddSec->isChecked())
596
                        Perm += 32;
597
                prefsManager->appPrefs.PDF_Options.Permissions = Perm;
598
                prefsManager->appPrefs.PDF_Options.PassOwner = tabPDF->PassOwner->text();
599
                prefsManager->appPrefs.PDF_Options.PassUser = tabPDF->PassUser->text();
600
        }
10553 fschmid 601
        if (tabPDF->PDFVersionCombo->currentIndex() == 0)
2873 cbradney 602
                prefsManager->appPrefs.PDF_Options.Version = PDFOptions::PDFVersion_13;
10553 fschmid 603
        if (tabPDF->PDFVersionCombo->currentIndex() == 1)
2873 cbradney 604
                prefsManager->appPrefs.PDF_Options.Version = PDFOptions::PDFVersion_14;
10553 fschmid 605
        if (tabPDF->PDFVersionCombo->currentIndex() == 2)
2873 cbradney 606
                prefsManager->appPrefs.PDF_Options.Version = PDFOptions::PDFVersion_15;
10553 fschmid 607
        if (tabPDF->PDFVersionCombo->currentIndex() == 3)
2873 cbradney 608
                prefsManager->appPrefs.PDF_Options.Version = PDFOptions::PDFVersion_X3;
10553 fschmid 609
        if (tabPDF->OutCombo->currentIndex() == 0)
2873 cbradney 610
        {
611
                prefsManager->appPrefs.PDF_Options.isGrayscale = false;
612
                prefsManager->appPrefs.PDF_Options.UseRGB = true;
613
                prefsManager->appPrefs.PDF_Options.UseProfiles = false;
614
                prefsManager->appPrefs.PDF_Options.UseProfiles2 = false;
615
        }
616
        else
617
        {
10553 fschmid 618
                if (tabPDF->OutCombo->currentIndex() == 2)
2873 cbradney 619
                {
620
                        prefsManager->appPrefs.PDF_Options.isGrayscale = true;
621
                        prefsManager->appPrefs.PDF_Options.UseRGB = false;
622
                        prefsManager->appPrefs.PDF_Options.UseProfiles = false;
623
                        prefsManager->appPrefs.PDF_Options.UseProfiles2 = false;
624
                }
625
                else
626
                {
627
                        prefsManager->appPrefs.PDF_Options.isGrayscale = false;
628
                        prefsManager->appPrefs.PDF_Options.UseRGB = false;
5880 jghali 629
                        if (/*CMSuse*/ ScCore->haveCMS())
2873 cbradney 630
                        {
631
                                prefsManager->appPrefs.PDF_Options.UseProfiles = tabPDF->EmbedProfs->isChecked();
632
                                prefsManager->appPrefs.PDF_Options.UseProfiles2 = tabPDF->EmbedProfs2->isChecked();
10553 fschmid 633
                                prefsManager->appPrefs.PDF_Options.Intent = tabPDF->IntendS->currentIndex();
634
                                prefsManager->appPrefs.PDF_Options.Intent2 = tabPDF->IntendI->currentIndex();
2873 cbradney 635
                                prefsManager->appPrefs.PDF_Options.EmbeddedI = tabPDF->NoEmbedded->isChecked();
636
                                prefsManager->appPrefs.PDF_Options.SolidProf = tabPDF->SolidPr->currentText();
637
                                prefsManager->appPrefs.PDF_Options.ImageProf = tabPDF->ImageP->currentText();
638
                                prefsManager->appPrefs.PDF_Options.PrintProf = tabPDF->PrintProfC->currentText();
639
                        }
640
                }
641
        }
642
        prefsManager->appPrefs.defaultItemAttributes = *(tabDefaultItemAttributes->getNewAttributes());
643
        prefsManager->appPrefs.defaultToCSetups = *(tabDefaultTOCIndexPrefs->getNewToCs());
5352 cbradney 644
//      prefsManager->appPrefs.KeyActions = tabKeys->getNewKeyMap();
645
        prefsManager->appPrefs.KeyActions = tabKeyboardShortcuts->getNewKeyMap();
7109 fschmid 646
        tabPrinter->storeValues();
2873 cbradney 647
}
5504 subik 648
 
649
void Preferences::applyChangesButton_clicked()
650
{
5781 cbradney 651
        ScCore->primaryMainWindow()->prefsOrg(this);
5504 subik 652
}
5507 subik 653
 
654
void Preferences::backToDefaults_clicked()
655
{
656
        prefsManager->initDefaults();
657
        restoreDefaults();
658
}