r14745 by cbradney - More PDF export prefs updates

scribus-commit scribus-commit at lists.scribus.net
Tue Feb 16 23:40:27 CET 2010


Revision: 14745
Author: cbradney
Date: 2010-02-16T22:31:12.664716Z
Commit message: More PDF export prefs updates

Changeset: 
M  /trunk/Scribus/scribus/ui/prefs_colormanagement.h
M  /trunk/Scribus/scribus/ui/prefs_pdfexport.h
M  /trunk/Scribus/scribus/ui/preferencesdialog.cpp
M  /trunk/Scribus/scribus/ui/prefs_colormanagement.cpp
M  /trunk/Scribus/scribus/ui/prefs_pdfexport.cpp

Diffs:
Index: scribus/ui/prefs_pdfexport.cpp
===================================================================
--- scribus/ui/prefs_pdfexport.cpp	(revision 14744)
+++ scribus/ui/prefs_pdfexport.cpp	(revision 14745)
@@ -81,18 +81,7 @@
 	imageCompressionQualityComboBox->addItem( tr( "Minimum" ) );
 	imageCompressionQualityComboBox->setCurrentIndex(i);
 
-	i = pdfVersionComboBox->currentIndex();
-	pdfVersionComboBox->clear();
-	pdfVersionComboBox->addItem("PDF 1.3 (Acrobat 4)");
-	pdfVersionComboBox->addItem("PDF 1.4 (Acrobat 5)");
-	pdfVersionComboBox->addItem("PDF 1.5 (Acrobat 6)");
-	//if (cmsEnabled)// && (!PDFXProfiles.isEmpty()))
-	{
-		pdfVersionComboBox->addItem("PDF/X-1a");
-		pdfVersionComboBox->addItem("PDF/X-3");
-		pdfVersionComboBox->addItem("PDF/X-4");
-	}
-	pdfVersionComboBox->setCurrentIndex(i);
+	addPDFVersions(true);//if (cmsEnabled)// && (!PDFXProfiles.isEmpty()))
 
 	i = pageBindingComboBox->currentIndex();
 	pageBindingComboBox->clear();
@@ -544,6 +533,14 @@
 	allowAnnotatingCheckBox->setEnabled(enabled);
 }
 
+
+void Prefs_PDFExport::enableCMS(bool enabled)
+{
+	cmsEnabled=enabled;
+	addPDFVersions(enabled);
+	enableProfiles(1);
+}
+
 void Prefs_PDFExport::createPageNumberRange()
 {
 	if (m_doc!=0)
@@ -819,3 +816,23 @@
 	tabWidget->setTabEnabled(2, false);
 	connect(outputIntentionComboBox, SIGNAL(activated(int)), this, SLOT(enableProfiles(int)));
 }
+
+void Prefs_PDFExport::addPDFVersions(bool addPDFXStrings)
+{
+	disconnect(pdfVersionComboBox, SIGNAL(activated(int)), this, SLOT(enablePDFX(int)));
+	int i = pdfVersionComboBox->currentIndex();
+	pdfVersionComboBox->clear();
+	pdfVersionComboBox->addItem("PDF 1.3 (Acrobat 4)");
+	pdfVersionComboBox->addItem("PDF 1.4 (Acrobat 5)");
+	pdfVersionComboBox->addItem("PDF 1.5 (Acrobat 6)");
+	if (addPDFXStrings)
+	{
+		pdfVersionComboBox->addItem("PDF/X-1a");
+		pdfVersionComboBox->addItem("PDF/X-3");
+		pdfVersionComboBox->addItem("PDF/X-4");
+	}
+	else
+		i=qMin(i,2);
+	pdfVersionComboBox->setCurrentIndex(i);
+	connect(pdfVersionComboBox, SIGNAL(activated(int)), this, SLOT(enablePDFX(int)));
+}
Index: scribus/ui/prefs_pdfexport.h
===================================================================
--- scribus/ui/prefs_pdfexport.h	(revision 14744)
+++ scribus/ui/prefs_pdfexport.h	(revision 14745)
@@ -26,6 +26,7 @@
 		virtual void restoreDefaults(struct ApplicationPrefs *prefsData, ScribusDoc* doc, const ProfilesL & PDFXProfiles,
 									 const QMap<QString, int> & DocFonts);
 		virtual void saveGuiToPrefs(struct ApplicationPrefs *prefsData) const;
+		void enableCMS(bool);
 
 	signals:
 		void noInfo();
@@ -53,6 +54,7 @@
 		void enableCustomRenderingWidgets(bool);
 		void enableSolidsImagesWidgets(bool);
 		void enablePDFXWidgets(bool);
+		void addPDFVersions(bool);
 		bool cmsEnabled;
 		ScribusDoc* m_doc;
 		QString defaultSolidColorRGBProfile;
Index: scribus/ui/prefs_colormanagement.cpp
===================================================================
--- scribus/ui/prefs_colormanagement.cpp	(revision 14744)
+++ scribus/ui/prefs_colormanagement.cpp	(revision 14745)
@@ -127,6 +127,11 @@
 	}
 }
 
+bool Prefs_ColorManagement::cmActive()
+{
+	return activateCMCheckBox->isChecked();
+}
+
 void Prefs_ColorManagement::cmActivated(bool active)
 {
 	imageRenderingIntentComboBox->setEnabled( active );
Index: scribus/ui/prefs_colormanagement.h
===================================================================
--- scribus/ui/prefs_colormanagement.h	(revision 14744)
+++ scribus/ui/prefs_colormanagement.h	(revision 14745)
@@ -24,7 +24,7 @@
 		virtual void restoreDefaults(struct ApplicationPrefs *prefsData);
 		void setProfiles(struct ApplicationPrefs *prefsData, ProfilesL *inputProfiles, ProfilesL *inputProfilesCMYK, ProfilesL *printerProfiles, ProfilesL *monitorProfiles);
 		virtual void saveGuiToPrefs(struct ApplicationPrefs *prefsData) const;
-
+		bool cmActive();
 	protected:
 		bool m_canChangeMonitorProfile;
 
Index: scribus/ui/preferencesdialog.cpp
===================================================================
--- scribus/ui/preferencesdialog.cpp	(revision 14744)
+++ scribus/ui/preferencesdialog.cpp	(revision 14745)
@@ -229,6 +229,8 @@
 			prefs_ItemTools->enableFontPreview(true);
 		if (prefsStackWidget->currentWidget()==dynamic_cast<QWidget*>(prefs_TableOfContents))
 			prefs_TableOfContents->setupItemAttrs( prefs_DocumentItemAttributes->getDocAttributesNames() );
+		if (prefsStackWidget->currentWidget()==dynamic_cast<QWidget*>(prefs_PDFExport))
+			prefs_PDFExport->enableCMS(prefs_ColorManagement->cmActive());
 	}
 }
 




More information about the scribus-commit mailing list