1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 
8 #ifndef PREFS_PDFEXPORT_H
9 #define PREFS_PDFEXPORT_H
10 
11 #include "ui_prefs_pdfexportbase.h"
12 #include "prefs_pane.h"
13 #include "scfonts.h"
14 #include "scribusapi.h"
15 
16 #include "pdfoptions.h"
17 class ScribusDoc;
18 
19 class SCRIBUS_API Prefs_PDFExport : public Prefs_Pane, Ui::Prefs_PDFExport
20 {
21 	Q_OBJECT
22 
23 	public:
24 		Prefs_PDFExport(QWidget* parent, ScribusDoc* doc=nullptr);
25 		~Prefs_PDFExport();
26 
27 		void restoreDefaults(struct ApplicationPrefs *prefsData)  override;
28 		virtual void restoreDefaults(struct ApplicationPrefs *prefsData, const ProfilesL & PDFXProfiles,
29 									 bool exporting=false);
30 		void saveGuiToPrefs(struct ApplicationPrefs *prefsData) const override;
31 		void enableCMS(bool);
32 
33 		PDFOptions::PDFFontEmbedding fontEmbeddingMode();
34 		QStringList fontsToEmbed();
35 		QStringList fontsToSubset();
36 		QStringList fontsToOutline();
37 
38 	signals:
39 		void noInfo();
40 		void hasInfo();
41 
42 	public slots:
43 		void languageChange();
44 		void unitChange(int);
45 
46 	protected slots:
47 		void enableRangeControls(bool);
48 		void enableSecurityControls(bool);
49 		void enablePDFExportTabs(bool);
50 		void createPageNumberRange();
51 		void setMaximumResolution();
52 		void enableProfiles(int);
53 		void enableLPI(int);
54 		void enableLPI2();
55 		void enablePG();
56 		void enablePGI();
57 		void enablePGI2();
58 		void enablePDFX(int);
59 		void SelLPIcol(int);
60 		void DoDownsample();
61 		void EmbeddingModeChange();
62 		void RemoveSubset();
63 		void PutToSubset();
64 		void SelEFont(QListWidgetItem*);
65 		void SelSFont(QListWidgetItem*);
66 		void EmbedAll();
67 		void SubsetAll();
68 		void OutlineAll();
69 		void PagePr();
70 		void doDocBleeds();
71 		void SetEffOpts(int nr);
72 
73 	protected:
74 		QListWidgetItem* addFontItem(const QString& fontName, QListWidget* fontList);
75 		void checkEmbeddableFonts();
76 		void setCustomRenderingWidgetsShown(bool);
77 		void setSolidsImagesWidgetsShown(bool);
78 		void enableCustomRenderingWidgets(bool);
79 		void enableSolidsImagesWidgets(bool);
80 		void enablePDFXWidgets(bool);
81 		void addPDFVersions(bool);
82 		void enableEffects(bool);
83 		bool cmsEnabled;
84 		double unitRatio;
85 		ScribusDoc* m_doc;
86 		QString defaultSolidColorRGBProfile;
87 		QString defaultPrinterProfile;
88 		PDFOptions Opts;
89 		QMap<QString, QString> AnnotationFonts;
90 
91 		QList<PDFPresentationData> EffVal;
92 		SCFonts AllFonts;
93 		bool exportingPDF;
94 		QString SelLPIcolor;
95 };
96 
97 #endif // PREFS_PDFEXPORT_H
98