r14448 by cbradney - Remove some PrefsManager usage from new font prefs, start pdf prefs pane work
scribus-commit
scribus-commit at lists.scribus.net
Fri Dec 25 01:00:23 CET 2009
Revision: 14448
Author: cbradney
Date: 2009-12-24T11:55:38.527310Z
Commit message: Remove some PrefsManager usage from new font prefs, start pdf prefs pane work
Changeset:
M /trunk/Scribus/scribus/ui/prefs_fonts.h
M /trunk/Scribus/scribus/ui/prefs_pdfexport.h
M /trunk/Scribus/scribus/ui/prefs_fonts.cpp
M /trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
Diffs:
Index: scribus/ui/prefs_pdfexport.cpp
===================================================================
--- scribus/ui/prefs_pdfexport.cpp (revision 14447)
+++ scribus/ui/prefs_pdfexport.cpp (revision 14448)
@@ -5,10 +5,11 @@
for which a new license (GPL+exception) is in place.
*/
-#include "prefs_pdfexport.h"
+#include "ui/prefs_pdfexport.h"
+#include "prefsstructs.h"
Prefs_PDFExport::Prefs_PDFExport(QWidget* parent)
- : QWidget(parent)
+ : Prefs_Pane(parent)
{
setupUi(this);
@@ -18,3 +19,17 @@
{
}
+void Prefs_PDFExport::languageChange()
+{
+}
+
+void Prefs_PDFExport::restoreDefaults(struct ApplicationPrefs *prefsData)
+{
+
+}
+
+
+void Prefs_PDFExport::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
+{
+
+}
Index: scribus/ui/prefs_pdfexport.h
===================================================================
--- scribus/ui/prefs_pdfexport.h (revision 14447)
+++ scribus/ui/prefs_pdfexport.h (revision 14448)
@@ -9,15 +9,21 @@
#define PREFS_PDFEXPORT_H
#include "ui_prefs_pdfexportbase.h"
+#include "prefs_pane.h"
#include "scribusapi.h"
-class SCRIBUS_API Prefs_PDFExport : public QWidget, Ui::Prefs_PDFExport
+class SCRIBUS_API Prefs_PDFExport : public Prefs_Pane, Ui::Prefs_PDFExport
{
Q_OBJECT
public:
Prefs_PDFExport(QWidget* parent=0);
~Prefs_PDFExport();
+ virtual void restoreDefaults(struct ApplicationPrefs *prefsData);
+ virtual void saveGuiToPrefs(struct ApplicationPrefs *prefsData) const;
+
+ public slots:
+ void languageChange();
};
#endif // PREFS_PDFEXPORT_H
Index: scribus/ui/prefs_fonts.cpp
===================================================================
--- scribus/ui/prefs_fonts.cpp (revision 14447)
+++ scribus/ui/prefs_fonts.cpp (revision 14448)
@@ -121,7 +121,7 @@
void Prefs_Fonts::restoreDefaults(struct ApplicationPrefs *prefsData)
{
// SCFonts* availFonts=&(PrefsManager::instance()->appPrefs.AvailFonts);
- fontListTableView->setFonts(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+ fontListTableView->setFonts(prefsData->fontPrefs.AvailFonts);
/*
DON'T REMOVE THIS COMMENTS, PLEASE! (Petr)
It's just a performance vs. functionality test.
@@ -184,7 +184,7 @@
// UsedFonts.sort();
FlagsRepl.clear();
fontSubstitutionsTableWidget->clearContents();
- fontSubstitutionsTableWidget->setRowCount(PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.count());
+ fontSubstitutionsTableWidget->setRowCount(prefsData->fontPrefs.GFontSub.count());
int a = 0;
QMap<QString,QString>::Iterator itfsu;
for (itfsu = RList.begin(); itfsu != RList.end(); ++itfsu)
@@ -200,11 +200,15 @@
FlagsRepl.append(item);
a++;
}
- UpdateFliste();
+ updateFontList(prefsData);
}
void Prefs_Fonts::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
{
+ prefsData->fontPrefs.GFontSub.clear();
+ uint a = 0;
+ for (QMap<QString,QString>::ConstIterator itfsu = RList.begin(); itfsu != RList.end(); ++itfsu)
+ prefsData->fontPrefs.GFontSub[itfsu.key()] = FlagsRepl.at(a++)->currentText();
}
@@ -213,11 +217,11 @@
deleteSubstitutionButton->setEnabled(true);
}
-void Prefs_Fonts::UpdateFliste()
+void Prefs_Fonts::updateFontList(struct ApplicationPrefs *prefsData)
{
QString tmp;
UsedFonts.clear();
- SCFonts fonts = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts;
+ SCFonts fonts = prefsData->fontPrefs.AvailFonts;
SCFontsIterator it(fonts);
for ( ; it.hasNext() ; it.next())
{
Index: scribus/ui/prefs_fonts.h
===================================================================
--- scribus/ui/prefs_fonts.h (revision 14447)
+++ scribus/ui/prefs_fonts.h (revision 14448)
@@ -31,7 +31,7 @@
public slots:
void languageChange();
void ReplaceSel(int r, int c);
- void UpdateFliste();
+ void updateFontList(struct ApplicationPrefs *prefsData);
void DelEntry();
void SelectPath(QListWidgetItem *c);
void AddPath();
@@ -46,7 +46,6 @@
QList<ScComboBox*> FlagsRepl;
//! List of font names of allowed fonts for substitutions
QStringList UsedFonts;
- QString HomeP;
QString CurrentPath;
ScribusDoc* m_doc;
};
More information about the scribus-commit
mailing list