r13955 by cbradney - Almost done with prefs variable separation
scribus-commit
scribus-commit at lists.scribus.net
Sat Sep 5 01:41:55 CEST 2009
Revision: 13955
Author: cbradney
Date: 2009-09-04T23:41:33.045771Z
Commit message: Almost done with prefs variable separation
Changeset:
M /trunk/Scribus/scribus/collect4output.cpp
M /trunk/Scribus/scribus/scprintengine_gdi.cpp
M /trunk/Scribus/scribus/scribusXml.cpp
M /trunk/Scribus/scribus/ui/reformdoc.cpp
M /trunk/Scribus/scribus/canvasmode_rotate.cpp
M /trunk/Scribus/scribus/scribusdoc.cpp
M /trunk/Scribus/scribus/ui/prefs.h
M /trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
M /trunk/Scribus/scribus/plugins/aiimplugin/importai.cpp
M /trunk/Scribus/scribus/ui/fontcombo.cpp
M /trunk/Scribus/scribus/fileloader.cpp
M /trunk/Scribus/scribus/scpreview.cpp
M /trunk/Scribus/scribus/pdflib_core.cpp
M /trunk/Scribus/scribus/pslib.cpp
M /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
M /trunk/Scribus/scribus/ui/tabdisplay.cpp
M /trunk/Scribus/scribus/prefsmanager.cpp
M /trunk/Scribus/scribus/scribus.cpp
M /trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
M /trunk/Scribus/scribus/ui/hysettings.cpp
M /trunk/Scribus/scribus/styles/charstyle.cpp
M /trunk/Scribus/scribus/hyphenator.cpp
M /trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
M /trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp
M /trunk/Scribus/scribus/scpageoutput.cpp
M /trunk/Scribus/scribus/scimgdataloader_ps.cpp
M /trunk/Scribus/scribus/ui/fontprefs.h
M /trunk/Scribus/scribus/canvasmode_normal.cpp
M /trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
M /trunk/Scribus/scribus/pageitem.cpp
M /trunk/Scribus/scribus/ui/prefs.cpp
M /trunk/Scribus/scribus/ui/preview.cpp
M /trunk/Scribus/scribus/canvasmode_drawbezier.cpp
M /trunk/Scribus/scribus/sampleitem.cpp
M /trunk/Scribus/scribus/ui/reformdoc.h
M /trunk/Scribus/scribus/canvasmode_create.cpp
M /trunk/Scribus/scribus/canvasmode_legacy.cpp
M /trunk/Scribus/scribus/scribusview.cpp
M /trunk/Scribus/scribus/ui/smtextstyles.cpp
M /trunk/Scribus/scribus/util_ghostscript.cpp
M /trunk/Scribus/scribus/ui/tabmiscellaneous.cpp
M /trunk/Scribus/scribus/gtaction.cpp
M /trunk/Scribus/scribus/ui/stylemanager.cpp
M /trunk/Scribus/scribus/ui/loremipsum.cpp
M /trunk/Scribus/scribus/scprintengine_ps.cpp
M /trunk/Scribus/scribus/pageitem_textframe.cpp
M /trunk/Scribus/scribus/canvas.cpp
M /trunk/Scribus/scribus/ui/tabexternaltoolswidget.cpp
M /trunk/Scribus/scribus/prefsstructs.h
M /trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
M /trunk/Scribus/scribus/prefsmanager.h
M /trunk/Scribus/scribus/ui/scrapbookpalette.cpp
M /trunk/Scribus/scribus/fontlistmodel.cpp
M /trunk/Scribus/scribus/ui/fontprefs.cpp
M /trunk/Scribus/scribus/stencilreader.cpp
M /trunk/Scribus/scribus/ui/masterpagepalette.cpp
M /trunk/Scribus/scribus/util_icon.cpp
M /trunk/Scribus/scribus/ui/tabscrapbook.cpp
Diffs:
Index: scribus/prefsmanager.h
===================================================================
--- scribus/prefsmanager.h (revision 13954)
+++ scribus/prefsmanager.h (revision 13955)
@@ -126,19 +126,19 @@
void setImageEditorExecutable(const QString&);
void setExtBrowserExecutable(const QString&);
void setLatexConfigs(const QStringList&);
- void setLatexCommands(const QMap<QString, QString>& commands) { appPrefs.latexCommands=commands; }
+ void setLatexCommands(const QMap<QString, QString>& commands) { appPrefs.extToolPrefs.latexCommands=commands; }
void setLatexEditorExecutable(const QString&);
- QString ghostscriptExecutable() const {return appPrefs.gs_exe;};
- QString imageEditorExecutable() const {return appPrefs.imageEditorExecutable;};
- QString extBrowserExecutable() const {return appPrefs.extBrowserExecutable;};
- QStringList latexConfigs() const {return appPrefs.latexConfigs;}
- QMap<QString, QString> latexCommands() const {return appPrefs.latexCommands;}
- QString latexEditorExecutable() const {return appPrefs.latexEditorExecutable;}
- bool latexStartWithEmptyFrames() const {return appPrefs.latexStartWithEmptyFrames;}
+ QString ghostscriptExecutable() const {return appPrefs.extToolPrefs.gs_exe;};
+ QString imageEditorExecutable() const {return appPrefs.extToolPrefs.imageEditorExecutable;};
+ QString extBrowserExecutable() const {return appPrefs.extToolPrefs.extBrowserExecutable;};
+ QStringList latexConfigs() const {return appPrefs.extToolPrefs.latexConfigs;}
+ QMap<QString, QString> latexCommands() const {return appPrefs.extToolPrefs.latexCommands;}
+ QString latexEditorExecutable() const {return appPrefs.extToolPrefs.latexEditorExecutable;}
+ bool latexStartWithEmptyFrames() const {return appPrefs.extToolPrefs.latexStartWithEmptyFrames;}
//! \brief Get the users preferred preview resolution
int gsResolution();
- int latexResolution() const {return appPrefs.latexResolution;}
- bool latexForceDpi() const {return appPrefs.latexForceDpi;}
+ int latexResolution() const {return appPrefs.extToolPrefs.latexResolution;}
+ bool latexForceDpi() const {return appPrefs.extToolPrefs.latexForceDpi;}
//! \brief Get the users preferred document directory
const QString documentDir();
void setDocumentDir(const QString& dirname);
Index: scribus/fontlistmodel.cpp
===================================================================
--- scribus/fontlistmodel.cpp (revision 13954)
+++ scribus/fontlistmodel.cpp (revision 13955)
@@ -16,7 +16,7 @@
FontListModel::FontListModel(QObject * parent, ScribusDoc * doc)
: QAbstractTableModel(parent),
m_doc(doc),
- m_fonts(PrefsManager::instance()->appPrefs.AvailFonts)
+ m_fonts(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts)
{
ttfFont = loadIcon("font_truetype16.png");
otfFont = loadIcon("font_otf16.png");
Index: scribus/stencilreader.cpp
===================================================================
--- scribus/stencilreader.cpp (revision 13954)
+++ scribus/stencilreader.cpp (revision 13955)
@@ -1397,7 +1397,7 @@
ob.setAttribute("LeftLine", 0);
ob.setAttribute("RightLine", 0);
ob.setAttribute("BottomLine", 0);
- ob.setAttribute("LANGUAGE", prefsManager->appPrefs.Language);
+ ob.setAttribute("LANGUAGE", prefsManager->appPrefs.hyphPrefs.Language);
ob.setAttribute("startArrowIndex", 0);
ob.setAttribute("endArrowIndex", 0);
ob.setAttribute("NUMDASH", 0);
Index: scribus/scribusXml.cpp
===================================================================
--- scribus/scribusXml.cpp (revision 13954)
+++ scribus/scribusXml.cpp (revision 13955)
@@ -789,11 +789,11 @@
tmpf = doc->itemToolPrefs.defFont;
tmf = tmpf;
if (!DoFonts.contains(tmpf))
- tmpf = AskForFont(prefsManager->appPrefs.AvailFonts, tmpf, doc);
+ tmpf = AskForFont(prefsManager->appPrefs.fontPrefs.AvailFonts, tmpf, doc);
else
tmpf = DoFonts[tmf];
- vg.charStyle().setFont(prefsManager->appPrefs.AvailFonts[tmpf]);
+ vg.charStyle().setFont(prefsManager->appPrefs.fontPrefs.AvailFonts[tmpf]);
vg.charStyle().setFontSize(qRound(attrAsDbl(attrs, "FONTSIZE", 12.0) * 10.0));
vg.charStyle().setFeatures(static_cast<StyleFlag>(attrAsInt(attrs, "EFFECT", 0)).featureList());
vg.charStyle().setFillColor(attrAsString(attrs, "FCOLOR", doc->itemToolPrefs.dBrush));
@@ -2572,7 +2572,7 @@
ScFace dummy = ScFace::none();
ApplicationPrefs& appPrefs = prefsManager->appPrefs;
- if (hasFont && ((!appPrefs.AvailFonts.contains(tmpf)) || (!appPrefs.AvailFonts[tmpf].usable())))
+ if (hasFont && ((!appPrefs.fontPrefs.AvailFonts.contains(tmpf)) || (!appPrefs.fontPrefs.AvailFonts[tmpf].usable())))
{
bool isThere = false;
for (int dl = 0; dl < dummyScFaces.count(); ++dl)
@@ -2590,7 +2590,7 @@
dummyScFaces.append(dummy);
}
unknown = true;
- if ((!appPrefs.GFontSub.contains(tmpf)) || (!appPrefs.AvailFonts[appPrefs.GFontSub[tmpf]].usable()))
+ if ((!appPrefs.GFontSub.contains(tmpf)) || (!appPrefs.fontPrefs.AvailFonts[appPrefs.GFontSub[tmpf]].usable()))
{
newReplacement = true;
ReplacedFonts.insert(tmpf, appPrefs.itemToolPrefs.defFont);
Index: scribus/canvasmode_drawbezier.cpp
===================================================================
--- scribus/canvasmode_drawbezier.cpp (revision 13954)
+++ scribus/canvasmode_drawbezier.cpp (revision 13955)
@@ -426,7 +426,7 @@
finalizeItem(currItem);
}
- if (!PrefsManager::instance()->appPrefs.stickyTools)
+ if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
{
// qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
m_view->requestMode(modeNormal);
Index: scribus/canvas.cpp
===================================================================
--- scribus/canvas.cpp (revision 13954)
+++ scribus/canvas.cpp (revision 13955)
@@ -1633,7 +1633,7 @@
if (m_doc->bleeds.hasNonZeroValue() && m_doc->guidesSettings.showBleed)
{
// painter->drawRect(m_doc->scratch.Left - bleedLeft+5 / m_viewMode.scale, m_doc->scratch.Top - bleedTop+5 / m_viewMode.scale, m_doc->currentPage()->width() + bleedLeft + bleedRight, m_doc->currentPage()->height() + bleedBottom + bleedTop);
- if (PrefsManager::instance()->appPrefs.showPageShadow)
+ if (PrefsManager::instance()->appPrefs.displayPrefs.showPageShadow)
painter->drawRect(m_doc->scratch.Left - pageBleeds.Left+5, m_doc->scratch.Top - pageBleeds.Top+5, m_doc->currentPage()->width() + pageBleeds.Left + pageBleeds.Right, m_doc->currentPage()->height() + pageBleeds.Bottom + pageBleeds.Top);
painter->setBrush(m_doc->papColor);
painter->drawRect(m_doc->scratch.Left - pageBleeds.Left, m_doc->scratch.Top - pageBleeds.Top, m_doc->currentPage()->width() + pageBleeds.Left + pageBleeds.Right, m_doc->currentPage()->height() + pageBleeds.Bottom + pageBleeds.Top);
@@ -1641,7 +1641,7 @@
else
{
// painter->drawRect(m_doc->scratch.Left+5 / m_viewMode.scale, m_doc->scratch.Top+5 / m_viewMode.scale, m_doc->currentPage()->width(), m_doc->currentPage()->height());
- if (PrefsManager::instance()->appPrefs.showPageShadow)
+ if (PrefsManager::instance()->appPrefs.displayPrefs.showPageShadow)
painter->drawRect(m_doc->scratch.Left+5, m_doc->scratch.Top+5, m_doc->currentPage()->width(), m_doc->currentPage()->height());
painter->setBrush(m_doc->papColor);
painter->drawRect(m_doc->scratch.Left, m_doc->scratch.Top, m_doc->currentPage()->width(), m_doc->currentPage()->height());
@@ -1662,7 +1662,7 @@
{
// qDebug()<<"Canvas::drawBackgroundPageOutlines"<< clipx<< clipy<< clipw<<cliph;
uint docPagesCount=m_doc->Pages->count();
- if (PrefsManager::instance()->appPrefs.showPageShadow && !m_viewMode.viewAsPreview)
+ if (PrefsManager::instance()->appPrefs.displayPrefs.showPageShadow && !m_viewMode.viewAsPreview)
{
painter->setBrush(QColor(128,128,128));
painter->setAntialiasing(false);
@@ -1897,7 +1897,7 @@
page->guides.drawPage(p, m_doc, lineWidth);
if (m_doc->currentPage() == page)
{
- p->setPen(PrefsManager::instance()->appPrefs.DPageBorderColor, 2 / m_viewMode.scale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DPageBorderColor, 2 / m_viewMode.scale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
p->drawRect(0, 0, pageWidth, pageHeight);
}
p->setAntialiasing(true);
@@ -2153,7 +2153,7 @@
void Canvas::displayXYHUD(QPoint m)
{
- if (!PrefsManager::instance()->appPrefs.showMouseCoordinates)
+ if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
return;
double gx, gy, gh, gw, r;
if (m_doc->m_Selection->isMultipleSelection())
@@ -2199,7 +2199,7 @@
void Canvas::displayCorrectedXYHUD(QPoint m, double x, double y)
{
- if (!PrefsManager::instance()->appPrefs.showMouseCoordinates)
+ if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
return;
double gx = x;
double gy = y;
@@ -2215,7 +2215,7 @@
void Canvas::displayCorrectedSingleHUD(QPoint m, double val, bool isX)
{
- if (!PrefsManager::instance()->appPrefs.showMouseCoordinates)
+ if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
return;
double gx = val;
if (isX)
@@ -2236,14 +2236,14 @@
void Canvas::displayXYHUD(QPoint m, double x, double y)
{
- if (!PrefsManager::instance()->appPrefs.showMouseCoordinates)
+ if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
return;
QToolTip::showText(m + QPoint(5, 5), tr("X: %1\nY: %2").arg(value2String(x, m_doc->unitIndex(), true, true)).arg(value2String(y, m_doc->unitIndex(), true, true)), this);
}
void Canvas::displaySizeHUD(QPoint m, double x, double y, bool isLine)
{
- if (!PrefsManager::instance()->appPrefs.showMouseCoordinates)
+ if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
return;
if (isLine)
QToolTip::showText(m + QPoint(5, 5), tr("Length: %1\nAngle: %2").arg(value2String(x, m_doc->unitIndex(), true, true)).arg(value2String(y, SC_DEGREES, true, true)), this);
@@ -2253,7 +2253,7 @@
void Canvas::displayRotHUD(QPoint m, double rot)
{
- if (!PrefsManager::instance()->appPrefs.showMouseCoordinates)
+ if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
return;
double r;
if (rot < 0.0)
Index: scribus/prefsstructs.h
===================================================================
--- scribus/prefsstructs.h (revision 13954)
+++ scribus/prefsstructs.h (revision 13955)
@@ -21,312 +21,360 @@
struct CheckerPrefs
{
- bool ignoreErrors;
- bool autoCheck;
- bool checkGlyphs;
- bool checkOverflow;
- bool checkOrphans;
- bool checkPictures;
- bool checkResolution;
- double minResolution;
- double maxResolution;
- bool checkTransparency;
- bool checkAnnotations;
- bool checkRasterPDF;
- bool checkForGIF;
- bool ignoreOffLayers;
+ bool ignoreErrors;
+ bool autoCheck;
+ bool checkGlyphs;
+ bool checkOverflow;
+ bool checkOrphans;
+ bool checkPictures;
+ bool checkResolution;
+ double minResolution;
+ double maxResolution;
+ bool checkTransparency;
+ bool checkAnnotations;
+ bool checkRasterPDF;
+ bool checkForGIF;
+ bool ignoreOffLayers;
};
typedef QMap<QString, CheckerPrefs> CheckerPrefsList;
struct TypoPrefs
{
- int valueSuperScript; //! Displacement of superscript
- int scalingSuperScript; //! Scaling of superscript
- int valueSubScript; //! Displacement of subscript
- int scalingSubScript; //! Scaling of subscript
- int valueSmallCaps; //! Scaling of small caps
- int autoLineSpacing; //! Automatic line spacing percentage
- int valueUnderlinePos; //! Underline displacement
- int valueUnderlineWidth; //! Underline width
- int valueStrikeThruPos; //! Strike-through displacement
- int valueStrikeThruWidth; //! Strike-through line width
+ int valueSuperScript; //! Displacement of superscript
+ int scalingSuperScript; //! Scaling of superscript
+ int valueSubScript; //! Displacement of subscript
+ int scalingSubScript; //! Scaling of subscript
+ int valueSmallCaps; //! Scaling of small caps
+ int autoLineSpacing; //! Automatic line spacing percentage
+ int valueUnderlinePos; //! Underline displacement
+ int valueUnderlineWidth; //! Underline width
+ int valueStrikeThruPos; //! Strike-through displacement
+ int valueStrikeThruWidth; //! Strike-through line width
};
struct WindowPrefs
{
- int xPosition;
- int yPosition;
- int width;
- int height;
- bool visible;
- bool docked;
- bool maximized;
+ int xPosition;
+ int yPosition;
+ int width;
+ int height;
+ bool visible;
+ bool docked;
+ bool maximized;
};
//User Interface
struct UIPrefs
{
- int mouseMoveTimeout; //! Mouse move timeout for move/resize operations
- int wheelJump; //! Distance to jump with mouse wheel scrolling
- int applicationFontSize; //! Font size to use in the application, apart from pÃalettes
- int paletteFontSize; //! Fotn size to use in the palettes
- QString style; //! Currently used QStyle name
- int recentDocCount; //! Number of recent documents to remember
- QString language; //! Language of the user interface
- bool useSmallWidgets; //! Use small widgets in the palettes
- bool showStartupDialog; //! Whether to show the startup dialog or not
+ int mouseMoveTimeout; //! Mouse move timeout for move/resize operations
+ int wheelJump; //! Distance to jump with mouse wheel scrolling
+ int applicationFontSize; //! Font size to use in the application, apart from pÃalettes
+ int paletteFontSize; //! Fotn size to use in the palettes
+ QString style; //! Currently used QStyle name
+ int recentDocCount; //! Number of recent documents to remember
+ QStringList RecentDocs;
+ QString language; //! Language of the user interface
+ bool useSmallWidgets; //! Use small widgets in the palettes
+ bool showStartupDialog; //! Whether to show the startup dialog or not
+ bool stickyTools;
+ bool grayscaleIcons;
+ WindowPrefs mainWinSettings;
+ QByteArray mainWinState;
};
//Paths
struct PathPrefs
{
- QString documents; //! Default document location
- QString colorProfiles; //! Default color profile location
- QString scripts; //! Default script location
- QString documentTemplates; //! Default document template location
+ QString documents; //! Default document location
+ QString colorProfiles; //! Default color profile location
+ QString scripts; //! Default script location
+ QString documentTemplates; //! Default document template location
};
//Document Setup
struct DocumentSetupPrefs
{
- QString pageSize; //! Default page size of a document
- int pageOrientation; //! Default orientation of the page
- double pageWidth; //! Width of a page
- double pageHeight; //! Height of a page
- MarginStruct margins; //! Margins for a page
- MarginStruct bleeds; //! Bleeds for a page
- int marginPreset; //! Use a preset ratio margin setup
- int pagePositioning; //! Show pages in 1,2,3,4 pages side by side on screen
- int docUnitIndex; //! The index of the default unit
+ QString pageSize; //! Default page size of a document
+ int pageOrientation; //! Default orientation of the page
+ double pageWidth; //! Width of a page
+ double pageHeight; //! Height of a page
+ MarginStruct margins; //! Margins for a page
+ MarginStruct bleeds; //! Bleeds for a page
+ int marginPreset; //! Use a preset ratio margin setup
+ int pagePositioning; //! Show pages in 1,2,3,4 pages side by side on screen
+ int docUnitIndex; //! The index of the default unit
};
//Guides
struct GuidesPrefs
{
- bool guidePlacement; //! Placement of guides, in front or behind
+ bool guidePlacement; //! Placement of guides, in front or behind
- int grabRadius;
- double guideRad;
+ int grabRadius;
+ double guideRad;
- bool guidesShown; //! Show the guides or not
- bool marginsShown; //! Show the margins or not
- bool gridShown; //! Show the grid or not
- bool baselineGridShown; //! Show the baseline grid or not
- bool framesShown; //! Show frame borders or not
- bool colBordersShown; //! Show text frame column borders or not
- bool layerMarkersShown; //! Show a layer indicator when layers are active or not
- bool linkShown; //! Show text frame links or not
- bool rulersShown; //! Show the page rulers or not
+ bool guidesShown; //! Show the guides or not
+ bool marginsShown; //! Show the margins or not
+ bool gridShown; //! Show the grid or not
+ bool baselineGridShown; //! Show the baseline grid or not
+ bool framesShown; //! Show frame borders or not
+ bool colBordersShown; //! Show text frame column borders or not
+ bool layerMarkersShown; //! Show a layer indicator when layers are active or not
+ bool linkShown; //! Show text frame links or not
+ bool rulersShown; //! Show the page rulers or not
- double majorGridSpacing; //! Major grid spacing
- double minorGridSpacing; //! Minor grid spacing
- double valueBaselineGrid; //! Baseline grid spacing
- double offsetBaselineGrid; //! Offset of first line of baseline grid from top of page
+ double majorGridSpacing; //! Major grid spacing
+ double minorGridSpacing; //! Minor grid spacing
+ double valueBaselineGrid; //! Baseline grid spacing
+ double offsetBaselineGrid; //! Offset of first line of baseline grid from top of page
- bool showPic;
- bool showControls;
- bool showBleed;
- bool rulerMode;
+ bool showPic;
+ bool showControls;
+ bool showBleed;
+ bool rulerMode;
- QColor guideColor; //! Color of guides
- QColor marginColor; //! Color of margins
- QColor majorGridColor; //! Color of major grid
- QColor minorGridColor; //! Color of minor grid
- QColor baselineGridColor; //! Color of baseline grid
+ QColor guideColor; //! Color of guides
+ QColor marginColor; //! Color of margins
+ QColor majorGridColor; //! Color of major grid
+ QColor minorGridColor; //! Color of minor grid
+ QColor baselineGridColor; //! Color of baseline grid
};
struct ItemToolPrefs
{
- /* Texttool */
- QString defFont;
- int defSize;
- QString dPenText;
- int dTextPenShade;
- QString dStrokeText;
- int dTextStrokeShade;
- QString dTextBackGround;
- QString dTextLineColor;
- int dTextBackGroundShade;
- int dTextLineShade;
- int dCols;
- double dGap;
- QString tabFillChar;
- double dTabWidth;
- /* ShapeTool */
- QString dPen;
- QString dBrush;
- int dShade;
- int dShade2;
- int dLineArt;
- double dWidth;
- /* Line Tool */
- QString dPenLine;
- int dShadeLine;
- double dWidthLine;
- int dLstyleLine;
- int dStartArrow;
- int dEndArrow;
- /* Regular Polygon Tool */
- int polyC;
- int polyFd;
- double polyF;
- bool polyS;
- double polyR;
- double polyCurvature;
- /* Picture Tool */
- QString dBrushPict;
- int shadePict;
- double scaleX;
- double scaleY;
- bool scaleType;
- bool aspectRatio;
- int lowResType;
- bool useEmbeddedPath;
+ /* Texttool */
+ QString defFont;
+ int defSize;
+ QString dPenText;
+ int dTextPenShade;
+ QString dStrokeText;
+ int dTextStrokeShade;
+ QString dTextBackGround;
+ QString dTextLineColor;
+ int dTextBackGroundShade;
+ int dTextLineShade;
+ int dCols;
+ double dGap;
+ QString tabFillChar;
+ double dTabWidth;
+ /* ShapeTool */
+ QString dPen;
+ QString dBrush;
+ int dShade;
+ int dShade2;
+ int dLineArt;
+ double dWidth;
+ /* Line Tool */
+ QString dPenLine;
+ int dShadeLine;
+ double dWidthLine;
+ int dLstyleLine;
+ int dStartArrow;
+ int dEndArrow;
+ /* Regular Polygon Tool */
+ int polyC;
+ int polyFd;
+ double polyF;
+ bool polyS;
+ double polyR;
+ double polyCurvature;
+ /* Picture Tool */
+ QString dBrushPict;
+ int shadePict;
+ double scaleX;
+ double scaleY;
+ bool scaleType;
+ bool aspectRatio;
+ int lowResType;
+ bool useEmbeddedPath;
};
struct OperatorToolPrefs
{
- /* Magnifier Tool */
- int magMin;
- int magMax;
- int magStep;
- /* Item Duplicate Offset */
- double dispX;
- double dispY;
- /* Rotation Tool constrain value */
- double constrain;
+ /* Magnifier Tool */
+ int magMin;
+ int magMax;
+ int magStep;
+ /* Item Duplicate Offset */
+ double dispX;
+ double dispY;
+ /* Rotation Tool constrain value */
+ double constrain;
};
-struct ApplicationPrefs
+struct HyphenatorPrefs
{
- UIPrefs uiPrefs;
- PathPrefs pathPrefs;
- DocumentSetupPrefs docSetupPrefs;
- GuidesPrefs guidesPrefs;
- TypoPrefs typoPrefs;
- ItemToolPrefs itemToolPrefs;
- OperatorToolPrefs opToolPrefs;
- //Hyphenator
- //Fonts
- //Printer
- //ColorManagement
- //PDF Export
- //Document Item Attributes
- //Tables of Contents
- //Keyboard Shortcuts
- //Scrapbook
- //Display
- //External Tools
- //Miscellaneous
- //Plugins
- //Short Words
- //Scripter
+ int MinWordLen;
+ int HyCount;
+ QString Language;
+ QHash<QString, QString> specialWords;
+ QSet<QString> ignoredWords;
+ bool Automatic;
+ bool AutoCheck;
+};
+struct FontPrefs
+{
+ SCFonts AvailFonts;
+ bool askBeforeSubstitute;
+};
- SCFonts AvailFonts;
- QList<ArrowDesc> arrowStyles;
- QList<PageSet> pageSets;
- ColorList DColors;
+struct PrinterPrefs
+{
+ QString PrinterName;
+ QString PrinterFile;
+ QString PrinterCommand;
+ bool ClipMargin;
+};
- bool showPageShadow;
- QColor DpapColor;
- QColor DFrameColor;
- QColor DFrameNormColor;
- QColor DFrameGroupColor;
- QColor DFrameLinkColor;
- QColor DFrameLockColor;
- QColor DFrameAnnotationColor;
- QColor DPageBorderColor;
- QColor DControlCharColor;
+struct ColorManagementPrefs
+{
+};
- CheckerPrefsList checkerProfiles;
- QString curCheckProfile;
+struct ItemAttrPrefs
+{
+ ObjAttrVector defaultItemAttributes;
+};
- WindowPrefs mainWinSettings;
- QByteArray mainWinState;
+struct TOCPrefs
+{
+ ToCSetupVector defaultToCSetups;
+};
+struct KeyboardShortcutsPrefs
+{
+ QMap<QString,Keys> KeyActions;
+};
+struct ScrapbookPrefs
+{
+ QStringList RecentScrapbooks;
+ int numScrapbookCopies;
+ bool doCopyToScrapbook;
+ bool persistentScrapbook;
+};
- PDFOptions PDF_Options;
- ObjAttrVector defaultItemAttributes;
- ToCSetupVector defaultToCSetups;
- bool SepalT;
- bool SepalN;
- // int PSize;
- bool marginColored;
- QStringList RecentDocs;
- QStringList RecentScrapbooks;
- int numScrapbookCopies;
- bool doCopyToScrapbook;
- bool persistentScrapbook;
+struct DisplayPrefs
+{
+ bool marginColored;
+ bool showPageShadow;
+ QColor DpapColor;
+ QColor DFrameColor;
+ QColor DFrameNormColor;
+ QColor DFrameGroupColor;
+ QColor DFrameLinkColor;
+ QColor DFrameLockColor;
+ QColor DFrameAnnotationColor;
+ QColor DPageBorderColor;
+ QColor DControlCharColor;
+ bool showToolTips;
+ bool showMouseCoordinates;
+ MarginStruct scratch;
+ double GapHorizontal;
+ double GapVertical;
+ double DisScale;
+};
- CMSData DCMSset;
- QMap<QString,Keys> KeyActions;
- QString PrinterName;
- QString PrinterFile;
- QString PrinterCommand;
+struct ExternalToolsPrefs
+{
+ QString gs_exe;
+ bool gs_AntiAliasText;
+ bool gs_AntiAliasGraphics;
+ int gs_Resolution;
+ QString imageEditorExecutable;
+ QString extBrowserExecutable;
+ QStringList latexConfigs;
+ QMap<QString, QString> latexCommands;
+ QString latexEditorExecutable;
+ int latexResolution;
+ bool latexForceDpi;
+ bool latexStartWithEmptyFrames;
+};
- int MinWordLen;
- int HyCount;
- QString Language;
- QHash<QString, QString> specialWords;
- QSet<QString> ignoredWords;
+struct MiscellaneousPrefs
+{
+ bool haveStylePreview;
- bool Automatic;
- bool AutoCheck;
+ // lorem ipsum
+ bool useStandardLI;
+ int paragraphsLI;
+};
- QMap<QString,QString> GFontSub;
- bool AutoSave;
- int AutoSaveTime;
- double DisScale;
- QString DColorSet;
- QStringList CustomColorSets;
- bool PrPr_Mode;
- bool Gcr_Mode;
- bool PrPr_AntiAliasing;
- bool PrPr_Transparency;
- bool PrPr_C;
- bool PrPr_M;
- bool PrPr_Y;
- bool PrPr_K;
- bool PrPr_InkCoverage;
- int PrPr_InkThreshold;
- QString gs_exe;
- bool gs_AntiAliasText;
- bool gs_AntiAliasGraphics;
- int gs_Resolution;
- QString imageEditorExecutable;
- QString extBrowserExecutable;
- QStringList latexConfigs;
- QMap<QString, QString> latexCommands;
- QString latexEditorExecutable;
- int latexResolution;
- bool latexForceDpi;
- bool latexStartWithEmptyFrames;
- bool ClipMargin;
- bool GCRMode;
- QColor STEcolor;
- QString STEfont;
- MarginStruct scratch;
- double GapHorizontal;
- double GapVertical;
- bool askBeforeSubstituite;
- bool haveStylePreview;
- bool showToolTips;
- bool showMouseCoordinates;
- // lorem ipsum
- bool useStandardLI;
- int paragraphsLI;
+struct PluginPrefs
+{
+};
+struct ShortWordPrefs
+{
+};
- bool stickyTools;
- bool grayscaleIcons;
- //TODO : Remove these no longer used items
- //! System default QStyle name for current instance, seemingly unused
- QString ui_SystemTheme;
+struct ScripterPrefs
+{
};
+struct ApplicationPrefs
+{
+ UIPrefs uiPrefs;
+ PathPrefs pathPrefs;
+ DocumentSetupPrefs docSetupPrefs;
+ GuidesPrefs guidesPrefs;
+ TypoPrefs typoPrefs;
+ ItemToolPrefs itemToolPrefs;
+ OperatorToolPrefs opToolPrefs;
+ HyphenatorPrefs hyphPrefs;
+ FontPrefs fontPrefs;
+ PrinterPrefs printerPrefs;
+ ColorManagementPrefs colorMgmtPrefs;
+ PDFOptions pdfPrefs;
+ ItemAttrPrefs itemAttrPrefs;
+ TOCPrefs tocPrefs;
+ KeyboardShortcutsPrefs keyShortcutPrefs;
+ ScrapbookPrefs scrapbookPrefs;
+ DisplayPrefs displayPrefs;
+ ExternalToolsPrefs extToolPrefs;
+ MiscellaneousPrefs miscPrefs;
+ PluginPrefs pluginPrefs;
+ ShortWordPrefs shortwordPrefs;
+ ScripterPrefs scripterPrefs;
+ CheckerPrefsList checkerPrefsList;
+
+
+ // Remaining to sort out
+ QList<ArrowDesc> arrowStyles;
+ QList<PageSet> pageSets;
+ ColorList DColors;
+ QString curCheckProfile;
+ bool SepalT;
+ bool SepalN;
+ CMSData DCMSset;
+ QMap<QString,QString> GFontSub;
+ bool AutoSave;
+ int AutoSaveTime;
+ QString DColorSet;
+ QStringList CustomColorSets;
+ bool PrPr_Mode;
+ bool Gcr_Mode;
+ bool PrPr_AntiAliasing;
+ bool PrPr_Transparency;
+ bool PrPr_C;
+ bool PrPr_M;
+ bool PrPr_Y;
+ bool PrPr_K;
+ bool PrPr_InkCoverage;
+ int PrPr_InkThreshold;
+ bool GCRMode;
+ QColor STEcolor;
+ QString STEfont;
+
+
+
+
+ //TODO : Remove these no longer used items
+ //! System default QStyle name for current instance, seemingly unused
+ QString ui_SystemTheme;
+};
+
#endif
Index: scribus/scpageoutput.cpp
===================================================================
--- scribus/scpageoutput.cpp (revision 13954)
+++ scribus/scpageoutput.cpp (revision 13955)
@@ -562,7 +562,7 @@
painter->setupPolygon(&gly, true);
if (glyph == 0)
{
- ScColorShade tmp(PrefsManager::instance()->appPrefs.DControlCharColor, 100);
+ ScColorShade tmp(PrefsManager::instance()->appPrefs.displayPrefs.DControlCharColor, 100);
painter->setPen(tmp, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
painter->setLineWidth(style.fontSize() * glyphs.scaleV * style.outlineWidth() * 2 / 10000.0);
painter->strokePath();
Index: scribus/pageitem.cpp
===================================================================
--- scribus/pageitem.cpp (revision 13954)
+++ scribus/pageitem.cpp (revision 13955)
@@ -1209,13 +1209,13 @@
{
if ((Frame) && (m_Doc->guidesSettings.framesShown) && ((itemType() == ImageFrame) || (itemType() == LatexFrame) || (itemType() == OSGFrame) || (itemType() == PathText)))
{
- p->setPen(PrefsManager::instance()->appPrefs.DFrameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
if ((isBookmark) || (m_isAnnotation))
- p->setPen(PrefsManager::instance()->appPrefs.DFrameAnnotationColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameAnnotationColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
if ((BackBox != 0) || (NextBox != 0))
- p->setPen(PrefsManager::instance()->appPrefs.DFrameLinkColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameLinkColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
if (m_Locked)
- p->setPen(PrefsManager::instance()->appPrefs.DFrameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
p->setFillMode(0);
if (itemType()==PathText)
{
@@ -1449,9 +1449,9 @@
{
//Locked line colour selection
if (m_Locked)
- p->setPen(QPen(PrefsManager::instance()->appPrefs.DFrameLockColor, 1.0 / sc, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
+ p->setPen(QPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameLockColor, 1.0 / sc, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
else
- p->setPen(QPen(PrefsManager::instance()->appPrefs.DFrameColor, 1.0 / sc, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
+ p->setPen(QPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameColor, 1.0 / sc, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
p->setBrush(Qt::NoBrush);
double lw2 = 1.0 / sc;
double lw = 1.0 / sc;
@@ -1480,7 +1480,7 @@
else
p->drawRect(QRectF(0, 0, Width, Height));
// p->setPen(QPen(PrefsManager::instance()->appPrefs.DFrameColor, 1.0 / sc, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
- p->setBrush(PrefsManager::instance()->appPrefs.DFrameColor);
+ p->setBrush(PrefsManager::instance()->appPrefs.displayPrefs.DFrameColor);
p->setPen(Qt::NoPen);
if ((!m_Locked) && (!m_SizeLocked))
{
@@ -1510,14 +1510,14 @@
}
else
{
- p->setPen(QPen(PrefsManager::instance()->appPrefs.DFrameGroupColor, 1.0 / sc, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
+ p->setPen(QPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameGroupColor, 1.0 / sc, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
p->setBrush(Qt::NoBrush);
p->drawRect(QRectF(0.0, 0.0, Width, Height));
if (m_Doc->m_Selection->count() == 1)
{
p->setPen(Qt::NoPen);
// p->setPen(QPen(PrefsManager::instance()->appPrefs.DFrameGroupColor, 1.0 / sc, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
- p->setBrush(PrefsManager::instance()->appPrefs.DFrameGroupColor);
+ p->setBrush(PrefsManager::instance()->appPrefs.displayPrefs.DFrameGroupColor);
p->drawRect(QRectF(0.0, 0.0, handleSize, handleSize));
p->drawRect(QRectF(Width - handleSize, Height - handleSize, handleSize, handleSize));
p->drawRect(QRectF(Width - handleSize, 0.0, handleSize, handleSize));
@@ -1915,7 +1915,7 @@
p->setupPolygon(&points, true);
QColor oldBrush = p->brush();
p->setBrush( (style.effects() & ScStyle_SuppressSpace) ? Qt::green
- : PrefsManager::instance()->appPrefs.DControlCharColor);
+ : PrefsManager::instance()->appPrefs.displayPrefs.DControlCharColor);
if (stroke)
{
QColor tmp = p->pen();
@@ -2037,7 +2037,7 @@
}
if (glyph == 0)
{
- p->setPen(PrefsManager::instance()->appPrefs.DControlCharColor, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DControlCharColor, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
p->setLineWidth(style.fontSize() * glyphs.scaleV * style.outlineWidth() * 2 / 10000.0);
p->strokePath();
}
Index: scribus/scribusview.cpp
===================================================================
--- scribus/scribusview.cpp (revision 13954)
+++ scribus/scribusview.cpp (revision 13955)
@@ -536,7 +536,7 @@
m_canvasMode->deactivate(false);
m_canvasMode = m_canvasMode->delegate();
m_canvasMode->activate(true);
- if (PrefsManager::instance()->appPrefs.stickyTools)
+ if (PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
{
m_canvas->m_viewMode.forceRedraw = true;
// Doc->m_Selection->clear();
@@ -2704,7 +2704,7 @@
int w = qRound(qMin(visibleWidth() / m_canvas->scale(), Doc->currentPage()->width()));
int h = qRound(qMin(visibleHeight() / m_canvas->scale(), Doc->currentPage()->height()));
rememberOldZoomLocation(w / 2 + x,h / 2 + y);
- zoom(oldX, oldY, zoomSpinBox->value() / 100.0 * Prefs->DisScale, false);
+ zoom(oldX, oldY, zoomSpinBox->value() / 100.0 * Prefs->displayPrefs.DisScale, false);
setFocus();
}
@@ -2715,7 +2715,7 @@
int w = qRound(qMin(visibleWidth() / m_canvas->scale(), Doc->maxCanvasCoordinate.x() - Doc->minCanvasCoordinate.x()));
int h = qRound(qMin(visibleHeight() / m_canvas->scale(), Doc->maxCanvasCoordinate.y() - Doc->minCanvasCoordinate.y()));
rememberOldZoomLocation(w / 2 + x,h / 2 + y);
- zoom(oldX, oldY, Prefs->DisScale, false);
+ zoom(oldX, oldY, Prefs->displayPrefs.DisScale, false);
}
void ScribusView::slotZoomIn(int mx,int my)
@@ -2808,7 +2808,7 @@
setRulerPos(contentsX(), contentsY());
setMenTxt(Doc->currentPage()->pageNr());
disconnect(zoomSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setZoom()));
- zoomSpinBox->setValue(m_canvas->scale()/Prefs->DisScale*100);
+ zoomSpinBox->setValue(m_canvas->scale()/Prefs->displayPrefs.DisScale*100);
connect(zoomSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setZoom()));
}
@@ -4772,20 +4772,20 @@
void ScribusView::setScale(const double newScale)
{
double Scale=newScale;
- double v=Doc->opToolPrefs.magMin*Prefs->DisScale/100.0;
+ double v=Doc->opToolPrefs.magMin*Prefs->displayPrefs.DisScale/100.0;
if (Scale < v)
Scale=v;
- double v2=Doc->opToolPrefs.magMax*Prefs->DisScale/100.0;
+ double v2=Doc->opToolPrefs.magMax*Prefs->displayPrefs.DisScale/100.0;
if (Scale > v2)
Scale=v2;
- double v3=32*Prefs->DisScale;
+ double v3=32*Prefs->displayPrefs.DisScale;
if (Scale > v3)
Scale=v3;
m_canvas->setScale(Scale);
zoomSpinBox->blockSignals(true);
- zoomSpinBox->setValue(m_canvas->scale()/Prefs->DisScale*100);
+ zoomSpinBox->setValue(m_canvas->scale()/Prefs->displayPrefs.DisScale*100);
zoomSpinBox->blockSignals(false);
unitChange();
@@ -4979,7 +4979,7 @@
{
QPoint canvasPoint;
QPoint globalPoint = m_canvas->canvasToGlobal(QPointF(canvasX, canvasY));
- double newScale = (scale > 32*Prefs->DisScale) ? (32*Prefs->DisScale) : scale;
+ double newScale = (scale > 32*Prefs->displayPrefs.DisScale) ? (32*Prefs->displayPrefs.DisScale) : scale;
undoManager->setUndoEnabled(false);
updatesOn(false);
setScale(newScale);
Index: scribus/pageitem_textframe.cpp
===================================================================
--- scribus/pageitem_textframe.cpp (revision 13954)
+++ scribus/pageitem_textframe.cpp (revision 13955)
@@ -2662,13 +2662,13 @@
double scpInv = 1.0 / (qMax(view->scale(), 1.0) * aestheticFactor);
if ((Frame) && (m_Doc->guidesSettings.framesShown))
{
- p->setPen(PrefsManager::instance()->appPrefs.DFrameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
if ((isBookmark) || (m_isAnnotation))
- p->setPen(PrefsManager::instance()->appPrefs.DFrameAnnotationColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameAnnotationColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
if ((BackBox != 0) || (NextBox != 0))
- p->setPen(PrefsManager::instance()->appPrefs.DFrameLinkColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameLinkColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
if (m_Locked)
- p->setPen(PrefsManager::instance()->appPrefs.DFrameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
p->setFillMode(0);
// Ugly Hack to fix rendering problems with cairo >=1.5.10 && <1.8.0 follows
@@ -3399,13 +3399,13 @@
double ly1= ofy;
double lx2= ofx+ofwh;
double ly2= ofy+ofwh;
- p->setPen(PrefsManager::instance()->appPrefs.DFrameNormColor, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameNormColor, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
if ((isBookmark) || (m_isAnnotation))
- p->setPen(PrefsManager::instance()->appPrefs.DFrameAnnotationColor, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameAnnotationColor, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
if ((BackBox != 0) || (NextBox != 0))
- p->setPen(PrefsManager::instance()->appPrefs.DFrameLinkColor, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameLinkColor, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
if (m_Locked)
- p->setPen(PrefsManager::instance()->appPrefs.DFrameLockColor, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.DFrameLockColor, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
if (m_Doc->m_Selection->containsItem(this))
p->setPen(Qt::red, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
p->setPenOpacity(1.0);
Index: scribus/ui/stylemanager.cpp
===================================================================
--- scribus/ui/stylemanager.cpp (revision 13954)
+++ scribus/ui/stylemanager.cpp (revision 13955)
@@ -1081,8 +1081,8 @@
}
ApplicationPrefs *prefsData=&(PrefsManager::instance()->appPrefs);
- for (QMap<QString,Keys>::Iterator it=prefsData->KeyActions.begin();
- it!=prefsData->KeyActions.end(); ++it)
+ for (QMap<QString,Keys>::Iterator it=prefsData->keyShortcutPrefs.KeyActions.begin();
+ it!=prefsData->keyShortcutPrefs.KeyActions.end(); ++it)
{
if (key.matches(it.value().keySequence) != QKeySequence::NoMatch)
return true;
Index: scribus/ui/loremipsum.cpp
===================================================================
--- scribus/ui/loremipsum.cpp (revision 13954)
+++ scribus/ui/loremipsum.cpp (revision 13955)
@@ -164,7 +164,7 @@
paraBox = new QSpinBox( this );
paraBox->setMinimum( 1 );
- paraBox->setValue(PrefsManager::instance()->appPrefs.paragraphsLI);
+ paraBox->setValue(PrefsManager::instance()->appPrefs.miscPrefs.paragraphsLI);
layout2->addWidget( paraBox );
randomCheckBox = new QCheckBox(this);
randomCheckBox->setChecked(true);
Index: scribus/ui/tabexternaltoolswidget.cpp
===================================================================
--- scribus/ui/tabexternaltoolswidget.cpp (revision 13954)
+++ scribus/ui/tabexternaltoolswidget.cpp (revision 13955)
@@ -89,19 +89,19 @@
void TabExternalToolsWidget::restoreDefaults(struct ApplicationPrefs *prefsData)
{
- psToolLineEdit->setText(QDir::convertSeparators(prefsData->gs_exe));
- psAntialiasTextCheckBox->setChecked(prefsData->gs_AntiAliasText);
- psAntialiasGraphicsCheckBox->setChecked(prefsData->gs_AntiAliasGraphics);
- psResolutionSpinBox->setValue(prefsData->gs_Resolution);
- imageToolLineEdit->setText(QDir::convertSeparators(prefsData->imageEditorExecutable));
- extBrowserToolLineEdit->setText(QDir::convertSeparators(prefsData->extBrowserExecutable));
- latexResolutionSpinBox->setValue(prefsData->latexResolution);
- latexEditorLineEdit->setText(prefsData->latexEditorExecutable);
- latexForceDpiCheckBox->setCheckState(prefsData->latexForceDpi?Qt::Checked:Qt::Unchecked);
- latexEmptyFrameCheckBox->setCheckState(prefsData->latexStartWithEmptyFrames?Qt::Checked:Qt::Unchecked);
+ psToolLineEdit->setText(QDir::convertSeparators(prefsData->extToolPrefs.gs_exe));
+ psAntialiasTextCheckBox->setChecked(prefsData->extToolPrefs.gs_AntiAliasText);
+ psAntialiasGraphicsCheckBox->setChecked(prefsData->extToolPrefs.gs_AntiAliasGraphics);
+ psResolutionSpinBox->setValue(prefsData->extToolPrefs.gs_Resolution);
+ imageToolLineEdit->setText(QDir::convertSeparators(prefsData->extToolPrefs.imageEditorExecutable));
+ extBrowserToolLineEdit->setText(QDir::convertSeparators(prefsData->extToolPrefs.extBrowserExecutable));
+ latexResolutionSpinBox->setValue(prefsData->extToolPrefs.latexResolution);
+ latexEditorLineEdit->setText(prefsData->extToolPrefs.latexEditorExecutable);
+ latexForceDpiCheckBox->setCheckState(prefsData->extToolPrefs.latexForceDpi?Qt::Checked:Qt::Unchecked);
+ latexEmptyFrameCheckBox->setCheckState(prefsData->extToolPrefs.latexStartWithEmptyFrames?Qt::Checked:Qt::Unchecked);
latexConfigsListWidget->clear();
- QStringList configs = prefsData->latexConfigs;
- commands = prefsData->latexCommands;
+ QStringList configs = prefsData->extToolPrefs.latexConfigs;
+ commands = prefsData->extToolPrefs.latexCommands;
foreach (QString config, configs) {
insertConfigItem(config);
}
Index: scribus/fileloader.cpp
===================================================================
--- scribus/fileloader.cpp (revision 13954)
+++ scribus/fileloader.cpp (revision 13955)
@@ -167,14 +167,14 @@
{
if (FileType==FORMATID_SLA12XIMPORT)
{
- (*it).plug->setupTargets(currDoc, currDoc->view(), currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.AvailFonts));
+ (*it).plug->setupTargets(currDoc, currDoc->view(), currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.fontPrefs.AvailFonts));
ret=(*it).plug->loadPage(FileName, PageToLoad, Mpage, renamedPageName);
// if (ret)
// (*it).plug->getReplacedFontData(newReplacement, ReplacedFonts, dummyScFaces);
}
if (FileType==FORMATID_SLA13XIMPORT || FileType==FORMATID_SLA134IMPORT || FileType==FORMATID_SLA150IMPORT)
{
- (*it).plug->setupTargets(currDoc, 0, currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.AvailFonts));
+ (*it).plug->setupTargets(currDoc, 0, currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.fontPrefs.AvailFonts));
ret=(*it).plug->loadPage(FileName, PageToLoad, Mpage, renamedPageName);
// if (ret)
// (*it).plug->getReplacedFontData(newReplacement, ReplacedFonts, dummyScFaces);
@@ -279,7 +279,7 @@
{
case FORMATID_SLA12XIMPORT:
{
- (*it).setupTargets(currDoc, currDoc->view(), currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.AvailFonts));
+ (*it).setupTargets(currDoc, currDoc->view(), currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.fontPrefs.AvailFonts));
ret=(*it).loadFile(FileName, LoadSavePlugin::lfCreateDoc);
// if (ret)
// (*it).getReplacedFontData(newReplacement, ReplacedFonts, dummyScFaces);
@@ -289,14 +289,14 @@
case FORMATID_SLA134IMPORT:
case FORMATID_SLA150IMPORT:
{
- (*it).setupTargets(currDoc, 0, currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.AvailFonts));
+ (*it).setupTargets(currDoc, 0, currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.fontPrefs.AvailFonts));
ret=(*it).loadFile(FileName, LoadSavePlugin::lfCreateDoc);
// if (ret)
// (*it).getReplacedFontData(newReplacement, ReplacedFonts, dummyScFaces);
}
break;
default:
- (*it).setupTargets(currDoc, currDoc->view(), currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.AvailFonts));
+ (*it).setupTargets(currDoc, currDoc->view(), currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.fontPrefs.AvailFonts));
ret = (*it).loadFile(FileName, LoadSavePlugin::lfCreateDoc);
break;
}
@@ -310,7 +310,7 @@
QList<FileFormat>::const_iterator it;
if (findFormat(FORMATID_SLA150EXPORT, it))
{
- it->setupTargets(doc, 0, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.AvailFonts));
+ it->setupTargets(doc, 0, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.fontPrefs.AvailFonts));
ret = it->saveFile(fileName);
if (savedFile)
*savedFile = it->lastSavedFile();
@@ -322,7 +322,7 @@
{
QList<FileFormat>::const_iterator it;
if (findFormat(FileType, it)) {
- (*it).plug->setupTargets(doc, 0, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.AvailFonts));
+ (*it).plug->setupTargets(doc, 0, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.fontPrefs.AvailFonts));
return (*it).readStyles(fileName, doc, docParagraphStyles);
}
return false;
@@ -332,7 +332,7 @@
{
QList<FileFormat>::const_iterator it;
if (findFormat(FileType, it)) {
- (*it).plug->setupTargets(doc, 0, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.AvailFonts));
+ (*it).plug->setupTargets(doc, 0, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.fontPrefs.AvailFonts));
return (*it).readCharStyles(fileName, doc, docCharStyles);
}
return false;
@@ -504,7 +504,7 @@
ReplacedFonts = currDoc->AllFonts->getSubstitutions(ReplacedFonts.keys());
if (ReplacedFonts.count() != 0)
{
- if ((prefsManager->appPrefs.askBeforeSubstituite))
+ if ((prefsManager->appPrefs.fontPrefs.askBeforeSubstitute))
{
qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
FontReplaceDialog dia(0, &ReplacedFonts);
Index: scribus/pdflib_core.cpp
===================================================================
--- scribus/pdflib_core.cpp (revision 13954)
+++ scribus/pdflib_core.cpp (revision 13955)
@@ -179,7 +179,7 @@
PDF_Error( tr("Qt build miss both \"UTF-16\" and \"ISO-10646-UCS-2\" text codecs, pdf export is not possible") );
return false;
}
- if (PDF_Begin_Doc(fn, PrefsManager::instance()->appPrefs.AvailFonts, usedFonts, doc.scMW()->bookmarkPalette->BView))
+ if (PDF_Begin_Doc(fn, PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts, usedFonts, doc.scMW()->bookmarkPalette->BView))
{
QMap<int, int> pageNsMpa;
for (uint a = 0; a < pageNs.size(); ++a)
@@ -7403,8 +7403,8 @@
}
else
{
- ImInfo.sxa *= PrefsManager::instance()->appPrefs.gs_Resolution / 72.0;
- ImInfo.sya *= PrefsManager::instance()->appPrefs.gs_Resolution / 72.0;
+ ImInfo.sxa *= PrefsManager::instance()->appPrefs.extToolPrefs.gs_Resolution / 72.0;
+ ImInfo.sya *= PrefsManager::instance()->appPrefs.extToolPrefs.gs_Resolution / 72.0;
}
}
if (!fromAN && output)
Index: scribus/hyphenator.cpp
===================================================================
--- scribus/hyphenator.cpp (revision 13954)
+++ scribus/hyphenator.cpp (revision 13955)
@@ -58,7 +58,7 @@
Language = doc->Language;
else
{
- Language = PrefsManager::instance()->appPrefs.Language;
+ Language = PrefsManager::instance()->appPrefs.hyphPrefs.Language;
doc->Language = Language;
}
// pfad += ScCore->primaryMainWindow()->Sprachen[Language];
Index: scribus/scimgdataloader_ps.cpp
===================================================================
--- scribus/scimgdataloader_ps.cpp (revision 13954)
+++ scribus/scimgdataloader_ps.cpp (revision 13955)
@@ -492,7 +492,7 @@
QString missingF = "";
for (int fo = 0; fo < FontListe.count(); fo++)
{
- if (!PrefsManager::instance()->appPrefs.AvailFonts.contains(FontListe[fo]))
+ if (!PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.contains(FontListe[fo]))
{
missing = true;
missingF += FontListe[fo]+"\n";
Index: scribus/util_ghostscript.cpp
===================================================================
--- scribus/util_ghostscript.cpp (revision 13954)
+++ scribus/util_ghostscript.cpp (revision 13955)
@@ -66,9 +66,9 @@
else
args.append( "-sDEVICE=pngalpha" );
// and antialiasing
- if (prefsManager->appPrefs.gs_AntiAliasText)
+ if (prefsManager->appPrefs.extToolPrefs.gs_AntiAliasText)
args.append( "-dTextAlphaBits=4" );
- if (prefsManager->appPrefs.gs_AntiAliasGraphics)
+ if (prefsManager->appPrefs.extToolPrefs.gs_AntiAliasGraphics)
args.append( "-dGraphicsAlphaBits=4" );
// Add any extra font paths being used by Scribus to gs's font search path
@@ -103,9 +103,9 @@
else
cmd1 += " -sDEVICE=pngalpha";
// and antialiasing
- if (prefsManager->appPrefs.gs_AntiAliasText)
+ if (prefsManager->appPrefs.extToolPrefs.gs_AntiAliasText)
cmd1 += " -dTextAlphaBits=4";
- if (prefsManager->appPrefs.gs_AntiAliasGraphics)
+ if (prefsManager->appPrefs.extToolPrefs.gs_AntiAliasGraphics)
cmd1 += " -dGraphicsAlphaBits=4";
// Add any extra font paths being used by Scribus to gs's font search path
Index: scribus/gtaction.cpp
===================================================================
--- scribus/gtaction.cpp (revision 13954)
+++ scribus/gtaction.cpp (revision 13955)
@@ -543,7 +543,7 @@
QString useFont = font->getName();
if ((useFont.isNull()) || (useFont.isEmpty()))
useFont = textFrame->itemText.defaultStyle().charStyle().font().scName();
- else if (prefsManager->appPrefs.AvailFonts[font->getName()].isNone())
+ else if (prefsManager->appPrefs.fontPrefs.AvailFonts[font->getName()].isNone())
{
bool found = false;
// Do not empty otherwise user may be asked to replace an empty font
@@ -599,7 +599,7 @@
if(!textFrame->doc()->UsedFonts.contains(useFont))
textFrame->doc()->AddFont(useFont);
- return prefsManager->appPrefs.AvailFonts[useFont];
+ return prefsManager->appPrefs.fontPrefs.AvailFonts[useFont];
}
QString gtAction::findFontName(gtFont* font)
@@ -608,7 +608,7 @@
for (uint i = 0; i < static_cast<uint>(gtFont::NAMECOUNT); ++i)
{
QString nname = font->getName(i);
- if (! prefsManager->appPrefs.AvailFonts[nname].isNone())
+ if (! prefsManager->appPrefs.fontPrefs.AvailFonts[nname].isNone())
{
ret = nname;
break;
Index: scribus/canvasmode_drawfreehand.cpp
===================================================================
--- scribus/canvasmode_drawfreehand.cpp (revision 13954)
+++ scribus/canvasmode_drawfreehand.cpp (revision 13955)
@@ -370,7 +370,7 @@
m_doc->changed();
// m_view->updateContents(currItem->getRedrawBounding(m_canvas->scale()).adjusted(-10, -10, 20, 20));
}
- if (!PrefsManager::instance()->appPrefs.stickyTools)
+ if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
{
m_view->requestMode(modeNormal);
// m_view->requestMode(submodePaintingDone);
@@ -510,7 +510,7 @@
currItem->OldH2 = currItem->height();
currItem->Sizing = false;
m_doc->SnapGuides = oldSnap;
- if (!PrefsManager::instance()->appPrefs.stickyTools)
+ if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
{
m_view->requestMode(modeNormal);
// m_view->requestMode(submodePaintingDone);
@@ -912,7 +912,7 @@
}
if (m_doc->appMode != modeEdit)
{
- if (!PrefsManager::instance()->appPrefs.stickyTools)
+ if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
{
// qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
m_view->requestMode(modeNormal);
Index: scribus/canvasmode_create.cpp
===================================================================
--- scribus/canvasmode_create.cpp (revision 13954)
+++ scribus/canvasmode_create.cpp (revision 13955)
@@ -396,7 +396,7 @@
delete m_createTransaction;
m_createTransaction = NULL;
}
- if (!PrefsManager::instance()->appPrefs.stickyTools)
+ if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
{
m_view->requestMode(modeNormal);
}
Index: scribus/util_icon.cpp
===================================================================
--- scribus/util_icon.cpp (revision 13954)
+++ scribus/util_icon.cpp (revision 13955)
@@ -48,7 +48,7 @@
pm->load(iconFilePath);
if (pm->isNull())
qWarning("Unable to load icon %s: Got null pixmap", iconFilePath.toAscii().constData());
- if (PrefsManager::instance()->appPrefs.grayscaleIcons && !forceUseColor)
+ if (PrefsManager::instance()->appPrefs.uiPrefs.grayscaleIcons && !forceUseColor)
{
QImage qi(pm->toImage());
int h=qi.height();
Index: scribus/canvasmode_legacy.cpp
===================================================================
--- scribus/canvasmode_legacy.cpp (revision 13954)
+++ scribus/canvasmode_legacy.cpp (revision 13955)
@@ -2415,7 +2415,7 @@
{
if (m_doc->appMode == modeRotation)
m_doc->RotMode ( RotMode );
- if (!PrefsManager::instance()->appPrefs.stickyTools)
+ if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
m_view->requestMode(modeNormal);
else
{
@@ -4861,7 +4861,7 @@
m_doc->m_Selection->addItem(currItem);
m_doc->m_Selection->delaySignalsOff();
// m_view->updateContents(currItem->getRedrawBounding(m_canvas->scale()));
- if (!PrefsManager::instance()->appPrefs.stickyTools)
+ if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
m_view->requestMode(modeNormal);
// emit DocChanged();
currItem->Sizing = currItem->asLine() ? false : true;
Index: scribus/scprintengine_ps.cpp
===================================================================
--- scribus/scprintengine_ps.cpp (revision 13954)
+++ scribus/scprintengine_ps.cpp (revision 13955)
@@ -23,7 +23,7 @@
doc.getUsedFonts(usedFonts);
doc.getUsedColors(usedColors);
PrefsManager *prefsManager = PrefsManager::instance();
- PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.AvailFonts, usedFonts, usedColors, options.includePDFMarks, options.useSpotColors);
+ PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.fontPrefs.AvailFonts, usedFonts, usedColors, options.includePDFMarks, options.useSpotColors);
if (dd != NULL)
{
if (!options.toFile)
Index: scribus/collect4output.cpp
===================================================================
--- scribus/collect4output.cpp (revision 13954)
+++ scribus/collect4output.cpp (revision 13955)
@@ -271,9 +271,9 @@
QMap<QString,int>::Iterator it3end = m_Doc->UsedFonts.end();
for (it3 = m_Doc->UsedFonts.begin(); it3 != it3end; ++it3)
{
- QFileInfo itf = QFileInfo(prefsManager->appPrefs.AvailFonts[it3.key()].fontFilePath());
- copyFileAtomic(prefsManager->appPrefs.AvailFonts[it3.key()].fontFilePath(), outputDirectory + itf.fileName());
- if (prefsManager->appPrefs.AvailFonts[it3.key()].type() == ScFace::TYPE1)
+ QFileInfo itf = QFileInfo(prefsManager->appPrefs.fontPrefs.AvailFonts[it3.key()].fontFilePath());
+ copyFileAtomic(prefsManager->appPrefs.fontPrefs.AvailFonts[it3.key()].fontFilePath(), outputDirectory + itf.fileName());
+ if (prefsManager->appPrefs.fontPrefs.AvailFonts[it3.key()].type() == ScFace::TYPE1)
{
QStringList metrics;
QString fontDir = itf.absolutePath();
Index: scribus/scprintengine_gdi.cpp
===================================================================
--- scribus/scprintengine_gdi.cpp (revision 13954)
+++ scribus/scprintengine_gdi.cpp (revision 13955)
@@ -439,7 +439,7 @@
options2.pageNumbers.push_back(page->pageNr() + 1 );
tempFilePath = PrefsManager::instance()->preferencesLocation() + "/tmp.ps";
- PSLib *dd = new PSLib(options2, false, PrefsManager::instance()->appPrefs.AvailFonts, usedFonts, usedColors, false, options2.useSpotColors );
+ PSLib *dd = new PSLib(options2, false, PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts, usedFonts, usedColors, false, options2.useSpotColors );
dd->PS_set_file( tempFilePath );
ret = dd->CreatePS( doc, options2);
delete dd;
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp (revision 13954)
+++ scribus/scribusdoc.cpp (revision 13955)
@@ -139,9 +139,9 @@
First(1), Last(0),
viewCount(0), viewID(0),
SnapGuides(false), GuideLock(false),
- scratch(prefsData.scratch),
- GapHorizontal(prefsData.GapHorizontal),
- GapVertical(prefsData.GapVertical),
+ scratch(prefsData.displayPrefs.scratch),
+ GapHorizontal(prefsData.displayPrefs.GapHorizontal),
+ GapVertical(prefsData.displayPrefs.GapVertical),
// ScratchLeft(prefsData.ScratchLeft),
// ScratchRight(prefsData.ScratchRight),
// ScratchTop(prefsData.ScratchTop),
@@ -167,16 +167,16 @@
ValCount(0),
DocName( tr("Document")+"-"),
UsedFonts(),
- AllFonts(&prefsData.AvailFonts),
+ AllFonts(&prefsData.fontPrefs.AvailFonts),
AObjects(),
- papColor(prefsData.DpapColor),
+ papColor(prefsData.displayPrefs.DpapColor),
CurrentSel(-1),
nodeEdit(),
typographicSettings(prefsData.typoPrefs),
guidesSettings(prefsData.guidesPrefs),
itemToolPrefs(prefsData.itemToolPrefs),
opToolPrefs(prefsData.opToolPrefs),
- checkerProfiles(prefsData.checkerProfiles),
+ checkerProfiles(prefsData.checkerPrefsList),
curCheckProfile(prefsData.curCheckProfile),
LastAuto(0), FirstAuto(0),
DraggedElem(0),
@@ -185,16 +185,16 @@
docParagraphStyles(),
docCharStyles(),
Layers(),
- marginColored(prefsData.marginColored),
+ marginColored(prefsData.displayPrefs.marginColored),
GroupCounter(1),
JavaScripts(),
TotalItems(0),
- MinWordLen(prefsData.MinWordLen),
- HyCount(prefsData.HyCount),
- Language(prefsData.Language),
- Automatic(prefsData.Automatic),
- AutoCheck(prefsData.AutoCheck),
- PDF_Options(prefsData.PDF_Options),
+ MinWordLen(prefsData.hyphPrefs.MinWordLen),
+ HyCount(prefsData.hyphPrefs.HyCount),
+ Language(prefsData.hyphPrefs.Language),
+ Automatic(prefsData.hyphPrefs.Automatic),
+ AutoCheck(prefsData.hyphPrefs.AutoCheck),
+ PDF_Options(prefsData.pdfPrefs),
RePos(false),
BookMarks(),
OldBM(false),
@@ -211,8 +211,8 @@
docLayerErrors(),
docItemErrors(),
masterItemErrors(),
- docItemAttributes(prefsData.defaultItemAttributes),
- docToCSetups(prefsData.defaultToCSetups),
+ docItemAttributes(prefsData.itemAttrPrefs.defaultItemAttributes),
+ docToCSetups(prefsData.tocPrefs.defaultToCSetups),
// sections
symReturn(), symNewLine(), symTab(), symNonBreak(), symNewCol(), symNewFrame(),
docHyphenator(0),
@@ -250,9 +250,9 @@
First(1), Last(0),
viewCount(0), viewID(0),
SnapGuides(false), GuideLock(false),
- scratch(prefsData.scratch),
- GapHorizontal(prefsData.GapHorizontal),
- GapVertical(prefsData.GapVertical),
+ scratch(prefsData.displayPrefs.scratch),
+ GapHorizontal(prefsData.displayPrefs.GapHorizontal),
+ GapVertical(prefsData.displayPrefs.GapVertical),
// ScratchLeft(prefsData.ScratchLeft),
// ScratchRight(prefsData.ScratchRight),
// ScratchTop(prefsData.ScratchTop),
@@ -280,16 +280,16 @@
ValCount(0),
DocName(docName),
UsedFonts(),
- AllFonts(&prefsData.AvailFonts),
+ AllFonts(&prefsData.fontPrefs.AvailFonts),
AObjects(),
- papColor(prefsData.DpapColor),
+ papColor(prefsData.displayPrefs.DpapColor),
CurrentSel(-1),
nodeEdit(),
typographicSettings(prefsData.typoPrefs),
guidesSettings(prefsData.guidesPrefs),
itemToolPrefs(prefsData.itemToolPrefs),
opToolPrefs(prefsData.opToolPrefs),
- checkerProfiles(prefsData.checkerProfiles),
+ checkerProfiles(prefsData.checkerPrefsList),
curCheckProfile(prefsData.curCheckProfile),
LastAuto(0), FirstAuto(0),
DraggedElem(0),
@@ -298,16 +298,16 @@
docParagraphStyles(),
docCharStyles(),
Layers(),
- marginColored(prefsData.marginColored),
+ marginColored(prefsData.displayPrefs.marginColored),
GroupCounter(1),
JavaScripts(),
TotalItems(0),
- MinWordLen(prefsData.MinWordLen),
- HyCount(prefsData.HyCount),
- Language(prefsData.Language),
- Automatic(prefsData.Automatic),
- AutoCheck(prefsData.AutoCheck),
- PDF_Options(prefsData.PDF_Options),
+ MinWordLen(prefsData.hyphPrefs.MinWordLen),
+ HyCount(prefsData.hyphPrefs.HyCount),
+ Language(prefsData.hyphPrefs.Language),
+ Automatic(prefsData.hyphPrefs.Automatic),
+ AutoCheck(prefsData.hyphPrefs.AutoCheck),
+ PDF_Options(prefsData.pdfPrefs),
RePos(false),
BookMarks(),
OldBM(false),
@@ -324,8 +324,8 @@
docLayerErrors(),
docItemErrors(),
masterItemErrors(),
- docItemAttributes(prefsData.defaultItemAttributes),
- docToCSetups(prefsData.defaultToCSetups),
+ docItemAttributes(prefsData.itemAttrPrefs.defaultItemAttributes),
+ docToCSetups(prefsData.tocPrefs.defaultToCSetups),
// sections
symReturn(), symNewLine(), symTab(), symNonBreak(), symNewCol(), symNewFrame(),
docHyphenator(0),
@@ -442,7 +442,7 @@
CharStyle cstyle;
cstyle.setDefaultStyle(true);
cstyle.setName(CommonStrings::DefaultCharacterStyle);
- cstyle.setFont(prefsData.AvailFonts[itemToolPrefs.defFont]);
+ cstyle.setFont(prefsData.fontPrefs.AvailFonts[itemToolPrefs.defFont]);
cstyle.setFontSize(itemToolPrefs.defSize);
cstyle.setFeatures(QStringList(CharStyle::INHERIT));
cstyle.setFillColor(itemToolPrefs.dPenText);
@@ -460,7 +460,7 @@
cstyle.setScaleH(1000);
cstyle.setScaleV(1000);
cstyle.setTracking(0);
- cstyle.setLanguage(PrefsManager::instance()->appPrefs.Language);
+ cstyle.setLanguage(PrefsManager::instance()->appPrefs.hyphPrefs.Language);
docParagraphStyles.create(pstyle);
docParagraphStyles.makeDefault( &(docParagraphStyles[0]) );
@@ -476,7 +476,7 @@
Layers.addLayer( tr("Background") );
// Fixme: Check PDF version input
- PDF_Options.Version = (PDFOptions::PDFVersion)prefsData.PDF_Options.Version;
+ PDF_Options.Version = (PDFOptions::PDFVersion)prefsData.pdfPrefs.Version;
PDF_Options.firstUse = true;
docPatterns.clear();
@@ -3475,7 +3475,7 @@
ScriXmlDoc *ss = new ScriXmlDoc();
QString dataS = ss->WriteElem(this, view(), &tempSelection);
setCurrentPage(targetPage);
- ss->ReadElem(dataS, prefsData.AvailFonts, this, targetPage->xOffset(), targetPage->yOffset(), false, true, prefsData.GFontSub, view());
+ ss->ReadElem(dataS, prefsData.fontPrefs.AvailFonts, this, targetPage->xOffset(), targetPage->yOffset(), false, true, prefsData.GFontSub, view());
delete ss;
setMasterPageMode(false);
}
@@ -3504,7 +3504,7 @@
QString dataS = ss->WriteElem(this, view(), &tempSelection);
setMasterPageMode(true);
setCurrentPage(targetPage);
- ss->ReadElem(dataS, prefsData.AvailFonts, this, targetPage->xOffset(), targetPage->yOffset(), false, true, prefsData.GFontSub, view());
+ ss->ReadElem(dataS, prefsData.fontPrefs.AvailFonts, this, targetPage->xOffset(), targetPage->yOffset(), false, true, prefsData.GFontSub, view());
delete ss;
setMasterPageMode(false);
}
@@ -4961,7 +4961,7 @@
if ((lcount < itemBuffer.count()) && !itemBuffer[lcount].isEmpty())
{
ScriXmlDoc *ss = new ScriXmlDoc();
- ss->ReadElemToLayer(itemBuffer[lcount], prefsData.AvailFonts, this, destination->xOffset(), destination->yOffset(), false, true, prefsData.GFontSub, view(),(*it).ID);
+ ss->ReadElemToLayer(itemBuffer[lcount], prefsData.fontPrefs.AvailFonts, this, destination->xOffset(), destination->yOffset(), false, true, prefsData.GFontSub, view(),(*it).ID);
delete ss;
}
lcount++;
Index: scribus/ui/prefs.cpp
===================================================================
--- scribus/ui/prefs.cpp (revision 13954)
+++ scribus/ui/prefs.cpp (revision 13955)
@@ -90,13 +90,13 @@
tabHyphenator = new HySettings(prefsWidgets/*, &ap->LangTransl*/);
addItem( tr("Hyphenator"), loadIcon("hyphenate.png"), tabHyphenator);
- tabFonts = new FontPrefs(prefsWidgets, false, prefsManager->preferencesLocation(), ap->doc);
+ tabFonts = new FontPrefsTab(prefsWidgets, false, prefsManager->preferencesLocation(), ap->doc);
addItem( tr("Fonts"), loadIcon("font.png"), tabFonts);
tabPrinter = new TabPrinter(prefsWidgets, "tabPrinter");
addItem( tr("Printer"), loadIcon("printer.png"), tabPrinter);
- tabDocChecker = new TabCheckDoc(prefsWidgets, prefsData->checkerProfiles, prefsData->curCheckProfile);
+ tabDocChecker = new TabCheckDoc(prefsWidgets, prefsData->checkerPrefsList, prefsData->curCheckProfile);
addItem( tr("Preflight Verifier"), loadIcon("checkdoc.png"), tabDocChecker);
if (ScCore->haveCMS())
@@ -108,11 +108,11 @@
QMap<QString, int> DocFonts;
DocFonts.clear();
tabPDF = new TabPDFOptions( prefsWidgets,
- prefsData->PDF_Options,
- prefsData->AvailFonts,
+ prefsData->pdfPrefs,
+ prefsData->fontPrefs.AvailFonts,
ScCore->PDFXProfiles,
DocFonts,
- prefsData->PDF_Options.PresentVals,
+ prefsData->pdfPrefs.PresentVals,
docUnitIndex,
prefsData->docSetupPrefs.pageHeight,
prefsData->docSetupPrefs.pageWidth,
@@ -121,15 +121,15 @@
tabDefaultItemAttributes = new DocumentItemAttributes(prefsWidgets);
QStringList defaultAttributesList=tabDefaultItemAttributes->getDocAttributesNames();
- tabDefaultItemAttributes->setup(&prefsData->defaultItemAttributes);
+ tabDefaultItemAttributes->setup(&prefsData->itemAttrPrefs.defaultItemAttributes);
addItem( tr("Document Item Attributes"), loadIcon("docattributes.png"), tabDefaultItemAttributes);
tabDefaultTOCIndexPrefs = new TOCIndexPrefs(prefsWidgets );
tabDefaultTOCIndexPrefs->setupItemAttrs( defaultAttributesList );
- tabDefaultTOCIndexPrefs->setup(&prefsData->defaultToCSetups, NULL);
+ tabDefaultTOCIndexPrefs->setup(&prefsData->tocPrefs.defaultToCSetups, NULL);
addItem( tr("Table of Contents and Indexes"), loadIcon("tabtocindex.png"), tabDefaultTOCIndexPrefs);
- tabKeyboardShortcuts = new TabKeyboardShortcutsWidget(prefsData->KeyActions, prefsWidgets);
+ tabKeyboardShortcuts = new TabKeyboardShortcutsWidget(prefsData->keyShortcutPrefs.KeyActions, prefsWidgets);
addItem( tr("Keyboard Shortcuts"), loadIcon("key_bindings.png"), tabKeyboardShortcuts);
tabScrapbook = new TabScrapbook( prefsWidgets );
@@ -201,9 +201,9 @@
tabGeneral->restoreDefaults(prefsData);
tabDocument->restoreDefaults(prefsData);
tabPrinter->restoreDefaults(prefsData);
- tabView->restoreDefaults(prefsData, prefsData->guidesPrefs, prefsData->pageSets, prefsData->docSetupPrefs.pagePositioning, prefsData->scratch);
- tabView->gapHorizontal->setValue(prefsData->GapHorizontal); // * unitRatio);
- tabView->gapVertical->setValue(prefsData->GapVertical); // * unitRatio);
+ tabView->restoreDefaults(prefsData, prefsData->guidesPrefs, prefsData->pageSets, prefsData->docSetupPrefs.pagePositioning, prefsData->displayPrefs.scratch);
+ tabView->gapHorizontal->setValue(prefsData->displayPrefs.GapHorizontal); // * unitRatio);
+ tabView->gapVertical->setValue(prefsData->displayPrefs.GapVertical); // * unitRatio);
tabScrapbook->restoreDefaults(prefsData);
tabHyphenator->restoreDefaults(prefsData);
tabGuides->restoreDefaults(&prefsData->guidesPrefs, &prefsData->typoPrefs, docUnitIndex);
@@ -212,15 +212,15 @@
// main performance issue in availFonts->GetFonts(HomeP)!
// no prefsData here
tabFonts->restoreDefaults();
- tabDocChecker->restoreDefaults(&prefsData->checkerProfiles, prefsData->curCheckProfile);
+ tabDocChecker->restoreDefaults(&prefsData->checkerPrefsList, prefsData->curCheckProfile);
QMap<QString, int> DocFonts;
DocFonts.clear();
- tabPDF->restoreDefaults(prefsData->PDF_Options,
- prefsData->AvailFonts,
+ tabPDF->restoreDefaults(prefsData->pdfPrefs,
+ prefsData->fontPrefs.AvailFonts,
ScCore->PDFXProfiles,
DocFonts,
- prefsData->PDF_Options.PresentVals,
+ prefsData->pdfPrefs.PresentVals,
docUnitIndex,
prefsData->docSetupPrefs.pageHeight,
prefsData->docSetupPrefs.pageWidth,
@@ -231,9 +231,9 @@
&ScCore->InputProfilesCMYK,
&ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
QStringList defaultAttributesList=tabDefaultItemAttributes->getDocAttributesNames();
- tabDefaultItemAttributes->setup(&prefsData->defaultItemAttributes);
+ tabDefaultItemAttributes->setup(&prefsData->itemAttrPrefs.defaultItemAttributes);
tabDefaultTOCIndexPrefs->setupItemAttrs( defaultAttributesList );
- tabDefaultTOCIndexPrefs->setup(&prefsData->defaultToCSetups, NULL);
+ tabDefaultTOCIndexPrefs->setup(&prefsData->tocPrefs.defaultToCSetups, NULL);
tabKeyboardShortcuts->restoreDefaults();
tabExtTools->restoreDefaults(prefsData);
tabMiscellaneous->restoreDefaults(prefsData);
@@ -358,24 +358,24 @@
prefsManager->appPrefs.uiPrefs.style = tabGeneral->GUICombo->currentText();
prefsManager->appPrefs.uiPrefs.useSmallWidgets = tabGeneral->useSmallWidgetsCheck->isChecked();
- prefsManager->appPrefs.GapHorizontal = tabView->gapHorizontal->value() / prefsUnitRatio;
- prefsManager->appPrefs.GapVertical = tabView->gapVertical->value() / prefsUnitRatio;
- prefsManager->appPrefs.marginColored = tabView->checkUnprintable->isChecked();
- prefsManager->appPrefs.scratch.Bottom = tabView->bottomScratch->value() / prefsUnitRatio;
- prefsManager->appPrefs.scratch.Left = tabView->leftScratch->value() / prefsUnitRatio;
- prefsManager->appPrefs.scratch.Right = tabView->rightScratch->value() / prefsUnitRatio;
- prefsManager->appPrefs.scratch.Top = tabView->topScratch->value() / prefsUnitRatio;
+ prefsManager->appPrefs.displayPrefs.GapHorizontal = tabView->gapHorizontal->value() / prefsUnitRatio;
+ prefsManager->appPrefs.displayPrefs.GapVertical = tabView->gapVertical->value() / prefsUnitRatio;
+ prefsManager->appPrefs.displayPrefs.marginColored = tabView->checkUnprintable->isChecked();
+ prefsManager->appPrefs.displayPrefs.scratch.Bottom = tabView->bottomScratch->value() / prefsUnitRatio;
+ prefsManager->appPrefs.displayPrefs.scratch.Left = tabView->leftScratch->value() / prefsUnitRatio;
+ prefsManager->appPrefs.displayPrefs.scratch.Right = tabView->rightScratch->value() / prefsUnitRatio;
+ prefsManager->appPrefs.displayPrefs.scratch.Top = tabView->topScratch->value() / prefsUnitRatio;
// GUI colors
- prefsManager->appPrefs.showPageShadow = tabView->checkShowPageShadow->isChecked();
- prefsManager->appPrefs.DpapColor = tabView->colorPaper;
- prefsManager->appPrefs.DFrameColor = tabView->colorFrame;
- prefsManager->appPrefs.DFrameNormColor = tabView->colorFrameNorm;
- prefsManager->appPrefs.DFrameGroupColor = tabView->colorFrameGroup;
- prefsManager->appPrefs.DFrameLockColor = tabView->colorFrameLocked;
- prefsManager->appPrefs.DFrameLinkColor = tabView->colorFrameLinked;
- prefsManager->appPrefs.DFrameAnnotationColor = tabView->colorFrameAnnotation;
- prefsManager->appPrefs.DPageBorderColor = tabView->colorPageBorder;
- prefsManager->appPrefs.DControlCharColor = tabView->colorControlChars;
+ prefsManager->appPrefs.displayPrefs.showPageShadow = tabView->checkShowPageShadow->isChecked();
+ prefsManager->appPrefs.displayPrefs.DpapColor = tabView->colorPaper;
+ prefsManager->appPrefs.displayPrefs.DFrameColor = tabView->colorFrame;
+ prefsManager->appPrefs.displayPrefs.DFrameNormColor = tabView->colorFrameNorm;
+ prefsManager->appPrefs.displayPrefs.DFrameGroupColor = tabView->colorFrameGroup;
+ prefsManager->appPrefs.displayPrefs.DFrameLockColor = tabView->colorFrameLocked;
+ prefsManager->appPrefs.displayPrefs.DFrameLinkColor = tabView->colorFrameLinked;
+ prefsManager->appPrefs.displayPrefs.DFrameAnnotationColor = tabView->colorFrameAnnotation;
+ prefsManager->appPrefs.displayPrefs.DPageBorderColor = tabView->colorPageBorder;
+ prefsManager->appPrefs.displayPrefs.DControlCharColor = tabView->colorControlChars;
// Guides
prefsManager->appPrefs.guidesPrefs.framesShown = tabView->checkFrame->isChecked();
@@ -385,11 +385,11 @@
prefsManager->appPrefs.guidesPrefs.showPic = tabView->checkPictures->isChecked();
prefsManager->appPrefs.guidesPrefs.linkShown = tabView->checkLink->isChecked();
prefsManager->appPrefs.guidesPrefs.showControls = tabView->checkControl->isChecked();
- prefsManager->appPrefs.DisScale = tabView->DisScale;
+ prefsManager->appPrefs.displayPrefs.DisScale = tabView->DisScale;
- prefsManager->appPrefs.doCopyToScrapbook = tabScrapbook->useScrapBookasExtension->isChecked();
- prefsManager->appPrefs.persistentScrapbook = tabScrapbook->persistentScrapbook->isChecked();
- prefsManager->appPrefs.numScrapbookCopies = tabScrapbook->numScrapCopies->value();
+ prefsManager->appPrefs.scrapbookPrefs.doCopyToScrapbook = tabScrapbook->useScrapBookasExtension->isChecked();
+ prefsManager->appPrefs.scrapbookPrefs.persistentScrapbook = tabScrapbook->persistentScrapbook->isChecked();
+ prefsManager->appPrefs.scrapbookPrefs.numScrapbookCopies = tabScrapbook->numScrapCopies->value();
tabTools->polyWidget->getValues(&prefsManager->appPrefs.itemToolPrefs.polyC,
&prefsManager->appPrefs.itemToolPrefs.polyFd,
@@ -417,25 +417,25 @@
prefsManager->setImageEditorExecutable(tabExtTools->newImageTool());
prefsManager->setExtBrowserExecutable(tabExtTools->newExtBrowserTool());
- prefsManager->appPrefs.gs_AntiAliasGraphics = tabExtTools->newAntialiasGraphics();
- prefsManager->appPrefs.gs_AntiAliasText = tabExtTools->newAntialiasText();
+ prefsManager->appPrefs.extToolPrefs.gs_AntiAliasGraphics = tabExtTools->newAntialiasGraphics();
+ prefsManager->appPrefs.extToolPrefs.gs_AntiAliasText = tabExtTools->newAntialiasText();
prefsManager->setGhostscriptExecutable(tabExtTools->newPSTool());
- prefsManager->appPrefs.gs_Resolution = tabExtTools->newPSToolResolution();
+ prefsManager->appPrefs.extToolPrefs.gs_Resolution = tabExtTools->newPSToolResolution();
- prefsManager->appPrefs.latexResolution = tabExtTools->newLatexToolResolution();
- prefsManager->appPrefs.latexForceDpi = tabExtTools->newLatexForceDpi();
- prefsManager->appPrefs.latexStartWithEmptyFrames = tabExtTools->newLatexStartWithEmptyFrames();
+ prefsManager->appPrefs.extToolPrefs.latexResolution = tabExtTools->newLatexToolResolution();
+ prefsManager->appPrefs.extToolPrefs.latexForceDpi = tabExtTools->newLatexForceDpi();
+ prefsManager->appPrefs.extToolPrefs.latexStartWithEmptyFrames = tabExtTools->newLatexStartWithEmptyFrames();
prefsManager->setLatexConfigs(tabExtTools->newLatexConfigs());
prefsManager->setLatexCommands(tabExtTools->newLatexCommands());
prefsManager->setLatexEditorExecutable(tabExtTools->newLatexEditor());
prefsManager->appPrefs.guidesPrefs.guidePlacement = tabGuides->inBackground->isChecked();
- prefsManager->appPrefs.askBeforeSubstituite = tabMiscellaneous->AskForSubs->isChecked();
- prefsManager->appPrefs.haveStylePreview = tabMiscellaneous->stylePreview->isChecked();
+ prefsManager->appPrefs.fontPrefs.askBeforeSubstitute = tabMiscellaneous->AskForSubs->isChecked();
+ prefsManager->appPrefs.miscPrefs.haveStylePreview = tabMiscellaneous->stylePreview->isChecked();
// lorem ipsum
- prefsManager->appPrefs.useStandardLI = tabMiscellaneous->useStandardLI->isChecked();
- prefsManager->appPrefs.paragraphsLI = tabMiscellaneous->paragraphsLI->value();
+ prefsManager->appPrefs.miscPrefs.useStandardLI = tabMiscellaneous->useStandardLI->isChecked();
+ prefsManager->appPrefs.miscPrefs.paragraphsLI = tabMiscellaneous->paragraphsLI->value();
prefsManager->appPrefs.docSetupPrefs.docUnitIndex = tabDocument->unitCombo->currentIndex();
@@ -455,7 +455,7 @@
prefsManager->appPrefs.guidesPrefs.marginColor = tabGuides->colorMargin;
prefsManager->appPrefs.guidesPrefs.guideColor = tabGuides->colorGuides;
prefsManager->appPrefs.guidesPrefs.baselineGridColor = tabGuides->colorBaselineGrid;
- prefsManager->appPrefs.checkerProfiles = tabDocChecker->checkerProfile;
+ prefsManager->appPrefs.checkerPrefsList = tabDocChecker->checkerProfile;
prefsManager->appPrefs.curCheckProfile = tabDocChecker->curCheckProfile->currentText();
prefsManager->appPrefs.typoPrefs.valueSuperScript = tabTypo->superDisplacement->value();
prefsManager->appPrefs.typoPrefs.scalingSuperScript = tabTypo->superScaling->value();
@@ -549,13 +549,13 @@
prefsManager->appPrefs.opToolPrefs.constrain = tabTools->genRot->value();
prefsManager->appPrefs.AutoSave = tabDocument->GroupAS->isChecked();
prefsManager->appPrefs.AutoSaveTime = tabDocument->ASTime->value() * 60 * 1000;
- prefsManager->appPrefs.MinWordLen = tabHyphenator->getWordLen();
- prefsManager->appPrefs.Language = ScCore->primaryMainWindow()->GetLang(tabHyphenator->getLanguage());
- prefsManager->appPrefs.Automatic = !tabHyphenator->getVerbose();
- prefsManager->appPrefs.AutoCheck = tabHyphenator->getInput();
- prefsManager->appPrefs.HyCount = tabHyphenator->getMaxCount();
- prefsManager->appPrefs.ignoredWords = tabHyphenator->getIgnoreList();
- prefsManager->appPrefs.specialWords = tabHyphenator->getExceptionList();
+ prefsManager->appPrefs.hyphPrefs.MinWordLen = tabHyphenator->getWordLen();
+ prefsManager->appPrefs.hyphPrefs.Language = ScCore->primaryMainWindow()->GetLang(tabHyphenator->getLanguage());
+ prefsManager->appPrefs.hyphPrefs.Automatic = !tabHyphenator->getVerbose();
+ prefsManager->appPrefs.hyphPrefs.AutoCheck = tabHyphenator->getInput();
+ prefsManager->appPrefs.hyphPrefs.HyCount = tabHyphenator->getMaxCount();
+ prefsManager->appPrefs.hyphPrefs.ignoredWords = tabHyphenator->getIgnoreList();
+ prefsManager->appPrefs.hyphPrefs.specialWords = tabHyphenator->getExceptionList();
if (ScCore->haveCMS())
tabColorManagement->setValues();
// not required propably as it's done already in the dialog prefsManager->appPrefs.AvailFonts == get fonts from fontprefs
@@ -565,11 +565,11 @@
for (QMap<QString,QString>::Iterator itfsu = tabFonts->RList.begin(); itfsu != itfsuend; ++itfsu)
prefsManager->appPrefs.GFontSub[itfsu.key()] = tabFonts->FlagsRepl.at(a++)->currentText();
- prefsManager->appPrefs.defaultItemAttributes = *(tabDefaultItemAttributes->getNewAttributes());
- prefsManager->appPrefs.defaultToCSetups = *(tabDefaultTOCIndexPrefs->getNewToCs());
+ prefsManager->appPrefs.itemAttrPrefs.defaultItemAttributes = *(tabDefaultItemAttributes->getNewAttributes());
+ prefsManager->appPrefs.tocPrefs.defaultToCSetups = *(tabDefaultTOCIndexPrefs->getNewToCs());
// prefsManager->appPrefs.KeyActions = tabKeys->getNewKeyMap();
- prefsManager->appPrefs.KeyActions = tabKeyboardShortcuts->getNewKeyMap();
- tabPDF->storeValues(prefsManager->appPrefs.PDF_Options);
+ prefsManager->appPrefs.keyShortcutPrefs.KeyActions = tabKeyboardShortcuts->getNewKeyMap();
+ tabPDF->storeValues(prefsManager->appPrefs.pdfPrefs);
tabPrinter->storeValues();
}
Index: scribus/ui/preview.cpp
===================================================================
--- scribus/ui/preview.cpp (revision 13954)
+++ scribus/ui/preview.cpp (revision 13955)
@@ -603,7 +603,7 @@
options.bleeds.Left = 0.0;
options.bleeds.Right = 0.0;
options.bleeds.Bottom = 0.0;
- PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.AvailFonts, ReallyUsed, doc->PageColors, false, !spotColors->isChecked());
+ PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, doc->PageColors, false, !spotColors->isChecked());
if (dd != NULL)
{
dd->PS_set_file( ScPaths::getTempFileDir() + "/tmp.ps");
@@ -706,7 +706,7 @@
options.bleeds.Left = 0.0;
options.bleeds.Right = 0.0;
options.bleeds.Bottom = 0.0;
- PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.AvailFonts, ReallyUsed, doc->PageColors, false, !spotColors->isChecked());
+ PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, doc->PageColors, false, !spotColors->isChecked());
if (dd != NULL)
{
dd->PS_set_file(ScPaths::getTempFileDir()+"/tmp.ps");
Index: scribus/prefsmanager.cpp
===================================================================
--- scribus/prefsmanager.cpp (revision 13954)
+++ scribus/prefsmanager.cpp (revision 13955)
@@ -66,7 +66,7 @@
PrefsManager::~PrefsManager()
{
- appPrefs.AvailFonts.clear();
+ appPrefs.fontPrefs.AvailFonts.clear();
delete prefsFile;
}
@@ -119,9 +119,9 @@
void PrefsManager::initDefaults()
{
/** Default font and size **/
- SCFontsIterator it(appPrefs.AvailFonts);
+ SCFontsIterator it(appPrefs.fontPrefs.AvailFonts);
bool goodFont = false;
- for ( SCFontsIterator itf(appPrefs.AvailFonts); itf.hasNext(); itf.next())
+ for ( SCFontsIterator itf(appPrefs.fontPrefs.AvailFonts); itf.hasNext(); itf.next())
{
if ((itf.currentKey() == "Arial Regular") || (itf.currentKey() == "Times New Roman Regular"))
{
@@ -185,15 +185,15 @@
appPrefs.uiPrefs.wheelJump = 40;
/** Set Default window position and size to sane default values which should work on every screen */
-// appPrefs.mainWinSettings.xPosition = 0;
-// appPrefs.mainWinSettings.yPosition = 0;
- appPrefs.mainWinSettings.width = 640;
- appPrefs.mainWinSettings.height = 480;
+// appPrefs.uiPrefs.mainWinSettings.xPosition = 0;
+// appPrefs.uiPrefs.mainWinSettings.yPosition = 0;
+ appPrefs.uiPrefs.mainWinSettings.width = 640;
+ appPrefs.uiPrefs.mainWinSettings.height = 480;
QDesktopWidget *d = QApplication::desktop();
- appPrefs.mainWinSettings.xPosition=(d->availableGeometry().width()-appPrefs.mainWinSettings.width)/2;
- appPrefs.mainWinSettings.yPosition=(d->availableGeometry().height()-appPrefs.mainWinSettings.height)/2;
- appPrefs.mainWinSettings.maximized = false;
- appPrefs.mainWinState = QByteArray();
+ appPrefs.uiPrefs.mainWinSettings.xPosition=(d->availableGeometry().width()-appPrefs.uiPrefs.mainWinSettings.width)/2;
+ appPrefs.uiPrefs.mainWinSettings.yPosition=(d->availableGeometry().height()-appPrefs.uiPrefs.mainWinSettings.height)/2;
+ appPrefs.uiPrefs.mainWinSettings.maximized = false;
+ appPrefs.uiPrefs.mainWinState = QByteArray();
appPrefs.guidesPrefs.marginsShown = true;
appPrefs.guidesPrefs.framesShown = true;
appPrefs.guidesPrefs.layerMarkersShown = false;
@@ -229,11 +229,11 @@
appPrefs.guidesPrefs.valueBaselineGrid = 14.4;
appPrefs.guidesPrefs.offsetBaselineGrid = 0.0;
appPrefs.uiPrefs.style = "";
- appPrefs.grayscaleIcons = false; // can be a little slower on startup.. but its a nice effect to play with
- appPrefs.showToolTips = true;
- appPrefs.showMouseCoordinates = true;
+ appPrefs.uiPrefs.grayscaleIcons = false; // can be a little slower on startup.. but its a nice effect to play with
+ appPrefs.displayPrefs.showToolTips = true;
+ appPrefs.displayPrefs.showMouseCoordinates = true;
appPrefs.uiPrefs.mouseMoveTimeout = 150;
- appPrefs.stickyTools = false;
+ appPrefs.uiPrefs.stickyTools = false;
//FIXME
//Black here causes issues when a colour set is loaded without "Black" in it.
//"Black" is created with wrong values. Eg SVG colour set
@@ -257,16 +257,16 @@
appPrefs.opToolPrefs.dispX = 10.0;
appPrefs.opToolPrefs.dispY = 10.0;
appPrefs.opToolPrefs.constrain = 15.0;
- appPrefs.DpapColor = QColor(Qt::white);
- appPrefs.showPageShadow = true;
- appPrefs.DFrameColor = QColor(Qt::red);
- appPrefs.DFrameNormColor = QColor(Qt::black);
- appPrefs.DFrameGroupColor = QColor(Qt::darkCyan);
- appPrefs.DFrameLockColor = QColor(Qt::darkRed);
- appPrefs.DFrameLinkColor = QColor(Qt::red);
- appPrefs.DFrameAnnotationColor = QColor(Qt::blue);
- appPrefs.DPageBorderColor = QColor(Qt::red);
- appPrefs.DControlCharColor = QColor(Qt::darkRed);
+ appPrefs.displayPrefs.DpapColor = QColor(Qt::white);
+ appPrefs.displayPrefs.showPageShadow = true;
+ appPrefs.displayPrefs.DFrameColor = QColor(Qt::red);
+ appPrefs.displayPrefs.DFrameNormColor = QColor(Qt::black);
+ appPrefs.displayPrefs.DFrameGroupColor = QColor(Qt::darkCyan);
+ appPrefs.displayPrefs.DFrameLockColor = QColor(Qt::darkRed);
+ appPrefs.displayPrefs.DFrameLinkColor = QColor(Qt::red);
+ appPrefs.displayPrefs.DFrameAnnotationColor = QColor(Qt::blue);
+ appPrefs.displayPrefs.DPageBorderColor = QColor(Qt::red);
+ appPrefs.displayPrefs.DControlCharColor = QColor(Qt::darkRed);
appPrefs.itemToolPrefs.dCols = 1;
appPrefs.itemToolPrefs.dGap = 0.0;
appPrefs.itemToolPrefs.dShadeLine = 100;
@@ -290,15 +290,15 @@
appPrefs.itemToolPrefs.polyR = 0.0;
appPrefs.itemToolPrefs.polyCurvature = 0.0;
// appPrefs.PSize = 40;
- appPrefs.ClipMargin = false;
+ appPrefs.printerPrefs.ClipMargin = false;
appPrefs.GCRMode = false;
- appPrefs.RecentDocs.clear();
- appPrefs.RecentScrapbooks.clear();
+ appPrefs.uiPrefs.RecentDocs.clear();
+ appPrefs.scrapbookPrefs.RecentScrapbooks.clear();
appPrefs.uiPrefs.recentDocCount = 5;
- appPrefs.doCopyToScrapbook = true;
- appPrefs.persistentScrapbook = false;
- appPrefs.numScrapbookCopies = 10;
- appPrefs.marginColored = false;
+ appPrefs.scrapbookPrefs.doCopyToScrapbook = true;
+ appPrefs.scrapbookPrefs.persistentScrapbook = false;
+ appPrefs.scrapbookPrefs.numScrapbookCopies = 10;
+ appPrefs.displayPrefs.marginColored = false;
appPrefs.docSetupPrefs.pageSize = "A4";
appPrefs.docSetupPrefs.pageOrientation = 0;
PageSize a4("A4");
@@ -317,22 +317,22 @@
appPrefs.itemToolPrefs.aspectRatio = true;
appPrefs.itemToolPrefs.lowResType = 1;
appPrefs.itemToolPrefs.useEmbeddedPath = false;
- appPrefs.MinWordLen = 3;
- appPrefs.HyCount = 2;
- appPrefs.Language = "";
- appPrefs.specialWords.clear();
- appPrefs.ignoredWords.clear();
- appPrefs.Automatic = true;
- appPrefs.AutoCheck = false;
+ appPrefs.hyphPrefs.MinWordLen = 3;
+ appPrefs.hyphPrefs.HyCount = 2;
+ appPrefs.hyphPrefs.Language = "";
+ appPrefs.hyphPrefs.specialWords.clear();
+ appPrefs.hyphPrefs.ignoredWords.clear();
+ appPrefs.hyphPrefs.Automatic = true;
+ appPrefs.hyphPrefs.AutoCheck = false;
appPrefs.AutoSave = true;
appPrefs.AutoSaveTime = 600000;
int dpi = qApp->desktop()->logicalDpiX();
if ((dpi < 60) || (dpi > 200))
dpi = 72;
- appPrefs.DisScale = dpi / 72.0;
+ appPrefs.displayPrefs.DisScale = dpi / 72.0;
-// appPrefs.DisScale = 1.0;
+// appPrefs.displayPrefs.DisScale = 1.0;
appPrefs.pathPrefs.documents = ScPaths::getUserDocumentDir();
appPrefs.pathPrefs.colorProfiles = "";
appPrefs.pathPrefs.scripts = "";
@@ -348,18 +348,18 @@
appPrefs.PrPr_K = true;
appPrefs.PrPr_InkCoverage = false;
appPrefs.PrPr_InkThreshold = 250;
- appPrefs.imageEditorExecutable = "gimp";
- appPrefs.extBrowserExecutable = "";
- appPrefs.latexConfigs = LatexConfigCache::defaultConfigs();
- appPrefs.latexCommands.clear();
- appPrefs.latexEditorExecutable = "";
- appPrefs.latexResolution = 72;
- appPrefs.latexForceDpi = true;
- appPrefs.latexStartWithEmptyFrames = false;
- appPrefs.gs_AntiAliasGraphics = true;
- appPrefs.gs_AntiAliasText = true;
- appPrefs.gs_exe = getGSDefaultExeName();
- appPrefs.gs_Resolution = 72;
+ appPrefs.extToolPrefs.imageEditorExecutable = "gimp";
+ appPrefs.extToolPrefs.extBrowserExecutable = "";
+ appPrefs.extToolPrefs.latexConfigs = LatexConfigCache::defaultConfigs();
+ appPrefs.extToolPrefs.latexCommands.clear();
+ appPrefs.extToolPrefs.latexEditorExecutable = "";
+ appPrefs.extToolPrefs.latexResolution = 72;
+ appPrefs.extToolPrefs.latexForceDpi = true;
+ appPrefs.extToolPrefs.latexStartWithEmptyFrames = false;
+ appPrefs.extToolPrefs.gs_AntiAliasGraphics = true;
+ appPrefs.extToolPrefs.gs_AntiAliasText = true;
+ appPrefs.extToolPrefs.gs_exe = getGSDefaultExeName();
+ appPrefs.extToolPrefs.gs_Resolution = 72;
appPrefs.STEcolor = QColor(Qt::white);
appPrefs.DCMSset.DefaultMonitorProfile = "";
appPrefs.DCMSset.DefaultPrinterProfile = "";
@@ -374,12 +374,12 @@
appPrefs.DCMSset.DefaultIntentColors = 1;
appPrefs.DCMSset.DefaultIntentImages = 0;
appPrefs.GFontSub.clear();
- appPrefs.scratch.Left = 100;
- appPrefs.scratch.Right = 100;
- appPrefs.scratch.Top = 20;
- appPrefs.scratch.Bottom = 20;
- appPrefs.GapHorizontal = 0.0;
- appPrefs.GapVertical = 40.0;
+ appPrefs.displayPrefs.scratch.Left = 100;
+ appPrefs.displayPrefs.scratch.Right = 100;
+ appPrefs.displayPrefs.scratch.Top = 20;
+ appPrefs.displayPrefs.scratch.Bottom = 20;
+ appPrefs.displayPrefs.GapHorizontal = 0.0;
+ appPrefs.displayPrefs.GapVertical = 40.0;
struct PageSet pageS;
pageS.Name = CommonStrings::pageSet1;
pageS.FirstPage = 0;
@@ -415,81 +415,81 @@
pageS.pageNames.append(CommonStrings::pageLocRight);
appPrefs.pageSets.append(pageS);
appPrefs.docSetupPrefs.pagePositioning = singlePage;
- appPrefs.askBeforeSubstituite = true;
- appPrefs.haveStylePreview = true;
+ appPrefs.fontPrefs.askBeforeSubstitute = true;
+ appPrefs.miscPrefs.haveStylePreview = true;
// lorem ipsum defaults
- appPrefs.useStandardLI = false;
- appPrefs.paragraphsLI = 10;
+ appPrefs.miscPrefs.useStandardLI = false;
+ appPrefs.miscPrefs.paragraphsLI = 10;
appPrefs.uiPrefs.showStartupDialog = true;
appPrefs.uiPrefs.useSmallWidgets = false;
- initDefaultCheckerPrefs(&appPrefs.checkerProfiles);
+ initDefaultCheckerPrefs(&appPrefs.checkerPrefsList);
appPrefs.curCheckProfile = CommonStrings::PostScript;
- appPrefs.PDF_Options.Thumbnails = false;
- appPrefs.PDF_Options.Articles = false;
- appPrefs.PDF_Options.useLayers = false;
- appPrefs.PDF_Options.Compress = true;
- appPrefs.PDF_Options.CompressMethod = PDFOptions::Compression_Auto;
- appPrefs.PDF_Options.Quality = 0;
- appPrefs.PDF_Options.RecalcPic = false;
- appPrefs.PDF_Options.embedPDF = false;
- appPrefs.PDF_Options.Bookmarks = false;
- appPrefs.PDF_Options.PicRes = 300;
- appPrefs.PDF_Options.Version = PDFOptions::PDFVersion_14;
- appPrefs.PDF_Options.Resolution = 300;
- appPrefs.PDF_Options.Binding = 0;
- appPrefs.PDF_Options.EmbedList.clear();
- appPrefs.PDF_Options.SubsetList.clear();
- appPrefs.PDF_Options.MirrorH = false;
- appPrefs.PDF_Options.MirrorV = false;
- appPrefs.PDF_Options.doClip = false;
- appPrefs.PDF_Options.RotateDeg = 0;
- appPrefs.PDF_Options.PresentMode = false;
- appPrefs.PDF_Options.fileName = "";
- appPrefs.PDF_Options.PresentVals.clear();
- appPrefs.PDF_Options.isGrayscale = false;
- appPrefs.PDF_Options.UseRGB = true;
- appPrefs.PDF_Options.UseProfiles = false;
- appPrefs.PDF_Options.UseProfiles2 = false;
- appPrefs.PDF_Options.SolidProf = "";
- appPrefs.PDF_Options.SComp = 3;
- appPrefs.PDF_Options.ImageProf = "";
- appPrefs.PDF_Options.PrintProf = "";
- appPrefs.PDF_Options.Info = "";
- appPrefs.PDF_Options.Intent = 0;
- appPrefs.PDF_Options.Intent2 = 0;
- appPrefs.PDF_Options.bleeds.Top = 0;
- appPrefs.PDF_Options.bleeds.Left = 0;
- appPrefs.PDF_Options.bleeds.Right = 0;
- appPrefs.PDF_Options.bleeds.Bottom = 0;
- appPrefs.PDF_Options.useDocBleeds = true;
- appPrefs.PDF_Options.cropMarks = false;
- appPrefs.PDF_Options.bleedMarks = false;
- appPrefs.PDF_Options.registrationMarks = false;
- appPrefs.PDF_Options.colorMarks = false;
- appPrefs.PDF_Options.docInfoMarks = false;
- appPrefs.PDF_Options.markOffset = 0;
- appPrefs.PDF_Options.EmbeddedI = false;
- appPrefs.PDF_Options.Encrypt = false;
- appPrefs.PDF_Options.PassOwner = "";
- appPrefs.PDF_Options.PassUser = "";
- appPrefs.PDF_Options.Permissions = -4;
- appPrefs.PDF_Options.UseLPI = false;
- appPrefs.PDF_Options.LPISettings.clear();
- appPrefs.PDF_Options.UseSpotColors = true;
- appPrefs.PDF_Options.doMultiFile = false;
- appPrefs.PDF_Options.displayBookmarks = false;
- appPrefs.PDF_Options.displayFullscreen = false;
- appPrefs.PDF_Options.displayLayers = false;
- appPrefs.PDF_Options.displayThumbs = false;
- appPrefs.PDF_Options.hideMenuBar = false;
- appPrefs.PDF_Options.hideToolBar = false;
- appPrefs.PDF_Options.fitWindow = false;
- appPrefs.PDF_Options.PageLayout = PDFOptions::SinglePage;
- appPrefs.PDF_Options.openAction = "";
+ appPrefs.pdfPrefs.Thumbnails = false;
+ appPrefs.pdfPrefs.Articles = false;
+ appPrefs.pdfPrefs.useLayers = false;
+ appPrefs.pdfPrefs.Compress = true;
+ appPrefs.pdfPrefs.CompressMethod = PDFOptions::Compression_Auto;
+ appPrefs.pdfPrefs.Quality = 0;
+ appPrefs.pdfPrefs.RecalcPic = false;
+ appPrefs.pdfPrefs.embedPDF = false;
+ appPrefs.pdfPrefs.Bookmarks = false;
+ appPrefs.pdfPrefs.PicRes = 300;
+ appPrefs.pdfPrefs.Version = PDFOptions::PDFVersion_14;
+ appPrefs.pdfPrefs.Resolution = 300;
+ appPrefs.pdfPrefs.Binding = 0;
+ appPrefs.pdfPrefs.EmbedList.clear();
+ appPrefs.pdfPrefs.SubsetList.clear();
+ appPrefs.pdfPrefs.MirrorH = false;
+ appPrefs.pdfPrefs.MirrorV = false;
+ appPrefs.pdfPrefs.doClip = false;
+ appPrefs.pdfPrefs.RotateDeg = 0;
+ appPrefs.pdfPrefs.PresentMode = false;
+ appPrefs.pdfPrefs.fileName = "";
+ appPrefs.pdfPrefs.PresentVals.clear();
+ appPrefs.pdfPrefs.isGrayscale = false;
+ appPrefs.pdfPrefs.UseRGB = true;
+ appPrefs.pdfPrefs.UseProfiles = false;
+ appPrefs.pdfPrefs.UseProfiles2 = false;
+ appPrefs.pdfPrefs.SolidProf = "";
+ appPrefs.pdfPrefs.SComp = 3;
+ appPrefs.pdfPrefs.ImageProf = "";
+ appPrefs.pdfPrefs.PrintProf = "";
+ appPrefs.pdfPrefs.Info = "";
+ appPrefs.pdfPrefs.Intent = 0;
+ appPrefs.pdfPrefs.Intent2 = 0;
+ appPrefs.pdfPrefs.bleeds.Top = 0;
+ appPrefs.pdfPrefs.bleeds.Left = 0;
+ appPrefs.pdfPrefs.bleeds.Right = 0;
+ appPrefs.pdfPrefs.bleeds.Bottom = 0;
+ appPrefs.pdfPrefs.useDocBleeds = true;
+ appPrefs.pdfPrefs.cropMarks = false;
+ appPrefs.pdfPrefs.bleedMarks = false;
+ appPrefs.pdfPrefs.registrationMarks = false;
+ appPrefs.pdfPrefs.colorMarks = false;
+ appPrefs.pdfPrefs.docInfoMarks = false;
+ appPrefs.pdfPrefs.markOffset = 0;
+ appPrefs.pdfPrefs.EmbeddedI = false;
+ appPrefs.pdfPrefs.Encrypt = false;
+ appPrefs.pdfPrefs.PassOwner = "";
+ appPrefs.pdfPrefs.PassUser = "";
+ appPrefs.pdfPrefs.Permissions = -4;
+ appPrefs.pdfPrefs.UseLPI = false;
+ appPrefs.pdfPrefs.LPISettings.clear();
+ appPrefs.pdfPrefs.UseSpotColors = true;
+ appPrefs.pdfPrefs.doMultiFile = false;
+ appPrefs.pdfPrefs.displayBookmarks = false;
+ appPrefs.pdfPrefs.displayFullscreen = false;
+ appPrefs.pdfPrefs.displayLayers = false;
+ appPrefs.pdfPrefs.displayThumbs = false;
+ appPrefs.pdfPrefs.hideMenuBar = false;
+ appPrefs.pdfPrefs.hideToolBar = false;
+ appPrefs.pdfPrefs.fitWindow = false;
+ appPrefs.pdfPrefs.PageLayout = PDFOptions::SinglePage;
+ appPrefs.pdfPrefs.openAction = "";
//Attribute setup
- appPrefs.defaultItemAttributes.clear();
- appPrefs.defaultToCSetups.clear();
+ appPrefs.itemAttrPrefs.defaultItemAttributes.clear();
+ appPrefs.tocPrefs.defaultToCSetups.clear();
initDefaultActionKeys();
}
@@ -500,14 +500,14 @@
QMap<QString, QKeySequence > *map=ActionManager::defaultShortcuts();
for( QMap<QString, QKeySequence >::ConstIterator it = map->begin(); it!=map->end(); ++it )
{
- appPrefs.KeyActions[it.key()].actionName = it.key();
- appPrefs.KeyActions[it.key()].keySequence = it.value();
+ appPrefs.keyShortcutPrefs.KeyActions[it.key()].actionName = it.key();
+ appPrefs.keyShortcutPrefs.KeyActions[it.key()].keySequence = it.value();
}
}
void PrefsManager::applyLoadedShortCuts()
{
- for (QMap<QString,Keys>::Iterator it = appPrefs.KeyActions.begin(); it != appPrefs.KeyActions.end(); ++it )
+ for (QMap<QString,Keys>::Iterator it = appPrefs.keyShortcutPrefs.KeyActions.begin(); it != appPrefs.keyShortcutPrefs.KeyActions.end(); ++it )
{
if (!it.value().actionName.isEmpty())
{
@@ -883,34 +883,34 @@
void PrefsManager::setupMainWindow(ScribusMainWindow* mw)
{
- mw->setDefaultPrinter(appPrefs.PrinterName, appPrefs.PrinterFile, appPrefs.PrinterCommand);
+ mw->setDefaultPrinter(appPrefs.printerPrefs.PrinterName, appPrefs.printerPrefs.PrinterFile, appPrefs.printerPrefs.PrinterCommand);
- uint max = qMin(appPrefs.uiPrefs.recentDocCount, appPrefs.RecentDocs.count());
+ uint max = qMin(appPrefs.uiPrefs.recentDocCount, appPrefs.uiPrefs.RecentDocs.count());
for (uint m = 0; m < max; ++m)
{
- QFileInfo fd(appPrefs.RecentDocs[m]);
+ QFileInfo fd(appPrefs.uiPrefs.RecentDocs[m]);
if (fd.exists())
{
- mw->RecentDocs.append(appPrefs.RecentDocs[m]);
- ScCore->fileWatcher->addFile(appPrefs.RecentDocs[m]);
+ mw->RecentDocs.append(appPrefs.uiPrefs.RecentDocs[m]);
+ ScCore->fileWatcher->addFile(appPrefs.uiPrefs.RecentDocs[m]);
}
}
mw->rebuildRecentFileMenu();
- mw->move(appPrefs.mainWinSettings.xPosition, appPrefs.mainWinSettings.yPosition);
- mw->resize(appPrefs.mainWinSettings.width, appPrefs.mainWinSettings.height);
- if (appPrefs.mainWinSettings.maximized)
+ mw->move(appPrefs.uiPrefs.mainWinSettings.xPosition, appPrefs.uiPrefs.mainWinSettings.yPosition);
+ mw->resize(appPrefs.uiPrefs.mainWinSettings.width, appPrefs.uiPrefs.mainWinSettings.height);
+ if (appPrefs.uiPrefs.mainWinSettings.maximized)
mw->setWindowState((ScCore->primaryMainWindow()->windowState() & ~Qt::WindowMinimized) | Qt::WindowMaximized);
//For 1.3.5, we dump prefs first time around.
if (!firstTimeIgnoreOldPrefs)
ReadPrefsXML();
- if (appPrefs.checkerProfiles.count() == 0)
+ if (appPrefs.checkerPrefsList.count() == 0)
{
- initDefaultCheckerPrefs(&appPrefs.checkerProfiles);
+ initDefaultCheckerPrefs(&appPrefs.checkerPrefsList);
appPrefs.curCheckProfile = CommonStrings::PostScript;
}
- if (!appPrefs.mainWinState.isEmpty())
+ if (!appPrefs.uiPrefs.mainWinState.isEmpty())
{
- mw->restoreState(appPrefs.mainWinState);
+ mw->restoreState(appPrefs.uiPrefs.mainWinState);
}
}
@@ -922,7 +922,7 @@
if (userprefsContext)
{
appPrefs.uiPrefs.language = userprefsContext->get("gui_language","");
- appPrefs.mainWinState = QByteArray::fromBase64(userprefsContext->get("mainwinstate","").toAscii());
+ appPrefs.uiPrefs.mainWinState = QByteArray::fromBase64(userprefsContext->get("mainwinstate","").toAscii());
//continue here...
//Prefs."blah blah" =...
}
@@ -944,19 +944,19 @@
// The caller is responsible for ensuring we aren't called under those
// conditions.
Q_ASSERT(!emergencyActivated);
- appPrefs.mainWinSettings.xPosition = abs(ScCore->primaryMainWindow()->pos().x());
- appPrefs.mainWinSettings.yPosition = abs(ScCore->primaryMainWindow()->pos().y());
- appPrefs.mainWinSettings.width = ScCore->primaryMainWindow()->size().width();
- appPrefs.mainWinSettings.height = ScCore->primaryMainWindow()->size().height();
- appPrefs.mainWinSettings.maximized = ScCore->primaryMainWindow()->isMaximized();
- appPrefs.mainWinState = ScCore->primaryMainWindow()->saveState();
- appPrefs.RecentDocs.clear();
+ appPrefs.uiPrefs.mainWinSettings.xPosition = abs(ScCore->primaryMainWindow()->pos().x());
+ appPrefs.uiPrefs.mainWinSettings.yPosition = abs(ScCore->primaryMainWindow()->pos().y());
+ appPrefs.uiPrefs.mainWinSettings.width = ScCore->primaryMainWindow()->size().width();
+ appPrefs.uiPrefs.mainWinSettings.height = ScCore->primaryMainWindow()->size().height();
+ appPrefs.uiPrefs.mainWinSettings.maximized = ScCore->primaryMainWindow()->isMaximized();
+ appPrefs.uiPrefs.mainWinState = ScCore->primaryMainWindow()->saveState();
+ appPrefs.uiPrefs.RecentDocs.clear();
uint max = qMin(appPrefs.uiPrefs.recentDocCount, ScCore->primaryMainWindow()->RecentDocs.count());
for (uint m = 0; m < max; ++m)
{
- appPrefs.RecentDocs.append(ScCore->primaryMainWindow()->RecentDocs[m]);
+ appPrefs.uiPrefs.RecentDocs.append(ScCore->primaryMainWindow()->RecentDocs[m]);
}
- ScCore->primaryMainWindow()->getDefaultPrinter(appPrefs.PrinterName, appPrefs.PrinterFile, appPrefs.PrinterCommand);
+ ScCore->primaryMainWindow()->getDefaultPrinter(appPrefs.printerPrefs.PrinterName, appPrefs.printerPrefs.PrinterFile, appPrefs.printerPrefs.PrinterCommand);
SavePrefsXML();
QString realFile;
if (fname.isNull())
@@ -976,7 +976,7 @@
if (userprefsContext)
{
userprefsContext->set("gui_language", appPrefs.uiPrefs.language);
- userprefsContext->set("mainwinstate", QString::fromAscii(appPrefs.mainWinState.toBase64()));
+ userprefsContext->set("mainwinstate", QString::fromAscii(appPrefs.uiPrefs.mainWinState.toBase64()));
//continue here...
//Prefs."blah blah" =...
}
@@ -986,27 +986,27 @@
void PrefsManager::setGhostscriptExecutable(const QString& executableName)
{
- appPrefs.gs_exe=executableName;
+ appPrefs.extToolPrefs.gs_exe=executableName;
}
void PrefsManager::setImageEditorExecutable(const QString& executableName)
{
- appPrefs.imageEditorExecutable=executableName;
+ appPrefs.extToolPrefs.imageEditorExecutable=executableName;
}
void PrefsManager::setExtBrowserExecutable(const QString& executableName)
{
- appPrefs.extBrowserExecutable=executableName;
+ appPrefs.extToolPrefs.extBrowserExecutable=executableName;
}
void PrefsManager::setLatexConfigs(const QStringList& configs)
{
- appPrefs.latexConfigs=configs;
+ appPrefs.extToolPrefs.latexConfigs=configs;
}
void PrefsManager::setLatexEditorExecutable(const QString& executableName)
{
- appPrefs.latexEditorExecutable=executableName;
+ appPrefs.extToolPrefs.latexEditorExecutable=executableName;
}
const QString PrefsManager::documentDir()
@@ -1027,8 +1027,8 @@
//Changed to return false when we have no fonts
bool PrefsManager::GetAllFonts(bool showFontInfo)
{
- appPrefs.AvailFonts.GetFonts(prefsLocation, showFontInfo);
- return !appPrefs.AvailFonts.isEmpty();
+ appPrefs.fontPrefs.AvailFonts.GetFonts(prefsLocation, showFontInfo);
+ return !appPrefs.fontPrefs.AvailFonts.isEmpty();
}
void PrefsManager::setShowStartupDialog(const bool showDialog)
@@ -1176,7 +1176,7 @@
ke.keySequence = keyseq;
ke.cleanMenuText=cleanMenuText;
ke.tableRow=rowNumber;
- appPrefs.KeyActions.insert(actName, ke);
+ appPrefs.keyShortcutPrefs.KeyActions.insert(actName, ke);
}
else
qDebug("%s", QString("Action Name: %1 does not exist").arg(actName).toAscii().constData());
@@ -1185,7 +1185,7 @@
double PrefsManager::displayScale() const
{
- return appPrefs.DisScale;
+ return appPrefs.displayPrefs.DisScale;
}
const QString& PrefsManager::uiLanguage() const
@@ -1215,7 +1215,7 @@
bool PrefsManager::showPageShadow() const
{
- return appPrefs.showPageShadow;
+ return appPrefs.displayPrefs.showPageShadow;
}
bool PrefsManager::WritePref(QString ho)
@@ -1250,20 +1250,20 @@
dc.setAttribute("rulersShown", static_cast<int>(appPrefs.guidesPrefs.rulersShown));
dc.setAttribute("showBleed", static_cast<int>(appPrefs.guidesPrefs.showBleed));
dc.setAttribute("rulerMode", static_cast<int>(appPrefs.guidesPrefs.rulerMode));
- dc.setAttribute("ScratchBottom", appPrefs.scratch.Bottom);
- dc.setAttribute("ScratchLeft", appPrefs.scratch.Left);
- dc.setAttribute("ScratchRight", appPrefs.scratch.Right);
- dc.setAttribute("ScratchTop", appPrefs.scratch.Top);
- dc.setAttribute("GapHorizontal", ScCLocale::toQStringC(appPrefs.GapHorizontal));
- dc.setAttribute("GapVertical", ScCLocale::toQStringC(appPrefs.GapVertical));
+ dc.setAttribute("ScratchBottom", appPrefs.displayPrefs.scratch.Bottom);
+ dc.setAttribute("ScratchLeft", appPrefs.displayPrefs.scratch.Left);
+ dc.setAttribute("ScratchRight", appPrefs.displayPrefs.scratch.Right);
+ dc.setAttribute("ScratchTop", appPrefs.displayPrefs.scratch.Top);
+ dc.setAttribute("GapHorizontal", ScCLocale::toQStringC(appPrefs.displayPrefs.GapHorizontal));
+ dc.setAttribute("GapVertical", ScCLocale::toQStringC(appPrefs.displayPrefs.GapVertical));
dc.setAttribute("STECOLOR", appPrefs.STEcolor.name());
dc.setAttribute("STEFONT", appPrefs.STEfont);
- dc.setAttribute("STYLEPREVIEW", static_cast<int>(appPrefs.haveStylePreview));
+ dc.setAttribute("STYLEPREVIEW", static_cast<int>(appPrefs.miscPrefs.haveStylePreview));
dc.setAttribute("UI_SHOWSTARTUPDIALOG", static_cast<int>(appPrefs.uiPrefs.showStartupDialog));
dc.setAttribute("UI_USESMALLWIDGETS", static_cast<int>(appPrefs.uiPrefs.useSmallWidgets));
- dc.setAttribute("ToolTips", static_cast<int>(appPrefs.showToolTips));
- dc.setAttribute("showMouseCoordinates", static_cast<int>(appPrefs.showMouseCoordinates));
- dc.setAttribute("stickyTools", static_cast<int>(appPrefs.stickyTools));
+ dc.setAttribute("ToolTips", static_cast<int>(appPrefs.displayPrefs.showToolTips));
+ dc.setAttribute("showMouseCoordinates", static_cast<int>(appPrefs.displayPrefs.showMouseCoordinates));
+ dc.setAttribute("stickyTools", static_cast<int>(appPrefs.uiPrefs.stickyTools));
elem.appendChild(dc);
QDomElement dc1=docu.createElement("GRID");
dc1.setAttribute("MINOR",ScCLocale::toQStringC(appPrefs.guidesPrefs.minorGridSpacing));
@@ -1277,24 +1277,24 @@
dc1.setAttribute("SHOW", static_cast<int>(appPrefs.guidesPrefs.gridShown));
elem.appendChild(dc1);
QDomElement dc1a=docu.createElement("PAGE");
- dc1a.setAttribute("ShowPageShadow",static_cast<int>(appPrefs.showPageShadow));
- dc1a.setAttribute("PAGEC",appPrefs.DpapColor.name());
- dc1a.setAttribute("SELEC",appPrefs.DFrameColor.name());
- dc1a.setAttribute("DFrameNormColor",appPrefs.DFrameNormColor.name());
- dc1a.setAttribute("DFrameGroupColor",appPrefs.DFrameGroupColor.name());
- dc1a.setAttribute("DFrameLockColor",appPrefs.DFrameLockColor.name());
- dc1a.setAttribute("DFrameLinkColor",appPrefs.DFrameLinkColor.name());
- dc1a.setAttribute("DFrameAnnotationColor",appPrefs.DFrameAnnotationColor.name());
- dc1a.setAttribute("DPageBorderColor",appPrefs.DPageBorderColor.name());
- dc1a.setAttribute("DControlCharColor",appPrefs.DControlCharColor.name());
+ dc1a.setAttribute("ShowPageShadow",static_cast<int>(appPrefs.displayPrefs.showPageShadow));
+ dc1a.setAttribute("PAGEC",appPrefs.displayPrefs.DpapColor.name());
+ dc1a.setAttribute("SELEC",appPrefs.displayPrefs.DFrameColor.name());
+ dc1a.setAttribute("DFrameNormColor",appPrefs.displayPrefs.DFrameNormColor.name());
+ dc1a.setAttribute("DFrameGroupColor",appPrefs.displayPrefs.DFrameGroupColor.name());
+ dc1a.setAttribute("DFrameLockColor",appPrefs.displayPrefs.DFrameLockColor.name());
+ dc1a.setAttribute("DFrameLinkColor",appPrefs.displayPrefs.DFrameLinkColor.name());
+ dc1a.setAttribute("DFrameAnnotationColor",appPrefs.displayPrefs.DFrameAnnotationColor.name());
+ dc1a.setAttribute("DPageBorderColor",appPrefs.displayPrefs.DPageBorderColor.name());
+ dc1a.setAttribute("DControlCharColor",appPrefs.displayPrefs.DControlCharColor.name());
dc1a.setAttribute("MARGC",appPrefs.guidesPrefs.marginColor.name());
- dc1a.setAttribute("RANDF", static_cast<int>(appPrefs.marginColored));
- dc1a.setAttribute("DScale", ScCLocale::toQStringC(appPrefs.DisScale));
+ dc1a.setAttribute("RANDF", static_cast<int>(appPrefs.displayPrefs.marginColored));
+ dc1a.setAttribute("DScale", ScCLocale::toQStringC(appPrefs.displayPrefs.DisScale));
elem.appendChild(dc1a);
QDomElement dc2=docu.createElement("FONTS");
dc2.setAttribute("FACE",appPrefs.itemToolPrefs.defFont);
dc2.setAttribute("SIZE",appPrefs.itemToolPrefs.defSize / 10.0);
- dc2.setAttribute("AutomaticSubst", static_cast<int>(appPrefs.askBeforeSubstituite));
+ dc2.setAttribute("AutomaticSubst", static_cast<int>(appPrefs.fontPrefs.askBeforeSubstitute));
elem.appendChild(dc2);
QDomElement dc3=docu.createElement("TYPO");
dc3.setAttribute("TIEF",appPrefs.typoPrefs.valueSubScript);
@@ -1369,20 +1369,20 @@
dc9.setAttribute("constrain", ScCLocale::toQStringC(appPrefs.opToolPrefs.constrain));
elem.appendChild(dc9);
QDomElement dc4=docu.createElement("MAINWINDOW");
- dc4.setAttribute("XPOS",appPrefs.mainWinSettings.xPosition);
- dc4.setAttribute("YPOS",appPrefs.mainWinSettings.yPosition);
- dc4.setAttribute("WIDTH",appPrefs.mainWinSettings.width);
- dc4.setAttribute("HEIGHT",appPrefs.mainWinSettings.height);
- dc4.setAttribute("MAXIMIZED",static_cast<int>(appPrefs.mainWinSettings.maximized));
+ dc4.setAttribute("XPOS",appPrefs.uiPrefs.mainWinSettings.xPosition);
+ dc4.setAttribute("YPOS",appPrefs.uiPrefs.mainWinSettings.yPosition);
+ dc4.setAttribute("WIDTH",appPrefs.uiPrefs.mainWinSettings.width);
+ dc4.setAttribute("HEIGHT",appPrefs.uiPrefs.mainWinSettings.height);
+ dc4.setAttribute("MAXIMIZED",static_cast<int>(appPrefs.uiPrefs.mainWinSettings.maximized));
elem.appendChild(dc4);
QDomElement dc73=docu.createElement("SCRAPBOOK");
- dc73.setAttribute("CopyToScrapbook",static_cast<int>(appPrefs.doCopyToScrapbook));
- dc73.setAttribute("persistentScrapbook",static_cast<int>(appPrefs.persistentScrapbook));
- dc73.setAttribute("numScrapbookCopies",appPrefs.numScrapbookCopies);
- for (int rd=0; rd<appPrefs.RecentScrapbooks.count(); ++rd)
+ dc73.setAttribute("CopyToScrapbook",static_cast<int>(appPrefs.scrapbookPrefs.doCopyToScrapbook));
+ dc73.setAttribute("persistentScrapbook",static_cast<int>(appPrefs.scrapbookPrefs.persistentScrapbook));
+ dc73.setAttribute("numScrapbookCopies",appPrefs.scrapbookPrefs.numScrapbookCopies);
+ for (int rd=0; rd<appPrefs.scrapbookPrefs.RecentScrapbooks.count(); ++rd)
{
QDomElement rde=docu.createElement("RECENT");
- rde.setAttribute("NAME",appPrefs.RecentScrapbooks[rd]);
+ rde.setAttribute("NAME",appPrefs.scrapbookPrefs.RecentScrapbooks[rd]);
dc73.appendChild(rde);
}
elem.appendChild(dc73);
@@ -1435,8 +1435,8 @@
dc79ac.setAttribute("currentProfile", appPrefs.curCheckProfile);
elem.appendChild(dc79ac);
CheckerPrefsList::Iterator itcp;
- CheckerPrefsList::Iterator itcpend=appPrefs.checkerProfiles.end();
- for (itcp = appPrefs.checkerProfiles.begin(); itcp != itcpend; ++itcp)
+ CheckerPrefsList::Iterator itcpend=appPrefs.checkerPrefsList.end();
+ for (itcp = appPrefs.checkerPrefsList.begin(); itcp != itcpend; ++itcp)
{
QDomElement dc79a=docu.createElement("CheckProfile");
dc79a.setAttribute("Name",itcp.key());
@@ -1474,10 +1474,10 @@
dc81.setAttribute("DIIm",appPrefs.DCMSset.DefaultIntentImages);
elem.appendChild(dc81);
QDomElement dc82=docu.createElement("PRINTER");
- dc82.setAttribute("NAME",appPrefs.PrinterName);
- dc82.setAttribute("FILE",appPrefs.PrinterFile);
- dc82.setAttribute("COMMAND",appPrefs.PrinterCommand);
- dc82.setAttribute("CLIPMARGIN", static_cast<int>(appPrefs.ClipMargin));
+ dc82.setAttribute("NAME",appPrefs.printerPrefs.PrinterName);
+ dc82.setAttribute("FILE",appPrefs.printerPrefs.PrinterFile);
+ dc82.setAttribute("COMMAND",appPrefs.printerPrefs.PrinterCommand);
+ dc82.setAttribute("CLIPMARGIN", static_cast<int>(appPrefs.printerPrefs.ClipMargin));
dc82.setAttribute("GMODE", static_cast<int>(appPrefs.GCRMode));
elem.appendChild(dc82);
QDomElement dc8Pr=docu.createElement("PRINTPREVIEW");
@@ -1496,35 +1496,35 @@
dc8Ex.setAttribute("GIMP", imageEditorExecutable());
dc8Ex.setAttribute("GS", ghostscriptExecutable());
dc8Ex.setAttribute("WebBrowser", extBrowserExecutable());
- dc8Ex.setAttribute("AlphaGraphics", static_cast<int>(appPrefs.gs_AntiAliasGraphics));
- dc8Ex.setAttribute("AlphaText", static_cast<int>(appPrefs.gs_AntiAliasText));
- dc8Ex.setAttribute("Resolution", appPrefs.gs_Resolution);
+ dc8Ex.setAttribute("AlphaGraphics", static_cast<int>(appPrefs.extToolPrefs.gs_AntiAliasGraphics));
+ dc8Ex.setAttribute("AlphaText", static_cast<int>(appPrefs.extToolPrefs.gs_AntiAliasText));
+ dc8Ex.setAttribute("Resolution", appPrefs.extToolPrefs.gs_Resolution);
dc8Ex.setAttribute("LatexEditor", latexEditorExecutable());
dc8Ex.setAttribute("LatexResolution", latexResolution());
- dc8Ex.setAttribute("LatexForceDpi", static_cast<int>(appPrefs.latexForceDpi));
- dc8Ex.setAttribute("LatexStartWithEmptyFrames", static_cast<int>(appPrefs.latexStartWithEmptyFrames));
+ dc8Ex.setAttribute("LatexForceDpi", static_cast<int>(appPrefs.extToolPrefs.latexForceDpi));
+ dc8Ex.setAttribute("LatexStartWithEmptyFrames", static_cast<int>(appPrefs.extToolPrefs.latexStartWithEmptyFrames));
QStringList configs = latexConfigs();
foreach (QString config, configs) {
QDomElement domConfig = docu.createElement("LatexConfig");
domConfig.setAttribute("file", config);
- domConfig.setAttribute("command", appPrefs.latexCommands[config]);
+ domConfig.setAttribute("command", appPrefs.extToolPrefs.latexCommands[config]);
dc8Ex.appendChild(domConfig);
}
elem.appendChild(dc8Ex);
QDomElement rde=docu.createElement("HYPHEN");
- rde.setAttribute("LANG", appPrefs.Language);
- rde.setAttribute("WORDLEN", appPrefs.MinWordLen);
- rde.setAttribute("HYCOUNT", appPrefs.HyCount);
- rde.setAttribute("MODE", static_cast<int>(appPrefs.Automatic));
- rde.setAttribute("INMODE", static_cast<int>(appPrefs.AutoCheck));
- for (QHash<QString, QString>::Iterator hyit = appPrefs.specialWords.begin(); hyit != appPrefs.specialWords.end(); ++hyit)
+ rde.setAttribute("LANG", appPrefs.hyphPrefs.Language);
+ rde.setAttribute("WORDLEN", appPrefs.hyphPrefs.MinWordLen);
+ rde.setAttribute("HYCOUNT", appPrefs.hyphPrefs.HyCount);
+ rde.setAttribute("MODE", static_cast<int>(appPrefs.hyphPrefs.Automatic));
+ rde.setAttribute("INMODE", static_cast<int>(appPrefs.hyphPrefs.AutoCheck));
+ for (QHash<QString, QString>::Iterator hyit = appPrefs.hyphPrefs.specialWords.begin(); hyit != appPrefs.hyphPrefs.specialWords.end(); ++hyit)
{
QDomElement hyelm = docu.createElement("EXCEPTION");
hyelm.setAttribute("WORD", hyit.key());
hyelm.setAttribute("HYPHENATED", hyit.value());
rde.appendChild(hyelm);
}
- for (QSet<QString>::Iterator hyit2 = appPrefs.ignoredWords.begin(); hyit2 != appPrefs.ignoredWords.end(); ++hyit2)
+ for (QSet<QString>::Iterator hyit2 = appPrefs.hyphPrefs.ignoredWords.begin(); hyit2 != appPrefs.hyphPrefs.ignoredWords.end(); ++hyit2)
{
QDomElement hyelm2 = docu.createElement("IGNORE");
hyelm2.setAttribute("WORD", (*hyit2));
@@ -1544,7 +1544,7 @@
co.setAttribute("Register", static_cast<int>(itc.value().isRegistrationColor()));
elem.appendChild(co);
}
- for ( SCFontsIterator itf(appPrefs.AvailFonts); itf.hasNext(); itf.next())
+ for ( SCFontsIterator itf(appPrefs.fontPrefs.AvailFonts); itf.hasNext(); itf.next())
{
if (!itf.currentKey().isEmpty())
{
@@ -1556,13 +1556,13 @@
elem.appendChild(fn);
}
}
- for (int rd=0; rd<appPrefs.RecentDocs.count(); ++rd)
+ for (int rd=0; rd<appPrefs.uiPrefs.RecentDocs.count(); ++rd)
{
QDomElement rde=docu.createElement("RECENT");
- rde.setAttribute("NAME",appPrefs.RecentDocs[rd]);
+ rde.setAttribute("NAME",appPrefs.uiPrefs.RecentDocs[rd]);
elem.appendChild(rde);
}
- for (QMap<QString,Keys>::Iterator ksc=appPrefs.KeyActions.begin(); ksc!=appPrefs.KeyActions.end(); ++ksc)
+ for (QMap<QString,Keys>::Iterator ksc=appPrefs.keyShortcutPrefs.KeyActions.begin(); ksc!=appPrefs.keyShortcutPrefs.KeyActions.end(); ++ksc)
{
if (ksc.value().actionName.isEmpty())
continue;
@@ -1589,61 +1589,61 @@
cosd.setAttribute("NAME",appPrefs.DColorSet);
elem.appendChild(cosd);
QDomElement pdf = docu.createElement("PDF");
- pdf.setAttribute("Thumbnails", static_cast<int>(appPrefs.PDF_Options.Thumbnails));
- pdf.setAttribute("Articles", static_cast<int>(appPrefs.PDF_Options.Articles));
- pdf.setAttribute("Bookmarks", static_cast<int>(appPrefs.PDF_Options.Bookmarks));
- pdf.setAttribute("Compress", static_cast<int>(appPrefs.PDF_Options.Compress));
- pdf.setAttribute("CMethod", appPrefs.PDF_Options.CompressMethod);
- pdf.setAttribute("Quality", appPrefs.PDF_Options.Quality);
- pdf.setAttribute("EmbedPDF", static_cast<int>(appPrefs.PDF_Options.embedPDF));
- pdf.setAttribute("MirrorH", static_cast<int>(appPrefs.PDF_Options.MirrorH));
- pdf.setAttribute("MirrorV", static_cast<int>(appPrefs.PDF_Options.MirrorV));
- pdf.setAttribute("Clip", static_cast<int>(appPrefs.PDF_Options.doClip));
- pdf.setAttribute("RotateDeg", static_cast<int>(appPrefs.PDF_Options.RotateDeg));
- pdf.setAttribute("PresentMode", static_cast<int>(appPrefs.PDF_Options.PresentMode));
- pdf.setAttribute("RecalcPic", static_cast<int>(appPrefs.PDF_Options.RecalcPic));
- pdf.setAttribute("Grayscale", static_cast<int>(appPrefs.PDF_Options.isGrayscale));
- pdf.setAttribute("RGBMode", static_cast<int>(appPrefs.PDF_Options.UseRGB));
- pdf.setAttribute("UseProfiles", static_cast<int>(appPrefs.PDF_Options.UseProfiles));
- pdf.setAttribute("UseProfiles2", static_cast<int>(appPrefs.PDF_Options.UseProfiles2));
- pdf.setAttribute("Binding", appPrefs.PDF_Options.Binding);
- pdf.setAttribute("PicRes", appPrefs.PDF_Options.PicRes);
- pdf.setAttribute("Resolution", appPrefs.PDF_Options.Resolution);
- pdf.setAttribute("Version", appPrefs.PDF_Options.Version);
- pdf.setAttribute("Intent", appPrefs.PDF_Options.Intent);
- pdf.setAttribute("Intent2", appPrefs.PDF_Options.Intent2);
- pdf.setAttribute("SolidP", appPrefs.PDF_Options.SolidProf);
- pdf.setAttribute("ImageP", appPrefs.PDF_Options.ImageProf);
- pdf.setAttribute("PrintP", appPrefs.PDF_Options.PrintProf);
- pdf.setAttribute("InfoString", appPrefs.PDF_Options.Info);
- pdf.setAttribute("BTop", ScCLocale::toQStringC(appPrefs.PDF_Options.bleeds.Top));
- pdf.setAttribute("BLeft", ScCLocale::toQStringC(appPrefs.PDF_Options.bleeds.Left));
- pdf.setAttribute("BRight", ScCLocale::toQStringC(appPrefs.PDF_Options.bleeds.Right));
- pdf.setAttribute("BBottom", ScCLocale::toQStringC(appPrefs.PDF_Options.bleeds.Bottom));
- pdf.setAttribute("useDocBleeds", static_cast<int>(appPrefs.PDF_Options.useDocBleeds));
- pdf.setAttribute("cropMarks", static_cast<int>(appPrefs.PDF_Options.cropMarks));
- pdf.setAttribute("bleedMarks", static_cast<int>(appPrefs.PDF_Options.bleedMarks));
- pdf.setAttribute("registrationMarks", static_cast<int>(appPrefs.PDF_Options.registrationMarks));
- pdf.setAttribute("colorMarks", static_cast<int>(appPrefs.PDF_Options.colorMarks));
- pdf.setAttribute("docInfoMarks", static_cast<int>(appPrefs.PDF_Options.docInfoMarks));
- pdf.setAttribute("markOffset", appPrefs.PDF_Options.markOffset);
- pdf.setAttribute("ImagePr", static_cast<int>(appPrefs.PDF_Options.EmbeddedI));
- pdf.setAttribute("PassOwner", appPrefs.PDF_Options.PassOwner);
- pdf.setAttribute("PassUser", appPrefs.PDF_Options.PassUser);
- pdf.setAttribute("Permissions", appPrefs.PDF_Options.Permissions);
- pdf.setAttribute("Encrypt", static_cast<int>(appPrefs.PDF_Options.Encrypt));
- pdf.setAttribute("UseLayers", static_cast<int>(appPrefs.PDF_Options.useLayers));
- pdf.setAttribute("UseLpi", static_cast<int>(appPrefs.PDF_Options.UseLPI));
- pdf.setAttribute("UseSpotColors", static_cast<int>(appPrefs.PDF_Options.UseSpotColors));
- pdf.setAttribute("doMultiFile", static_cast<int>(appPrefs.PDF_Options.doMultiFile));
- pdf.setAttribute("displayBookmarks", static_cast<int>(appPrefs.PDF_Options.displayBookmarks));
- pdf.setAttribute("displayFullscreen", static_cast<int>(appPrefs.PDF_Options.displayFullscreen));
- pdf.setAttribute("displayLayers", static_cast<int>(appPrefs.PDF_Options.displayLayers));
- pdf.setAttribute("displayThumbs", static_cast<int>(appPrefs.PDF_Options.displayThumbs));
- pdf.setAttribute("PageLayout", appPrefs.PDF_Options.PageLayout);
- pdf.setAttribute("openAction", appPrefs.PDF_Options.openAction);
+ pdf.setAttribute("Thumbnails", static_cast<int>(appPrefs.pdfPrefs.Thumbnails));
+ pdf.setAttribute("Articles", static_cast<int>(appPrefs.pdfPrefs.Articles));
+ pdf.setAttribute("Bookmarks", static_cast<int>(appPrefs.pdfPrefs.Bookmarks));
+ pdf.setAttribute("Compress", static_cast<int>(appPrefs.pdfPrefs.Compress));
+ pdf.setAttribute("CMethod", appPrefs.pdfPrefs.CompressMethod);
+ pdf.setAttribute("Quality", appPrefs.pdfPrefs.Quality);
+ pdf.setAttribute("EmbedPDF", static_cast<int>(appPrefs.pdfPrefs.embedPDF));
+ pdf.setAttribute("MirrorH", static_cast<int>(appPrefs.pdfPrefs.MirrorH));
+ pdf.setAttribute("MirrorV", static_cast<int>(appPrefs.pdfPrefs.MirrorV));
+ pdf.setAttribute("Clip", static_cast<int>(appPrefs.pdfPrefs.doClip));
+ pdf.setAttribute("RotateDeg", static_cast<int>(appPrefs.pdfPrefs.RotateDeg));
+ pdf.setAttribute("PresentMode", static_cast<int>(appPrefs.pdfPrefs.PresentMode));
+ pdf.setAttribute("RecalcPic", static_cast<int>(appPrefs.pdfPrefs.RecalcPic));
+ pdf.setAttribute("Grayscale", static_cast<int>(appPrefs.pdfPrefs.isGrayscale));
+ pdf.setAttribute("RGBMode", static_cast<int>(appPrefs.pdfPrefs.UseRGB));
+ pdf.setAttribute("UseProfiles", static_cast<int>(appPrefs.pdfPrefs.UseProfiles));
+ pdf.setAttribute("UseProfiles2", static_cast<int>(appPrefs.pdfPrefs.UseProfiles2));
+ pdf.setAttribute("Binding", appPrefs.pdfPrefs.Binding);
+ pdf.setAttribute("PicRes", appPrefs.pdfPrefs.PicRes);
+ pdf.setAttribute("Resolution", appPrefs.pdfPrefs.Resolution);
+ pdf.setAttribute("Version", appPrefs.pdfPrefs.Version);
+ pdf.setAttribute("Intent", appPrefs.pdfPrefs.Intent);
+ pdf.setAttribute("Intent2", appPrefs.pdfPrefs.Intent2);
+ pdf.setAttribute("SolidP", appPrefs.pdfPrefs.SolidProf);
+ pdf.setAttribute("ImageP", appPrefs.pdfPrefs.ImageProf);
+ pdf.setAttribute("PrintP", appPrefs.pdfPrefs.PrintProf);
+ pdf.setAttribute("InfoString", appPrefs.pdfPrefs.Info);
+ pdf.setAttribute("BTop", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.Top));
+ pdf.setAttribute("BLeft", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.Left));
+ pdf.setAttribute("BRight", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.Right));
+ pdf.setAttribute("BBottom", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.Bottom));
+ pdf.setAttribute("useDocBleeds", static_cast<int>(appPrefs.pdfPrefs.useDocBleeds));
+ pdf.setAttribute("cropMarks", static_cast<int>(appPrefs.pdfPrefs.cropMarks));
+ pdf.setAttribute("bleedMarks", static_cast<int>(appPrefs.pdfPrefs.bleedMarks));
+ pdf.setAttribute("registrationMarks", static_cast<int>(appPrefs.pdfPrefs.registrationMarks));
+ pdf.setAttribute("colorMarks", static_cast<int>(appPrefs.pdfPrefs.colorMarks));
+ pdf.setAttribute("docInfoMarks", static_cast<int>(appPrefs.pdfPrefs.docInfoMarks));
+ pdf.setAttribute("markOffset", appPrefs.pdfPrefs.markOffset);
+ pdf.setAttribute("ImagePr", static_cast<int>(appPrefs.pdfPrefs.EmbeddedI));
+ pdf.setAttribute("PassOwner", appPrefs.pdfPrefs.PassOwner);
+ pdf.setAttribute("PassUser", appPrefs.pdfPrefs.PassUser);
+ pdf.setAttribute("Permissions", appPrefs.pdfPrefs.Permissions);
+ pdf.setAttribute("Encrypt", static_cast<int>(appPrefs.pdfPrefs.Encrypt));
+ pdf.setAttribute("UseLayers", static_cast<int>(appPrefs.pdfPrefs.useLayers));
+ pdf.setAttribute("UseLpi", static_cast<int>(appPrefs.pdfPrefs.UseLPI));
+ pdf.setAttribute("UseSpotColors", static_cast<int>(appPrefs.pdfPrefs.UseSpotColors));
+ pdf.setAttribute("doMultiFile", static_cast<int>(appPrefs.pdfPrefs.doMultiFile));
+ pdf.setAttribute("displayBookmarks", static_cast<int>(appPrefs.pdfPrefs.displayBookmarks));
+ pdf.setAttribute("displayFullscreen", static_cast<int>(appPrefs.pdfPrefs.displayFullscreen));
+ pdf.setAttribute("displayLayers", static_cast<int>(appPrefs.pdfPrefs.displayLayers));
+ pdf.setAttribute("displayThumbs", static_cast<int>(appPrefs.pdfPrefs.displayThumbs));
+ pdf.setAttribute("PageLayout", appPrefs.pdfPrefs.PageLayout);
+ pdf.setAttribute("openAction", appPrefs.pdfPrefs.openAction);
QMap<QString,LPIData>::Iterator itlp;
- for (itlp = appPrefs.PDF_Options.LPISettings.begin(); itlp != appPrefs.PDF_Options.LPISettings.end(); ++itlp)
+ for (itlp = appPrefs.pdfPrefs.LPISettings.begin(); itlp != appPrefs.pdfPrefs.LPISettings.end(); ++itlp)
{
QDomElement pdf4 = docu.createElement("LPI");
pdf4.setAttribute("Color", itlp.key());
@@ -1654,7 +1654,7 @@
}
elem.appendChild(pdf);
QDomElement docItemAttrs = docu.createElement("DefaultItemAttributes");
- for(ObjAttrVector::Iterator objAttrIt = appPrefs.defaultItemAttributes.begin() ; objAttrIt != appPrefs.defaultItemAttributes.end(); ++objAttrIt )
+ for(ObjAttrVector::Iterator objAttrIt = appPrefs.itemAttrPrefs.defaultItemAttributes.begin() ; objAttrIt != appPrefs.itemAttrPrefs.defaultItemAttributes.end(); ++objAttrIt )
{
QDomElement itemAttr = docu.createElement("ItemAttribute");
itemAttr.setAttribute("Name", (*objAttrIt).name);
@@ -1668,7 +1668,7 @@
}
elem.appendChild(docItemAttrs);
QDomElement tocElem = docu.createElement("TablesOfContents");
- for(ToCSetupVector::Iterator tocSetupIt = appPrefs.defaultToCSetups.begin() ; tocSetupIt != appPrefs.defaultToCSetups.end(); ++tocSetupIt )
+ for(ToCSetupVector::Iterator tocSetupIt = appPrefs.tocPrefs.defaultToCSetups.begin() ; tocSetupIt != appPrefs.tocPrefs.defaultToCSetups.end(); ++tocSetupIt )
{
QDomElement tocsetup = docu.createElement("TableOfContents");
tocsetup.setAttribute("Name", (*tocSetupIt).name);
@@ -1682,8 +1682,8 @@
elem.appendChild(tocElem);
// lorem ipsum
QDomElement liElem = docu.createElement("LoremIpsum");
- liElem.setAttribute("useStandardLI", static_cast<int>(appPrefs.useStandardLI));
- liElem.setAttribute("paragraphsLI", appPrefs.paragraphsLI);
+ liElem.setAttribute("useStandardLI", static_cast<int>(appPrefs.miscPrefs.useStandardLI));
+ liElem.setAttribute("paragraphsLI", appPrefs.miscPrefs.paragraphsLI);
elem.appendChild(liElem);
// write file
bool result = false;
@@ -1746,11 +1746,11 @@
if (!prefs135FileFound)
return false;
appPrefs.DColors.clear();
- appPrefs.latexCommands.clear();
+ appPrefs.extToolPrefs.latexCommands.clear();
ScColor lf = ScColor();
QDomNode DOC=elem.firstChild();
if (!DOC.namedItem("CheckProfile").isNull())
- appPrefs.checkerProfiles.clear();
+ appPrefs.checkerPrefsList.clear();
while(!DOC.isNull())
{
QDomElement dc=DOC.toElement();
@@ -1806,21 +1806,21 @@
appPrefs.guidesPrefs.rulersShown = static_cast<bool>(dc.attribute("rulersShown", "1").toInt());
appPrefs.guidesPrefs.showBleed = static_cast<bool>(dc.attribute("showBleed", "1").toInt());
appPrefs.guidesPrefs.rulerMode = static_cast<bool>(dc.attribute("rulerMode", "1").toInt());
- appPrefs.haveStylePreview = static_cast<bool>(dc.attribute("STYLEPREVIEW", "1").toInt());
+ appPrefs.miscPrefs.haveStylePreview = static_cast<bool>(dc.attribute("STYLEPREVIEW", "1").toInt());
- appPrefs.scratch.Bottom = ScCLocale::toDoubleC(dc.attribute("ScratchBottom"), 20.0);
- appPrefs.scratch.Left = ScCLocale::toDoubleC(dc.attribute("ScratchLeft"), 100.0);
- appPrefs.scratch.Right = ScCLocale::toDoubleC(dc.attribute("ScratchRight"), 100.0);
- appPrefs.scratch.Top = ScCLocale::toDoubleC(dc.attribute("ScratchTop"), 20.0);
- appPrefs.GapHorizontal = ScCLocale::toDoubleC(dc.attribute("GapHorizontal"), 0.0);
- appPrefs.GapVertical = ScCLocale::toDoubleC(dc.attribute("GapVertical"), 40.0);
+ appPrefs.displayPrefs.scratch.Bottom = ScCLocale::toDoubleC(dc.attribute("ScratchBottom"), 20.0);
+ appPrefs.displayPrefs.scratch.Left = ScCLocale::toDoubleC(dc.attribute("ScratchLeft"), 100.0);
+ appPrefs.displayPrefs.scratch.Right = ScCLocale::toDoubleC(dc.attribute("ScratchRight"), 100.0);
+ appPrefs.displayPrefs.scratch.Top = ScCLocale::toDoubleC(dc.attribute("ScratchTop"), 20.0);
+ appPrefs.displayPrefs.GapHorizontal = ScCLocale::toDoubleC(dc.attribute("GapHorizontal"), 0.0);
+ appPrefs.displayPrefs.GapVertical = ScCLocale::toDoubleC(dc.attribute("GapVertical"), 40.0);
if (dc.hasAttribute("STECOLOR"))
appPrefs.STEcolor = QColor(dc.attribute("STECOLOR"));
if (dc.hasAttribute("STEFONT"))
appPrefs.STEfont = dc.attribute("STEFONT");
- appPrefs.showToolTips = static_cast<bool>(dc.attribute("ToolTips", "1").toInt());
- appPrefs.showMouseCoordinates = static_cast<bool>(dc.attribute("showMouseCoordinates", "1").toInt());
- appPrefs.stickyTools = static_cast<bool>(dc.attribute("stickyTools", "0").toInt());
+ appPrefs.displayPrefs.showToolTips = static_cast<bool>(dc.attribute("ToolTips", "1").toInt());
+ appPrefs.displayPrefs.showMouseCoordinates = static_cast<bool>(dc.attribute("showMouseCoordinates", "1").toInt());
+ appPrefs.uiPrefs.stickyTools = static_cast<bool>(dc.attribute("stickyTools", "0").toInt());
}
if (dc.tagName()=="GRID")
{
@@ -1839,19 +1839,19 @@
}
if (dc.tagName()=="PAGE")
{
- appPrefs.showPageShadow = static_cast<bool>(dc.attribute("ShowPageShadow", "1").toInt());
- appPrefs.DpapColor = QColor(dc.attribute("PAGEC"));
- appPrefs.DFrameColor = QColor(dc.attribute("SELEC","#ff0000"));
- appPrefs.DFrameNormColor = QColor(dc.attribute("DFrameNormColor","#000000"));
- appPrefs.DFrameGroupColor = QColor(dc.attribute("DFrameGroupColor","#008080"));
- appPrefs.DFrameLockColor = QColor(dc.attribute("DFrameLockColor","#800000"));
- appPrefs.DFrameLinkColor = QColor(dc.attribute("DFrameLinkColor","#ff0000"));
- appPrefs.DFrameAnnotationColor = QColor(dc.attribute("DFrameAnnotationColor","#0000ff"));
- appPrefs.DPageBorderColor = QColor(dc.attribute("DPageBorderColor","#ff0000"));
- appPrefs.DControlCharColor = QColor(dc.attribute("DControlCharColor","#800000"));
+ appPrefs.displayPrefs.showPageShadow = static_cast<bool>(dc.attribute("ShowPageShadow", "1").toInt());
+ appPrefs.displayPrefs.DpapColor = QColor(dc.attribute("PAGEC"));
+ appPrefs.displayPrefs.DFrameColor = QColor(dc.attribute("SELEC","#ff0000"));
+ appPrefs.displayPrefs.DFrameNormColor = QColor(dc.attribute("DFrameNormColor","#000000"));
+ appPrefs.displayPrefs.DFrameGroupColor = QColor(dc.attribute("DFrameGroupColor","#008080"));
+ appPrefs.displayPrefs.DFrameLockColor = QColor(dc.attribute("DFrameLockColor","#800000"));
+ appPrefs.displayPrefs.DFrameLinkColor = QColor(dc.attribute("DFrameLinkColor","#ff0000"));
+ appPrefs.displayPrefs.DFrameAnnotationColor = QColor(dc.attribute("DFrameAnnotationColor","#0000ff"));
+ appPrefs.displayPrefs.DPageBorderColor = QColor(dc.attribute("DPageBorderColor","#ff0000"));
+ appPrefs.displayPrefs.DControlCharColor = QColor(dc.attribute("DControlCharColor","#800000"));
appPrefs.guidesPrefs.marginColor = QColor(dc.attribute("MARGC","#0000ff"));
- appPrefs.marginColored = static_cast<bool>(dc.attribute("RANDF", "0").toInt());
- appPrefs.DisScale = ScCLocale::toDoubleC(dc.attribute("DScale"), appPrefs.DisScale);
+ appPrefs.displayPrefs.marginColored = static_cast<bool>(dc.attribute("RANDF", "0").toInt());
+ appPrefs.displayPrefs.DisScale = ScCLocale::toDoubleC(dc.attribute("DScale"), appPrefs.displayPrefs.DisScale);
}
if (dc.tagName()=="TYPO")
{
@@ -1936,11 +1936,11 @@
}
if (dc.tagName()=="MAINWINDOW")
{
- appPrefs.mainWinSettings.xPosition = dc.attribute("XPOS", "0").toInt();
- appPrefs.mainWinSettings.yPosition = dc.attribute("YPOS", "0").toInt();
- appPrefs.mainWinSettings.width = dc.attribute("WIDTH", "640").toInt();
- appPrefs.mainWinSettings.height = dc.attribute("HEIGHT", "480").toInt();
- appPrefs.mainWinSettings.maximized = static_cast<bool>(dc.attribute("MAXIMIZED", "0").toInt());
+ appPrefs.uiPrefs.mainWinSettings.xPosition = dc.attribute("XPOS", "0").toInt();
+ appPrefs.uiPrefs.mainWinSettings.yPosition = dc.attribute("YPOS", "0").toInt();
+ appPrefs.uiPrefs.mainWinSettings.width = dc.attribute("WIDTH", "640").toInt();
+ appPrefs.uiPrefs.mainWinSettings.height = dc.attribute("HEIGHT", "480").toInt();
+ appPrefs.uiPrefs.mainWinSettings.maximized = static_cast<bool>(dc.attribute("MAXIMIZED", "0").toInt());
QDesktopWidget *d = QApplication::desktop();
QSize gStrut = QApplication::globalStrut();
int minX = 0;
@@ -1949,28 +1949,28 @@
// on Mac you're dead if the titlebar is not on screen
minY = 22;
#endif
- if (appPrefs.mainWinSettings.xPosition < minX )
- appPrefs.mainWinSettings.xPosition = minX;
- if (appPrefs.mainWinSettings.yPosition < minY)
- appPrefs.mainWinSettings.yPosition = minY;
+ if (appPrefs.uiPrefs.mainWinSettings.xPosition < minX )
+ appPrefs.uiPrefs.mainWinSettings.xPosition = minX;
+ if (appPrefs.uiPrefs.mainWinSettings.yPosition < minY)
+ appPrefs.uiPrefs.mainWinSettings.yPosition = minY;
int minWidth = 5*gStrut.width();
int minHeight = 5*gStrut.width();
int maxWidth = d->width();
int maxHeight = d->height();
- if (appPrefs.mainWinSettings.width > maxWidth)
- appPrefs.mainWinSettings.width = maxWidth;
- if (appPrefs.mainWinSettings.width < minWidth)
- appPrefs.mainWinSettings.width = minWidth;
- if (appPrefs.mainWinSettings.height > maxHeight)
- appPrefs.mainWinSettings.height = maxHeight;
- if (appPrefs.mainWinSettings.height < minHeight)
- appPrefs.mainWinSettings.height = minHeight;
+ if (appPrefs.uiPrefs.mainWinSettings.width > maxWidth)
+ appPrefs.uiPrefs.mainWinSettings.width = maxWidth;
+ if (appPrefs.uiPrefs.mainWinSettings.width < minWidth)
+ appPrefs.uiPrefs.mainWinSettings.width = minWidth;
+ if (appPrefs.uiPrefs.mainWinSettings.height > maxHeight)
+ appPrefs.uiPrefs.mainWinSettings.height = maxHeight;
+ if (appPrefs.uiPrefs.mainWinSettings.height < minHeight)
+ appPrefs.uiPrefs.mainWinSettings.height = minHeight;
int maxX = d->width() - minWidth;
int maxY = d->height() - minHeight;
- if (appPrefs.mainWinSettings.xPosition >= maxX)
- appPrefs.mainWinSettings.xPosition = maxX;
- if (appPrefs.mainWinSettings.yPosition >= maxY)
- appPrefs.mainWinSettings.yPosition = maxY;
+ if (appPrefs.uiPrefs.mainWinSettings.xPosition >= maxX)
+ appPrefs.uiPrefs.mainWinSettings.xPosition = maxX;
+ if (appPrefs.uiPrefs.mainWinSettings.yPosition >= maxY)
+ appPrefs.uiPrefs.mainWinSettings.yPosition = maxY;
}
if (dc.tagName()=="PAGEPALETTE")
{
@@ -1979,9 +1979,9 @@
}
if (dc.tagName()=="SCRAPBOOK")
{
- appPrefs.doCopyToScrapbook = static_cast<bool>(dc.attribute("CopyToScrapbook", "1").toInt());
- appPrefs.persistentScrapbook = static_cast<bool>(dc.attribute("persistentScrapbook", "0").toInt());
- appPrefs.numScrapbookCopies = dc.attribute("numScrapbookCopies", "10").toInt();
+ appPrefs.scrapbookPrefs.doCopyToScrapbook = static_cast<bool>(dc.attribute("CopyToScrapbook", "1").toInt());
+ appPrefs.scrapbookPrefs.persistentScrapbook = static_cast<bool>(dc.attribute("persistentScrapbook", "0").toInt());
+ appPrefs.scrapbookPrefs.numScrapbookCopies = dc.attribute("numScrapbookCopies", "10").toInt();
QDomNode scrp = dc.firstChild();
while(!scrp.isNull())
{
@@ -1991,7 +1991,7 @@
QString nam = scrpElem.attribute("NAME");
QFileInfo fd(nam);
if (fd.exists())
- appPrefs.RecentScrapbooks.append(nam);
+ appPrefs.scrapbookPrefs.RecentScrapbooks.append(nam);
}
scrp = scrp.nextSibling();
}
@@ -2044,10 +2044,10 @@
PGSN = PGSN.nextSibling();
}
appPrefs.pageSets.append(pageS);
- if ((appPrefs.pageSets.count() == appPrefs.docSetupPrefs.pagePositioning) && ((appPrefs.GapHorizontal < 0) && (appPrefs.GapVertical < 0)))
+ if ((appPrefs.pageSets.count() == appPrefs.docSetupPrefs.pagePositioning) && ((appPrefs.displayPrefs.GapHorizontal < 0) && (appPrefs.displayPrefs.GapVertical < 0)))
{
- appPrefs.GapHorizontal = ScCLocale::toDoubleC(PgsAttr.attribute("GapHorizontal"), 0.0);
- appPrefs.GapVertical = ScCLocale::toDoubleC(PgsAttr.attribute("GapBelow"), 40.0);
+ appPrefs.displayPrefs.GapHorizontal = ScCLocale::toDoubleC(PgsAttr.attribute("GapHorizontal"), 0.0);
+ appPrefs.displayPrefs.GapVertical = ScCLocale::toDoubleC(PgsAttr.attribute("GapBelow"), 40.0);
}
}
PGS = PGS.nextSibling();
@@ -2072,15 +2072,15 @@
}
if (!importingFrom12 && dc.tagName()=="SHORTCUT")
{
-// if (appPrefs.KeyActions.contains(dc.attribute("ACTION")))
+// if (appPrefs.keyShortcutPrefs.KeyActions.contains(dc.attribute("ACTION")))
// {
- appPrefs.KeyActions[dc.attribute("ACTION")].actionName = dc.attribute("ACTION");
+ appPrefs.keyShortcutPrefs.KeyActions[dc.attribute("ACTION")].actionName = dc.attribute("ACTION");
QKeySequence newKeySequence = QKeySequence(dc.attribute("SEQUENCE"));
- appPrefs.KeyActions[dc.attribute("ACTION")].keySequence = newKeySequence;
+ appPrefs.keyShortcutPrefs.KeyActions[dc.attribute("ACTION")].keySequence = newKeySequence;
// }
}
if (dc.tagName()=="RECENT")
- appPrefs.RecentDocs.append(dc.attribute("NAME"));
+ appPrefs.uiPrefs.RecentDocs.append(dc.attribute("NAME"));
if (dc.tagName()=="Checker")
{
appPrefs.curCheckProfile = dc.attribute("currentProfile", CommonStrings::PostScript);
@@ -2112,14 +2112,14 @@
checkerSettings.checkRasterPDF = static_cast<bool>(dc.attribute("checkRasterPDF", "1").toInt());
checkerSettings.checkForGIF = static_cast<bool>(dc.attribute("checkForGIF", "1").toInt());
checkerSettings.ignoreOffLayers = static_cast<bool>(dc.attribute("ignoreOffLayers", "0").toInt());
- appPrefs.checkerProfiles[name] = checkerSettings;
+ appPrefs.checkerPrefsList[name] = checkerSettings;
}
if (dc.tagName()=="PRINTER")
{
- appPrefs.PrinterName = dc.attribute("NAME");
- appPrefs.PrinterFile = dc.attribute("FILE");
- appPrefs.PrinterCommand = dc.attribute("COMMAND");
- appPrefs.ClipMargin = static_cast<bool>(dc.attribute("CLIPMARGIN", "1").toInt());
+ appPrefs.printerPrefs.PrinterName = dc.attribute("NAME");
+ appPrefs.printerPrefs.PrinterFile = dc.attribute("FILE");
+ appPrefs.printerPrefs.PrinterCommand = dc.attribute("COMMAND");
+ appPrefs.printerPrefs.ClipMargin = static_cast<bool>(dc.attribute("CLIPMARGIN", "1").toInt());
appPrefs.GCRMode = static_cast<bool>(dc.attribute("GMODE", "1").toInt());
}
if (dc.tagName()=="PRINTPREVIEW")
@@ -2141,12 +2141,12 @@
bool gsa2 = testGSAvailability(ghostscriptExecutable());
if( (gsa1 == true) || (gsa2 == false) )
setGhostscriptExecutable(dc.attribute("GS", "gs"));
- appPrefs.gs_AntiAliasText = static_cast<bool>(dc.attribute("AlphaText", "0").toInt());
- appPrefs.gs_AntiAliasGraphics = static_cast<bool>(dc.attribute("AlphaGraphics", "0").toInt());
- appPrefs.gs_Resolution = dc.attribute("Resolution", "72").toInt();
- appPrefs.latexResolution = dc.attribute("LatexResolution", "72").toInt();
- appPrefs.latexForceDpi = static_cast<bool>(dc.attribute("LatexForceDpi", "1").toInt());
- appPrefs.latexStartWithEmptyFrames = static_cast<bool>(dc.attribute("LatexStartWithEmptyFrames", "0").toInt());
+ appPrefs.extToolPrefs.gs_AntiAliasText = static_cast<bool>(dc.attribute("AlphaText", "0").toInt());
+ appPrefs.extToolPrefs.gs_AntiAliasGraphics = static_cast<bool>(dc.attribute("AlphaGraphics", "0").toInt());
+ appPrefs.extToolPrefs.gs_Resolution = dc.attribute("Resolution", "72").toInt();
+ appPrefs.extToolPrefs.latexResolution = dc.attribute("LatexResolution", "72").toInt();
+ appPrefs.extToolPrefs.latexForceDpi = static_cast<bool>(dc.attribute("LatexForceDpi", "1").toInt());
+ appPrefs.extToolPrefs.latexStartWithEmptyFrames = static_cast<bool>(dc.attribute("LatexStartWithEmptyFrames", "0").toInt());
setImageEditorExecutable(dc.attribute("GIMP", "gimp"));
setExtBrowserExecutable(dc.attribute("WebBrowser", ""));
setLatexEditorExecutable(dc.attribute("LatexEditor", ""));
@@ -2160,7 +2160,7 @@
bool configExists = !confFile.isEmpty() && (QFile::exists(confFile) || QFile::exists(latexBase+confFile));
if (!configs.contains(confFile) && configExists) {
configs.append(confFile);
- appPrefs.latexCommands[confFile] = command;
+ appPrefs.extToolPrefs.latexCommands[confFile] = command;
}
}
if (!configs.isEmpty()) {
@@ -2173,11 +2173,11 @@
if (dc.tagName()=="HYPHEN")
{
if (!dc.attribute("LANG", "").isEmpty())
- appPrefs.Language = dc.attribute("LANG");
- appPrefs.MinWordLen = dc.attribute("WORDLEN", "3").toInt();
- appPrefs.HyCount = dc.attribute("HYCOUNT", "2").toInt();
- appPrefs.Automatic = static_cast<bool>(dc.attribute("MODE", "1").toInt());
- appPrefs.AutoCheck = static_cast<bool>(dc.attribute("INMODE", "1").toInt());
+ appPrefs.hyphPrefs.Language = dc.attribute("LANG");
+ appPrefs.hyphPrefs.MinWordLen = dc.attribute("WORDLEN", "3").toInt();
+ appPrefs.hyphPrefs.HyCount = dc.attribute("HYCOUNT", "2").toInt();
+ appPrefs.hyphPrefs.Automatic = static_cast<bool>(dc.attribute("MODE", "1").toInt());
+ appPrefs.hyphPrefs.AutoCheck = static_cast<bool>(dc.attribute("INMODE", "1").toInt());
QDomNode hyelm = dc.firstChild();
while(!hyelm.isNull())
{
@@ -2186,12 +2186,12 @@
{
QString word = hyElem.attribute("WORD");
QString hyph = hyElem.attribute("HYPHENATED");
- appPrefs.specialWords.insert(word, hyph);
+ appPrefs.hyphPrefs.specialWords.insert(word, hyph);
}
else if (hyElem.tagName()=="IGNORE")
{
QString word = hyElem.attribute("WORD");
- appPrefs.ignoredWords.insert(word);
+ appPrefs.hyphPrefs.ignoredWords.insert(word);
}
hyelm = hyelm.nextSibling();
}
@@ -2202,7 +2202,7 @@
if (!tmpf.isEmpty())
{
QString newFont = "";
- if (!appPrefs.AvailFonts.contains(tmpf))
+ if (!appPrefs.fontPrefs.AvailFonts.contains(tmpf))
{
ScCore->showSplash(false);
MissingFont *dia = new MissingFont(0, tmpf, 0);
@@ -2215,17 +2215,17 @@
if (!newFont.isEmpty())
appPrefs.itemToolPrefs.defFont = newFont;
appPrefs.itemToolPrefs.defSize = qRound( ScCLocale::toDoubleC(dc.attribute("SIZE"), 12.0) * 10.0 );
- appPrefs.askBeforeSubstituite = static_cast<bool>(dc.attribute("AutomaticSubst", "1").toInt());
+ appPrefs.fontPrefs.askBeforeSubstitute = static_cast<bool>(dc.attribute("AutomaticSubst", "1").toInt());
}
}
if (dc.tagName()=="FONT")
{
QString tmpf(dc.attribute("NAME"));
- if (!tmpf.isEmpty() && appPrefs.AvailFonts.contains(tmpf))
+ if (!tmpf.isEmpty() && appPrefs.fontPrefs.AvailFonts.contains(tmpf))
{
- appPrefs.AvailFonts[tmpf].embedPs(static_cast<bool>(dc.attribute("EMBED").toInt()));
- appPrefs.AvailFonts[tmpf].usable(appPrefs.AvailFonts[tmpf].usable() && static_cast<bool>(dc.attribute("USE", "1").toInt()));
- appPrefs.AvailFonts[tmpf].subset(static_cast<bool>(dc.attribute("SUBSET", "0").toInt()));
+ appPrefs.fontPrefs.AvailFonts[tmpf].embedPs(static_cast<bool>(dc.attribute("EMBED").toInt()));
+ appPrefs.fontPrefs.AvailFonts[tmpf].usable(appPrefs.fontPrefs.AvailFonts[tmpf].usable() && static_cast<bool>(dc.attribute("USE", "1").toInt()));
+ appPrefs.fontPrefs.AvailFonts[tmpf].subset(static_cast<bool>(dc.attribute("SUBSET", "0").toInt()));
}
}
if (dc.tagName()=="COLOR")
@@ -2252,62 +2252,62 @@
appPrefs.DColorSet = dc.attribute("NAME");
if(dc.tagName()=="PDF")
{
- appPrefs.PDF_Options.Articles = static_cast<bool>(dc.attribute("Articles").toInt());
- appPrefs.PDF_Options.Thumbnails = static_cast<bool>(dc.attribute("Thumbnails").toInt());
- appPrefs.PDF_Options.Compress = static_cast<bool>(dc.attribute("Compress").toInt());
- appPrefs.PDF_Options.CompressMethod = (PDFOptions::PDFCompression) dc.attribute("CMethod", "0").toInt();
- appPrefs.PDF_Options.Quality = dc.attribute("Quality", "0").toInt();
- appPrefs.PDF_Options.embedPDF = dc.attribute("EmbedPDF", "0").toInt();
- appPrefs.PDF_Options.RecalcPic = static_cast<bool>(dc.attribute("RecalcPic").toInt());
- appPrefs.PDF_Options.Bookmarks = static_cast<bool>(dc.attribute("Bookmarks").toInt());
- appPrefs.PDF_Options.MirrorH = static_cast<bool>(dc.attribute("MirrorH").toInt());
- appPrefs.PDF_Options.MirrorV = static_cast<bool>(dc.attribute("MirrorV").toInt());
- appPrefs.PDF_Options.doClip = static_cast<bool>(dc.attribute("Clip").toInt());
- appPrefs.PDF_Options.RotateDeg = dc.attribute("RotateDeg", "0").toInt();
- appPrefs.PDF_Options.PresentMode = static_cast<bool>(dc.attribute("PresentMode").toInt());
- appPrefs.PDF_Options.PicRes = dc.attribute("PicRes").toInt();
- appPrefs.PDF_Options.Version = (PDFOptions::PDFVersion)dc.attribute("Version").toInt();
- appPrefs.PDF_Options.Resolution = dc.attribute("Resolution").toInt();
- appPrefs.PDF_Options.Binding = dc.attribute("Binding").toInt();
- appPrefs.PDF_Options.fileName = "";
- appPrefs.PDF_Options.isGrayscale = static_cast<bool>(dc.attribute("Grayscale", "0").toInt());
- appPrefs.PDF_Options.UseRGB = static_cast<bool>(dc.attribute("RGBMode", "0").toInt());
- appPrefs.PDF_Options.UseProfiles = static_cast<bool>(dc.attribute("UseProfiles", "0").toInt());
- appPrefs.PDF_Options.UseProfiles2 = static_cast<bool>(dc.attribute("UseProfiles2", "0").toInt());
- appPrefs.PDF_Options.Intent = dc.attribute("Intent", "1").toInt();
- appPrefs.PDF_Options.Intent2 = dc.attribute("Intent2", "1").toInt();
- appPrefs.PDF_Options.SolidProf = dc.attribute("SolidP", "");
- appPrefs.PDF_Options.ImageProf = dc.attribute("ImageP", "");
- appPrefs.PDF_Options.PrintProf = dc.attribute("PrintP", "");
- appPrefs.PDF_Options.Info = dc.attribute("InfoString", "");
- appPrefs.PDF_Options.bleeds.Top = ScCLocale::toDoubleC(dc.attribute("BTop"), 0.0);
- appPrefs.PDF_Options.bleeds.Left = ScCLocale::toDoubleC(dc.attribute("BLeft"), 0.0);
- appPrefs.PDF_Options.bleeds.Right = ScCLocale::toDoubleC(dc.attribute("BRight"), 0.0);
- appPrefs.PDF_Options.bleeds.Bottom = ScCLocale::toDoubleC(dc.attribute("BBottom"), 0.0);
- appPrefs.PDF_Options.useDocBleeds = static_cast<bool>(dc.attribute("useDocBleeds", "1").toInt());
- appPrefs.PDF_Options.cropMarks = static_cast<bool>(dc.attribute("cropMarks", "0").toInt());
- appPrefs.PDF_Options.bleedMarks = static_cast<bool>(dc.attribute("bleedMarks", "0").toInt());
- appPrefs.PDF_Options.registrationMarks = static_cast<bool>(dc.attribute("registrationMarks", "0").toInt());
- appPrefs.PDF_Options.colorMarks = static_cast<bool>(dc.attribute("colorMarks", "0").toInt());
- appPrefs.PDF_Options.docInfoMarks = static_cast<bool>(dc.attribute("docInfoMarks", "0").toInt());
- appPrefs.PDF_Options.markOffset = ScCLocale::toDoubleC(dc.attribute("markOffset"), 0.0);
- appPrefs.PDF_Options.EmbeddedI = static_cast<bool>(dc.attribute("ImagePr", "0").toInt());
- appPrefs.PDF_Options.PassOwner = dc.attribute("PassOwner", "");
- appPrefs.PDF_Options.PassUser = dc.attribute("PassUser", "");
- appPrefs.PDF_Options.Permissions = dc.attribute("Permissions", "-4").toInt();
- appPrefs.PDF_Options.Encrypt = static_cast<bool>(dc.attribute("Encrypt", "0").toInt());
- appPrefs.PDF_Options.useLayers = static_cast<bool>(dc.attribute("UseLayers", "0").toInt());
- appPrefs.PDF_Options.UseLPI = static_cast<bool>(dc.attribute("UseLpi", "0").toInt());
- appPrefs.PDF_Options.UseSpotColors = static_cast<bool>(dc.attribute("UseSpotColors", "1").toInt());
- appPrefs.PDF_Options.doMultiFile = static_cast<bool>(dc.attribute("doMultiFile", "0").toInt());
- appPrefs.PDF_Options.displayBookmarks = static_cast<bool>(dc.attribute("displayBookmarks", "0").toInt());
- appPrefs.PDF_Options.displayFullscreen = static_cast<bool>(dc.attribute("displayFullscreen", "0").toInt());
- appPrefs.PDF_Options.displayLayers = static_cast<bool>(dc.attribute("displayLayers", "0").toInt());
- appPrefs.PDF_Options.displayThumbs = static_cast<bool>(dc.attribute("displayThumbs", "0").toInt());
- appPrefs.PDF_Options.PageLayout = dc.attribute("PageLayout", "0").toInt();
- appPrefs.PDF_Options.openAction = dc.attribute("openAction", "");
+ appPrefs.pdfPrefs.Articles = static_cast<bool>(dc.attribute("Articles").toInt());
+ appPrefs.pdfPrefs.Thumbnails = static_cast<bool>(dc.attribute("Thumbnails").toInt());
+ appPrefs.pdfPrefs.Compress = static_cast<bool>(dc.attribute("Compress").toInt());
+ appPrefs.pdfPrefs.CompressMethod = (PDFOptions::PDFCompression) dc.attribute("CMethod", "0").toInt();
+ appPrefs.pdfPrefs.Quality = dc.attribute("Quality", "0").toInt();
+ appPrefs.pdfPrefs.embedPDF = dc.attribute("EmbedPDF", "0").toInt();
+ appPrefs.pdfPrefs.RecalcPic = static_cast<bool>(dc.attribute("RecalcPic").toInt());
+ appPrefs.pdfPrefs.Bookmarks = static_cast<bool>(dc.attribute("Bookmarks").toInt());
+ appPrefs.pdfPrefs.MirrorH = static_cast<bool>(dc.attribute("MirrorH").toInt());
+ appPrefs.pdfPrefs.MirrorV = static_cast<bool>(dc.attribute("MirrorV").toInt());
+ appPrefs.pdfPrefs.doClip = static_cast<bool>(dc.attribute("Clip").toInt());
+ appPrefs.pdfPrefs.RotateDeg = dc.attribute("RotateDeg", "0").toInt();
+ appPrefs.pdfPrefs.PresentMode = static_cast<bool>(dc.attribute("PresentMode").toInt());
+ appPrefs.pdfPrefs.PicRes = dc.attribute("PicRes").toInt();
+ appPrefs.pdfPrefs.Version = (PDFOptions::PDFVersion)dc.attribute("Version").toInt();
+ appPrefs.pdfPrefs.Resolution = dc.attribute("Resolution").toInt();
+ appPrefs.pdfPrefs.Binding = dc.attribute("Binding").toInt();
+ appPrefs.pdfPrefs.fileName = "";
+ appPrefs.pdfPrefs.isGrayscale = static_cast<bool>(dc.attribute("Grayscale", "0").toInt());
+ appPrefs.pdfPrefs.UseRGB = static_cast<bool>(dc.attribute("RGBMode", "0").toInt());
+ appPrefs.pdfPrefs.UseProfiles = static_cast<bool>(dc.attribute("UseProfiles", "0").toInt());
+ appPrefs.pdfPrefs.UseProfiles2 = static_cast<bool>(dc.attribute("UseProfiles2", "0").toInt());
+ appPrefs.pdfPrefs.Intent = dc.attribute("Intent", "1").toInt();
+ appPrefs.pdfPrefs.Intent2 = dc.attribute("Intent2", "1").toInt();
+ appPrefs.pdfPrefs.SolidProf = dc.attribute("SolidP", "");
+ appPrefs.pdfPrefs.ImageProf = dc.attribute("ImageP", "");
+ appPrefs.pdfPrefs.PrintProf = dc.attribute("PrintP", "");
+ appPrefs.pdfPrefs.Info = dc.attribute("InfoString", "");
+ appPrefs.pdfPrefs.bleeds.Top = ScCLocale::toDoubleC(dc.attribute("BTop"), 0.0);
+ appPrefs.pdfPrefs.bleeds.Left = ScCLocale::toDoubleC(dc.attribute("BLeft"), 0.0);
+ appPrefs.pdfPrefs.bleeds.Right = ScCLocale::toDoubleC(dc.attribute("BRight"), 0.0);
+ appPrefs.pdfPrefs.bleeds.Bottom = ScCLocale::toDoubleC(dc.attribute("BBottom"), 0.0);
+ appPrefs.pdfPrefs.useDocBleeds = static_cast<bool>(dc.attribute("useDocBleeds", "1").toInt());
+ appPrefs.pdfPrefs.cropMarks = static_cast<bool>(dc.attribute("cropMarks", "0").toInt());
+ appPrefs.pdfPrefs.bleedMarks = static_cast<bool>(dc.attribute("bleedMarks", "0").toInt());
+ appPrefs.pdfPrefs.registrationMarks = static_cast<bool>(dc.attribute("registrationMarks", "0").toInt());
+ appPrefs.pdfPrefs.colorMarks = static_cast<bool>(dc.attribute("colorMarks", "0").toInt());
+ appPrefs.pdfPrefs.docInfoMarks = static_cast<bool>(dc.attribute("docInfoMarks", "0").toInt());
+ appPrefs.pdfPrefs.markOffset = ScCLocale::toDoubleC(dc.attribute("markOffset"), 0.0);
+ appPrefs.pdfPrefs.EmbeddedI = static_cast<bool>(dc.attribute("ImagePr", "0").toInt());
+ appPrefs.pdfPrefs.PassOwner = dc.attribute("PassOwner", "");
+ appPrefs.pdfPrefs.PassUser = dc.attribute("PassUser", "");
+ appPrefs.pdfPrefs.Permissions = dc.attribute("Permissions", "-4").toInt();
+ appPrefs.pdfPrefs.Encrypt = static_cast<bool>(dc.attribute("Encrypt", "0").toInt());
+ appPrefs.pdfPrefs.useLayers = static_cast<bool>(dc.attribute("UseLayers", "0").toInt());
+ appPrefs.pdfPrefs.UseLPI = static_cast<bool>(dc.attribute("UseLpi", "0").toInt());
+ appPrefs.pdfPrefs.UseSpotColors = static_cast<bool>(dc.attribute("UseSpotColors", "1").toInt());
+ appPrefs.pdfPrefs.doMultiFile = static_cast<bool>(dc.attribute("doMultiFile", "0").toInt());
+ appPrefs.pdfPrefs.displayBookmarks = static_cast<bool>(dc.attribute("displayBookmarks", "0").toInt());
+ appPrefs.pdfPrefs.displayFullscreen = static_cast<bool>(dc.attribute("displayFullscreen", "0").toInt());
+ appPrefs.pdfPrefs.displayLayers = static_cast<bool>(dc.attribute("displayLayers", "0").toInt());
+ appPrefs.pdfPrefs.displayThumbs = static_cast<bool>(dc.attribute("displayThumbs", "0").toInt());
+ appPrefs.pdfPrefs.PageLayout = dc.attribute("PageLayout", "0").toInt();
+ appPrefs.pdfPrefs.openAction = dc.attribute("openAction", "");
QDomNode PFO = DOC.firstChild();
- appPrefs.PDF_Options.LPISettings.clear();
+ appPrefs.pdfPrefs.LPISettings.clear();
while(!PFO.isNull())
{
QDomElement pdfF = PFO.toElement();
@@ -2317,7 +2317,7 @@
lpo.Angle = pdfF.attribute("Angle").toInt();
lpo.Frequency = pdfF.attribute("Frequency").toInt();
lpo.SpotFunc = pdfF.attribute("SpotFunction").toInt();
- appPrefs.PDF_Options.LPISettings[pdfF.attribute("Color")] = lpo;
+ appPrefs.pdfPrefs.LPISettings[pdfF.attribute("Color")] = lpo;
}
PFO = PFO.nextSibling();
}
@@ -2325,7 +2325,7 @@
if(dc.tagName()=="DefaultItemAttributes")
{
QDomNode DIA = DOC.firstChild();
- appPrefs.defaultItemAttributes.clear();
+ appPrefs.itemAttrPrefs.defaultItemAttributes.clear();
while(!DIA.isNull())
{
QDomElement itemAttr = DIA.toElement();
@@ -2339,7 +2339,7 @@
objattr.relationship=itemAttr.attribute("Relationship");
objattr.relationshipto=itemAttr.attribute("RelationshipTo");
objattr.autoaddto=itemAttr.attribute("AutoAddTo");
- appPrefs.defaultItemAttributes.append(objattr);
+ appPrefs.itemAttrPrefs.defaultItemAttributes.append(objattr);
}
DIA = DIA.nextSibling();
}
@@ -2347,7 +2347,7 @@
if(dc.tagName()=="TablesOfContents")
{
QDomNode TOC = DOC.firstChild();
- appPrefs.defaultToCSetups.clear();
+ appPrefs.tocPrefs.defaultToCSetups.clear();
while(!TOC.isNull())
{
QDomElement tocElem = TOC.toElement();
@@ -2366,7 +2366,7 @@
tocsetup.pageLocation=End;
if (numberPlacement=="NotShown")
tocsetup.pageLocation=NotShown;
- appPrefs.defaultToCSetups.append(tocsetup);
+ appPrefs.tocPrefs.defaultToCSetups.append(tocsetup);
}
TOC = TOC.nextSibling();
}
@@ -2374,8 +2374,8 @@
// lorem ispum
if (dc.tagName() == "LoremIpsum")
{
- appPrefs.useStandardLI = static_cast<bool>(dc.attribute("useStandardLI", "0").toInt());
- appPrefs.paragraphsLI = dc.attribute("paragraphsLI", "10").toInt();
+ appPrefs.miscPrefs.useStandardLI = static_cast<bool>(dc.attribute("useStandardLI", "0").toInt());
+ appPrefs.miscPrefs.paragraphsLI = dc.attribute("paragraphsLI", "10").toInt();
}
DOC=DOC.nextSibling();
}
@@ -2468,5 +2468,5 @@
int PrefsManager::gsResolution()
{
- return appPrefs.gs_Resolution;
+ return appPrefs.extToolPrefs.gs_Resolution;
}
Index: scribus/sampleitem.cpp
===================================================================
--- scribus/sampleitem.cpp (revision 13954)
+++ scribus/sampleitem.cpp (revision 13955)
@@ -65,7 +65,7 @@
tmpStyle.setRightMargin(0);
tmpStyle.setGapBefore(0);
tmpStyle.setGapAfter(0);
- tmpStyle.charStyle().setFont(PrefsManager::instance()->appPrefs.AvailFonts[m_Doc->itemToolPrefs.defFont]);
+ tmpStyle.charStyle().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[m_Doc->itemToolPrefs.defFont]);
tmpStyle.charStyle().setFontSize(m_Doc->itemToolPrefs.defSize);
// tmpStyle.tabValues().clear();
tmpStyle.setHasDropCap(false);
@@ -188,7 +188,7 @@
void SampleItem::setFont(QString font)
{
- tmpStyle.charStyle().setFont(PrefsManager::instance()->appPrefs.AvailFonts[font]);
+ tmpStyle.charStyle().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[font]);
}
void SampleItem::setFontSize(int fontSize, bool autoLineSpa)
@@ -324,7 +324,7 @@
if (m_Doc->view() != NULL)
{
sca = m_Doc->view()->scale();
- m_Doc->view()->setScale(1.0 * PrefsManager::instance()->appPrefs.DisScale);
+ m_Doc->view()->setScale(1.0 * PrefsManager::instance()->appPrefs.displayPrefs.DisScale);
}
painter->setZoomFactor(m_Doc->view()->scale());
Index: scribus/ui/tabdisplay.cpp
===================================================================
--- scribus/ui/tabdisplay.cpp (revision 13954)
+++ scribus/ui/tabdisplay.cpp (revision 13955)
@@ -65,48 +65,48 @@
docUnitIndex = prefsData->docSetupPrefs.docUnitIndex;
double unitRatio = unitGetRatioFromIndex(docUnitIndex);
- DisScale = prefsData->DisScale;
+ DisScale = prefsData->displayPrefs.DisScale;
int decimals = unitGetPrecisionFromIndex(docUnitIndex);
QString unitSuffix = unitGetSuffixFromIndex(docUnitIndex);
QPixmap pm(54, 14);
- pm.fill(prefsData->DpapColor);
- colorPaper = prefsData->DpapColor;
+ pm.fill(prefsData->displayPrefs.DpapColor);
+ colorPaper = prefsData->displayPrefs.DpapColor;
backColor->setIcon(pm);
backColor->setText( QString::null );
- pm.fill(prefsData->DFrameColor);
- colorFrame = prefsData->DFrameColor;
+ pm.fill(prefsData->displayPrefs.DFrameColor);
+ colorFrame = prefsData->displayPrefs.DFrameColor;
buttonFrameSelected->setText( QString::null );
buttonFrameSelected->setIcon(pm);
- pm.fill(prefsData->DFrameNormColor);
- colorFrameNorm = prefsData->DFrameNormColor;
+ pm.fill(prefsData->displayPrefs.DFrameNormColor);
+ colorFrameNorm = prefsData->displayPrefs.DFrameNormColor;
buttonFrameNormal->setText( QString::null );
buttonFrameNormal->setIcon(pm);
- pm.fill(prefsData->DFrameGroupColor);
- colorFrameGroup = prefsData->DFrameGroupColor;
+ pm.fill(prefsData->displayPrefs.DFrameGroupColor);
+ colorFrameGroup = prefsData->displayPrefs.DFrameGroupColor;
buttonFrameGrouped->setText( QString::null );
buttonFrameGrouped->setIcon(pm);
- pm.fill(prefsData->DFrameLinkColor);
- colorFrameLinked = prefsData->DFrameLinkColor;
+ pm.fill(prefsData->displayPrefs.DFrameLinkColor);
+ colorFrameLinked = prefsData->displayPrefs.DFrameLinkColor;
buttonFrameLinked->setText( QString::null );
buttonFrameLinked->setIcon(pm);
- pm.fill(prefsData->DFrameLockColor);
- colorFrameLocked = prefsData->DFrameLockColor;
+ pm.fill(prefsData->displayPrefs.DFrameLockColor);
+ colorFrameLocked = prefsData->displayPrefs.DFrameLockColor;
buttonFrameLocked->setText( QString::null );
buttonFrameLocked->setIcon(pm);
- pm.fill(prefsData->DFrameAnnotationColor);
- colorFrameAnnotation = prefsData->DFrameAnnotationColor;
+ pm.fill(prefsData->displayPrefs.DFrameAnnotationColor);
+ colorFrameAnnotation = prefsData->displayPrefs.DFrameAnnotationColor;
buttonFrameAnnotation->setText( QString::null );
buttonFrameAnnotation->setIcon(pm);
- pm.fill(prefsData->DPageBorderColor);
- colorPageBorder = prefsData->DPageBorderColor;
+ pm.fill(prefsData->displayPrefs.DPageBorderColor);
+ colorPageBorder = prefsData->displayPrefs.DPageBorderColor;
buttonSelectedPage->setText( QString::null );
buttonSelectedPage->setIcon(pm);
- pm.fill(prefsData->DControlCharColor);
- colorControlChars = prefsData->DControlCharColor;
+ pm.fill(prefsData->displayPrefs.DControlCharColor);
+ colorControlChars = prefsData->displayPrefs.DControlCharColor;
buttonControlChars->setText( QString::null );
buttonControlChars->setIcon(pm);
- checkShowPageShadow->setChecked(prefsData->showPageShadow);
- checkUnprintable->setChecked( prefsData->marginColored );
+ checkShowPageShadow->setChecked(prefsData->displayPrefs.showPageShadow);
+ checkUnprintable->setChecked( prefsData->displayPrefs.marginColored );
checkPictures->setChecked(guidesSettings.showPic);
checkLink->setChecked(guidesSettings.linkShown);
checkControl->setChecked(guidesSettings.showControls);
Index: scribus/ui/reformdoc.cpp
===================================================================
--- scribus/ui/reformdoc.cpp (revision 13954)
+++ scribus/ui/reformdoc.cpp (revision 13955)
@@ -84,13 +84,13 @@
tabHyphenator = new HySettings(prefsWidgets/*, &ScMW->LangTransl*/);
addItem( tr("Hyphenator"), loadIcon("hyphenate.png"), tabHyphenator);
- tabFonts = new FontPrefs(prefsWidgets, true, PrefsManager::instance()->preferencesLocation(), doc);
+ tabFonts = new FontPrefsTab(prefsWidgets, true, PrefsManager::instance()->preferencesLocation(), doc);
addItem( tr("Fonts"), loadIcon("font.png"), tabFonts);
tabDocChecker = new TabCheckDoc(prefsWidgets, doc->checkerProfiles, doc->curCheckProfile);
addItem( tr("Preflight Verifier"), loadIcon("checkdoc.png"), tabDocChecker);
- tabPDF = new TabPDFOptions( prefsWidgets, doc->PDF_Options, PrefsManager::instance()->appPrefs.AvailFonts,
+ tabPDF = new TabPDFOptions( prefsWidgets, doc->PDF_Options, PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts,
ScCore->PDFXProfiles, doc->UsedFonts, doc->PDF_Options.PresentVals,
docUnitIndex, doc->pageHeight, doc->pageWidth, doc );
addItem( tr("PDF Export"), loadIcon("acroread32.png"), tabPDF);
@@ -152,7 +152,7 @@
tabTools->restoreDefaults(&currDoc->itemToolPrefs, &currDoc->opToolPrefs, docUnitIndex);
tabFonts->restoreDefaults();
tabDocChecker->restoreDefaults(&currDoc->checkerProfiles, currDoc->curCheckProfile);
- tabPDF->restoreDefaults(currDoc->PDF_Options, PrefsManager::instance()->appPrefs.AvailFonts,
+ tabPDF->restoreDefaults(currDoc->PDF_Options, PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts,
ScCore->PDFXProfiles, currDoc->UsedFonts, currDoc->PDF_Options.PresentVals,
docUnitIndex, currDoc->pageHeight, currDoc->pageWidth, currDoc, false);
if (ScCore->haveCMS())
Index: scribus/ui/fontprefs.h
===================================================================
--- scribus/ui/fontprefs.h (revision 13954)
+++ scribus/ui/fontprefs.h (revision 13955)
@@ -4,8 +4,8 @@
a copyright and/or license notice that predates the release of Scribus 1.3.2
for which a new license (GPL+exception) is in place.
*/
-#ifndef FONTPREFS_H
-#define FONTPREFS_H
+#ifndef FONTPREFSTAB_H
+#define FONTPREFSTAB_H
#include <QTabWidget>
#include <QList>
@@ -27,13 +27,13 @@
class ScComboBox;
/*! \brief A configuration Widget for Font Preferences */
-class SCRIBUS_API FontPrefs : public QTabWidget
+class SCRIBUS_API FontPrefsTab : public QTabWidget
{
Q_OBJECT
public:
- FontPrefs( QWidget* parent, bool Hdoc, QString PPath, ScribusDoc* doc );
- ~FontPrefs() {};
+ FontPrefsTab( QWidget* parent, bool Hdoc, QString PPath, ScribusDoc* doc );
+ ~FontPrefsTab() {};
void restoreDefaults();
QMap<QString,QString> RList;
Index: scribus/ui/masterpagepalette.cpp
===================================================================
--- scribus/ui/masterpagepalette.cpp (revision 13954)
+++ scribus/ui/masterpagepalette.cpp (revision 13955)
@@ -271,7 +271,7 @@
{
ScriXmlDoc *ss = new ScriXmlDoc();
QString buffer = ss->WriteElem(currentDoc, currentView, currentDoc->m_Selection);
- ss->ReadElemToLayer(buffer, prefsManager->appPrefs.AvailFonts, currentDoc, destination->xOffset(), destination->yOffset(), false, true, prefsManager->appPrefs.GFontSub, currentView, it->ID);
+ ss->ReadElemToLayer(buffer, prefsManager->appPrefs.fontPrefs.AvailFonts, currentDoc, destination->xOffset(), destination->yOffset(), false, true, prefsManager->appPrefs.GFontSub, currentView, it->ID);
currentDoc->m_Selection->clear();
delete ss;
}
Index: scribus/ui/tabscrapbook.cpp
===================================================================
--- scribus/ui/tabscrapbook.cpp (revision 13954)
+++ scribus/ui/tabscrapbook.cpp (revision 13955)
@@ -18,7 +18,7 @@
void TabScrapbook::restoreDefaults(struct ApplicationPrefs *prefsData)
{
- useScrapBookasExtension->setChecked(prefsData->doCopyToScrapbook);
- persistentScrapbook->setChecked(prefsData->persistentScrapbook);
- numScrapCopies->setValue(prefsData->numScrapbookCopies);
+ useScrapBookasExtension->setChecked(prefsData->scrapbookPrefs.doCopyToScrapbook);
+ persistentScrapbook->setChecked(prefsData->scrapbookPrefs.persistentScrapbook);
+ numScrapCopies->setValue(prefsData->scrapbookPrefs.numScrapbookCopies);
}
Index: scribus/ui/prefs.h
===================================================================
--- scribus/ui/prefs.h (revision 13954)
+++ scribus/ui/prefs.h (revision 13955)
@@ -18,7 +18,7 @@
class TabTools;
class TabCheckDoc;
class TabPDFOptions;
-class FontPrefs;
+class FontPrefsTab;
class DocumentItemAttributes;
class TOCIndexPrefs;
class MarginWidget;
@@ -82,7 +82,7 @@
TabDisplay* tabView;
TabTools* tabTools;
HySettings* tabHyphenator;
- FontPrefs* tabFonts;
+ FontPrefsTab* tabFonts;
TabPrinter* tabPrinter;
TabCheckDoc* tabDocChecker;
CMSPrefs* tabColorManagement;
Index: scribus/ui/scrapbookpalette.cpp
===================================================================
--- scribus/ui/scrapbookpalette.cpp (revision 13954)
+++ scribus/ui/scrapbookpalette.cpp (revision 13955)
@@ -980,7 +980,7 @@
if (bv == tempBView)
{
tempCount++;
- if (tempBView->objectMap.count() > PrefsManager::instance()->appPrefs.numScrapbookCopies)
+ if (tempBView->objectMap.count() > PrefsManager::instance()->appPrefs.scrapbookPrefs.numScrapbookCopies)
{
QMap<QString,BibView::Elem>::Iterator it;
it = tempBView->objectMap.begin();
@@ -1295,7 +1295,7 @@
delete pre;
if (Frame3->currentIndex() == 1)
{
- if (tempBView->objectMap.count() > PrefsManager::instance()->appPrefs.numScrapbookCopies)
+ if (tempBView->objectMap.count() > PrefsManager::instance()->appPrefs.scrapbookPrefs.numScrapbookCopies)
{
QMap<QString,BibView::Elem>::Iterator it;
it = tempBView->objectMap.begin();
@@ -1363,7 +1363,7 @@
p.end();
new QListWidgetItem(QIcon(pm2), nam, tempBView);
delete pre;
- if (tempBView->objectMap.count() > PrefsManager::instance()->appPrefs.numScrapbookCopies)
+ if (tempBView->objectMap.count() > PrefsManager::instance()->appPrefs.scrapbookPrefs.numScrapbookCopies)
{
QMap<QString,BibView::Elem>::Iterator it;
it = tempBView->objectMap.begin();
Index: scribus/ui/reformdoc.h
===================================================================
--- scribus/ui/reformdoc.h (revision 13954)
+++ scribus/ui/reformdoc.h (revision 13955)
@@ -34,7 +34,7 @@
class TabTools;
class TabCheckDoc;
class TabPDFOptions;
-class FontPrefs;
+class FontPrefsTab;
class DocumentItemAttributes;
class TOCIndexPrefs;
class MarginWidget;
@@ -73,7 +73,7 @@
TabTypograpy* tabTypo;
TabTools* tabTools;
HySettings* tabHyphenator;
- FontPrefs* tabFonts;
+ FontPrefsTab* tabFonts;
TabCheckDoc* tabDocChecker;
CMSPrefs* tabColorManagement;
TabPDFOptions* tabPDF;
Index: scribus/ui/hysettings.cpp
===================================================================
--- scribus/ui/hysettings.cpp (revision 13954)
+++ scribus/ui/hysettings.cpp (revision 13955)
@@ -50,27 +50,27 @@
void HySettings::restoreDefaults(struct ApplicationPrefs *prefsData)
{
- verbose->setChecked(!prefsData->Automatic);
- input->setChecked(prefsData->AutoCheck);
- setCurrentComboItem(language, LanguageManager::instance()->getTransLangFromLang(prefsData->Language));
- wordLen->setValue(prefsData->MinWordLen);
- maxCount->setValue(prefsData->HyCount);
- ignoreList->addItems(prefsData->ignoredWords.toList());
+ verbose->setChecked(!prefsData->hyphPrefs.Automatic);
+ input->setChecked(prefsData->hyphPrefs.AutoCheck);
+ setCurrentComboItem(language, LanguageManager::instance()->getTransLangFromLang(prefsData->hyphPrefs.Language));
+ wordLen->setValue(prefsData->hyphPrefs.MinWordLen);
+ maxCount->setValue(prefsData->hyphPrefs.HyCount);
+ ignoreList->addItems(prefsData->hyphPrefs.ignoredWords.toList());
ignoreList->sortItems();
- exceptList->addItems(prefsData->specialWords.values());
+ exceptList->addItems(prefsData->hyphPrefs.specialWords.values());
exceptList->sortItems();
}
-void HySettings::restoreDefaults(ScribusDoc *prefsData)
+void HySettings::restoreDefaults(ScribusDoc *doc)
{
- verbose->setChecked(!prefsData->Automatic);
- input->setChecked(prefsData->AutoCheck);
- setCurrentComboItem(language, LanguageManager::instance()->getTransLangFromLang(prefsData->Language));
- wordLen->setValue(prefsData->MinWordLen);
- maxCount->setValue(prefsData->HyCount);
- ignoreList->addItems(prefsData->docHyphenator->ignoredWords.toList());
+ verbose->setChecked(!doc->Automatic);
+ input->setChecked(doc->AutoCheck);
+ setCurrentComboItem(language, LanguageManager::instance()->getTransLangFromLang(doc->Language));
+ wordLen->setValue(doc->MinWordLen);
+ maxCount->setValue(doc->HyCount);
+ ignoreList->addItems(doc->docHyphenator->ignoredWords.toList());
ignoreList->sortItems();
- exceptList->addItems(prefsData->docHyphenator->specialWords.values());
+ exceptList->addItems(doc->docHyphenator->specialWords.values());
exceptList->sortItems();
}
Index: scribus/ui/fontcombo.cpp
===================================================================
--- scribus/ui/fontcombo.cpp (revision 13954)
+++ scribus/ui/fontcombo.cpp (revision 13955)
@@ -57,7 +57,7 @@
clear();
QMap<QString, QString> rlist;
rlist.clear();
- SCFontsIterator it(prefsManager->appPrefs.AvailFonts);
+ SCFontsIterator it(prefsManager->appPrefs.fontPrefs.AvailFonts);
for ( ; it.hasNext(); it.next())
{
if (it.current().usable())
@@ -73,7 +73,7 @@
}
for (QMap<QString,QString>::Iterator it2 = rlist.begin(); it2 != rlist.end(); ++it2)
{
- ScFace fon = prefsManager->appPrefs.AvailFonts[it2.value()];
+ ScFace fon = prefsManager->appPrefs.fontPrefs.AvailFonts[it2.value()];
if (! fon.usable() )
continue;
ScFace::FontType type = fon.type();
@@ -155,7 +155,7 @@
disconnect(fontStyle, SIGNAL(activated(int)), this, SLOT(styleSelected(int)));
QString curr = fontStyle->currentText();
fontStyle->clear();
- QStringList slist = prefsManager->appPrefs.AvailFonts.fontMap[fontFamily->itemText(id)];
+ QStringList slist = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap[fontFamily->itemText(id)];
slist.sort();
fontStyle->addItems(slist);
if (slist.contains(curr))
@@ -182,11 +182,11 @@
{
disconnect(fontFamily, SIGNAL(activated(int)), this, SLOT(familySelected(int)));
disconnect(fontStyle, SIGNAL(activated(int)), this, SLOT(styleSelected(int)));
- QString family = prefsManager->appPrefs.AvailFonts[f].family();
- QString style = prefsManager->appPrefs.AvailFonts[f].style();
+ QString family = prefsManager->appPrefs.fontPrefs.AvailFonts[f].family();
+ QString style = prefsManager->appPrefs.fontPrefs.AvailFonts[f].style();
setCurrentComboItem(fontFamily, family);
fontStyle->clear();
- QStringList slist = prefsManager->appPrefs.AvailFonts.fontMap[family];
+ QStringList slist = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap[family];
slist.sort();
QStringList ilist;
ilist.clear();
@@ -194,7 +194,7 @@
{
for (QStringList::ConstIterator it3 = slist.begin(); it3 != slist.end(); ++it3)
{
- if ((currDoc->DocName == prefsManager->appPrefs.AvailFonts[family + " " + *it3].localForDocument()) || (prefsManager->appPrefs.AvailFonts[family + " " + *it3].localForDocument().isEmpty()))
+ if ((currDoc->DocName == prefsManager->appPrefs.fontPrefs.AvailFonts[family + " " + *it3].localForDocument()) || (prefsManager->appPrefs.fontPrefs.AvailFonts[family + " " + *it3].localForDocument().isEmpty()))
ilist.append(*it3);
}
fontStyle->addItems(ilist);
@@ -213,22 +213,22 @@
disconnect(fontStyle, SIGNAL(activated(int)), this, SLOT(styleSelected(int)));
fontFamily->clear();
fontStyle->clear();
- QStringList rlist = prefsManager->appPrefs.AvailFonts.fontMap.keys();
+ QStringList rlist = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap.keys();
QMap<QString, QString> flist;
flist.clear();
for (QStringList::ConstIterator it2 = rlist.begin(); it2 != rlist.end(); ++it2)
{
if (currentDoc != NULL)
{
- QStringList slist = prefsManager->appPrefs.AvailFonts.fontMap[*it2];
+ QStringList slist = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap[*it2];
slist.sort();
QStringList ilist;
ilist.clear();
for (QStringList::ConstIterator it3 = slist.begin(); it3 != slist.end(); ++it3)
{
- if ( prefsManager->appPrefs.AvailFonts.contains(*it2 + " " + *it3))
+ if ( prefsManager->appPrefs.fontPrefs.AvailFonts.contains(*it2 + " " + *it3))
{
- const ScFace& fon(prefsManager->appPrefs.AvailFonts[*it2 + " " + *it3]);
+ const ScFace& fon(prefsManager->appPrefs.fontPrefs.AvailFonts[*it2 + " " + *it3]);
if (fon.usable() && !fon.isReplacement() && (currentDoc->DocName == fon.localForDocument() || fon.localForDocument().isEmpty()))
ilist.append(*it3);
}
@@ -241,7 +241,7 @@
}
for (QMap<QString,QString>::Iterator it2a = flist.begin(); it2a != flist.end(); ++it2a)
{
- ScFace fon = prefsManager->appPrefs.AvailFonts[it2a.value()+" "+prefsManager->appPrefs.AvailFonts.fontMap[it2a.value()][0]];
+ ScFace fon = prefsManager->appPrefs.fontPrefs.AvailFonts[it2a.value()+" "+prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap[it2a.value()][0]];
if ( !fon.usable() || fon.isReplacement() )
continue;
ScFace::FontType type = fon.type();
@@ -259,7 +259,7 @@
fontFamily->addItem(ttfFont, it2a.value());
}
QString family = fontFamily->currentText();
- QStringList slist = prefsManager->appPrefs.AvailFonts.fontMap[family];
+ QStringList slist = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap[family];
slist.sort();
QStringList ilist;
ilist.clear();
@@ -267,7 +267,7 @@
{
for (QStringList::ConstIterator it3 = slist.begin(); it3 != slist.end(); ++it3)
{
- if (prefsManager->appPrefs.AvailFonts.contains(family + " " + *it3) && (currentDoc->DocName == prefsManager->appPrefs.AvailFonts[family + " " + *it3].localForDocument() || prefsManager->appPrefs.AvailFonts[family + " " + *it3].localForDocument().isEmpty()))
+ if (prefsManager->appPrefs.fontPrefs.AvailFonts.contains(family + " " + *it3) && (currentDoc->DocName == prefsManager->appPrefs.fontPrefs.AvailFonts[family + " " + *it3].localForDocument() || prefsManager->appPrefs.fontPrefs.AvailFonts[family + " " + *it3].localForDocument().isEmpty()))
ilist.append(*it3);
}
fontStyle->addItems(ilist);
Index: scribus/ui/tabmiscellaneous.cpp
===================================================================
--- scribus/ui/tabmiscellaneous.cpp (revision 13954)
+++ scribus/ui/tabmiscellaneous.cpp (revision 13955)
@@ -26,8 +26,8 @@
void TabMiscellaneous::restoreDefaults(struct ApplicationPrefs *prefsData)
{
- AskForSubs->setChecked(prefsData->askBeforeSubstituite);
- stylePreview->setChecked(prefsData->haveStylePreview);
- useStandardLI->setChecked(prefsData->useStandardLI);
- paragraphsLI->setValue(prefsData->paragraphsLI);
+ AskForSubs->setChecked(prefsData->fontPrefs.askBeforeSubstitute);
+ stylePreview->setChecked(prefsData->miscPrefs.haveStylePreview);
+ useStandardLI->setChecked(prefsData->miscPrefs.useStandardLI);
+ paragraphsLI->setValue(prefsData->miscPrefs.paragraphsLI);
}
Index: scribus/ui/fontprefs.cpp
===================================================================
--- scribus/ui/fontprefs.cpp (revision 13954)
+++ scribus/ui/fontprefs.cpp (revision 13955)
@@ -37,7 +37,7 @@
#include "fontlistview.h"
-FontPrefs::FontPrefs( QWidget* parent, bool Hdoc, QString PPath, ScribusDoc* doc ) : QTabWidget( parent )
+FontPrefsTab::FontPrefsTab( QWidget* parent, bool Hdoc, QString PPath, ScribusDoc* doc ) : QTabWidget( parent )
{
RList = PrefsManager::instance()->appPrefs.GFontSub;
HomeP = PPath;
@@ -139,21 +139,21 @@
connect(DelB, SIGNAL(clicked()), this, SLOT(DelEntry()));
}
-void FontPrefs::restoreDefaults()
+void FontPrefsTab::restoreDefaults()
{
rebuildDialog();
}
-void FontPrefs::ReplaceSel(int, int)
+void FontPrefsTab::ReplaceSel(int, int)
{
DelB->setEnabled(true);
}
-void FontPrefs::UpdateFliste()
+void FontPrefsTab::UpdateFliste()
{
QString tmp;
UsedFonts.clear();
- SCFonts fonts = PrefsManager::instance()->appPrefs.AvailFonts;
+ SCFonts fonts = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts;
SCFontsIterator it(fonts);
for ( ; it.hasNext() ; it.next())
{
@@ -174,7 +174,7 @@
}
}
-void FontPrefs::DelEntry()
+void FontPrefsTab::DelEntry()
{
int r = Table3->currentRow();
QString tmp = Table3->item(r, 0)->text();
@@ -184,7 +184,7 @@
DelB->setEnabled(false);
}
-void FontPrefs::readPaths()
+void FontPrefsTab::readPaths()
{
Q_ASSERT(!DocAvail); // should never be called in doc-specific prefs
PrefsContext *fontPrefsContext = PrefsManager::instance()->prefsFile->getContext("Fonts");
@@ -194,7 +194,7 @@
PathList->addItem( QDir::convertSeparators(fontPathTable->get(i,0)) );
}
-void FontPrefs::writePaths()
+void FontPrefsTab::writePaths()
{
Q_ASSERT(!DocAvail); // should never be called in doc-specific prefs
PrefsContext *fontPrefsContext = PrefsManager::instance()->prefsFile->getContext("Fonts");
@@ -204,7 +204,7 @@
fontPathTable->set(i, 0, QDir::fromNativeSeparators(PathList->item(i)->text()));
}
-void FontPrefs::SelectPath(QListWidgetItem *c)
+void FontPrefsTab::SelectPath(QListWidgetItem *c)
{
if (!DocAvail)
{
@@ -214,7 +214,7 @@
CurrentPath = c->text();
}
-void FontPrefs::AddPath()
+void FontPrefsTab::AddPath()
{
Q_ASSERT(!DocAvail); // should never be called in doc-specific prefs
PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
@@ -233,7 +233,7 @@
ChangeB->setEnabled(false);
RemoveB->setEnabled(false);
CurrentPath = s;
- SCFonts* availFonts=&(PrefsManager::instance()->appPrefs.AvailFonts);
+ SCFonts* availFonts=&(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
QString dir = QDir::fromNativeSeparators(s2);
availFonts->AddScalableFonts(dir +"/");
availFonts->updateFontMap();
@@ -241,7 +241,7 @@
}
}
-void FontPrefs::ChangePath()
+void FontPrefsTab::ChangePath()
{
Q_ASSERT(!DocAvail); // should never be called in doc-specific prefs
QString s = QFileDialog::getExistingDirectory(this, tr("Choose a Directory"), CurrentPath);
@@ -253,7 +253,7 @@
if (PathList->findItems(s2, Qt::MatchExactly).count() != 0)
return;
QString path = PathList->currentItem()->text();
- SCFonts* availFonts=&(PrefsManager::instance()->appPrefs.AvailFonts);
+ SCFonts* availFonts=&(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
SCFontsIterator it(*availFonts);
for ( ; it.hasNext(); it.next())
{
@@ -275,7 +275,7 @@
}
}
-void FontPrefs::DelPath()
+void FontPrefsTab::DelPath()
{
Q_ASSERT(!DocAvail); // should never be called in doc-specific prefs
QFile fx(HomeP+"/scribusfont13.rc");
@@ -290,7 +290,7 @@
}
else
return;
- SCFonts* availFonts=&(PrefsManager::instance()->appPrefs.AvailFonts);
+ SCFonts* availFonts=&(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
SCFontsIterator it(*availFonts);
for ( ; it.hasNext(); it.next())
{
@@ -307,10 +307,10 @@
RemoveB->setEnabled(false);
}
-void FontPrefs::rebuildDialog()
+void FontPrefsTab::rebuildDialog()
{
// SCFonts* availFonts=&(PrefsManager::instance()->appPrefs.AvailFonts);
- fontList->setFonts(PrefsManager::instance()->appPrefs.AvailFonts);
+ fontList->setFonts(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
/*
DON'T REMOVE THIS COMMENTS, PLEASE! (Petr)
It's just a performance vs. functionality test.
Index: scribus/ui/smtextstyles.cpp
===================================================================
--- scribus/ui/smtextstyles.cpp (revision 13954)
+++ scribus/ui/smtextstyles.cpp (revision 13955)
@@ -157,7 +157,7 @@
selection_.append(&tmpStyles_[index]);
}
- pwidget_->show(selection_, pstyles, cstyles, doc_->unitIndex(), PrefsManager::instance()->appPrefs.Language);
+ pwidget_->show(selection_, pstyles, cstyles, doc_->unitIndex(), PrefsManager::instance()->appPrefs.hyphPrefs.Language);
setupConnections();
}
@@ -1335,7 +1335,7 @@
for (int i = 0; i < selection_.count(); ++i)
selection_[i]->charStyle().resetFont();
else {
- ScFace sf = PrefsManager::instance()->appPrefs.AvailFonts[s];
+ ScFace sf = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[s];
for (int i = 0; i < selection_.count(); ++i)
selection_[i]->charStyle().setFont(sf);
@@ -1532,7 +1532,7 @@
selection_.append(&tmpStyles_[index]);
}
- page_->show(selection_, cstyles, PrefsManager::instance()->appPrefs.Language, doc_->unitIndex());
+ page_->show(selection_, cstyles, PrefsManager::instance()->appPrefs.hyphPrefs.Language, doc_->unitIndex());
setupConnections();
}
@@ -2262,7 +2262,7 @@
for (int i = 0; i < selection_.count(); ++i)
selection_[i]->resetFont();
else {
- sf = PrefsManager::instance()->appPrefs.AvailFonts[s];
+ sf = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[s];
for (int i = 0; i < selection_.count(); ++i)
selection_[i]->setFont(sf);
Index: scribus/canvasmode_rotate.cpp
===================================================================
--- scribus/canvasmode_rotate.cpp (revision 13954)
+++ scribus/canvasmode_rotate.cpp (revision 13955)
@@ -347,7 +347,7 @@
}
m_doc->RotMode( m_oldRotMode );
m_view->RCenter = m_oldRotCenter;
- if (!PrefsManager::instance()->appPrefs.stickyTools)
+ if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
m_view->requestMode(modeNormal);
else
{
Index: scribus/styles/charstyle.cpp
===================================================================
--- scribus/styles/charstyle.cpp (revision 13954)
+++ scribus/styles/charstyle.cpp (revision 13955)
@@ -476,7 +476,7 @@
ScFace parse<ScFace>(const Xml_string& str)
{
// FIXME: enable font substitution here
- return PrefsManager::instance()->appPrefs.AvailFonts[str];
+ return PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[str];
}
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp (revision 13954)
+++ scribus/scribus.cpp (revision 13955)
@@ -353,17 +353,17 @@
if (primaryMainWindow)
ScCore->setSplashStatus( tr("Initializing Hyphenator") );
- QString preLang = prefsManager->appPrefs.Language;
+ QString preLang(prefsManager->appPrefs.hyphPrefs.Language);
initHyphenator();
if (!LanguageManager::instance()->getHyphFilename( preLang, false ).isEmpty() )
- prefsManager->appPrefs.Language = preLang;
+ prefsManager->appPrefs.hyphPrefs.Language = preLang;
if (primaryMainWindow)
ScCore->setSplashStatus( tr("Reading Scrapbook") );
initScrapbook();
- scrActions["helpTooltips"]->setChecked(prefsManager->appPrefs.showToolTips);
- scrActions["showMouseCoordinates"]->setChecked(prefsManager->appPrefs.showMouseCoordinates);
- scrActions["stickyTools"]->setChecked(prefsManager->appPrefs.stickyTools);
+ scrActions["helpTooltips"]->setChecked(prefsManager->appPrefs.displayPrefs.showToolTips);
+ scrActions["showMouseCoordinates"]->setChecked(prefsManager->appPrefs.displayPrefs.showMouseCoordinates);
+ scrActions["stickyTools"]->setChecked(prefsManager->appPrefs.uiPrefs.stickyTools);
ToggleTips();
ToggleMouseTips();
propertiesPalette->setFontSize();
@@ -582,7 +582,7 @@
if (scrapbookFileInfo.exists())
scrapbookPalette->readContents(scrapbookFile);
scrapbookPalette->setScrapbookFileName(scrapbookFile);
- scrapbookPalette->setOpenScrapbooks(prefsManager->appPrefs.RecentScrapbooks);
+ scrapbookPalette->setOpenScrapbooks(prefsManager->appPrefs.scrapbookPrefs.RecentScrapbooks);
rebuildRecentPasteMenu();
connect(scrapbookPalette, SIGNAL(updateRecentMenue()), this, SLOT(rebuildRecentPasteMenu()));
}
@@ -1147,7 +1147,7 @@
bool retVal;
if (e->type() == QEvent::ToolTip)
{
- return (!prefsManager->appPrefs.showToolTips);
+ return (!prefsManager->appPrefs.displayPrefs.showToolTips);
}
if ( e->type() == QEvent::KeyPress )
{
@@ -1324,8 +1324,8 @@
slotSelect();
if (doc->m_Selection->count() == 0)
HaveNewSel(-1);
- prefsManager->appPrefs.stickyTools = false;
- scrActions["stickyTools"]->setChecked(prefsManager->appPrefs.stickyTools);
+ prefsManager->appPrefs.uiPrefs.stickyTools = false;
+ scrActions["stickyTools"]->setChecked(false);
return;
}
Qt::KeyboardModifiers buttonModifiers = k->modifiers();
@@ -1969,10 +1969,10 @@
// Clean up plugins, THEN save prefs to disk
ScCore->pluginManager->cleanupPlugins();
- if (!prefsManager->appPrefs.persistentScrapbook)
+ if (!prefsManager->appPrefs.scrapbookPrefs.persistentScrapbook)
scrapbookPalette->CleanUpTemp();
- prefsManager->appPrefs.RecentScrapbooks.clear();
- prefsManager->appPrefs.RecentScrapbooks = scrapbookPalette->getOpenScrapbooks();
+ prefsManager->appPrefs.scrapbookPrefs.RecentScrapbooks.clear();
+ prefsManager->appPrefs.scrapbookPrefs.RecentScrapbooks = scrapbookPalette->getOpenScrapbooks();
if (!emergencyActivated)
prefsManager->SavePrefs();
UndoManager::deleteInstance();
@@ -2263,8 +2263,8 @@
view = tempView;
tempDoc->setCurrentPage(tempDoc->Pages->at(0));
tempDoc->setGUI(requiresGUI, this, tempView);
- tempDoc->docHyphenator->ignoredWords = prefsManager->appPrefs.ignoredWords;
- tempDoc->docHyphenator->specialWords = prefsManager->appPrefs.specialWords;
+ tempDoc->docHyphenator->ignoredWords = prefsManager->appPrefs.hyphPrefs.ignoredWords;
+ tempDoc->docHyphenator->specialWords = prefsManager->appPrefs.hyphPrefs.specialWords;
tempDoc->setLoading(false);
//run after setGUI to set up guidepalette ok
@@ -3448,7 +3448,7 @@
scrMenuMgr->removeMenuItem((*it), recentPasteMenuName);
scrRecentPasteActions.clear();
- int max = qMin(prefsManager->appPrefs.numScrapbookCopies, scrapbookPalette->tempBView->objectMap.count());
+ int max = qMin(prefsManager->appPrefs.scrapbookPrefs.numScrapbookCopies, scrapbookPalette->tempBView->objectMap.count());
if (max > 0)
{
QMap<QString,BibView::Elem>::Iterator it;
@@ -3893,8 +3893,8 @@
}
ScCore->getCMSProfilesDir(fi.absolutePath()+"/", false, false);
- prefsManager->appPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/", FName);
- prefsManager->appPrefs.AvailFonts.updateFontMap();
+ prefsManager->appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/", FName);
+ prefsManager->appPrefs.fontPrefs.AvailFonts.updateFontMap();
doc=new ScribusDoc();
doc->is12doc=is12doc;
doc->appMode = modeNormal;
@@ -4970,7 +4970,7 @@
std::string xml(xmlString.str());
BufferI = QString::fromUtf8(xml.c_str(), xml.length());
- if (prefsManager->appPrefs.doCopyToScrapbook)
+ if (prefsManager->appPrefs.scrapbookPrefs.doCopyToScrapbook)
{
ScriXmlDoc ss;
QString buffer = ss.WriteElem(doc, view, doc->m_Selection);
@@ -5055,7 +5055,7 @@
doc->itemSelection_DeleteItem(&objects);
#endif
- if ((prefsManager->appPrefs.doCopyToScrapbook) && (!internalCopy))
+ if ((prefsManager->appPrefs.scrapbookPrefs.doCopyToScrapbook) && (!internalCopy))
{
ScriXmlDoc ss;
QString buffer = ss.WriteElem(doc, view, doc->m_Selection);
@@ -5491,12 +5491,12 @@
void ScribusMainWindow::ToggleTips()
{
- prefsManager->appPrefs.showToolTips = scrActions["helpTooltips"]->isChecked();
+ prefsManager->appPrefs.displayPrefs.showToolTips = scrActions["helpTooltips"]->isChecked();
}
void ScribusMainWindow::ToggleMouseTips()
{
- prefsManager->appPrefs.showMouseCoordinates = scrActions["showMouseCoordinates"]->isChecked();
+ prefsManager->appPrefs.displayPrefs.showMouseCoordinates = scrActions["showMouseCoordinates"]->isChecked();
}
void ScribusMainWindow::SaveText()
@@ -5776,9 +5776,9 @@
void ScribusMainWindow::ToggleStickyTools()
{
- prefsManager->appPrefs.stickyTools = !prefsManager->appPrefs.stickyTools;
- scrActions["stickyTools"]->setChecked(prefsManager->appPrefs.stickyTools);
- if (HaveDoc && doc->appMode!=modeNormal && !prefsManager->appPrefs.stickyTools)
+ prefsManager->appPrefs.uiPrefs.stickyTools = !prefsManager->appPrefs.uiPrefs.stickyTools;
+ scrActions["stickyTools"]->setChecked(prefsManager->appPrefs.uiPrefs.stickyTools);
+ if (HaveDoc && doc->appMode!=modeNormal && !prefsManager->appPrefs.uiPrefs.stickyTools)
view->requestMode(modeNormal);
}
@@ -6458,7 +6458,7 @@
int docSelectionCount=doc->m_Selection->count();
if (mode == modeDrawBezierLine)
{
- if ((docSelectionCount != 0) && (!prefsManager->appPrefs.stickyTools))
+ if ((docSelectionCount != 0) && (!prefsManager->appPrefs.uiPrefs.stickyTools))
view->Deselect(true);
view->FirstPoly = true;
}
@@ -6890,7 +6890,7 @@
QString nf2(nf);
if (!doc->UsedFonts.contains(nf))
{
- if (doc->AddFont(nf)) //, prefsManager->appPrefs.AvailFonts[nf]->Font))
+ if (doc->AddFont(nf)) //, prefsManager->appPrefs.fontPrefs.AvailFonts[nf]->Font))
{
}
else
@@ -7283,11 +7283,11 @@
QString nf = doc->paragraphStyles()[a].charStyle().font().scName();
if (!doc->UsedFonts.contains(nf))
{
- if (doc->AddFont(nf)) //, prefsManager->appPrefs.AvailFonts[nf]->Font))
+ if (doc->AddFont(nf)) //, prefsManager->appPrefs.fontPrefs.AvailFonts[nf]->Font))
{
}
// else
-//FIXME doc->paragraphStyles()[a].charStyle().setFont((prefsManager->appPrefs.AvailFonts[doc->toolSettings.defFont]));
+//FIXME doc->paragraphStyles()[a].charStyle().setFont((prefsManager->appPrefs.fontPrefs.AvailFonts[doc->toolSettings.defFont]));
}
}
}
@@ -7842,7 +7842,7 @@
options.bleeds.Left = 0.0;
options.bleeds.Right = 0.0;
options.bleeds.Bottom = 0.0;
- PSLib *dd = new PSLib(options, false, prefsManager->appPrefs.AvailFonts, ReallyUsed, usedColors, false, true);
+ PSLib *dd = new PSLib(options, false, prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, usedColors, false, true);
if (dd != NULL)
{
if (dd->PS_set_file(fn))
@@ -8027,7 +8027,7 @@
doc->PDF_Options.SubsetList = tmpEm;
}
MarginStruct optBleeds = doc->PDF_Options.bleeds;
- PDFExportDialog dia(this, doc->DocName, ReallyUsed, view, doc->PDF_Options, doc->PDF_Options.PresentVals, ScCore->PDFXProfiles, prefsManager->appPrefs.AvailFonts, doc->unitRatio(), ScCore->PrinterProfiles);
+ PDFExportDialog dia(this, doc->DocName, ReallyUsed, view, doc->PDF_Options, doc->PDF_Options.PresentVals, ScCore->PDFXProfiles, prefsManager->appPrefs.fontPrefs.AvailFonts, doc->unitRatio(), ScCore->PrinterProfiles);
if (dia.exec())
{
qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
@@ -8220,7 +8220,7 @@
view->requestMode(submodeEndNodeEdit);
ScriXmlDoc ss;
- if(ss.ReadElem(xml, prefsManager->appPrefs.AvailFonts, docc, x, y, art, loca, prefsManager->appPrefs.GFontSub, vie))
+ if(ss.ReadElem(xml, prefsManager->appPrefs.fontPrefs.AvailFonts, docc, x, y, art, loca, prefsManager->appPrefs.GFontSub, vie))
{
vie->DrawNew();
if (doc == docc)
@@ -8792,7 +8792,7 @@
void ScribusMainWindow::SetShortCut()
{
- for (QMap<QString,Keys>::Iterator it = prefsManager->appPrefs.KeyActions.begin(); it != prefsManager->appPrefs.KeyActions.end(); ++it )
+ for (QMap<QString,Keys>::Iterator it = prefsManager->appPrefs.keyShortcutPrefs.KeyActions.begin(); it != prefsManager->appPrefs.keyShortcutPrefs.KeyActions.end(); ++it )
{
if (!it.value().actionName.isEmpty())
if (scrActions[it.value().actionName])
@@ -8948,7 +8948,7 @@
//For each hyphenation file, grab the strings and the hyphenation data.
QString lang = QString(QLocale::system().name()).left(2);
LangTransl.clear();
- prefsManager->appPrefs.Language = "English";
+ prefsManager->appPrefs.hyphPrefs.Language = "English";
if ((hyphDir.exists()) && (hyphDir.count() != 0))
{
LanguageManager *langmgr(LanguageManager::instance());
@@ -8965,10 +8965,10 @@
langmgr->addHyphLang(fileLangAbbrev, hyphDir[dc]);
// Sprachen.insert(datein, hyphDir[dc]);
if (fileLangAbbrev == lang)
- prefsManager->appPrefs.Language = datein;
+ prefsManager->appPrefs.hyphPrefs.Language = datein;
}
if (datein.isEmpty())
- prefsManager->appPrefs.Language = "English";
+ prefsManager->appPrefs.hyphPrefs.Language = "English";
}
// propertiesPalette->fillLangCombo(LangTransl);
}
@@ -9292,9 +9292,9 @@
void ScribusMainWindow::insertSampleText()
{
LoremManager m(doc, this);
- if (prefsManager->appPrefs.useStandardLI)
+ if (prefsManager->appPrefs.miscPrefs.useStandardLI)
{
- m.insertLoremIpsum("la.xml", prefsManager->appPrefs.paragraphsLI);
+ m.insertLoremIpsum("la.xml", prefsManager->appPrefs.miscPrefs.paragraphsLI);
return;
}
Index: scribus/plugins/scriptplugin/cmdtext.cpp
===================================================================
--- scribus/plugins/scriptplugin/cmdtext.cpp (revision 13954)
+++ scribus/plugins/scriptplugin/cmdtext.cpp (revision 13955)
@@ -403,7 +403,7 @@
PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set font on a non-text frame.","python error").toLocal8Bit().constData());
return NULL;
}
- if (PrefsManager::instance()->appPrefs.AvailFonts.contains(QString::fromUtf8(Font)))
+ if (PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.contains(QString::fromUtf8(Font)))
{
int Apm = ScCore->primaryMainWindow()->doc->appMode;
ScCore->primaryMainWindow()->doc->m_Selection->clear();
Index: scribus/plugins/scriptplugin/objprinter.cpp
===================================================================
--- scribus/plugins/scriptplugin/objprinter.cpp (revision 13954)
+++ scribus/plugins/scriptplugin/objprinter.cpp (revision 13955)
@@ -459,7 +459,7 @@
}
#endif
- PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.AvailFonts, ReallyUsed, ScCore->primaryMainWindow()->doc->PageColors, false, true);
+ PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, ScCore->primaryMainWindow()->doc->PageColors, false, true);
if (dd != NULL)
{
if (!fil)
Index: scribus/plugins/scriptplugin/cmdmisc.cpp
===================================================================
--- scribus/plugins/scriptplugin/cmdmisc.cpp (revision 13954)
+++ scribus/plugins/scriptplugin/cmdmisc.cpp (revision 13955)
@@ -33,14 +33,14 @@
PyObject *scribus_fontnames(PyObject* /* self */)
{
int cc2 = 0;
- SCFontsIterator it2(PrefsManager::instance()->appPrefs.AvailFonts);
+ SCFontsIterator it2(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
for ( ; it2.hasNext() ; it2.next())
{
if (it2.current().usable())
cc2++;
}
PyObject *l = PyList_New(cc2);
- SCFontsIterator it(PrefsManager::instance()->appPrefs.AvailFonts);
+ SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
int cc = 0;
for ( ; it.hasNext() ; it.next())
{
@@ -55,8 +55,8 @@
PyObject *scribus_xfontnames(PyObject* /* self */)
{
- PyObject *l = PyList_New(PrefsManager::instance()->appPrefs.AvailFonts.count());
- SCFontsIterator it(PrefsManager::instance()->appPrefs.AvailFonts);
+ PyObject *l = PyList_New(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.count());
+ SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
int cc = 0;
PyObject *row;
for ( ; it.hasNext() ; it.next())
@@ -94,7 +94,7 @@
if (!PyArg_ParseTupleAndKeywords(args, kw, "esesesi|es", kwargs,
"utf-8", &Name, "utf-8", &FileName, "utf-8", &Sample, &Size, "ascii", &format))
return NULL;
- if (!PrefsManager::instance()->appPrefs.AvailFonts.contains(QString::fromUtf8(Name)))
+ if (!PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.contains(QString::fromUtf8(Name)))
{
PyErr_SetString(NotFoundError, QObject::tr("Font not found.","python error").toLocal8Bit().constData());
return NULL;
@@ -108,7 +108,7 @@
if (!format)
// User specified no format, so use the historical default of PPM format.
format = const_cast<char*>("PPM");
- QPixmap pm = FontSample(PrefsManager::instance()->appPrefs.AvailFonts[QString::fromUtf8(Name)], Size, ts, Qt::white);
+ QPixmap pm = FontSample(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[QString::fromUtf8(Name)], Size, ts, Qt::white);
// If the user specified an empty filename, return the image data as
// a string. Otherwise, save it to disk.
if (QString::fromUtf8(FileName).isEmpty())
Index: scribus/plugins/aiimplugin/importai.cpp
===================================================================
--- scribus/plugins/aiimplugin/importai.cpp (revision 13954)
+++ scribus/plugins/aiimplugin/importai.cpp (revision 13955)
@@ -1821,7 +1821,7 @@
family.replace( QRegExp( "'" ) , QChar( ' ' ) );
textFont = m_Doc->itemToolPrefs.defFont;
bool found = false;
- SCFontsIterator it(PrefsManager::instance()->appPrefs.AvailFonts);
+ SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
for ( ; it.hasNext(); it.next())
{
QString fam;
Index: scribus/plugins/fileloader/scribus12format/scribus12format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus12format/scribus12format.cpp (revision 13954)
+++ scribus/plugins/fileloader/scribus12format/scribus12format.cpp (revision 13955)
@@ -1522,8 +1522,8 @@
if (tmpf.isEmpty())
tmpf = doc->itemToolPrefs.defFont;
PrefsManager *prefsManager=PrefsManager::instance();
- prefsManager->appPrefs.AvailFonts.findFont(tmpf, doc);
- vg->charStyle().setFont(prefsManager->appPrefs.AvailFonts[tmpf]);
+ prefsManager->appPrefs.fontPrefs.AvailFonts.findFont(tmpf, doc);
+ vg->charStyle().setFont(prefsManager->appPrefs.fontPrefs.AvailFonts[tmpf]);
vg->charStyle().setFontSize(qRound(ScCLocale::toDoubleC(pg->attribute("FONTSIZE"), 12.0) * 10.0));
vg->setHasDropCap(static_cast<bool>(pg->attribute("DROP", "0").toInt()));
vg->setDropCapLines(pg->attribute("DROPLIN", "2").toInt());
Index: scribus/plugins/fileloader/scribus150format/scribus150format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format.cpp (revision 13954)
+++ scribus/plugins/fileloader/scribus150format/scribus150format.cpp (revision 13955)
@@ -1744,7 +1744,7 @@
newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::PARSEP);
ParagraphStyle newStyle;
PrefsManager* prefsManager = PrefsManager::instance();
- readParagraphStyle(doc, reader, newStyle, prefsManager->appPrefs.AvailFonts);
+ readParagraphStyle(doc, reader, newStyle, prefsManager->appPrefs.fontPrefs.AvailFonts);
newItem->itemText.setStyle(newItem->itemText.length()-1, newStyle);
newItem->itemText.setCharStyle(newItem->itemText.length()-1, 1, lastStyle->Style);
}
@@ -1752,7 +1752,7 @@
{
ParagraphStyle newStyle;
PrefsManager* prefsManager = PrefsManager::instance();
- readParagraphStyle(doc, reader, newStyle, prefsManager->appPrefs.AvailFonts);
+ readParagraphStyle(doc, reader, newStyle, prefsManager->appPrefs.fontPrefs.AvailFonts);
newItem->itemText.setStyle(newItem->itemText.length(), newStyle);
}
else if (tName == "tab")
@@ -3146,7 +3146,7 @@
QString tmpf, tmV;
const StyleSet<ParagraphStyle> * docParagraphStyles = tempStyles? tempStyles : & doc->paragraphStyles();
PrefsManager* prefsManager = PrefsManager::instance();
- readParagraphStyle(doc, reader, style, prefsManager->appPrefs.AvailFonts);
+ readParagraphStyle(doc, reader, style, prefsManager->appPrefs.fontPrefs.AvailFonts);
for (int xx=0; xx<docParagraphStyles->count(); ++xx)
{
if (style.name() == (*docParagraphStyles)[xx].name())
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp (revision 13954)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp (revision 13955)
@@ -1772,7 +1772,7 @@
newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::PARSEP);
ParagraphStyle newStyle;
PrefsManager* prefsManager = PrefsManager::instance();
- readParagraphStyle(doc, reader, newStyle, prefsManager->appPrefs.AvailFonts);
+ readParagraphStyle(doc, reader, newStyle, prefsManager->appPrefs.fontPrefs.AvailFonts);
newItem->itemText.setStyle(newItem->itemText.length()-1, newStyle);
newItem->itemText.setCharStyle(newItem->itemText.length()-1, 1, lastStyle->Style);
}
@@ -3237,7 +3237,7 @@
QString tmpf, tmV;
const StyleSet<ParagraphStyle> * docParagraphStyles = tempStyles? tempStyles : & doc->paragraphStyles();
PrefsManager* prefsManager = PrefsManager::instance();
- readParagraphStyle(doc, reader, style, prefsManager->appPrefs.AvailFonts);
+ readParagraphStyle(doc, reader, style, prefsManager->appPrefs.fontPrefs.AvailFonts);
for (int xx=0; xx<docParagraphStyles->count(); ++xx)
{
if (style.name() == (*docParagraphStyles)[xx].name())
Index: scribus/scpreview.cpp
===================================================================
--- scribus/scpreview.cpp (revision 13954)
+++ scribus/scpreview.cpp (revision 13955)
@@ -123,9 +123,9 @@
if(pg.tagName()=="FONT")
{
tmpf = GetAttr(&pg, "NAME");
- if ((!prefsManager->appPrefs.AvailFonts.contains(tmpf)) || (!prefsManager->appPrefs.AvailFonts[tmpf].usable()))
+ if ((!prefsManager->appPrefs.fontPrefs.AvailFonts.contains(tmpf)) || (!prefsManager->appPrefs.fontPrefs.AvailFonts[tmpf].usable()))
{
- if ((!prefsManager->appPrefs.GFontSub.contains(tmpf)) || (!prefsManager->appPrefs.AvailFonts[prefsManager->appPrefs.GFontSub[tmpf]].usable()))
+ if ((!prefsManager->appPrefs.GFontSub.contains(tmpf)) || (!prefsManager->appPrefs.fontPrefs.AvailFonts[prefsManager->appPrefs.GFontSub[tmpf]].usable()))
{
ScCore->showSplash(false);
MissingFont *dia = new MissingFont(0, tmpf, 0);
@@ -142,7 +142,7 @@
{
// FT_Face face;
// error = FT_New_Face( library, prefsManager->appPrefs.AvailFonts[tmpf].fontFilePath(), prefsManager->appPrefs.AvailFonts[tmpf].faceIndex(), &face );
- if ( prefsManager->appPrefs.AvailFonts[tmpf].usable() )
+ if ( prefsManager->appPrefs.fontPrefs.AvailFonts[tmpf].usable() )
tmpf = prefsManager->appPrefs.itemToolPrefs.defFont;
/* if (prefsManager->appPrefs.AvailFonts[tmpf]->ReadMetrics()) {
//already done in ScFonts::addScalaableFont():
@@ -411,7 +411,7 @@
if (hg->ch == QChar(5))
hg->ch = QChar(13);
it++;
- hg->setFont(prefsManager->appPrefs.AvailFonts[*it]);
+ hg->setFont(prefsManager->appPrefs.fontPrefs.AvailFonts[*it]);
it++;
hg->setFontSize(qRound(ScCLocale::toDoubleC((*it)) * 10.0));
it++;
@@ -1063,13 +1063,13 @@
double wide;
double csi = Siz / 100.0;
// uint chr = ccx[0].unicode();
- if (prefsManager->appPrefs.AvailFonts[ZFo].canRender(ccx[0]))
+ if (prefsManager->appPrefs.fontPrefs.AvailFonts[ZFo].canRender(ccx[0]))
{
- wide = prefsManager->appPrefs.AvailFonts[ZFo].charWidth(ccx[0])*(Siz / 10.0);
+ wide = prefsManager->appPrefs.fontPrefs.AvailFonts[ZFo].charWidth(ccx[0])*(Siz / 10.0);
QTransform chma;
chma.scale(csi, csi);
- uint gl = prefsManager->appPrefs.AvailFonts[ZFo].char2CMap(ccx[0]);
- FPointArray gly = prefsManager->appPrefs.AvailFonts[ZFo].glyphOutline(gl);
+ uint gl = prefsManager->appPrefs.fontPrefs.AvailFonts[ZFo].char2CMap(ccx[0]);
+ FPointArray gly = prefsManager->appPrefs.fontPrefs.AvailFonts[ZFo].glyphOutline(gl);
if (gly.size() < 4)
return;
gly.map(chma);
@@ -1092,19 +1092,19 @@
p->fillPath();
if ((Style & 4) && ((mod % 2) != 0))
{
- p->setLineWidth(prefsManager->appPrefs.AvailFonts[ZFo].strokeWidth() * Siz / 20);
+ p->setLineWidth(prefsManager->appPrefs.fontPrefs.AvailFonts[ZFo].strokeWidth() * Siz / 20);
p->strokePath();
}
if (Style & 16)
{
- double st = prefsManager->appPrefs.AvailFonts[ZFo].strikeoutPos() * (Siz / 10.0);
- p->setLineWidth(qMax(prefsManager->appPrefs.AvailFonts[ZFo].strokeWidth() * (Siz / 10.0), 1.0));
+ double st = prefsManager->appPrefs.fontPrefs.AvailFonts[ZFo].strikeoutPos() * (Siz / 10.0);
+ p->setLineWidth(qMax(prefsManager->appPrefs.fontPrefs.AvailFonts[ZFo].strokeWidth() * (Siz / 10.0), 1.0));
p->drawLine(FPoint(xco, yco-st), FPoint(xco+wide, yco-st));
}
if (Style & 8)
{
- double st = prefsManager->appPrefs.AvailFonts[ZFo].underlinePos() * (Siz / 10.0);
- p->setLineWidth(qMax(prefsManager->appPrefs.AvailFonts[ZFo].strokeWidth() * (Siz / 10.0), 1.0));
+ double st = prefsManager->appPrefs.fontPrefs.AvailFonts[ZFo].underlinePos() * (Siz / 10.0);
+ p->setLineWidth(qMax(prefsManager->appPrefs.fontPrefs.AvailFonts[ZFo].strokeWidth() * (Siz / 10.0), 1.0));
p->drawLine(FPoint(xco, yco-st), FPoint(xco+wide, yco-st));
}
}
Index: scribus/pslib.cpp
===================================================================
--- scribus/pslib.cpp (revision 13954)
+++ scribus/pslib.cpp (revision 13955)
@@ -1470,7 +1470,7 @@
if (loadRawText(fn, tmp))
{
PutStream("bEPS\n");
- PutStream(ToStr(PrefsManager::instance()->appPrefs.gs_Resolution / 72.0 * scalex) + " " + ToStr(PrefsManager::instance()->appPrefs.gs_Resolution / 72.0 * scaley) + " sc\n");
+ PutStream(ToStr(PrefsManager::instance()->appPrefs.extToolPrefs.gs_Resolution / 72.0 * scalex) + " " + ToStr(PrefsManager::instance()->appPrefs.extToolPrefs.gs_Resolution / 72.0 * scaley) + " sc\n");
PutStream(ToStr(-c->BBoxX+x * scalex) + " " + ToStr(y * scalex) + " tr\n");
if (!Name.isEmpty())
{
@@ -1524,8 +1524,8 @@
PutStream(ToStr(x*scalex) + " " + ToStr(y*scaley) + " tr\n");
if ((extensionIndicatesPDF(ext)) && (!c->asLatexFrame()))
{
- scalex *= PrefsManager::instance()->appPrefs.gs_Resolution / 300.0;
- scaley *= PrefsManager::instance()->appPrefs.gs_Resolution / 300.0;
+ scalex *= PrefsManager::instance()->appPrefs.extToolPrefs.gs_Resolution / 300.0;
+ scaley *= PrefsManager::instance()->appPrefs.extToolPrefs.gs_Resolution / 300.0;
}
// PutStream(ToStr(x*scalex) + " " + ToStr(y*scaley) + " tr\n");
PutStream(ToStr(qRound(scalex*w)) + " " + ToStr(qRound(scaley*h)) + " sc\n");
Index: scribus/canvasmode_normal.cpp
===================================================================
--- scribus/canvasmode_normal.cpp (revision 13954)
+++ scribus/canvasmode_normal.cpp (revision 13955)
@@ -956,7 +956,7 @@
}
if (m_doc->appMode != modeEdit)
{
- if (!PrefsManager::instance()->appPrefs.stickyTools)
+ if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
m_view->requestMode(modeNormal);
else
{
More information about the scribus-commit
mailing list