Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 14447 → Rev 14448

/trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
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
{
 
}
/trunk/Scribus/scribus/ui/prefs_pdfexport.h
9,9 → 9,10
#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
 
18,6 → 19,11
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
/trunk/Scribus/scribus/ui/prefs_fonts.cpp
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())
{
/trunk/Scribus/scribus/ui/prefs_fonts.h
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;
};