r24049 by jghali - Add support for PDF-based printing on *nix systems
scribus-commit
scribus-commit at lists.scribus.net
Sat Oct 3 22:57:53 UTC 2020
Author: jghali
Date: Sat Oct 3 22:57:53 2020
New Revision: 24049
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24049
Log:
Add support for PDF-based printing on *nix systems
Added:
trunk/Scribus/scribus/ui/printlanguagecombo.cpp
trunk/Scribus/scribus/ui/printlanguagecombo.h
trunk/Scribus/scribus/ui/printpreviewbase.ui
Modified:
trunk/Scribus/doc/de/scripterapi-Printer.html
trunk/Scribus/doc/de/scripterapi-constants.html
trunk/Scribus/doc/en/scripterapi-Printer.html
trunk/Scribus/doc/en/scripterapi-constants.html
trunk/Scribus/doc/fr/scripterapi-Printer.html
trunk/Scribus/doc/fr/scripterapi-constants.html
trunk/Scribus/doc/it/scripterapi-Printer.html
trunk/Scribus/doc/it/scripterapi-constants.html
trunk/Scribus/doc/ru/scripterapi-Printer.html
trunk/Scribus/doc/ru/scripterapi-constants.html
trunk/Scribus/scribus/CMakeLists.txt
trunk/Scribus/scribus/commonstrings.cpp
trunk/Scribus/scribus/commonstrings.h
trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
trunk/Scribus/scribus/plugins/scriptplugin_py2x/objprinter.cpp
trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp
trunk/Scribus/scribus/printpreviewcreator.h
trunk/Scribus/scribus/printpreviewcreator_gdi.cpp
trunk/Scribus/scribus/printpreviewcreator_gdi.h
trunk/Scribus/scribus/printpreviewcreator_pdf.cpp
trunk/Scribus/scribus/printpreviewcreator_pdf.h
trunk/Scribus/scribus/printpreviewcreator_ps.cpp
trunk/Scribus/scribus/printpreviewcreator_ps.h
trunk/Scribus/scribus/printpreviewcreatorfactory.cpp
trunk/Scribus/scribus/printpreviewcreatorfactory.h
trunk/Scribus/scribus/scprintengine.h
trunk/Scribus/scribus/scprintengine_gdi.cpp
trunk/Scribus/scribus/scprintengine_pdf.h
trunk/Scribus/scribus/scprintengine_ps.cpp
trunk/Scribus/scribus/scprintengine_ps.h
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusstructs.h
trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
trunk/Scribus/scribus/ui/outputpreview_pdf.ui
trunk/Scribus/scribus/ui/outputpreview_ps.cpp
trunk/Scribus/scribus/ui/outputpreview_ps.ui
trunk/Scribus/scribus/ui/prefs_printer.cpp
trunk/Scribus/scribus/ui/prefs_printerbase.ui
trunk/Scribus/scribus/ui/printdialog.cpp
trunk/Scribus/scribus/ui/printdialog.h
trunk/Scribus/scribus/ui/printdialogbase.ui
trunk/Scribus/scribus/ui/printpreview.cpp
trunk/Scribus/scribus/ui/printpreview.h
trunk/Scribus/scribus/util_printer.cpp
trunk/Scribus/scribus/util_printer.h
trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters
trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj
trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj.filters
trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj
trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj.filters
Modified: trunk/Scribus/doc/de/scripterapi-Printer.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/doc/de/scripterapi-Printer.html
==============================================================================
--- trunk/Scribus/doc/de/scripterapi-Printer.html (original)
+++ trunk/Scribus/doc/de/scripterapi-Printer.html Sat Oct 3 22:57:53 2020
@@ -3,9 +3,11 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Python: class Printer</title>
</head>
+
<style>
@import "manual.css";
</style>
+
<body>
<h2>Python: class Printer</h2>
<p>
@@ -15,7 +17,6 @@
<p>Methods defined here:</p>
<dl>
-<dd>
<dt><a name="Printer-Print"><strong>Print</strong></a>(...)</dt>
<dd><p>This method is deprecated - use <a href="#Printer-print">print</a>() instead.</p></dd>
@@ -24,10 +25,12 @@
<dt><a name="Printer-print"><strong>print</strong></a>(...)</dt>
<dd><p>Prints selected pages.</p></dd>
+</dl>
-<hr>
+<hr/>
+
<p>Data and other attributes defined here:</p>
-<dd>
+<dl>
<dt><strong>__new__</strong> = <built-in method __new__ of type object></dt>
<dd><p>T.<a href="#Printer-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</p></dd>
@@ -65,12 +68,15 @@
<dd><p>Name of printer to use.<br>
Default is 'File' for printing into file</p></dd>
+ <dt><strong>prnLanguage</strong> = <attribute 'prnLanguage' of 'Printer' objects></dt>
+ <dd><p>Print language to use.<br>
+One of PRNLANG_* constants. -- Default is PRNLANG_POSTSCRIPT3</p></dd>
+
<dt><strong>pslevel</strong> = <member 'pslevel' of 'Printer' objects></dt>
- <dd><p>PostScript Level<br>
-Can be 1 or 2 or 3 -- Default is 3.</p></dd>
+ <dd><p>Deprecated, use prnLanguage instead.</p></dd>
<dt><strong>separation</strong> = <attribute 'separation' of 'Printer' objects></dt>
- <dd><p>Print separationl<br>
+ <dd><p>Print separations<br>
'No' -- Default<br>
'All'<br>
'Cyan'<br>
Modified: trunk/Scribus/doc/de/scripterapi-constants.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/doc/de/scripterapi-constants.html
==============================================================================
--- trunk/Scribus/doc/de/scripterapi-constants.html (original)
+++ trunk/Scribus/doc/de/scripterapi-constants.html Sat Oct 3 22:57:53 2020
@@ -1,241 +1,241 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>Predefined Constants</title>
+ <title>Constantes prédéfinies</title>
</head>
-<style>
- at import "manual.css";
-</style>
<body>
-<h2>Predefined Constants</h2>
-
-<p>There are some Constants defined to help using the Commands: </p>
-
-<h4>Scribus Version:</h4>
- <p>The script interface provides two variables containing the current Scribus version in the <code>scribus</code> module. Scripts can use these variables to check that they're running under the version of Scribus they expect, and to report information about incompatibilities to the user. These two variables, <code>scribus_version</code> and <code>scribus_version_info</code>, were added in 1.2.1 and 1.3.0svn and will not be present in earlier versions. If you need to, you can check for their presence with <code>hasattr(scribus, 'scribus_version')</code>.</p>
- <p><code>scribus_version</code> contains the current Scribus version as a string. It will usually look like <code>'1.2.1svn'</code> or <code>'1.3.0'</code>, for example, but is not guaranteed to always follow that format. This variable is useful when you need to display the version to the user, for example when reporting an incompatibility. Do not parse or compare this variable, that is what <code>scribus_version_info</code> is for.</p>
- <p><code>scribus_version_info</code> is a tuple similar to the <code>sys.version_info</code> tuple provided by Python. It is a tuple of the form (majorversion, minorversion, patchlevel, extraversion, build) for example, 1.2.1svn will have <code>(1,2,1,'svn',0)</code> and 1.3.2 will have <code>(1,3,2,'',0)</code> . These tuples are ideal for checking for minimum versions, etc, because Python compares tuples element-by-element, left-to-right. For example:</p>
+<h2>Constantes prédéfinies</h2>
+
+<p>Des constantes sont définies pour aider à utiliser les commandes: </p>
+
+<h4>Version Scribus :</h4>
+ <p>L'interface de script fournit deux variables contenant la version
+courante de Scribus dans le module <code>Scribus</code>. Les scripts peuvent utiliser ces variables pour vérifier qu'ils tournent sous la bonne version de Scribus et pour informer l'utilisateur d'éventuelles incompatibilités. Ces
+deux variables, <code>scribus_version</code> et
+<code>scribus_version_info</code>, ont été ajoutées dans les versions
+1.2.1 et 1.3.0cvs et sont absentes des versions
+précédentes. Si nécessaire, vous pouvez vérifier leur présence avec <code>hasattr(scribus, 'scribus_version')</code>.</p>
+ <p><code>scribus_version</code> est une chaîne qui contient la version courante de Scribus. Sa valeur ressemble habituellement à <code>'1.2.1cvs'</code> ou <code>'1.3.0'</code>, par exemple, mais il n'est pas garanti que le format sera toujours le même. Cette
+variable est utile pour afficher la version à l'utilisateur, par exemple pour signaler une incompatibilité. N'analysez pas et ne comparez pas cette variable, car <code>scribus_version_info</code> est fait pour cela.</p>
+ <p><code>scribus_version_info</code> est un vecteur semblable au vecteur <code>sys.version_info</code> fourni par Python.
+C'est un vecteur de la forme (majorversion, minorversion, patchlevel,
+extraversion, build), par exemple 1.2.1cvs correspond Ã
+<code>(1,2,1,'cvs',0)</code> et 1.3.2 correspond à <code>(1,3,2,'',0)</code> . Ces vecteurs sont idéaux pour vérifier les versions minimum, etc., parce que Python compare les vecteurs élément par élément, de gauche à droite. Par exemple :</p>
<pre>
if scribus.scribus_version_info[:3] < (1,2,2):
- messageBox("Scribus - Python script",
- "This script requires Scribus 1.2.2 or newer. "+"You're running %s." % scribus.scribus_version, scribus.ICON_CRITICAL)
+ messageBox("Scribus - script Python",
+ "Ce script requiert 1.2.2 ou plus récent."+\
+ "Vous roulez %s." % scribus.scribus_version,
+ ICON_CRITICAL)
sys.exit()
</pre>
-<p><em>Note that if you are using this style of import statement:</em></p>
-<pre>import scribus</pre>
-<p>you will need to add a prefix to these predefined constants, for example, <strong>scribus.ICON_CRITICAL</strong>.</p>
-
-
-<h4>Unit Enumeration Constants: </h4>
+
+<h4>Constantes d'énumération d'unités : </h4>
<table><tr><td>
<dl>
<dt>UNIT_POINTS</dt>
- <dd>Measurement Unit Point = 0</dd>
+ <dd>Unité de mesure point = 0</dd>
<dt>UNIT_MILLIMETERS</dt>
- <dd>Measurement Unit Millimeter = 1</dd>
+ <dd>Unité de mesure millimètre = 1</dd>
<dt>UNIT_INCHES</dt>
- <dd>Measurement Unit Inch = 2</dd>
+ <dd>Unité de mesure pouce = 2</dd>
<dt>UNIT_PICAS</dt>
- <dd>Measurement Unit Pica = 3</dd>
-</dl>
-</td></tr></table>
-
-<h4>Unit Conversion Constants</h4>
-
-<p>These conversion factors can be used to convert units to and from points.
-Thus, to convert inches to points, you can simply write 'value/inch', to
-convert points to inches you write 'value*inch', and to convert inches to mm
-you write 'value*mm/inch' .</p>
+ <dd>Unité de mesure pica = 3</dd>
+</dl>
+</td></tr></table>
+
+<h4>Constantes de conversion d'unités</h4>
+
+<p>Ces facteurs de conversion peuvent être utilisés pour convertir les unités en points et vice versa.
+Ainsi, pour convertir les pouces en points, il suffit d'écrire 'valeur/inch'; pour convertir les points en pouces vous écrirez 'valeur*inch', et pour convertir les pouces en mm vous écrirez 'valeur*mm/inch'.</p>
<table><tr><td>
<dl>
<dt>pt</dt>
- <dd>points in 1 pt</dd>
+ <dd>points dans 1 pt</dd>
<dt>inch</dt>
- <dd>inches in 1 pt</dt>
+ <dd>pouces dans 1 pt</dt>
<dt>p</dt>
- <dd>pica in 1 pt</dd>
+ <dd>pica dans 1 pt</dd>
<dt>cm<dt>
- <dd>centimetres in 1 pt</dd>
+ <dd>centimètres dans 1 pt</dd>
<dt>mm</dt>
- <dd>millimetres in 1 pt</dd>
+ <dd>millimètres dans 1 pt</dd>
<dt>...</dt>
- <dd>Other constants will be provided if the Scribus core knows about them.</dd>
-</dl>
-</td></tr></table>
-
-<h4>Page Orientation Definitions: </h4>
+ <dd>D'autres constantes seront fournies si le coeur de Scribus les reconnaît.</dd>
+</dl>
+</td></tr></table>
+
+<h4>Constantes d'orientation de page :</h4>
<table><tr><td>
<dl>
<dt>PORTRAIT</dt>
- <dd>Page orientation Portrait = 0</dd>
+ <dd>Orientation Portrait = 0</dd>
<dt>LANDSCAPE</dt>
- <dd>Page orientation Landscape = 1</dd>
-</dl>
-</td></tr></table>
-
-<h4>Definitions for Page Formats: </h4>
-<p>If you are using these, it's important to understand that these constants are simply tuples of these specific numbers. There are now two sets of these constants for A and B series of paper formats.</p>
-<p>The original set, such as PAPER_A4, is used when a document is created with points units. Now you can also use the similarly named PAPER_A4_MM when you are using millimeters as the page units. As before, they must be used with the appropriate constant, either UNIT_POINTS or UNIT_MILLIMETERS. What you can then do, for example, is use them to create a document in points, then switch the units of the document with the setUnit() command.</p>
+ <dd>Orientation Landscape = 1</dd>
+</dl>
+</td></tr></table>
+
+<h4>Réglages de format de page : </h4>
<table><tr>
<td>
<dl>
<dt>PAPER_A0</dt>
- <dd>Paper format A0 = 2380 x 3368 Points</dd>
+ <dd>Format papier A0 = 2380 x 3368 Points</dd>
<dt>PAPER_A1</dt>
- <dd>Paper format A1 = 1684 x 2380 Points</dd>
+ <dd>Format papier A1 = 1684 x 2380 Points</dd>
<dt>PAPER_A2</dt>
- <dd>Paper format A2 = 1190 x 1684 Points</dd>
+ <dd>Format papier A2 = 1190 x 1684 Points</dd>
<dt>PAPER_A3</dt>
- <dd>Paper format A3 = 842 x 1190 Points</dd>
+ <dd>Format papier A3 = 842 x 1190 Points</dd>
<dt>PAPER_A4</dt>
- <dd>Paper format A4 = 595 x 842 Points</dd>
+ <dd>Format papier A4 = 595 x 842 Points</dd>
<dt>PAPER_A5</dt>
- <dd>Paper format A5 = 421 x 595 Points</dd>
+ <dd>Format papier A5 = 421 x 595 Points</dd>
<dt>PAPER_A6</dt>
- <dd>Paper format A6 = 297 x 421 Points</dd>
+ <dd>Format papier A6 = 297 x 421 Points</dd>
<dt>PAPER_A7</dt>
- <dd>Paper format A7 = 210 x 297 Points</dd>
+ <dd>Format papier A7 = 210 x 297 Points</dd>
<dt>PAPER_A8</dt>
- <dd>Paper format A8 = 148 x 210 Points</dd>
+ <dd>Format papier A8 = 148 x 210 Points</dd>
<dt>PAPER_A9</dt>
- <dd>Paper format A9 = 105 x 148 Points</dd></dl></td>
+ <dd>Format papier A9 = 105 x 148 Points</dd></dl></td>
<td>
<dl>
<dt>PAPER_A0_MM</dt>
- <dd>Paper format A0 = 841 x 1189 Millimeters</dd>
+ <dd>Format papier A0 = 841 x 1189 Millimètres</dd>
<dt>PAPER_A1_MM</dt>
- <dd>Paper format A1 = 594 x 841 Millimeters</dd>
+ <dd>Format papier A1 = 594 x 841 Millimètres</dd>
<dt>PAPER_A2_MM</dt>
- <dd>Paper format A2 = 420 x 594 Millimeters</dd>
+ <dd>Format papier A2 = 420 x 594 Millimètres</dd>
<dt>PAPER_A3_MM</dt>
- <dd>Paper format A3 = 297 x 420 Millimeters</dd>
+ <dd>Format papier A3 = 297 x 420 Millimètres</dd>
<dt>PAPER_A4_MM</dt>
- <dd>Paper format A4 = 210 x 297 Millimeters</dd>
+ <dd>Format papier A4 = 210 x 297 Millimètres</dd>
<dt>PAPER_A5_MM</dt>
- <dd>Paper format A5 = 148 x 210 Millimeters</dd>
+ <dd>Format papier A5 = 148 x 210 Millimètres</dd>
<dt>PAPER_A6_MM</dt>
- <dd>Paper format A6 = 105 x 148 Millimeters</dd>
+ <dd>Format papier A6 = 105 x 148 Millimètres</dd>
<dt>PAPER_A7_MM</dt>
- <dd>Paper format A7 = 74 x 105 Millimeters</dd>
+ <dd>Format papier A7 = 74 x 105 Millimètres</dd>
<dt>PAPER_A8_MM</dt>
- <dd>Paper format A8 = 52 x 74 Millimeters</dd>
+ <dd>Format papier A8 = 52 x 74 Millimètres</dd>
<dt>PAPER_A9_MM</dt>
- <dd>Paper format A9 = 37 x 52 Millimeters</dd></dl></td></tr>
+ <dd>Format papier A9 = 37 x 52 Millimètres</dd></dl></td></tr>
<tr><td>
<dl>
<dt>PAPER_B0</dt>
- <dd>Paper format B0 = 2836 x 4008 Points</dd>
+ <dd>Format papier B0 = 2836 x 4008 Points</dd>
<dt>PAPER_B1</dt>
- <dd>Paper format B1 = 2004 x 2836 Points</dd>
+ <dd>Format papier B1 = 2004 x 2836 Points</dd>
<dt>PAPER_B2</dt>
- <dd>Paper format B2 = 1418 x 2004 Points</dd>
+ <dd>Format papier B2 = 1418 x 2004 Points</dd>
<dt>PAPER_B3</dt>
- <dd>Paper format B3 = 1002 x 1418 Points</dd>
+ <dd>Format papier B3 = 1002 x 1418 Points</dd>
<dt>PAPER_B4</dt>
- <dd>Paper format B4 = 709 x 1002 Points</dd>
+ <dd>Format papier B4 = 709 x 1002 Points</dd>
<dt>PAPER_B5</dt>
- <dd>Paper format B5 = 501 x 709 Points</dd>
+ <dd>Format papier B5 = 501 x 709 Points</dd>
<dt>PAPER_B6</dt>
- <dd>Paper format B6 = 355 x 501 Points</dd>
+ <dd>Format papier B6 = 355 x 501 Points</dd>
<dt>PAPER_B7</dt>
- <dd>Paper format B7 = 250 x 355 Points</dd>
+ <dd>Format papier B7 = 250 x 355 Points</dd>
<dt>PAPER_B8</dt>
- <dd>Paper format B8 = 178 x 250 Points</dd>
+ <dd>Format papier B8 = 178 x 250 Points</dd>
<dt>PAPER_B9</dt>
- <dd>Paper format B9 = 125 x 178 Points</dd>
+ <dd>Format papier B9 = 125 x 178 Points</dd>
<dt>PAPER_B10</dt>
- <dd>Paper format B10 = 89 x 125 Points</dd></dl></td>
+ <dd>Format papier B10 = 89 x 125 Points</dd></dl></td>
<td>
<dl>
<dt>PAPER_B0_MM</dt>
- <dd>Paper format B0 = 1000 x 1414 Millimeters</dd>
+ <dd>Format papier B0 = 1000 x 1414 Millimètres</dd>
<dt>PAPER_B1_MM</dt>
- <dd>Paper format B1 = 707 x 1000 Millimeters</dd>
+ <dd>Format papier B1 = 707 x 1000 Millimètres</dd>
<dt>PAPER_B2_MM</dt>
- <dd>Paper format B2 = 500 x 707 Millimeters</dd>
+ <dd>Format papier B2 = 500 x 707 Millimètres</dd>
<dt>PAPER_B3_MM</dt>
- <dd>Paper format B3 = 353 x 500 Millimeters</dd>
+ <dd>Format papier B3 = 353 x 500 Millimètres</dd>
<dt>PAPER_B4_MM</dt>
- <dd>Paper format B4 = 250 x 353 Millimeters</dd>
+ <dd>Format papier B4 = 250 x 353 Millimètres</dd>
<dt>PAPER_B5_MM</dt>
- <dd>Paper format B5 = 176 x 250 Millimeters</dd>
+ <dd>Format papier B5 = 176 x 250 Millimètres</dd>
<dt>PAPER_B6_MM</dt>
- <dd>Paper format B6 = 125 x 176 Millimeters</dd>
+ <dd>Format papier B6 = 125 x 176 Millimètres</dd>
<dt>PAPER_B7_MM</dt>
- <dd>Paper format B7 = 88 x 125 Millimeters</dd>
+ <dd>Format papier B7 = 88 x 125 Millimètres</dd>
<dt>PAPER_B8_MM</dt>
- <dd>Paper format B8 = 62 x 88 Millimeters</dd>
+ <dd>Format papier B8 = 62 x 88 Millimètres</dd>
<dt>PAPER_B9_MM</dt>
- <dd>Paper format B9 = 44 x 62 Millimeters</dd>
+ <dd>Format papier B9 = 44 x 62 Millimètres</dd>
<dt>PAPER_B10_MM</dt>
- <dd>Paper format B10 = 31 x 44 Millimeters</dd></dl></td></tr>
+ <dd>Format papier B10 = 31 x 44 Millimètres</dd></dl></td></tr>
<tr><td>
<dl>
<dt>PAPER_C5E</dt>
- <dd>Paper format C5E = 462 x 649 Points</dd>
+ <dd>Format papier C5E = 462 x 649 Points</dd>
<dt>PAPER_COMM10E</dt>
- <dd>Paper format Comm10E = 298 x 683 Points</dd>
+ <dd>Format papier Comm10E = 298 x 683 Points</dd>
<dt>PAPER_DLE</dt>
- <dd>Paper format DLE = 312 x 624 Points</dd>
+ <dd>Format papier DLE = 312 x 624 Points</dd>
<dt>PAPER_EXECUTIVE</dt>
- <dd>Paper format Executive = 542 x 720 Points</dd>
+ <dd>Format papier Executive = 542 x 720 Points</dd>
<dt>PAPER_FOLIO</dt>
- <dd>Paper format Folio = 595 x 935 Points</dd>
+ <dd>Format papier Folio = 595 x 935 Points</dd>
<dt>PAPER_LEDGER</dt>
- <dd>Paper format Ledger = 1224 x 792 Points</dd>
+ <dd>Format papier Ledger = 1224 x 792 Points</dd>
<dt>PAPER_LEGAL</dt>
- <dd>Paper format Legal = 612 x 1008 Points</dd>
+ <dd>Format papier Legal = 612 x 1008 Points</dd>
<dt>PAPER_LETTER</dt>
- <dd>Paper format Letter = 612 x 792 Points</dd>
+ <dd>Format papier Letter = 612 x 792 Points</dd>
<dt>PAPER_TABLOID</dt>
- <dd>Paper format Tabloid = 792 x 1224 Points</dd>
+ <dd>Format papier Tabloid = 792 x 1224 Points</dd>
</dl></td></tr>
</table>
-<h4>Definitions for Document Layout:</h4>
+<h4>Constantes de disposition du document :</h4>
<table><tr><td>
<dl>
<dt>FACINGPAGES</dt>
- <dd>Layout with facing Pages.</dd>
+ <dd>Disposition avec des pages en regard.</dd>
<dt>NOFACINGPAGES</dt>
- <dd>Normal Layout of the Document.</dd>
+ <dd>Disposition normale du document.</dd>
<dt>FIRSTPAGELEFT</dt>
- <dd>The first Page of the Document is a left Page.</dd>
+ <dd>La première page du document est une page de droite.</dd>
<dt>FIRSTPAGERIGHT</dt>
- <dd>The first Page of the Document is a right Page.</dd>
-</dl>
-</td></tr></table>
-
-<h4>Alignment Definitions: </h4>
+ <dd>La première page du document est une première de droite.</dd>
+</dl>
+</td></tr></table>
+
+<h4>Constantes d'alignement :</h4>
<table><tr><td>
<dl>
<dt>ALIGN_LEFT</dt>
- <dd>Text is aligned to the Left.</dd>
+ <dd>Le texte est aligné à gauche.</dd>
<dt>ALIGN_CENTERED</dt>
- <dd>The Text is centered in the Textframe.</dd>
+ <dd>Le texte est centré dans le cadre de texte.</dd>
<dt>ALIGN_RIGHT</dt>
- <dd>The Text is aligned to the Right Side of the Textframe</dd>
+ <dd>Le texte est aligné sur le côté droit du cadre de texte.</dd>
<dt>ALIGN_FORCED</dt>
- <dd>The Text has forced Alignment</dd>
+ <dd>Le texte a un alignement forcé.</dd>
<dt>ALIGN_BLOCK</dt>
- <dd>The Text has block Alignment</dd>
-</dl>
-</td></tr></table>
-
-<h4>Vertical alignment Definitions: </h4>
+ <dd>Le texte a un alignement bloqué.</dd>
+</dl>
+</td></tr></table>
+
+<h4>Constantes d'alignement vertical :</h4>
<table><tr><td>
<dl>
<dt>ALIGNV_TOP</dt>
- <dd>Text is aligned vertically to the top.</dd>
+ <dd>Le texte est aligné verticalement en haut.</dd>
<dt>ALIGNV_CENTERED</dt>
- <dd>Text is aligned vertically to the center.</dd>
+ <dd>Le texte est aligné verticalement au centre.</dd>
<dt>ALIGNV_BOTTOM</dt>
- <dd>Text is aligned vertically to the bottom.</dd>
-</dl>
-</td></tr></table>
-
-<h4>Line related Definitions: </h4>
+ <dd>Le texte est aligné verticalement en bas.</dd>
+</dl>
+</td></tr></table>
+
+<h4>Réglages relatifs aux lignes :</h4>
<table><tr><td>
<dl>
<dt>LINE_DASH</dt>
@@ -254,11 +254,23 @@
</dl>
</td></tr></table>
-<h4>Fill related Definitions: </h4>
+<h4>Définitions d'espaces de couleur: </h4>
+<table><tr><td>
+<dl>
+ <dt>CSPACE_UNDEFINED</dt>
+ <dt>CSPACE_RGB</dt>
+ <dt>CSPACE_CMYK</dt>
+ <dt>CSPACE_GRAY</dt>
+ <dt>CSPACE_DUOTONE</dt>
+ <dt>CSPACE_MONOCHROME</dt>
+</dl>
+</td></tr></table>
+
+<h4>Réglages relatifs au fond :</h4>
<table><tr><td>
<dl>
<dt>FILL_NOG</dt>
- <dd>No gradient, plain color</dd>
+ <dd>Pas de dégradé, couleur unie</dd>
<dt>FILL_HORIZONTALG</dt>
<dt>FILL_VERTICALG</dt>
<dt>FILL_DIAGONALG</dt>
@@ -267,25 +279,21 @@
</dl>
</td></tr></table>
-<h4>Dialog Buttons</h4>
-<p>
-<table>
-<tr><td><strong>Button Type</strong></td><td><strong>Return Value</strong></td></tr>
-<tr> <td>BUTTON_ABORT</td><td>262144</td></tr>
-<tr> <td>BUTTON_CANCEL</td><td>4194304</td></tr>
- <tr><td>BUTTON_IGNORE</td><td>1048576</td></tr>
- <tr><td>BUTTON_NO</td><td>65536</td></tr>
- <tr><td>BUTTON_NONE</td><td>N/A</td></tr>
- <tr><td>BUTTON_OK</td><td>1024</td></tr>
- <tr><td>BUTTON_RETRY</td><td>524288</td></tr>
- <tr><td>BUTTON_YES</td><td>16384</td></tr>
-</table></p>
-
-<p>There is also a hierarchy of buttons in terms of how they appear in the dialogs, with this ordering, left to right:</p>
-<p>BUTTON_YES, BUTTON_NO, BUTTON_OK, BUTTON_RETRY, BUTTON_IGNORE, BUTTON_ABORT, BUTTON_CANCEL</p>
-<p>For example, even if you assign CANCEL to button1, RETRY to button2, and YES to button3, they will appear YES, RETRY, and CANCEL left to right in the dialog.</p>
-
-<h4>Dialog Icons</h4>
+<h4>Boutons de dialogue</h4>
+<table><tr><td>
+<dl>
+ <dt>BUTTON_ABORT</dt>
+ <dt>BUTTON_CANCEL</dt>
+ <dt>BUTTON_IGNORE</dt>
+ <dt>BUTTON_NO</dt>
+ <dt>BUTTON_NONE</dt>
+ <dt>BUTTON_OK</dt>
+ <dt>BUTTON_RETRY</dt>
+ <dt>BUTTON_YES</dt>
+</dl>
+</td></tr></table>
+
+<h4>Icônes de dialogue</h4>
<table><tr><td>
<dl>
<dt>ICON_CRITICAL</dt>
@@ -295,7 +303,7 @@
</dl>
</td></tr></table>
-<h4>Tab alignment</h4>
+<h4>Constantes d'alignement par TAB</h4>
<table><tr><td>
<dl>
<dt>TAB_LEFT</dt>
@@ -306,5 +314,22 @@
</dl>
</td></tr></table>
+<h4>Constantes de language d'impression</h4>
+<table><tr><td>
+<dl>
+ <dt>PRNLANG_POSTSCRIPT1</dt>
+ <dd>Postscript Niveau 1 (requiert Ghostscript)</dd>
+ <dt>PRNLANG_POSTSCRIPT2</dt>
+ <dd>Postscript Niveau 2 (requiert Ghostscript)</dd>
+ <dt>PRNLANG_POSTSCRIPT3</dt>
+ <dd>Postscript Niveau 3</dd>
+ <dt>PRNLANG_WINDOWSGDI</dt>
+ <dd>Windows GDI (disponible sur Microsoft Windows uniquement)</dd>
+ <dt>PRNLANG_PDF</dt>
+ <dd>Adobe PDF (disponible uniquement sur MacOS et les systèmes dérivés d'Unix)</dd>
+</dl>
+</td></tr></table>
+
</body>
</html>
+
Modified: trunk/Scribus/doc/en/scripterapi-Printer.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/doc/en/scripterapi-Printer.html
==============================================================================
--- trunk/Scribus/doc/en/scripterapi-Printer.html (original)
+++ trunk/Scribus/doc/en/scripterapi-Printer.html Sat Oct 3 22:57:53 2020
@@ -68,12 +68,15 @@
<dd><p>Name of printer to use.<br>
Default is 'File' for printing into file</p></dd>
+ <dt><strong>prnLanguage</strong> = <attribute 'prnLanguage' of 'Printer' objects></dt>
+ <dd><p>Print language to use.<br>
+One of PRNLANG_* constants. -- Default is PRNLANG_POSTSCRIPT3</p></dd>
+
<dt><strong>pslevel</strong> = <member 'pslevel' of 'Printer' objects></dt>
- <dd><p>PostScript Level<br>
-Can be 1 or 2 or 3 -- Default is 3.</p></dd>
+ <dd><p>Deprecated, use prnLanguage instead.</p></dd>
<dt><strong>separation</strong> = <attribute 'separation' of 'Printer' objects></dt>
- <dd><p>Print separationl<br>
+ <dd><p>Print separations<br>
'No' -- Default<br>
'All'<br>
'Cyan'<br>
Modified: trunk/Scribus/doc/en/scripterapi-constants.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/doc/en/scripterapi-constants.html
==============================================================================
--- trunk/Scribus/doc/en/scripterapi-constants.html (original)
+++ trunk/Scribus/doc/en/scripterapi-constants.html Sat Oct 3 22:57:53 2020
@@ -318,5 +318,21 @@
</dl>
</td></tr></table>
+<h4>Print languages</h4>
+<table><tr><td>
+<dl>
+ <dt>PRNLANG_POSTSCRIPT1</dt>
+ <dd>Postscript Level 1 (requires Ghostscript)</dd>
+ <dt>PRNLANG_POSTSCRIPT2</dt>
+ <dd>Postscript Level 2 (requires Ghostscript)</dd>
+ <dt>PRNLANG_POSTSCRIPT3</dt>
+ <dd>Postscript Level 3</dd>
+ <dt>PRNLANG_WINDOWSGDI</dt>
+ <dd>Windows GDI (available on Microsoft Windows only)</dd>
+ <dt>PRNLANG_PDF</dt>
+ <dd>Adobe PDF (available only on MacOS and *nix systems)</dd>
+</dl>
+</td></tr></table>
+
</body>
</html>
Modified: trunk/Scribus/doc/fr/scripterapi-Printer.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/doc/fr/scripterapi-Printer.html
==============================================================================
--- trunk/Scribus/doc/fr/scripterapi-Printer.html (original)
+++ trunk/Scribus/doc/fr/scripterapi-Printer.html Sat Oct 3 22:57:53 2020
@@ -68,12 +68,15 @@
<dd><p>Nom de l'imprimante à utiliser.<br>
La valeur par défaut est 'File' pour l'impression dans un fichier</p></dd>
+ <dt><strong>prnLanguage</strong> = <attribut 'prnLanguage' des objets 'Printer'></dt>
+ <dd><p>Langage d'impression à utiliser.<br>
+Une des constantes PRNLANG_*. La valeur par défaut est PRNLANG_POSTSCRIPT3.</p></dd>
+
<dt><strong>pslevel</strong> = <membre 'pslevel' des objets 'Printer'></dt>
- <dd><p>Niveau PostScript<br>
-Peut être 1 ou 2 ou 3 -- Valeur par défaut à 3.</p></dd>
+ <dd><p>Obsolète, veuillez utiliser prnLanguage à la place.</p></dd>
<dt><strong>separation</strong> = <attribut 'separation' des objets 'Printer'></dt>
- <dd><p>Imprimer la séparation<br>
+ <dd><p>Imprimer les séparations<br>
'No' -- Défaut<br>
'All'<br>
'Cyan'<br>
Modified: trunk/Scribus/doc/fr/scripterapi-constants.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/doc/fr/scripterapi-constants.html
==============================================================================
--- trunk/Scribus/doc/fr/scripterapi-constants.html (original)
+++ trunk/Scribus/doc/fr/scripterapi-constants.html Sat Oct 3 22:57:53 2020
@@ -66,7 +66,7 @@
</dl>
</td></tr></table>
-<h4>Définitions d'orientation de page :</h4>
+<h4>Constantes d'orientation de page :</h4>
<table><tr><td>
<dl>
<dt>PORTRAIT</dt>
@@ -193,7 +193,7 @@
</dl></td></tr>
</table>
-<h4>Réglages de la disposition du document :</h4>
+<h4>Constantes de disposition du document :</h4>
<table><tr><td>
<dl>
<dt>FACINGPAGES</dt>
@@ -207,7 +207,7 @@
</dl>
</td></tr></table>
-<h4>Réglages de l'alignement :</h4>
+<h4>Constantes d'alignement :</h4>
<table><tr><td>
<dl>
<dt>ALIGN_LEFT</dt>
@@ -223,7 +223,7 @@
</dl>
</td></tr></table>
-<h4>Réglages de l'alignement vertical :</h4>
+<h4>Constantes d'alignement vertical :</h4>
<table><tr><td>
<dl>
<dt>ALIGNV_TOP</dt>
@@ -303,7 +303,7 @@
</dl>
</td></tr></table>
-<h4>Alignement par TAB</h4>
+<h4>Constantes d'alignement par TAB</h4>
<table><tr><td>
<dl>
<dt>TAB_LEFT</dt>
@@ -314,6 +314,22 @@
</dl>
</td></tr></table>
+<h4>Constantes de language d'impression</h4>
+<table><tr><td>
+<dl>
+ <dt>PRNLANG_POSTSCRIPT1</dt>
+ <dd>Postscript Niveau 1 (requiert Ghostscript)</dd>
+ <dt>PRNLANG_POSTSCRIPT2</dt>
+ <dd>Postscript Niveau 2 (requiert Ghostscript)</dd>
+ <dt>PRNLANG_POSTSCRIPT3</dt>
+ <dd>Postscript Niveau 3</dd>
+ <dt>PRNLANG_WINDOWSGDI</dt>
+ <dd>Windows GDI (disponible sur Microsoft Windows uniquement)</dd>
+ <dt>PRNLANG_PDF</dt>
+ <dd>Adobe PDF (disponible uniquement sur MacOS et les systèmes dérivés d'Unix)</dd>
+</dl>
+</td></tr></table>
+
</body>
</html>
Modified: trunk/Scribus/doc/it/scripterapi-Printer.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/doc/it/scripterapi-Printer.html
==============================================================================
--- trunk/Scribus/doc/it/scripterapi-Printer.html (original)
+++ trunk/Scribus/doc/it/scripterapi-Printer.html Sat Oct 3 22:57:53 2020
@@ -1,89 +1,99 @@
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>Python: class Printer</title>
-</head>
-<body>
-<h2>Python: class Printer</h2>
-<p>
-<a name="Printer">class <strong>Printer</strong></a>(<a href="__builtin__.html#object">object</a>)
-</p>
-<hr />
-
-<p>Methods defined here:</p>
-<dd>
- <dt><a name="Printer-Print"><strong>Print</strong></a>(...)</dt>
- <dd><code>This method is deprecated - use <a href="#Printer-print">print</a>() instead.</code></dd>
-
- <dt><a name="Printer-__init__"><strong>__init__</strong></a>(...)</dt>
- <dd><code>x.<a href="#Printer-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</code></dd>
-
- <dt><a name="Printer-print"><strong>print</strong></a>(...)</dt>
- <dd><code>Prints selected pages.</code></dd>
-
-<hr>
-<p>Data and other attributes defined here:</p>
-<dd>
- <dt><strong>__new__</strong> = <built-in method __new__ of type object></dt>
- <dd><code>T.<a href="#Printer-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</code></dd>
-
- <dt><strong>allPrinters</strong> = <attribute 'allPrinters' of 'Printer' objects></dt>
- <dd><code>List of installed printers -- read only</code></dd>
-
- <dt><strong>cmd</strong> = <attribute 'cmd' of 'Printer' objects></dt>
- <dd><code>Alternative Printer Command</code></dd>
-
- <dt><strong>color</strong> = <member 'color' of 'Printer' objects></dt>
- <dd><code>Print in color.<br>
-True - color -- Default<br>
-False - greyscale</code></dd>
-
- <dt><strong>copies</strong> = <member 'copies' of 'Printer' objects></dt>
- <dd><code>Number of copies</code></dd>
-
- <dt><strong>file</strong> = <attribute 'file' of 'Printer' objects></dt>
- <dd><code>Name of file to print into</code></dd>
-
- <dt><strong>mph</strong> = <member 'mph' of 'Printer' objects></dt>
- <dd><code>Mirror Pages Horizontal<br>
-True<br>
-False -- Default</code></dd>
-
- <dt><strong>mpv</strong> = <member 'mpv' of 'Printer' objects></dt>
- <dd><code>Mirror Pages Vertical<br>
- True<br>
-False -- Default</code></dd>
-
- <dt><strong>pages</strong> = <attribute 'pages' of 'Printer' objects></dt>
- <dd><code>List of pages to be printed</code></dd>
-
- <dt><strong>printer</strong> = <attribute 'printer' of 'Printer' objects></dt>
- <dd><code>Name of printer to use.<br>
-Default is 'File' for printing into file</code></dd>
-
- <dt><strong>pslevel</strong> = <member 'pslevel' of 'Printer' objects></dt>
- <dd><code>PostScript Level<br>
-Can be 1 or 2 or 3 -- Default is 3.</code></dd>
-
- <dt><strong>separation</strong> = <attribute 'separation' of 'Printer' objects></dt>
- <dd><code>Print separationl<br>
- 'No' -- Default<br>
- 'All'<br>
- 'Cyan'<br>
- 'Magenta'<br>
- 'Yellow'<br>
- 'Black'<br>
-Beware of misspelling because a check is not performed</code></dd>
-
- <dt><strong>ucr</strong> = <member 'ucr' of 'Printer' objects></dt>
- <dd><code>Apply Under Color Removal<br>
-True -- Default<br>
-False</code></dd>
-
- <dt><strong>useICC</strong> = <member 'useICC' of 'Printer' objects></dt>
- <dd><code>Use ICC Profile<br>
-True<br>
-False -- Default</code></dd>
-
-</body>
-</html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>Python: class Printer</title>
+</head>
+
+<style>
+ at import "manual.css";
+</style>
+
+<body>
+<h2>Python: class Printer</h2>
+<p>
+<a name="Printer">class <strong>Printer</strong></a>(<a href="__builtin__.html#object">object</a>)
+</p>
+<hr />
+
+<p>Methods defined here:</p>
+<dl>
+ <dt><a name="Printer-Print"><strong>Print</strong></a>(...)</dt>
+ <dd><p>This method is deprecated - use <a href="#Printer-print">print</a>() instead.</p></dd>
+
+ <dt><a name="Printer-__init__"><strong>__init__</strong></a>(...)</dt>
+ <dd><p>x.<a href="#Printer-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</p></dd>
+
+ <dt><a name="Printer-print"><strong>print</strong></a>(...)</dt>
+ <dd><p>Prints selected pages.</p></dd>
+</dl>
+
+<hr/>
+
+<p>Data and other attributes defined here:</p>
+<dl>
+ <dt><strong>__new__</strong> = <built-in method __new__ of type object></dt>
+ <dd><p>T.<a href="#Printer-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</p></dd>
+
+ <dt><strong>allPrinters</strong> = <attribute 'allPrinters' of 'Printer' objects></dt>
+ <dd><p>List of installed printers -- read only</p></dd>
+
+ <dt><strong>cmd</strong> = <attribute 'cmd' of 'Printer' objects></dt>
+ <dd><p>Alternative Printer Command</p></dd>
+
+ <dt><strong>color</strong> = <member 'color' of 'Printer' objects></dt>
+ <dd><p>Print in color.<br>
+True - color -- Default<br>
+False - greyscale</p></dd>
+
+ <dt><strong>copies</strong> = <member 'copies' of 'Printer' objects></dt>
+ <dd><p>Number of copies</p></dd>
+
+ <dt><strong>file</strong> = <attribute 'file' of 'Printer' objects></dt>
+ <dd><p>Name of file to print into</p></dd>
+
+ <dt><strong>mph</strong> = <member 'mph' of 'Printer' objects></dt>
+ <dd><p>Mirror Pages Horizontal<br>
+True<br>
+False -- Default</p></dd>
+
+ <dt><strong>mpv</strong> = <member 'mpv' of 'Printer' objects></dt>
+ <dd><p>Mirror Pages Vertical<br>
+ True<br>
+False -- Default</p></dd>
+
+ <dt><strong>pages</strong> = <attribute 'pages' of 'Printer' objects></dt>
+ <dd><p>List of pages to be printed</p></dd>
+
+ <dt><strong>printer</strong> = <attribute 'printer' of 'Printer' objects></dt>
+ <dd><p>Name of printer to use.<br>
+Default is 'File' for printing into file</p></dd>
+
+ <dt><strong>prnLanguage</strong> = <attribute 'prnLanguage' of 'Printer' objects></dt>
+ <dd><p>Print language to use.<br>
+One of PRNLANG_* constants. -- Default is PRNLANG_POSTSCRIPT3</p></dd>
+
+ <dt><strong>pslevel</strong> = <member 'pslevel' of 'Printer' objects></dt>
+ <dd><p>Deprecated, use prnLanguage instead.</p></dd>
+
+ <dt><strong>separation</strong> = <attribute 'separation' of 'Printer' objects></dt>
+ <dd><p>Print separations<br>
+ 'No' -- Default<br>
+ 'All'<br>
+ 'Cyan'<br>
+ 'Magenta'<br>
+ 'Yellow'<br>
+ 'Black'<br>
+Beware of misspelling because a check is not performed</p></dd>
+
+ <dt><strong>ucr</strong> = <member 'ucr' of 'Printer' objects></dt>
+ <dd><p>Apply Under Color Removal<br>
+True -- Default<br>
+False</p></dd>
+
+ <dt><strong>useICC</strong> = <member 'useICC' of 'Printer' objects></dt>
+ <dd><p>Use ICC Profile<br>
+True<br>
+False -- Default</p></dd>
+</dl>
+</body>
+</html>
Modified: trunk/Scribus/doc/it/scripterapi-constants.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/doc/it/scripterapi-constants.html
==============================================================================
--- trunk/Scribus/doc/it/scripterapi-constants.html (original)
+++ trunk/Scribus/doc/it/scripterapi-constants.html Sat Oct 3 22:57:53 2020
@@ -1,241 +1,241 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>Predefined Constants</title>
+ <title>Constantes prédéfinies</title>
</head>
-<style>
- at import "manual.css";
-</style>
<body>
-<h2>Predefined Constants</h2>
-
-<p>There are some Constants defined to help using the Commands: </p>
-
-<h4>Scribus Version:</h4>
- <p>The script interface provides two variables containing the current Scribus version in the <code>scribus</code> module. Scripts can use these variables to check that they're running under the version of Scribus they expect, and to report information about incompatibilities to the user. These two variables, <code>scribus_version</code> and <code>scribus_version_info</code>, were added in 1.2.1 and 1.3.0svn and will not be present in earlier versions. If you need to, you can check for their presence with <code>hasattr(scribus, 'scribus_version')</code>.</p>
- <p><code>scribus_version</code> contains the current Scribus version as a string. It will usually look like <code>'1.2.1svn'</code> or <code>'1.3.0'</code>, for example, but is not guaranteed to always follow that format. This variable is useful when you need to display the version to the user, for example when reporting an incompatibility. Do not parse or compare this variable, that is what <code>scribus_version_info</code> is for.</p>
- <p><code>scribus_version_info</code> is a tuple similar to the <code>sys.version_info</code> tuple provided by Python. It is a tuple of the form (majorversion, minorversion, patchlevel, extraversion, build) for example, 1.2.1svn will have <code>(1,2,1,'svn',0)</code> and 1.3.2 will have <code>(1,3,2,'',0)</code> . These tuples are ideal for checking for minimum versions, etc, because Python compares tuples element-by-element, left-to-right. For example:</p>
+<h2>Constantes prédéfinies</h2>
+
+<p>Des constantes sont définies pour aider à utiliser les commandes: </p>
+
+<h4>Version Scribus :</h4>
+ <p>L'interface de script fournit deux variables contenant la version
+courante de Scribus dans le module <code>Scribus</code>. Les scripts peuvent utiliser ces variables pour vérifier qu'ils tournent sous la bonne version de Scribus et pour informer l'utilisateur d'éventuelles incompatibilités. Ces
+deux variables, <code>scribus_version</code> et
+<code>scribus_version_info</code>, ont été ajoutées dans les versions
+1.2.1 et 1.3.0cvs et sont absentes des versions
+précédentes. Si nécessaire, vous pouvez vérifier leur présence avec <code>hasattr(scribus, 'scribus_version')</code>.</p>
+ <p><code>scribus_version</code> est une chaîne qui contient la version courante de Scribus. Sa valeur ressemble habituellement à <code>'1.2.1cvs'</code> ou <code>'1.3.0'</code>, par exemple, mais il n'est pas garanti que le format sera toujours le même. Cette
+variable est utile pour afficher la version à l'utilisateur, par exemple pour signaler une incompatibilité. N'analysez pas et ne comparez pas cette variable, car <code>scribus_version_info</code> est fait pour cela.</p>
+ <p><code>scribus_version_info</code> est un vecteur semblable au vecteur <code>sys.version_info</code> fourni par Python.
+C'est un vecteur de la forme (majorversion, minorversion, patchlevel,
+extraversion, build), par exemple 1.2.1cvs correspond Ã
+<code>(1,2,1,'cvs',0)</code> et 1.3.2 correspond à <code>(1,3,2,'',0)</code> . Ces vecteurs sont idéaux pour vérifier les versions minimum, etc., parce que Python compare les vecteurs élément par élément, de gauche à droite. Par exemple :</p>
<pre>
if scribus.scribus_version_info[:3] < (1,2,2):
- messageBox("Scribus - Python script",
- "This script requires Scribus 1.2.2 or newer. "+"You're running %s." % scribus.scribus_version, scribus.ICON_CRITICAL)
+ messageBox("Scribus - script Python",
+ "Ce script requiert 1.2.2 ou plus récent."+\
+ "Vous roulez %s." % scribus.scribus_version,
+ ICON_CRITICAL)
sys.exit()
</pre>
-<p><em>Note that if you are using this style of import statement:</em></p>
-<pre>import scribus</pre>
-<p>you will need to add a prefix to these predefined constants, for example, <strong>scribus.ICON_CRITICAL</strong>.</p>
-
-
-<h4>Unit Enumeration Constants: </h4>
+
+<h4>Constantes d'énumération d'unités : </h4>
<table><tr><td>
<dl>
<dt>UNIT_POINTS</dt>
- <dd>Measurement Unit Point = 0</dd>
+ <dd>Unité de mesure point = 0</dd>
<dt>UNIT_MILLIMETERS</dt>
- <dd>Measurement Unit Millimeter = 1</dd>
+ <dd>Unité de mesure millimètre = 1</dd>
<dt>UNIT_INCHES</dt>
- <dd>Measurement Unit Inch = 2</dd>
+ <dd>Unité de mesure pouce = 2</dd>
<dt>UNIT_PICAS</dt>
- <dd>Measurement Unit Pica = 3</dd>
-</dl>
-</td></tr></table>
-
-<h4>Unit Conversion Constants</h4>
-
-<p>These conversion factors can be used to convert units to and from points.
-Thus, to convert inches to points, you can simply write 'value/inch', to
-convert points to inches you write 'value*inch', and to convert inches to mm
-you write 'value*mm/inch' .</p>
+ <dd>Unité de mesure pica = 3</dd>
+</dl>
+</td></tr></table>
+
+<h4>Constantes de conversion d'unités</h4>
+
+<p>Ces facteurs de conversion peuvent être utilisés pour convertir les unités en points et vice versa.
+Ainsi, pour convertir les pouces en points, il suffit d'écrire 'valeur/inch'; pour convertir les points en pouces vous écrirez 'valeur*inch', et pour convertir les pouces en mm vous écrirez 'valeur*mm/inch'.</p>
<table><tr><td>
<dl>
<dt>pt</dt>
- <dd>points in 1 pt</dd>
+ <dd>points dans 1 pt</dd>
<dt>inch</dt>
- <dd>inches in 1 pt</dt>
+ <dd>pouces dans 1 pt</dt>
<dt>p</dt>
- <dd>pica in 1 pt</dd>
+ <dd>pica dans 1 pt</dd>
<dt>cm<dt>
- <dd>centimetres in 1 pt</dd>
+ <dd>centimètres dans 1 pt</dd>
<dt>mm</dt>
- <dd>millimetres in 1 pt</dd>
+ <dd>millimètres dans 1 pt</dd>
<dt>...</dt>
- <dd>Other constants will be provided if the Scribus core knows about them.</dd>
-</dl>
-</td></tr></table>
-
-<h4>Page Orientation Definitions: </h4>
+ <dd>D'autres constantes seront fournies si le coeur de Scribus les reconnaît.</dd>
+</dl>
+</td></tr></table>
+
+<h4>Constantes d'orientation de page :</h4>
<table><tr><td>
<dl>
<dt>PORTRAIT</dt>
- <dd>Page orientation Portrait = 0</dd>
+ <dd>Orientation Portrait = 0</dd>
<dt>LANDSCAPE</dt>
- <dd>Page orientation Landscape = 1</dd>
-</dl>
-</td></tr></table>
-
-<h4>Definitions for Page Formats: </h4>
-<p>If you are using these, it's important to understand that these constants are simply tuples of these specific numbers. There are now two sets of these constants for A and B series of paper formats.</p>
-<p>The original set, such as PAPER_A4, is used when a document is created with points units. Now you can also use the similarly named PAPER_A4_MM when you are using millimeters as the page units. As before, they must be used with the appropriate constant, either UNIT_POINTS or UNIT_MILLIMETERS. What you can then do, for example, is use them to create a document in points, then switch the units of the document with the setUnit() command.</p>
+ <dd>Orientation Landscape = 1</dd>
+</dl>
+</td></tr></table>
+
+<h4>Réglages de format de page : </h4>
<table><tr>
<td>
<dl>
<dt>PAPER_A0</dt>
- <dd>Paper format A0 = 2380 x 3368 Points</dd>
+ <dd>Format papier A0 = 2380 x 3368 Points</dd>
<dt>PAPER_A1</dt>
- <dd>Paper format A1 = 1684 x 2380 Points</dd>
+ <dd>Format papier A1 = 1684 x 2380 Points</dd>
<dt>PAPER_A2</dt>
- <dd>Paper format A2 = 1190 x 1684 Points</dd>
+ <dd>Format papier A2 = 1190 x 1684 Points</dd>
<dt>PAPER_A3</dt>
- <dd>Paper format A3 = 842 x 1190 Points</dd>
+ <dd>Format papier A3 = 842 x 1190 Points</dd>
<dt>PAPER_A4</dt>
- <dd>Paper format A4 = 595 x 842 Points</dd>
+ <dd>Format papier A4 = 595 x 842 Points</dd>
<dt>PAPER_A5</dt>
- <dd>Paper format A5 = 421 x 595 Points</dd>
+ <dd>Format papier A5 = 421 x 595 Points</dd>
<dt>PAPER_A6</dt>
- <dd>Paper format A6 = 297 x 421 Points</dd>
+ <dd>Format papier A6 = 297 x 421 Points</dd>
<dt>PAPER_A7</dt>
- <dd>Paper format A7 = 210 x 297 Points</dd>
+ <dd>Format papier A7 = 210 x 297 Points</dd>
<dt>PAPER_A8</dt>
- <dd>Paper format A8 = 148 x 210 Points</dd>
+ <dd>Format papier A8 = 148 x 210 Points</dd>
<dt>PAPER_A9</dt>
- <dd>Paper format A9 = 105 x 148 Points</dd></dl></td>
+ <dd>Format papier A9 = 105 x 148 Points</dd></dl></td>
<td>
<dl>
<dt>PAPER_A0_MM</dt>
- <dd>Paper format A0 = 841 x 1189 Millimeters</dd>
+ <dd>Format papier A0 = 841 x 1189 Millimètres</dd>
<dt>PAPER_A1_MM</dt>
- <dd>Paper format A1 = 594 x 841 Millimeters</dd>
+ <dd>Format papier A1 = 594 x 841 Millimètres</dd>
<dt>PAPER_A2_MM</dt>
- <dd>Paper format A2 = 420 x 594 Millimeters</dd>
+ <dd>Format papier A2 = 420 x 594 Millimètres</dd>
<dt>PAPER_A3_MM</dt>
- <dd>Paper format A3 = 297 x 420 Millimeters</dd>
+ <dd>Format papier A3 = 297 x 420 Millimètres</dd>
<dt>PAPER_A4_MM</dt>
- <dd>Paper format A4 = 210 x 297 Millimeters</dd>
+ <dd>Format papier A4 = 210 x 297 Millimètres</dd>
<dt>PAPER_A5_MM</dt>
- <dd>Paper format A5 = 148 x 210 Millimeters</dd>
+ <dd>Format papier A5 = 148 x 210 Millimètres</dd>
<dt>PAPER_A6_MM</dt>
- <dd>Paper format A6 = 105 x 148 Millimeters</dd>
+ <dd>Format papier A6 = 105 x 148 Millimètres</dd>
<dt>PAPER_A7_MM</dt>
- <dd>Paper format A7 = 74 x 105 Millimeters</dd>
+ <dd>Format papier A7 = 74 x 105 Millimètres</dd>
<dt>PAPER_A8_MM</dt>
- <dd>Paper format A8 = 52 x 74 Millimeters</dd>
+ <dd>Format papier A8 = 52 x 74 Millimètres</dd>
<dt>PAPER_A9_MM</dt>
- <dd>Paper format A9 = 37 x 52 Millimeters</dd></dl></td></tr>
+ <dd>Format papier A9 = 37 x 52 Millimètres</dd></dl></td></tr>
<tr><td>
<dl>
<dt>PAPER_B0</dt>
- <dd>Paper format B0 = 2836 x 4008 Points</dd>
+ <dd>Format papier B0 = 2836 x 4008 Points</dd>
<dt>PAPER_B1</dt>
- <dd>Paper format B1 = 2004 x 2836 Points</dd>
+ <dd>Format papier B1 = 2004 x 2836 Points</dd>
<dt>PAPER_B2</dt>
- <dd>Paper format B2 = 1418 x 2004 Points</dd>
+ <dd>Format papier B2 = 1418 x 2004 Points</dd>
<dt>PAPER_B3</dt>
- <dd>Paper format B3 = 1002 x 1418 Points</dd>
+ <dd>Format papier B3 = 1002 x 1418 Points</dd>
<dt>PAPER_B4</dt>
- <dd>Paper format B4 = 709 x 1002 Points</dd>
+ <dd>Format papier B4 = 709 x 1002 Points</dd>
<dt>PAPER_B5</dt>
- <dd>Paper format B5 = 501 x 709 Points</dd>
+ <dd>Format papier B5 = 501 x 709 Points</dd>
<dt>PAPER_B6</dt>
- <dd>Paper format B6 = 355 x 501 Points</dd>
+ <dd>Format papier B6 = 355 x 501 Points</dd>
<dt>PAPER_B7</dt>
- <dd>Paper format B7 = 250 x 355 Points</dd>
+ <dd>Format papier B7 = 250 x 355 Points</dd>
<dt>PAPER_B8</dt>
- <dd>Paper format B8 = 178 x 250 Points</dd>
+ <dd>Format papier B8 = 178 x 250 Points</dd>
<dt>PAPER_B9</dt>
- <dd>Paper format B9 = 125 x 178 Points</dd>
+ <dd>Format papier B9 = 125 x 178 Points</dd>
<dt>PAPER_B10</dt>
- <dd>Paper format B10 = 89 x 125 Points</dd></dl></td>
+ <dd>Format papier B10 = 89 x 125 Points</dd></dl></td>
<td>
<dl>
<dt>PAPER_B0_MM</dt>
- <dd>Paper format B0 = 1000 x 1414 Millimeters</dd>
+ <dd>Format papier B0 = 1000 x 1414 Millimètres</dd>
<dt>PAPER_B1_MM</dt>
- <dd>Paper format B1 = 707 x 1000 Millimeters</dd>
+ <dd>Format papier B1 = 707 x 1000 Millimètres</dd>
<dt>PAPER_B2_MM</dt>
- <dd>Paper format B2 = 500 x 707 Millimeters</dd>
+ <dd>Format papier B2 = 500 x 707 Millimètres</dd>
<dt>PAPER_B3_MM</dt>
- <dd>Paper format B3 = 353 x 500 Millimeters</dd>
+ <dd>Format papier B3 = 353 x 500 Millimètres</dd>
<dt>PAPER_B4_MM</dt>
- <dd>Paper format B4 = 250 x 353 Millimeters</dd>
+ <dd>Format papier B4 = 250 x 353 Millimètres</dd>
<dt>PAPER_B5_MM</dt>
- <dd>Paper format B5 = 176 x 250 Millimeters</dd>
+ <dd>Format papier B5 = 176 x 250 Millimètres</dd>
<dt>PAPER_B6_MM</dt>
- <dd>Paper format B6 = 125 x 176 Millimeters</dd>
+ <dd>Format papier B6 = 125 x 176 Millimètres</dd>
<dt>PAPER_B7_MM</dt>
- <dd>Paper format B7 = 88 x 125 Millimeters</dd>
+ <dd>Format papier B7 = 88 x 125 Millimètres</dd>
<dt>PAPER_B8_MM</dt>
- <dd>Paper format B8 = 62 x 88 Millimeters</dd>
+ <dd>Format papier B8 = 62 x 88 Millimètres</dd>
<dt>PAPER_B9_MM</dt>
- <dd>Paper format B9 = 44 x 62 Millimeters</dd>
+ <dd>Format papier B9 = 44 x 62 Millimètres</dd>
<dt>PAPER_B10_MM</dt>
- <dd>Paper format B10 = 31 x 44 Millimeters</dd></dl></td></tr>
+ <dd>Format papier B10 = 31 x 44 Millimètres</dd></dl></td></tr>
<tr><td>
<dl>
<dt>PAPER_C5E</dt>
- <dd>Paper format C5E = 462 x 649 Points</dd>
+ <dd>Format papier C5E = 462 x 649 Points</dd>
<dt>PAPER_COMM10E</dt>
- <dd>Paper format Comm10E = 298 x 683 Points</dd>
+ <dd>Format papier Comm10E = 298 x 683 Points</dd>
<dt>PAPER_DLE</dt>
- <dd>Paper format DLE = 312 x 624 Points</dd>
+ <dd>Format papier DLE = 312 x 624 Points</dd>
<dt>PAPER_EXECUTIVE</dt>
- <dd>Paper format Executive = 542 x 720 Points</dd>
+ <dd>Format papier Executive = 542 x 720 Points</dd>
<dt>PAPER_FOLIO</dt>
- <dd>Paper format Folio = 595 x 935 Points</dd>
+ <dd>Format papier Folio = 595 x 935 Points</dd>
<dt>PAPER_LEDGER</dt>
- <dd>Paper format Ledger = 1224 x 792 Points</dd>
+ <dd>Format papier Ledger = 1224 x 792 Points</dd>
<dt>PAPER_LEGAL</dt>
- <dd>Paper format Legal = 612 x 1008 Points</dd>
+ <dd>Format papier Legal = 612 x 1008 Points</dd>
<dt>PAPER_LETTER</dt>
- <dd>Paper format Letter = 612 x 792 Points</dd>
+ <dd>Format papier Letter = 612 x 792 Points</dd>
<dt>PAPER_TABLOID</dt>
- <dd>Paper format Tabloid = 792 x 1224 Points</dd>
+ <dd>Format papier Tabloid = 792 x 1224 Points</dd>
</dl></td></tr>
</table>
-<h4>Definitions for Document Layout:</h4>
+<h4>Constantes de disposition du document :</h4>
<table><tr><td>
<dl>
<dt>FACINGPAGES</dt>
- <dd>Layout with facing Pages.</dd>
+ <dd>Disposition avec des pages en regard.</dd>
<dt>NOFACINGPAGES</dt>
- <dd>Normal Layout of the Document.</dd>
+ <dd>Disposition normale du document.</dd>
<dt>FIRSTPAGELEFT</dt>
- <dd>The first Page of the Document is a left Page.</dd>
+ <dd>La première page du document est une page de droite.</dd>
<dt>FIRSTPAGERIGHT</dt>
- <dd>The first Page of the Document is a right Page.</dd>
-</dl>
-</td></tr></table>
-
-<h4>Alignment Definitions: </h4>
+ <dd>La première page du document est une première de droite.</dd>
+</dl>
+</td></tr></table>
+
+<h4>Constantes d'alignement :</h4>
<table><tr><td>
<dl>
<dt>ALIGN_LEFT</dt>
- <dd>Text is aligned to the Left.</dd>
+ <dd>Le texte est aligné à gauche.</dd>
<dt>ALIGN_CENTERED</dt>
- <dd>The Text is centered in the Textframe.</dd>
+ <dd>Le texte est centré dans le cadre de texte.</dd>
<dt>ALIGN_RIGHT</dt>
- <dd>The Text is aligned to the Right Side of the Textframe</dd>
+ <dd>Le texte est aligné sur le côté droit du cadre de texte.</dd>
<dt>ALIGN_FORCED</dt>
- <dd>The Text has forced Alignment</dd>
+ <dd>Le texte a un alignement forcé.</dd>
<dt>ALIGN_BLOCK</dt>
- <dd>The Text has block Alignment</dd>
-</dl>
-</td></tr></table>
-
-<h4>Vertical alignment Definitions: </h4>
+ <dd>Le texte a un alignement bloqué.</dd>
+</dl>
+</td></tr></table>
+
+<h4>Constantes d'alignement vertical :</h4>
<table><tr><td>
<dl>
<dt>ALIGNV_TOP</dt>
- <dd>Text is aligned vertically to the top.</dd>
+ <dd>Le texte est aligné verticalement en haut.</dd>
<dt>ALIGNV_CENTERED</dt>
- <dd>Text is aligned vertically to the center.</dd>
+ <dd>Le texte est aligné verticalement au centre.</dd>
<dt>ALIGNV_BOTTOM</dt>
- <dd>Text is aligned vertically to the bottom.</dd>
-</dl>
-</td></tr></table>
-
-<h4>Line related Definitions: </h4>
+ <dd>Le texte est aligné verticalement en bas.</dd>
+</dl>
+</td></tr></table>
+
+<h4>Réglages relatifs aux lignes :</h4>
<table><tr><td>
<dl>
<dt>LINE_DASH</dt>
@@ -254,11 +254,23 @@
</dl>
</td></tr></table>
-<h4>Fill related Definitions: </h4>
+<h4>Définitions d'espaces de couleur: </h4>
+<table><tr><td>
+<dl>
+ <dt>CSPACE_UNDEFINED</dt>
+ <dt>CSPACE_RGB</dt>
+ <dt>CSPACE_CMYK</dt>
+ <dt>CSPACE_GRAY</dt>
+ <dt>CSPACE_DUOTONE</dt>
+ <dt>CSPACE_MONOCHROME</dt>
+</dl>
+</td></tr></table>
+
+<h4>Réglages relatifs au fond :</h4>
<table><tr><td>
<dl>
<dt>FILL_NOG</dt>
- <dd>No gradient, plain color</dd>
+ <dd>Pas de dégradé, couleur unie</dd>
<dt>FILL_HORIZONTALG</dt>
<dt>FILL_VERTICALG</dt>
<dt>FILL_DIAGONALG</dt>
@@ -267,25 +279,21 @@
</dl>
</td></tr></table>
-<h4>Dialog Buttons</h4>
-<p>
-<table>
-<tr><td><strong>Button Type</strong></td><td><strong>Return Value</strong></td></tr>
-<tr> <td>BUTTON_ABORT</td><td>262144</td></tr>
-<tr> <td>BUTTON_CANCEL</td><td>4194304</td></tr>
- <tr><td>BUTTON_IGNORE</td><td>1048576</td></tr>
- <tr><td>BUTTON_NO</td><td>65536</td></tr>
- <tr><td>BUTTON_NONE</td><td>N/A</td></tr>
- <tr><td>BUTTON_OK</td><td>1024</td></tr>
- <tr><td>BUTTON_RETRY</td><td>524288</td></tr>
- <tr><td>BUTTON_YES</td><td>16384</td></tr>
-</table></p>
-
-<p>There is also a hierarchy of buttons in terms of how they appear in the dialogs, with this ordering, left to right:</p>
-<p>BUTTON_YES, BUTTON_NO, BUTTON_OK, BUTTON_RETRY, BUTTON_IGNORE, BUTTON_ABORT, BUTTON_CANCEL</p>
-<p>For example, even if you assign CANCEL to button1, RETRY to button2, and YES to button3, they will appear YES, RETRY, and CANCEL left to right in the dialog.</p>
-
-<h4>Dialog Icons</h4>
+<h4>Boutons de dialogue</h4>
+<table><tr><td>
+<dl>
+ <dt>BUTTON_ABORT</dt>
+ <dt>BUTTON_CANCEL</dt>
+ <dt>BUTTON_IGNORE</dt>
+ <dt>BUTTON_NO</dt>
+ <dt>BUTTON_NONE</dt>
+ <dt>BUTTON_OK</dt>
+ <dt>BUTTON_RETRY</dt>
+ <dt>BUTTON_YES</dt>
+</dl>
+</td></tr></table>
+
+<h4>Icônes de dialogue</h4>
<table><tr><td>
<dl>
<dt>ICON_CRITICAL</dt>
@@ -295,7 +303,7 @@
</dl>
</td></tr></table>
-<h4>Tab alignment</h4>
+<h4>Constantes d'alignement par TAB</h4>
<table><tr><td>
<dl>
<dt>TAB_LEFT</dt>
@@ -306,5 +314,22 @@
</dl>
</td></tr></table>
+<h4>Constantes de language d'impression</h4>
+<table><tr><td>
+<dl>
+ <dt>PRNLANG_POSTSCRIPT1</dt>
+ <dd>Postscript Niveau 1 (requiert Ghostscript)</dd>
+ <dt>PRNLANG_POSTSCRIPT2</dt>
+ <dd>Postscript Niveau 2 (requiert Ghostscript)</dd>
+ <dt>PRNLANG_POSTSCRIPT3</dt>
+ <dd>Postscript Niveau 3</dd>
+ <dt>PRNLANG_WINDOWSGDI</dt>
+ <dd>Windows GDI (disponible sur Microsoft Windows uniquement)</dd>
+ <dt>PRNLANG_PDF</dt>
+ <dd>Adobe PDF (disponible uniquement sur MacOS et les systèmes dérivés d'Unix)</dd>
+</dl>
+</td></tr></table>
+
</body>
</html>
+
Modified: trunk/Scribus/doc/ru/scripterapi-Printer.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/doc/ru/scripterapi-Printer.html
==============================================================================
--- trunk/Scribus/doc/ru/scripterapi-Printer.html (original)
+++ trunk/Scribus/doc/ru/scripterapi-Printer.html Sat Oct 3 22:57:53 2020
@@ -68,12 +68,15 @@
<dd><p>Name of printer to use.<br>
Default is 'File' for printing into file</p></dd>
+ <dt><strong>prnLanguage</strong> = <attribute 'prnLanguage' of 'Printer' objects></dt>
+ <dd><p>Print language to use.<br>
+One of PRNLANG_* constants. -- Default is PRNLANG_POSTSCRIPT3</p></dd>
+
<dt><strong>pslevel</strong> = <member 'pslevel' of 'Printer' objects></dt>
- <dd><p>PostScript Level<br>
-Can be 1 or 2 or 3 -- Default is 3.</p></dd>
+ <dd><p>Deprecated, use prnLanguage instead.</p></dd>
<dt><strong>separation</strong> = <attribute 'separation' of 'Printer' objects></dt>
- <dd><p>Print separationl<br>
+ <dd><p>Print separations<br>
'No' -- Default<br>
'All'<br>
'Cyan'<br>
Modified: trunk/Scribus/doc/ru/scripterapi-constants.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/doc/ru/scripterapi-constants.html
==============================================================================
--- trunk/Scribus/doc/ru/scripterapi-constants.html (original)
+++ trunk/Scribus/doc/ru/scripterapi-constants.html Sat Oct 3 22:57:53 2020
@@ -1,241 +1,241 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>Predefined Constants</title>
+ <title>Constantes prédéfinies</title>
</head>
-<style>
- at import "manual.css";
-</style>
<body>
-<h2>Predefined Constants</h2>
-
-<p>There are some Constants defined to help using the Commands: </p>
-
-<h4>Scribus Version:</h4>
- <p>The script interface provides two variables containing the current Scribus version in the <code>scribus</code> module. Scripts can use these variables to check that they're running under the version of Scribus they expect, and to report information about incompatibilities to the user. These two variables, <code>scribus_version</code> and <code>scribus_version_info</code>, were added in 1.2.1 and 1.3.0svn and will not be present in earlier versions. If you need to, you can check for their presence with <code>hasattr(scribus, 'scribus_version')</code>.</p>
- <p><code>scribus_version</code> contains the current Scribus version as a string. It will usually look like <code>'1.2.1svn'</code> or <code>'1.3.0'</code>, for example, but is not guaranteed to always follow that format. This variable is useful when you need to display the version to the user, for example when reporting an incompatibility. Do not parse or compare this variable, that is what <code>scribus_version_info</code> is for.</p>
- <p><code>scribus_version_info</code> is a tuple similar to the <code>sys.version_info</code> tuple provided by Python. It is a tuple of the form (majorversion, minorversion, patchlevel, extraversion, build) for example, 1.2.1svn will have <code>(1,2,1,'svn',0)</code> and 1.3.2 will have <code>(1,3,2,'',0)</code> . These tuples are ideal for checking for minimum versions, etc, because Python compares tuples element-by-element, left-to-right. For example:</p>
+<h2>Constantes prédéfinies</h2>
+
+<p>Des constantes sont définies pour aider à utiliser les commandes: </p>
+
+<h4>Version Scribus :</h4>
+ <p>L'interface de script fournit deux variables contenant la version
+courante de Scribus dans le module <code>Scribus</code>. Les scripts peuvent utiliser ces variables pour vérifier qu'ils tournent sous la bonne version de Scribus et pour informer l'utilisateur d'éventuelles incompatibilités. Ces
+deux variables, <code>scribus_version</code> et
+<code>scribus_version_info</code>, ont été ajoutées dans les versions
+1.2.1 et 1.3.0cvs et sont absentes des versions
+précédentes. Si nécessaire, vous pouvez vérifier leur présence avec <code>hasattr(scribus, 'scribus_version')</code>.</p>
+ <p><code>scribus_version</code> est une chaîne qui contient la version courante de Scribus. Sa valeur ressemble habituellement à <code>'1.2.1cvs'</code> ou <code>'1.3.0'</code>, par exemple, mais il n'est pas garanti que le format sera toujours le même. Cette
+variable est utile pour afficher la version à l'utilisateur, par exemple pour signaler une incompatibilité. N'analysez pas et ne comparez pas cette variable, car <code>scribus_version_info</code> est fait pour cela.</p>
+ <p><code>scribus_version_info</code> est un vecteur semblable au vecteur <code>sys.version_info</code> fourni par Python.
+C'est un vecteur de la forme (majorversion, minorversion, patchlevel,
+extraversion, build), par exemple 1.2.1cvs correspond Ã
+<code>(1,2,1,'cvs',0)</code> et 1.3.2 correspond à <code>(1,3,2,'',0)</code> . Ces vecteurs sont idéaux pour vérifier les versions minimum, etc., parce que Python compare les vecteurs élément par élément, de gauche à droite. Par exemple :</p>
<pre>
if scribus.scribus_version_info[:3] < (1,2,2):
- messageBox("Scribus - Python script",
- "This script requires Scribus 1.2.2 or newer. "+"You're running %s." % scribus.scribus_version, scribus.ICON_CRITICAL)
+ messageBox("Scribus - script Python",
+ "Ce script requiert 1.2.2 ou plus récent."+\
+ "Vous roulez %s." % scribus.scribus_version,
+ ICON_CRITICAL)
sys.exit()
</pre>
-<p><em>Note that if you are using this style of import statement:</em></p>
-<pre>import scribus</pre>
-<p>you will need to add a prefix to these predefined constants, for example, <strong>scribus.ICON_CRITICAL</strong>.</p>
-
-
-<h4>Unit Enumeration Constants: </h4>
+
+<h4>Constantes d'énumération d'unités : </h4>
<table><tr><td>
<dl>
<dt>UNIT_POINTS</dt>
- <dd>Measurement Unit Point = 0</dd>
+ <dd>Unité de mesure point = 0</dd>
<dt>UNIT_MILLIMETERS</dt>
- <dd>Measurement Unit Millimeter = 1</dd>
+ <dd>Unité de mesure millimètre = 1</dd>
<dt>UNIT_INCHES</dt>
- <dd>Measurement Unit Inch = 2</dd>
+ <dd>Unité de mesure pouce = 2</dd>
<dt>UNIT_PICAS</dt>
- <dd>Measurement Unit Pica = 3</dd>
-</dl>
-</td></tr></table>
-
-<h4>Unit Conversion Constants</h4>
-
-<p>These conversion factors can be used to convert units to and from points.
-Thus, to convert inches to points, you can simply write 'value/inch', to
-convert points to inches you write 'value*inch', and to convert inches to mm
-you write 'value*mm/inch' .</p>
+ <dd>Unité de mesure pica = 3</dd>
+</dl>
+</td></tr></table>
+
+<h4>Constantes de conversion d'unités</h4>
+
+<p>Ces facteurs de conversion peuvent être utilisés pour convertir les unités en points et vice versa.
+Ainsi, pour convertir les pouces en points, il suffit d'écrire 'valeur/inch'; pour convertir les points en pouces vous écrirez 'valeur*inch', et pour convertir les pouces en mm vous écrirez 'valeur*mm/inch'.</p>
<table><tr><td>
<dl>
<dt>pt</dt>
- <dd>points in 1 pt</dd>
+ <dd>points dans 1 pt</dd>
<dt>inch</dt>
- <dd>inches in 1 pt</dt>
+ <dd>pouces dans 1 pt</dt>
<dt>p</dt>
- <dd>pica in 1 pt</dd>
+ <dd>pica dans 1 pt</dd>
<dt>cm<dt>
- <dd>centimetres in 1 pt</dd>
+ <dd>centimètres dans 1 pt</dd>
<dt>mm</dt>
- <dd>millimetres in 1 pt</dd>
+ <dd>millimètres dans 1 pt</dd>
<dt>...</dt>
- <dd>Other constants will be provided if the Scribus core knows about them.</dd>
-</dl>
-</td></tr></table>
-
-<h4>Page Orientation Definitions: </h4>
+ <dd>D'autres constantes seront fournies si le coeur de Scribus les reconnaît.</dd>
+</dl>
+</td></tr></table>
+
+<h4>Constantes d'orientation de page :</h4>
<table><tr><td>
<dl>
<dt>PORTRAIT</dt>
- <dd>Page orientation Portrait = 0</dd>
+ <dd>Orientation Portrait = 0</dd>
<dt>LANDSCAPE</dt>
- <dd>Page orientation Landscape = 1</dd>
-</dl>
-</td></tr></table>
-
-<h4>Definitions for Page Formats: </h4>
-<p>If you are using these, it's important to understand that these constants are simply tuples of these specific numbers. There are now two sets of these constants for A and B series of paper formats.</p>
-<p>The original set, such as PAPER_A4, is used when a document is created with points units. Now you can also use the similarly named PAPER_A4_MM when you are using millimeters as the page units. As before, they must be used with the appropriate constant, either UNIT_POINTS or UNIT_MILLIMETERS. What you can then do, for example, is use them to create a document in points, then switch the units of the document with the setUnit() command.</p>
+ <dd>Orientation Landscape = 1</dd>
+</dl>
+</td></tr></table>
+
+<h4>Réglages de format de page : </h4>
<table><tr>
<td>
<dl>
<dt>PAPER_A0</dt>
- <dd>Paper format A0 = 2380 x 3368 Points</dd>
+ <dd>Format papier A0 = 2380 x 3368 Points</dd>
<dt>PAPER_A1</dt>
- <dd>Paper format A1 = 1684 x 2380 Points</dd>
+ <dd>Format papier A1 = 1684 x 2380 Points</dd>
<dt>PAPER_A2</dt>
- <dd>Paper format A2 = 1190 x 1684 Points</dd>
+ <dd>Format papier A2 = 1190 x 1684 Points</dd>
<dt>PAPER_A3</dt>
- <dd>Paper format A3 = 842 x 1190 Points</dd>
+ <dd>Format papier A3 = 842 x 1190 Points</dd>
<dt>PAPER_A4</dt>
- <dd>Paper format A4 = 595 x 842 Points</dd>
+ <dd>Format papier A4 = 595 x 842 Points</dd>
<dt>PAPER_A5</dt>
- <dd>Paper format A5 = 421 x 595 Points</dd>
+ <dd>Format papier A5 = 421 x 595 Points</dd>
<dt>PAPER_A6</dt>
- <dd>Paper format A6 = 297 x 421 Points</dd>
+ <dd>Format papier A6 = 297 x 421 Points</dd>
<dt>PAPER_A7</dt>
- <dd>Paper format A7 = 210 x 297 Points</dd>
+ <dd>Format papier A7 = 210 x 297 Points</dd>
<dt>PAPER_A8</dt>
- <dd>Paper format A8 = 148 x 210 Points</dd>
+ <dd>Format papier A8 = 148 x 210 Points</dd>
<dt>PAPER_A9</dt>
- <dd>Paper format A9 = 105 x 148 Points</dd></dl></td>
+ <dd>Format papier A9 = 105 x 148 Points</dd></dl></td>
<td>
<dl>
<dt>PAPER_A0_MM</dt>
- <dd>Paper format A0 = 841 x 1189 Millimeters</dd>
+ <dd>Format papier A0 = 841 x 1189 Millimètres</dd>
<dt>PAPER_A1_MM</dt>
- <dd>Paper format A1 = 594 x 841 Millimeters</dd>
+ <dd>Format papier A1 = 594 x 841 Millimètres</dd>
<dt>PAPER_A2_MM</dt>
- <dd>Paper format A2 = 420 x 594 Millimeters</dd>
+ <dd>Format papier A2 = 420 x 594 Millimètres</dd>
<dt>PAPER_A3_MM</dt>
- <dd>Paper format A3 = 297 x 420 Millimeters</dd>
+ <dd>Format papier A3 = 297 x 420 Millimètres</dd>
<dt>PAPER_A4_MM</dt>
- <dd>Paper format A4 = 210 x 297 Millimeters</dd>
+ <dd>Format papier A4 = 210 x 297 Millimètres</dd>
<dt>PAPER_A5_MM</dt>
- <dd>Paper format A5 = 148 x 210 Millimeters</dd>
+ <dd>Format papier A5 = 148 x 210 Millimètres</dd>
<dt>PAPER_A6_MM</dt>
- <dd>Paper format A6 = 105 x 148 Millimeters</dd>
+ <dd>Format papier A6 = 105 x 148 Millimètres</dd>
<dt>PAPER_A7_MM</dt>
- <dd>Paper format A7 = 74 x 105 Millimeters</dd>
+ <dd>Format papier A7 = 74 x 105 Millimètres</dd>
<dt>PAPER_A8_MM</dt>
- <dd>Paper format A8 = 52 x 74 Millimeters</dd>
+ <dd>Format papier A8 = 52 x 74 Millimètres</dd>
<dt>PAPER_A9_MM</dt>
- <dd>Paper format A9 = 37 x 52 Millimeters</dd></dl></td></tr>
+ <dd>Format papier A9 = 37 x 52 Millimètres</dd></dl></td></tr>
<tr><td>
<dl>
<dt>PAPER_B0</dt>
- <dd>Paper format B0 = 2836 x 4008 Points</dd>
+ <dd>Format papier B0 = 2836 x 4008 Points</dd>
<dt>PAPER_B1</dt>
- <dd>Paper format B1 = 2004 x 2836 Points</dd>
+ <dd>Format papier B1 = 2004 x 2836 Points</dd>
<dt>PAPER_B2</dt>
- <dd>Paper format B2 = 1418 x 2004 Points</dd>
+ <dd>Format papier B2 = 1418 x 2004 Points</dd>
<dt>PAPER_B3</dt>
- <dd>Paper format B3 = 1002 x 1418 Points</dd>
+ <dd>Format papier B3 = 1002 x 1418 Points</dd>
<dt>PAPER_B4</dt>
- <dd>Paper format B4 = 709 x 1002 Points</dd>
+ <dd>Format papier B4 = 709 x 1002 Points</dd>
<dt>PAPER_B5</dt>
- <dd>Paper format B5 = 501 x 709 Points</dd>
+ <dd>Format papier B5 = 501 x 709 Points</dd>
<dt>PAPER_B6</dt>
- <dd>Paper format B6 = 355 x 501 Points</dd>
+ <dd>Format papier B6 = 355 x 501 Points</dd>
<dt>PAPER_B7</dt>
- <dd>Paper format B7 = 250 x 355 Points</dd>
+ <dd>Format papier B7 = 250 x 355 Points</dd>
<dt>PAPER_B8</dt>
- <dd>Paper format B8 = 178 x 250 Points</dd>
+ <dd>Format papier B8 = 178 x 250 Points</dd>
<dt>PAPER_B9</dt>
- <dd>Paper format B9 = 125 x 178 Points</dd>
+ <dd>Format papier B9 = 125 x 178 Points</dd>
<dt>PAPER_B10</dt>
- <dd>Paper format B10 = 89 x 125 Points</dd></dl></td>
+ <dd>Format papier B10 = 89 x 125 Points</dd></dl></td>
<td>
<dl>
<dt>PAPER_B0_MM</dt>
- <dd>Paper format B0 = 1000 x 1414 Millimeters</dd>
+ <dd>Format papier B0 = 1000 x 1414 Millimètres</dd>
<dt>PAPER_B1_MM</dt>
- <dd>Paper format B1 = 707 x 1000 Millimeters</dd>
+ <dd>Format papier B1 = 707 x 1000 Millimètres</dd>
<dt>PAPER_B2_MM</dt>
- <dd>Paper format B2 = 500 x 707 Millimeters</dd>
+ <dd>Format papier B2 = 500 x 707 Millimètres</dd>
<dt>PAPER_B3_MM</dt>
- <dd>Paper format B3 = 353 x 500 Millimeters</dd>
+ <dd>Format papier B3 = 353 x 500 Millimètres</dd>
<dt>PAPER_B4_MM</dt>
- <dd>Paper format B4 = 250 x 353 Millimeters</dd>
+ <dd>Format papier B4 = 250 x 353 Millimètres</dd>
<dt>PAPER_B5_MM</dt>
- <dd>Paper format B5 = 176 x 250 Millimeters</dd>
+ <dd>Format papier B5 = 176 x 250 Millimètres</dd>
<dt>PAPER_B6_MM</dt>
- <dd>Paper format B6 = 125 x 176 Millimeters</dd>
+ <dd>Format papier B6 = 125 x 176 Millimètres</dd>
<dt>PAPER_B7_MM</dt>
- <dd>Paper format B7 = 88 x 125 Millimeters</dd>
+ <dd>Format papier B7 = 88 x 125 Millimètres</dd>
<dt>PAPER_B8_MM</dt>
- <dd>Paper format B8 = 62 x 88 Millimeters</dd>
+ <dd>Format papier B8 = 62 x 88 Millimètres</dd>
<dt>PAPER_B9_MM</dt>
- <dd>Paper format B9 = 44 x 62 Millimeters</dd>
+ <dd>Format papier B9 = 44 x 62 Millimètres</dd>
<dt>PAPER_B10_MM</dt>
- <dd>Paper format B10 = 31 x 44 Millimeters</dd></dl></td></tr>
+ <dd>Format papier B10 = 31 x 44 Millimètres</dd></dl></td></tr>
<tr><td>
<dl>
<dt>PAPER_C5E</dt>
- <dd>Paper format C5E = 462 x 649 Points</dd>
+ <dd>Format papier C5E = 462 x 649 Points</dd>
<dt>PAPER_COMM10E</dt>
- <dd>Paper format Comm10E = 298 x 683 Points</dd>
+ <dd>Format papier Comm10E = 298 x 683 Points</dd>
<dt>PAPER_DLE</dt>
- <dd>Paper format DLE = 312 x 624 Points</dd>
+ <dd>Format papier DLE = 312 x 624 Points</dd>
<dt>PAPER_EXECUTIVE</dt>
- <dd>Paper format Executive = 542 x 720 Points</dd>
+ <dd>Format papier Executive = 542 x 720 Points</dd>
<dt>PAPER_FOLIO</dt>
- <dd>Paper format Folio = 595 x 935 Points</dd>
+ <dd>Format papier Folio = 595 x 935 Points</dd>
<dt>PAPER_LEDGER</dt>
- <dd>Paper format Ledger = 1224 x 792 Points</dd>
+ <dd>Format papier Ledger = 1224 x 792 Points</dd>
<dt>PAPER_LEGAL</dt>
- <dd>Paper format Legal = 612 x 1008 Points</dd>
+ <dd>Format papier Legal = 612 x 1008 Points</dd>
<dt>PAPER_LETTER</dt>
- <dd>Paper format Letter = 612 x 792 Points</dd>
+ <dd>Format papier Letter = 612 x 792 Points</dd>
<dt>PAPER_TABLOID</dt>
- <dd>Paper format Tabloid = 792 x 1224 Points</dd>
+ <dd>Format papier Tabloid = 792 x 1224 Points</dd>
</dl></td></tr>
</table>
-<h4>Definitions for Document Layout:</h4>
+<h4>Constantes de disposition du document :</h4>
<table><tr><td>
<dl>
<dt>FACINGPAGES</dt>
- <dd>Layout with facing Pages.</dd>
+ <dd>Disposition avec des pages en regard.</dd>
<dt>NOFACINGPAGES</dt>
- <dd>Normal Layout of the Document.</dd>
+ <dd>Disposition normale du document.</dd>
<dt>FIRSTPAGELEFT</dt>
- <dd>The first Page of the Document is a left Page.</dd>
+ <dd>La première page du document est une page de droite.</dd>
<dt>FIRSTPAGERIGHT</dt>
- <dd>The first Page of the Document is a right Page.</dd>
-</dl>
-</td></tr></table>
-
-<h4>Alignment Definitions: </h4>
+ <dd>La première page du document est une première de droite.</dd>
+</dl>
+</td></tr></table>
+
+<h4>Constantes d'alignement :</h4>
<table><tr><td>
<dl>
<dt>ALIGN_LEFT</dt>
- <dd>Text is aligned to the Left.</dd>
+ <dd>Le texte est aligné à gauche.</dd>
<dt>ALIGN_CENTERED</dt>
- <dd>The Text is centered in the Textframe.</dd>
+ <dd>Le texte est centré dans le cadre de texte.</dd>
<dt>ALIGN_RIGHT</dt>
- <dd>The Text is aligned to the Right Side of the Textframe</dd>
+ <dd>Le texte est aligné sur le côté droit du cadre de texte.</dd>
<dt>ALIGN_FORCED</dt>
- <dd>The Text has forced Alignment</dd>
+ <dd>Le texte a un alignement forcé.</dd>
<dt>ALIGN_BLOCK</dt>
- <dd>The Text has block Alignment</dd>
-</dl>
-</td></tr></table>
-
-<h4>Vertical alignment Definitions: </h4>
+ <dd>Le texte a un alignement bloqué.</dd>
+</dl>
+</td></tr></table>
+
+<h4>Constantes d'alignement vertical :</h4>
<table><tr><td>
<dl>
<dt>ALIGNV_TOP</dt>
- <dd>Text is aligned vertically to the top.</dd>
+ <dd>Le texte est aligné verticalement en haut.</dd>
<dt>ALIGNV_CENTERED</dt>
- <dd>Text is aligned vertically to the center.</dd>
+ <dd>Le texte est aligné verticalement au centre.</dd>
<dt>ALIGNV_BOTTOM</dt>
- <dd>Text is aligned vertically to the bottom.</dd>
-</dl>
-</td></tr></table>
-
-<h4>Line related Definitions: </h4>
+ <dd>Le texte est aligné verticalement en bas.</dd>
+</dl>
+</td></tr></table>
+
+<h4>Réglages relatifs aux lignes :</h4>
<table><tr><td>
<dl>
<dt>LINE_DASH</dt>
@@ -254,7 +254,7 @@
</dl>
</td></tr></table>
-<h4>Colorspace Definitions: </h4>
+<h4>Définitions d'espaces de couleur: </h4>
<table><tr><td>
<dl>
<dt>CSPACE_UNDEFINED</dt>
@@ -266,11 +266,11 @@
</dl>
</td></tr></table>
-<h4>Fill related Definitions: </h4>
+<h4>Réglages relatifs au fond :</h4>
<table><tr><td>
<dl>
<dt>FILL_NOG</dt>
- <dd>No gradient, plain color</dd>
+ <dd>Pas de dégradé, couleur unie</dd>
<dt>FILL_HORIZONTALG</dt>
<dt>FILL_VERTICALG</dt>
<dt>FILL_DIAGONALG</dt>
@@ -279,25 +279,21 @@
</dl>
</td></tr></table>
-<h4>Dialog Buttons</h4>
-<p>
-<table>
-<tr><td><strong>Button Type</strong></td><td><strong>Return Value</strong></td></tr>
-<tr> <td>BUTTON_ABORT</td><td>262144</td></tr>
-<tr> <td>BUTTON_CANCEL</td><td>4194304</td></tr>
- <tr><td>BUTTON_IGNORE</td><td>1048576</td></tr>
- <tr><td>BUTTON_NO</td><td>65536</td></tr>
- <tr><td>BUTTON_NONE</td><td>N/A</td></tr>
- <tr><td>BUTTON_OK</td><td>1024</td></tr>
- <tr><td>BUTTON_RETRY</td><td>524288</td></tr>
- <tr><td>BUTTON_YES</td><td>16384</td></tr>
-</table></p>
-
-<p>There is also a hierarchy of buttons in terms of how they appear in the dialogs, with this ordering, left to right:</p>
-<p>BUTTON_YES, BUTTON_NO, BUTTON_OK, BUTTON_RETRY, BUTTON_IGNORE, BUTTON_ABORT, BUTTON_CANCEL</p>
-<p>For example, even if you assign CANCEL to button1, RETRY to button2, and YES to button3, they will appear YES, RETRY, and CANCEL left to right in the dialog.</p>
-
-<h4>Dialog Icons</h4>
+<h4>Boutons de dialogue</h4>
+<table><tr><td>
+<dl>
+ <dt>BUTTON_ABORT</dt>
+ <dt>BUTTON_CANCEL</dt>
+ <dt>BUTTON_IGNORE</dt>
+ <dt>BUTTON_NO</dt>
+ <dt>BUTTON_NONE</dt>
+ <dt>BUTTON_OK</dt>
+ <dt>BUTTON_RETRY</dt>
+ <dt>BUTTON_YES</dt>
+</dl>
+</td></tr></table>
+
+<h4>Icônes de dialogue</h4>
<table><tr><td>
<dl>
<dt>ICON_CRITICAL</dt>
@@ -307,7 +303,7 @@
</dl>
</td></tr></table>
-<h4>Tab alignment</h4>
+<h4>Constantes d'alignement par TAB</h4>
<table><tr><td>
<dl>
<dt>TAB_LEFT</dt>
@@ -318,5 +314,22 @@
</dl>
</td></tr></table>
+<h4>Constantes de language d'impression</h4>
+<table><tr><td>
+<dl>
+ <dt>PRNLANG_POSTSCRIPT1</dt>
+ <dd>Postscript Niveau 1 (requiert Ghostscript)</dd>
+ <dt>PRNLANG_POSTSCRIPT2</dt>
+ <dd>Postscript Niveau 2 (requiert Ghostscript)</dd>
+ <dt>PRNLANG_POSTSCRIPT3</dt>
+ <dd>Postscript Niveau 3</dd>
+ <dt>PRNLANG_WINDOWSGDI</dt>
+ <dd>Windows GDI (disponible sur Microsoft Windows uniquement)</dd>
+ <dt>PRNLANG_PDF</dt>
+ <dd>Adobe PDF (disponible uniquement sur MacOS et les systèmes dérivés d'Unix)</dd>
+</dl>
+</td></tr></table>
+
</body>
</html>
+
Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Sat Oct 3 22:57:53 2020
@@ -172,6 +172,7 @@
ui/prefs_tableofcontentsbase.ui
ui/prefs_documentitemattributesbase.ui
ui/printdialogbase.ui
+ ui/printpreviewbase.ui
ui/propertiespalette_groupbase.ui
ui/propertiespalette_imagebase.ui
ui/propertiespalette_linebase.ui
@@ -471,6 +472,7 @@
ui/prefs_tableofcontents.h
ui/prefs_documentitemattributes.h
ui/printdialog.h
+ ui/printlanguagecombo.h
ui/printpreview.h
ui/propertiespalette.h
ui/propertiespalette_group.h
@@ -981,6 +983,7 @@
ui/prefs_tableofcontents.cpp
ui/prefs_documentitemattributes.cpp
ui/printdialog.cpp
+ ui/printlanguagecombo.cpp
ui/printpreview.cpp
ui/propertiespalette.cpp
ui/propertiespalette_image.cpp
Modified: trunk/Scribus/scribus/commonstrings.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/commonstrings.cpp
==============================================================================
--- trunk/Scribus/scribus/commonstrings.cpp (original)
+++ trunk/Scribus/scribus/commonstrings.cpp Sat Oct 3 22:57:53 2020
@@ -161,8 +161,12 @@
QString CommonStrings::trMinGlyphExtension = "";
QString CommonStrings::trMaxGlyphExtension = "";
+QString CommonStrings::File = "";
+QString CommonStrings::trFile = "";
QString CommonStrings::PostScript = "";
QString CommonStrings::trPostScript = "";
+QString CommonStrings::PDF = "";
+QString CommonStrings::trPDF = "";
QString CommonStrings::PDF_1_3 = "";
QString CommonStrings::PDF_1_4 = "";
QString CommonStrings::PDF_1_5 = "";
@@ -429,8 +433,12 @@
CommonStrings::trMaxGlyphExtension = tr("Max. Glyph Extension");
//PostScript & PDF Types etc
+ CommonStrings::File = "File";
+ CommonStrings::trFile = tr("File");
CommonStrings::PostScript = "PostScript";
CommonStrings::trPostScript = tr("PostScript");
+ CommonStrings::PDF = "PDF";
+ CommonStrings::trPDF = tr("PDF");
CommonStrings::PDF_1_3 = "PDF 1.3";
CommonStrings::PDF_1_4 = "PDF 1.4";
CommonStrings::PDF_1_5 = "PDF 1.5";
@@ -449,20 +457,20 @@
CommonStrings::trWindowsGDI = tr( "Windows GDI" );
//Units
- CommonStrings::trStrPT=unitGetStrFromIndex(SC_PT);
- CommonStrings::trStrMM=unitGetStrFromIndex(SC_MM);
- CommonStrings::trStrIN=unitGetStrFromIndex(SC_IN);
- CommonStrings::trStrP =unitGetStrFromIndex(SC_P);
- CommonStrings::trStrCM=unitGetStrFromIndex(SC_CM);
- CommonStrings::trStrC =unitGetStrFromIndex(SC_C);
- CommonStrings::trStrPX=tr("px");
- CommonStrings::strPT=unitGetUntranslatedStrFromIndex(SC_PT);
- CommonStrings::strMM=unitGetUntranslatedStrFromIndex(SC_MM);
- CommonStrings::strIN=unitGetUntranslatedStrFromIndex(SC_IN);
- CommonStrings::strP =unitGetUntranslatedStrFromIndex(SC_P);
- CommonStrings::strCM=unitGetUntranslatedStrFromIndex(SC_CM);
- CommonStrings::strC =unitGetUntranslatedStrFromIndex(SC_C);
- CommonStrings::strPX="px";
+ CommonStrings::trStrPT = unitGetStrFromIndex(SC_PT);
+ CommonStrings::trStrMM = unitGetStrFromIndex(SC_MM);
+ CommonStrings::trStrIN = unitGetStrFromIndex(SC_IN);
+ CommonStrings::trStrP = unitGetStrFromIndex(SC_P);
+ CommonStrings::trStrCM = unitGetStrFromIndex(SC_CM);
+ CommonStrings::trStrC = unitGetStrFromIndex(SC_C);
+ CommonStrings::trStrPX = tr("px");
+ CommonStrings::strPT = unitGetUntranslatedStrFromIndex(SC_PT);
+ CommonStrings::strMM = unitGetUntranslatedStrFromIndex(SC_MM);
+ CommonStrings::strIN = unitGetUntranslatedStrFromIndex(SC_IN);
+ CommonStrings::strP = unitGetUntranslatedStrFromIndex(SC_P);
+ CommonStrings::strCM = unitGetUntranslatedStrFromIndex(SC_CM);
+ CommonStrings::strC = unitGetUntranslatedStrFromIndex(SC_C);
+ CommonStrings::strPX = "px";
//Keyboard Modifiers
CommonStrings::altModifier=tr("Alt");
Modified: trunk/Scribus/scribus/commonstrings.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/commonstrings.h
==============================================================================
--- trunk/Scribus/scribus/commonstrings.h (original)
+++ trunk/Scribus/scribus/commonstrings.h Sat Oct 3 22:57:53 2020
@@ -250,8 +250,12 @@
static QString trMaxGlyphExtension;
//PostScript or other PDL strings
+ static QString File;
+ static QString trFile;
static QString PostScript;
static QString trPostScript;
+ static QString PDF;
+ static QString trPDF;
static QString PDF_1_3;
static QString PDF_1_4;
static QString PDF_1_5;
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Sat Oct 3 22:57:53 2020
@@ -1717,9 +1717,9 @@
doc->Print_Options.colorMarks = attrs.valueAsBool("colorMarks");
doc->Print_Options.includePDFMarks = attrs.valueAsBool("includePDFMarks", true);
if (attrs.hasAttribute("PrintEngine"))
- doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PrintEngine", 3);
+ doc->Print_Options.prnLanguage = (PrintLanguage) attrs.valueAsInt("PrintEngine", 3);
else
- doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PSLevel", 3);
+ doc->Print_Options.prnLanguage = (PrintLanguage) attrs.valueAsInt("PSLevel", 3);
doc->Print_Options.markLength = attrs.valueAsDouble("markLength");
doc->Print_Options.markOffset = attrs.valueAsDouble("markOffset");
doc->Print_Options.bleeds.setTop(attrs.valueAsDouble("BleedTop"));
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Sat Oct 3 22:57:53 2020
@@ -3423,9 +3423,9 @@
doc->Print_Options.colorMarks = attrs.valueAsBool("colorMarks");
doc->Print_Options.includePDFMarks = attrs.valueAsBool("includePDFMarks", true);
if (attrs.hasAttribute("PrintEngine"))
- doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PrintEngine", 3);
+ doc->Print_Options.prnLanguage = (PrintLanguage) attrs.valueAsInt("PrintEngine", 3);
else
- doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PSLevel", 3);
+ doc->Print_Options.prnLanguage = (PrintLanguage) attrs.valueAsInt("PSLevel", 3);
doc->Print_Options.markLength = attrs.valueAsDouble("markLength");
doc->Print_Options.markOffset = attrs.valueAsDouble("markOffset");
doc->Print_Options.bleeds.setTop(attrs.valueAsDouble("BleedTop"));
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Sat Oct 3 22:57:53 2020
@@ -1111,8 +1111,8 @@
docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->Print_Options.registrationMarks));
docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->Print_Options.colorMarks));
docu.writeAttribute("includePDFMarks", static_cast<int>(m_Doc->Print_Options.includePDFMarks));
- docu.writeAttribute("PSLevel", (int) ((m_Doc->Print_Options.prnEngine < PrintEngine::WindowsGDI) ? m_Doc->Print_Options.prnEngine : PrintEngine::PostScript3));
- docu.writeAttribute("PrintEngine" , (int) m_Doc->Print_Options.prnEngine);
+ docu.writeAttribute("PSLevel", (int) ((m_Doc->Print_Options.prnLanguage < PrintLanguage::WindowsGDI) ? m_Doc->Print_Options.prnLanguage : PrintLanguage::PostScript3));
+ docu.writeAttribute("PrintEngine" , (int) m_Doc->Print_Options.prnLanguage);
docu.writeAttribute("markLength" , m_Doc->Print_Options.markLength);
docu.writeAttribute("markOffset" , m_Doc->Print_Options.markOffset);
docu.writeAttribute("BleedTop" , m_Doc->Print_Options.bleeds.top());
Modified: trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp Sat Oct 3 22:57:53 2020
@@ -8,30 +8,31 @@
#include <iostream>
#include "objprinter.h"
-#include "cmdutil.h"
-#include "prefsmanager.h"
#include <structmember.h>
#include <QFileInfo>
#include <QDir>
#include <QScopedPointer>
+#include "cmdutil.h"
+#include "prefsmanager.h"
#include "pslib.h"
#include "scpaths.h"
+#include "scprintengine_pdf.h"
+#include "scprintengine_ps.h"
#include "scribuscore.h"
#include "scribusdoc.h"
#include "util_file.h"
#include "util_ghostscript.h"
#include "util_printer.h"
-// these functions are located at utils.cpp
-bool SCRIBUS_API loadText(QString nam, QString *Buffer);
-void SCRIBUS_API ReOrderText(ScribusDoc *doc, ScribusView *view);
-// end of utils.cpp
-
#if defined(_WIN32)
#include "scprintengine_gdi.h"
#endif
+
+// these functions are located at utils.cpp
+void SCRIBUS_API ReOrderText(ScribusDoc *doc, ScribusView *view);
+// end of utils.cpp
typedef struct
{
@@ -45,7 +46,7 @@
PyObject *separation; // string - No; All; Cyan; Magenta; Yellow; Black
int color; // bool - do we print in color=1 or greyscale=0
int useICC; // bool - do we use ICC Profiles 0 = No 1 = Yes
- int pslevel; // integer - 1, 2 or 3 level of used postscript
+ int prnLang; // integer - print language
int mph; // bool - mirror pages horizontally
int mpv; // bool - mirror pages vertically
int ucr; // bool - Under Color Removal
@@ -74,37 +75,37 @@
if (self != nullptr) {
// set allPrinters attribute
self->allPrinters = PyList_New(0);
- if (self->allPrinters == nullptr){
+ if (self->allPrinters == nullptr) {
Py_DECREF(self);
return nullptr;
}
// set printer attribute
self->printer = PyUnicode_FromString("");
- if (self->printer == nullptr){
+ if (self->printer == nullptr) {
Py_DECREF(self);
return nullptr;
}
// set file attribute
self->file = PyUnicode_FromString("");
- if (self->file == nullptr){
+ if (self->file == nullptr) {
Py_DECREF(self);
return nullptr;
}
// set cmd attribute
self->cmd = PyUnicode_FromString("");
- if (self->cmd == nullptr){
+ if (self->cmd == nullptr) {
Py_DECREF(self);
return nullptr;
}
// set pages attribute
self->pages = PyList_New(0);
- if (self->pages == nullptr){
+ if (self->pages == nullptr) {
Py_DECREF(self);
return nullptr;
}
// set separation attribute
self->separation = PyUnicode_FromString("No");
- if (self->separation == nullptr){
+ if (self->separation == nullptr) {
Py_DECREF(self);
return nullptr;
}
@@ -112,8 +113,8 @@
self->color = 1;
// set useICC attribute
self->useICC = 0;
-// set pslevel attribute
- self->pslevel = 3;
+// set prnLanguage attribute
+ self->prnLang = (int) PrintLanguage::PostScript3;
// set mph attribute
self->mph = 0;
// set mpv attribute
@@ -134,7 +135,7 @@
// pool system for installed printers
// most code is stolen and little adopted from druck.cpp
PyObject *allPrinters = PyList_New(0);
- if (allPrinters){
+ if (allPrinters) {
Py_DECREF(self->allPrinters);
self->allPrinters = allPrinters;
}
@@ -145,7 +146,7 @@
if (prn.isEmpty())
continue;
PyObject *tmppr = PyUnicode_FromString(prn.toUtf8().constData());
- if (tmppr){
+ if (tmppr) {
PyList_Append(self->allPrinters, tmppr);
Py_DECREF(tmppr);
}
@@ -156,7 +157,7 @@
// as defaut set to print into file
PyObject *printer = nullptr;
printer = PyUnicode_FromString("File");
- if (printer){
+ if (printer) {
Py_DECREF(self->printer);
self->printer = printer;
}
@@ -164,11 +165,11 @@
QString tf(ScCore->primaryMainWindow()->doc->pdfOptions().fileName);
if (tf.isEmpty()) {
QFileInfo fi = QFileInfo(ScCore->primaryMainWindow()->doc->documentFileName());
- tf = fi.path()+"/"+fi.baseName()+".pdf";
+ tf = fi.path() + "/" + fi.baseName() + ".pdf";
}
PyObject *file = nullptr;
file = PyUnicode_FromString(tf.toUtf8());
- if (file){
+ if (file) {
Py_DECREF(self->file);
self->file = file;
} else {
@@ -178,7 +179,7 @@
// alternative printer commands default to ""
PyObject *cmd = nullptr;
cmd = PyUnicode_FromString("");
- if (cmd){
+ if (cmd) {
Py_DECREF(self->cmd);
self->cmd = cmd;
}
@@ -187,12 +188,12 @@
PyObject *pages = nullptr;
int num = ScCore->primaryMainWindow()->doc->Pages->count();
pages = PyList_New(num);
- if (pages){
+ if (pages) {
Py_DECREF(self->pages);
self->pages = pages;
}
- for (int i = 0; i<num; i++) {
- PyObject *tmp=nullptr;
+ for (int i = 0; i < num; i++) {
+ PyObject *tmp = nullptr;
tmp = PyLong_FromLong((long)i+1L); // instead of 1 put here first page number
if (tmp)
PyList_SetItem(self->pages, i, tmp);
@@ -200,7 +201,7 @@
// do not print separation
PyObject *separation = nullptr;
separation = PyUnicode_FromString("No");
- if (separation){
+ if (separation) {
Py_DECREF(self->separation);
self->separation = separation;
}
@@ -209,7 +210,7 @@
// do not use ICC Profile
self->useICC = 0;
// use PostScrip level 3
- self->pslevel = 3;
+ self->prnLang = (int) PrintLanguage::PostScript3;
// do not mirror pages
self->mph = 0;
// do not mirror pages
@@ -225,7 +226,8 @@
{const_cast<char*>("copies"), T_INT, offsetof(Printer, copies), 0, const_cast<char*>("Number of copies")},
{const_cast<char*>("color"), T_INT, offsetof(Printer, color), 0, const_cast<char*>("Print in color.\n\t True - color -- Default\n\t False - greyscale")},
{const_cast<char*>("useICC"), T_INT, offsetof(Printer, useICC), 0, const_cast<char*>("Use ICC Profile\n\tTrue\n\tFalse -- Default")},
- {const_cast<char*>("pslevel"), T_INT, offsetof(Printer, pslevel), 0, const_cast<char*>("PostScript Level\nCan be 1 or 2 or 3 -- Default is 3.")},
+ {const_cast<char*>("pslevel"), T_INT, offsetof(Printer, prnLang), 0, const_cast<char*>("Deprecated, use prnLanguage instead.")}, // Deprecated
+ {const_cast<char*>("prnLanguage"), T_INT, offsetof(Printer, prnLang), 0, const_cast<char*>("Print Language\nOne of PRNLANG_* constants -- Default is PRNLANG_POSTSCRIPT3.")},
{const_cast<char*>("mph"), T_INT, offsetof(Printer, mph), 0, const_cast<char*>("Mirror Pages Horizontal\n\tTrue\n\tFalse -- Default")},
{const_cast<char*>("mpv"), T_INT, offsetof(Printer, mpv), 0, const_cast<char*>("Mirror Pages Vertical\n\t True\n\tFalse -- Default")},
{const_cast<char*>("ucr"), T_INT, offsetof(Printer, ucr), 0, const_cast<char*>("Apply Under Color Removal\n\tTrue -- Default\n\tFalse")},
@@ -262,15 +264,20 @@
PyErr_SetString(PyExc_TypeError, "The 'printer' attribute value must be string.");
return -1;
}
+
int n = PyList_Size(self->allPrinters);
bool same = 0;
- for (int i = 0; i<n; i++)
- if (PyObject_RichCompareBool(value, PyList_GetItem(self->allPrinters, i), Py_EQ) == 1)
+ for (int i = 0; i < n; i++) {
+ if (PyObject_RichCompareBool(value, PyList_GetItem(self->allPrinters, i), Py_EQ) == 1) {
same = true;
+ break;
+ }
+ }
if (!same) {
PyErr_SetString(PyExc_ValueError, "'printer' value can be only one of string in 'allPrinters' attribute ");
return -1;
}
+
Py_DECREF(self->printer);
Py_INCREF(value);
self->printer = value;
@@ -338,9 +345,9 @@
return -1;
}
int len = PyList_Size(value);
- for (int i = 0; i<len; i++){
+ for (int i = 0; i < len; i++) {
PyObject *tmp = PyList_GetItem(value, i);
- if (!PyLong_Check(tmp)){
+ if (!PyLong_Check(tmp)) {
PyErr_SetString(PyExc_TypeError, "'pages' attribute must be list containing only integers.");
return -1;
}
@@ -394,27 +401,24 @@
if (!checkHaveDocument()) {
return nullptr;
}
-// copied from void ScribusMainWindow::slotFilePrint() in file scribus.cpp
- QString fna, prn, cmd, cc, SepName;
- QString printcomm;
- bool fil;
-
-// ReOrderText(ScCore->primaryMainWindow()->doc, ScCore->primaryMainWindow()->view);
- prn = PyUnicode_asQString(self->printer);
- fna = PyUnicode_asQString(self->file);
- fil = PyUnicode_asQString(self->printer) == QString("File");
- std::vector<int> pageNs;
+
+// ReOrderText(ScCore->primaryMainWindow()->doc, ScCore->primaryMainWindow()->view);
+ QString prn = PyUnicode_asQString(self->printer);
+ QString fna = PyUnicode_asQString(self->file);
+ bool fil = PyUnicode_asQString(self->printer) == QString("File");
+ QString sepName = PyUnicode_asQString(self->separation);
+
PrintOptions options;
for (int i = 0; i < PyList_Size(self->pages); ++i) {
options.pageNumbers.push_back((int) PyLong_AsLong(PyList_GetItem(self->pages, i)));
}
- int copyCount = (self->copies < 1) ? 1 : self->copies;
- SepName = PyUnicode_asQString(self->separation);
options.printer = prn;
- options.prnEngine = (PrintEngine) self->pslevel;
+ options.prnLanguage = (PrintLanguage) self->prnLang;
+ options.copies = (self->copies < 1) ? 1 : self->copies;
options.toFile = fil;
- options.separationName = SepName;
- options.outputSeparations = SepName != QString("No");
+ options.filename = fil ? fna : QString();
+ options.separationName = sepName;
+ options.outputSeparations = sepName != QString("No");
options.useSpotColors = true;
options.useColor = self->color;
options.mirrorH = self->mph;
@@ -429,9 +433,14 @@
options.includePDFMarks = false;
options.markOffset = 0.0;
options.bleeds.set(0, 0, 0, 0);
- if (!PrinterUtil::checkPrintEngineSupport(options.printer, options.prnEngine, options.toFile))
- options.prnEngine = PrinterUtil::getDefaultPrintEngine(options.printer, options.toFile);
- printcomm = PyUnicode_asQString(self->cmd);
+ if (!PrinterUtil::checkPrintLanguageSupport(options.printer, options.prnLanguage, options.toFile))
+ options.prnLanguage = PrinterUtil::getDefaultPrintLanguage(options.printer, options.toFile);
+ if (options.prnLanguage == PrintLanguage::PDF || options.prnLanguage == PrintLanguage::WindowsGDI)
+ {
+ options.separationName = "All";
+ options.outputSeparations = false;
+ }
+ options.printerCommand = PyUnicode_asQString(self->cmd);
ScribusDoc* currentDoc = ScCore->primaryMainWindow()->doc;
@@ -451,55 +460,26 @@
}
#endif
- QScopedPointer<PSLib> psLib(new PSLib(currentDoc, options, PSLib::OutputPS, ¤tDoc->PageColors));
- if (psLib.isNull())
+ if (options.prnLanguage == PrintLanguage::PostScript1 || options.prnLanguage == PrintLanguage::PostScript2)
{
- PyErr_SetString(PyExc_SystemError, "Memory allocation error");
- return nullptr;
- }
-
- if (!fil)
- fna = QDir::toNativeSeparators(ScPaths::tempFileDir() + "/tmp.ps");
- fna = QDir::toNativeSeparators(fna);
-
- int printed = psLib->createPS(fna);
- if (printed == 1)
- {
- PyErr_SetString(PyExc_SystemError, "Printing failed");
- return nullptr;
- }
-
- if (options.prnEngine == PrintEngine::PostScript1 || options.prnEngine == PrintEngine::PostScript2)
- {
- if (ScCore->haveGS())
- {
- QString tmp;
- QStringList opts;
- opts.append( QString("-dDEVICEWIDTHPOINTS=%1").arg(tmp.setNum(currentDoc->pageWidth())) );
- opts.append( QString("-dDEVICEHEIGHTPOINTS=%1").arg(tmp.setNum(currentDoc->pageHeight())) );
- convertPS2PS(fna, fna + ".tmp", opts, (int) options.prnEngine);
- moveFile( fna + ".tmp", fna );
- }
- else
+ if (!ScCore->haveGS())
{
PyErr_SetString(PyExc_SystemError, "Printing failed : GhostScript is needed to print to PostScript Level 1 or Level 2");
Py_RETURN_NONE;
}
}
- if (!fil)
+ QScopedPointer<ScPrintEngine> printEngine;
+ if (options.prnLanguage == PrintLanguage::PDF)
+ printEngine.reset(new ScPrintEngine_PDF(*currentDoc));
+ else
+ printEngine.reset(new ScPrintEngine_PS(*currentDoc));
+
+ bool printDone = printEngine->print(options);
+ if (!printDone)
{
- if (!printcomm.isEmpty())
- cmd = printcomm + " "+fna;
- else
- {
- cmd = "lpr -P" + prn;
- if (copyCount > 1)
- cmd += " -#" + cc.setNum(copyCount);
- cmd += " "+fna;
- }
- system(cmd.toLocal8Bit().constData());
- unlink(fna.toLocal8Bit().constData());
+ QString error = printEngine->errorMessage();
+ PyErr_SetString(PyExc_SystemError, error.toLocal8Bit().constData());
}
Py_RETURN_NONE;
Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp Sat Oct 3 22:57:53 2020
@@ -767,6 +767,7 @@
PyDict_SetItemString(d, const_cast<char*>("ICON_INFORMATION"), Py_BuildValue(const_cast<char*>("i"), QMessageBox::Information));
PyDict_SetItemString(d, const_cast<char*>("ICON_WARNING"), Py_BuildValue(const_cast<char*>("i"), QMessageBox::Warning));
PyDict_SetItemString(d, const_cast<char*>("ICON_CRITICAL"), Py_BuildValue(const_cast<char*>("i"), QMessageBox::Critical));
+ // Paper formats
PyDict_SetItemString(d, const_cast<char*>("PAPER_A0"), Py_BuildValue(const_cast<char*>("(ff)"), 2380.0, 3368.0));
PyDict_SetItemString(d, const_cast<char*>("PAPER_A1"), Py_BuildValue(const_cast<char*>("(ff)"), 1684.0, 2380.0));
PyDict_SetItemString(d, const_cast<char*>("PAPER_A2"), Py_BuildValue(const_cast<char*>("(ff)"), 1190.0, 1684.0));
@@ -818,12 +819,14 @@
PyDict_SetItemString(d, const_cast<char*>("PAPER_LEGAL"), Py_BuildValue(const_cast<char*>("(ff)"), 612.0, 1008.0));
PyDict_SetItemString(d, const_cast<char*>("PAPER_LETTER"), Py_BuildValue(const_cast<char*>("(ff)"), 612.0, 792.0));
PyDict_SetItemString(d, const_cast<char*>("PAPER_TABLOID"), Py_BuildValue(const_cast<char*>("(ff)"), 792.0, 1224.0));
+ // Colorspaces
PyDict_SetItemString(d, const_cast<char*>("CSPACE_UNDEFINED"), Py_BuildValue(const_cast<char*>("i"), -1));
PyDict_SetItemString(d, const_cast<char*>("CSPACE_RGB"), Py_BuildValue(const_cast<char*>("i"), 0));
PyDict_SetItemString(d, const_cast<char*>("CSPACE_CMYK"), Py_BuildValue(const_cast<char*>("i"), 1));
PyDict_SetItemString(d, const_cast<char*>("CSPACE_GRAY"), Py_BuildValue(const_cast<char*>("i"), 2));
PyDict_SetItemString(d, const_cast<char*>("CSPACE_DUOTONE"), Py_BuildValue(const_cast<char*>("i"), 3));
PyDict_SetItemString(d, const_cast<char*>("CSPACE_MONOCHROME"), Py_BuildValue(const_cast<char*>("i"), 4));
+ // Blend modes
PyDict_SetItemString(d, const_cast<char*>("NORMAL"), Py_BuildValue(const_cast<char*>("i"), 0));
PyDict_SetItemString(d, const_cast<char*>("DARKEN"), Py_BuildValue(const_cast<char*>("i"), 1));
PyDict_SetItemString(d, const_cast<char*>("LIGHTEN"), Py_BuildValue(const_cast<char*>("i"), 2));
@@ -840,12 +843,18 @@
PyDict_SetItemString(d, const_cast<char*>("SATURATION"), Py_BuildValue(const_cast<char*>("i"), 13));
PyDict_SetItemString(d, const_cast<char*>("COLOR"), Py_BuildValue(const_cast<char*>("i"), 14));
PyDict_SetItemString(d, const_cast<char*>("LUMINOSITY"), Py_BuildValue(const_cast<char*>("i"), 15));
- // preset page layouts
+ // Preset page layouts
PyDict_SetItemString(d, const_cast<char*>("PAGE_1"), Py_BuildValue(const_cast<char*>("i"), 0));
PyDict_SetItemString(d, const_cast<char*>("PAGE_2"), Py_BuildValue(const_cast<char*>("i"), 1));
PyDict_SetItemString(d, const_cast<char*>("PAGE_3"), Py_BuildValue(const_cast<char*>("i"), 2));
PyDict_SetItemString(d, const_cast<char*>("PAGE_4"), Py_BuildValue(const_cast<char*>("i"), 3));
- // tab alignment
+ // Print languages
+ PyDict_SetItemString(d, const_cast<char*>("PRNLANG_POSTSCRIPT1"), Py_BuildValue(const_cast<char*>("i"), (int) PrintLanguage::PostScript1));
+ PyDict_SetItemString(d, const_cast<char*>("PRNLANG_POSTSCRIPT2"), Py_BuildValue(const_cast<char*>("i"), (int) PrintLanguage::PostScript2));
+ PyDict_SetItemString(d, const_cast<char*>("PRNLANG_POSTSCRIPT3"), Py_BuildValue(const_cast<char*>("i"), (int) PrintLanguage::PostScript3));
+ PyDict_SetItemString(d, const_cast<char*>("PRNLANG_WINDOWSGDI"), Py_BuildValue(const_cast<char*>("i"), (int) PrintLanguage::WindowsGDI));
+ PyDict_SetItemString(d, const_cast<char*>("PRNLANG_PDF"), Py_BuildValue(const_cast<char*>("i"), (int) PrintLanguage::PDF));
+ // Tab alignment
PyDict_SetItemString(d, const_cast<char*>("TAB_LEFT"), Py_BuildValue(const_cast<char*>("i"), 0));
PyDict_SetItemString(d, const_cast<char*>("TAB_RIGHT"), Py_BuildValue(const_cast<char*>("i"), 1));
PyDict_SetItemString(d, const_cast<char*>("TAB_PERIOD"), Py_BuildValue(const_cast<char*>("i"), 2));
Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/objprinter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/objprinter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/objprinter.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/objprinter.cpp Sat Oct 3 22:57:53 2020
@@ -8,30 +8,31 @@
#include <iostream>
#include "objprinter.h"
-#include "cmdutil.h"
-#include "prefsmanager.h"
#include <structmember.h>
#include <QFileInfo>
#include <QDir>
#include <QScopedPointer>
+#include "cmdutil.h"
+#include "prefsmanager.h"
#include "pslib.h"
#include "scpaths.h"
+#include "scprintengine_pdf.h"
+#include "scprintengine_ps.h"
#include "scribuscore.h"
#include "scribusdoc.h"
#include "util_file.h"
#include "util_ghostscript.h"
#include "util_printer.h"
-// these functions are located at utils.cpp
-bool SCRIBUS_API loadText(QString nam, QString *Buffer);
-void SCRIBUS_API ReOrderText(ScribusDoc *doc, ScribusView *view);
-// end of utils.cpp
-
#if defined(_WIN32)
#include "scprintengine_gdi.h"
#endif
+
+// these functions are located at utils.cpp
+void SCRIBUS_API ReOrderText(ScribusDoc *doc, ScribusView *view);
+// end of utils.cpp
typedef struct
{
@@ -45,7 +46,7 @@
PyObject *separation; // string - No; All; Cyan; Magenta; Yellow; Black
int color; // bool - do we print in color=1 or greyscale=0
int useICC; // bool - do we use ICC Profiles 0 = No 1 = Yes
- int pslevel; // integer - 1, 2 or 3 level of used postscript
+ int prnLang; // integer - print language
int mph; // bool - mirror pages horizontally
int mpv; // bool - mirror pages vertically
int ucr; // bool - Under Color Removal
@@ -74,37 +75,37 @@
if (self != nullptr) {
// set allPrinters attribute
self->allPrinters = PyList_New(0);
- if (self->allPrinters == nullptr){
+ if (self->allPrinters == nullptr) {
Py_DECREF(self);
return nullptr;
}
// set printer attribute
self->printer = PyString_FromString("");
- if (self->printer == nullptr){
+ if (self->printer == nullptr) {
Py_DECREF(self);
return nullptr;
}
// set file attribute
self->file = PyString_FromString("");
- if (self->file == nullptr){
+ if (self->file == nullptr) {
Py_DECREF(self);
return nullptr;
}
// set cmd attribute
self->cmd = PyString_FromString("");
- if (self->cmd == nullptr){
+ if (self->cmd == nullptr) {
Py_DECREF(self);
return nullptr;
}
// set pages attribute
self->pages = PyList_New(0);
- if (self->pages == nullptr){
+ if (self->pages == nullptr) {
Py_DECREF(self);
return nullptr;
}
// set separation attribute
self->separation = PyString_FromString("No");
- if (self->separation == nullptr){
+ if (self->separation == nullptr) {
Py_DECREF(self);
return nullptr;
}
@@ -112,8 +113,8 @@
self->color = 1;
// set useICC attribute
self->useICC = 0;
-// set pslevel attribute
- self->pslevel = 3;
+// set prnLanguage attribute
+ self->prnLang = (int) PrintLanguage::PostScript3;
// set mph attribute
self->mph = 0;
// set mpv attribute
@@ -134,7 +135,7 @@
// pool system for installed printers
// most code is stolen and little adopted from druck.cpp
PyObject *allPrinters = PyList_New(0);
- if (allPrinters){
+ if (allPrinters) {
Py_DECREF(self->allPrinters);
self->allPrinters = allPrinters;
}
@@ -145,7 +146,7 @@
if (prn.isEmpty())
continue;
PyObject *tmppr = PyString_FromString(prn.toLocal8Bit().constData());
- if (tmppr){
+ if (tmppr) {
PyList_Append(self->allPrinters, tmppr);
Py_DECREF(tmppr);
}
@@ -156,7 +157,7 @@
// as defaut set to print into file
PyObject *printer = nullptr;
printer = PyString_FromString("File");
- if (printer){
+ if (printer) {
Py_DECREF(self->printer);
self->printer = printer;
}
@@ -164,11 +165,11 @@
QString tf(ScCore->primaryMainWindow()->doc->pdfOptions().fileName);
if (tf.isEmpty()) {
QFileInfo fi = QFileInfo(ScCore->primaryMainWindow()->doc->documentFileName());
- tf = fi.path()+"/"+fi.baseName()+".pdf";
+ tf = fi.path() + "/" + fi.baseName() + ".pdf";
}
PyObject *file = nullptr;
file = PyString_FromString(tf.toLatin1());
- if (file){
+ if (file) {
Py_DECREF(self->file);
self->file = file;
} else {
@@ -178,7 +179,7 @@
// alternative printer commands default to ""
PyObject *cmd = nullptr;
cmd = PyString_FromString("");
- if (cmd){
+ if (cmd) {
Py_DECREF(self->cmd);
self->cmd = cmd;
}
@@ -187,12 +188,12 @@
PyObject *pages = nullptr;
int num = ScCore->primaryMainWindow()->doc->Pages->count();
pages = PyList_New(num);
- if (pages){
+ if (pages) {
Py_DECREF(self->pages);
self->pages = pages;
}
- for (int i = 0; i<num; i++) {
- PyObject *tmp=nullptr;
+ for (int i = 0; i < num; i++) {
+ PyObject *tmp = nullptr;
tmp = PyInt_FromLong((long)i+1L); // instead of 1 put here first page number
if (tmp)
PyList_SetItem(self->pages, i, tmp);
@@ -200,7 +201,7 @@
// do not print separation
PyObject *separation = nullptr;
separation = PyString_FromString("No");
- if (separation){
+ if (separation) {
Py_DECREF(self->separation);
self->separation = separation;
}
@@ -209,7 +210,7 @@
// do not use ICC Profile
self->useICC = 0;
// use PostScrip level 3
- self->pslevel = 3;
+ self->prnLang = (int) PrintLanguage::PostScript3;
// do not mirror pages
self->mph = 0;
// do not mirror pages
@@ -225,7 +226,8 @@
{const_cast<char*>("copies"), T_INT, offsetof(Printer, copies), 0, const_cast<char*>("Number of copies")},
{const_cast<char*>("color"), T_INT, offsetof(Printer, color), 0, const_cast<char*>("Print in color.\n\t True - color -- Default\n\t False - greyscale")},
{const_cast<char*>("useICC"), T_INT, offsetof(Printer, useICC), 0, const_cast<char*>("Use ICC Profile\n\tTrue\n\tFalse -- Default")},
- {const_cast<char*>("pslevel"), T_INT, offsetof(Printer, pslevel), 0, const_cast<char*>("PostScript Level\nCan be 1 or 2 or 3 -- Default is 3.")},
+ {const_cast<char*>("pslevel"), T_INT, offsetof(Printer, prnLang), 0, const_cast<char*>("Deprecated, use prnLanguage instead.")}, // Deprecated
+ {const_cast<char*>("prnLanguage"), T_INT, offsetof(Printer, prnLang), 0, const_cast<char*>("Print Language\nOne of PRNLANG_* constants -- Default is PRNLANG_POSTSCRIPT3.")},
{const_cast<char*>("mph"), T_INT, offsetof(Printer, mph), 0, const_cast<char*>("Mirror Pages Horizontal\n\tTrue\n\tFalse -- Default")},
{const_cast<char*>("mpv"), T_INT, offsetof(Printer, mpv), 0, const_cast<char*>("Mirror Pages Vertical\n\t True\n\tFalse -- Default")},
{const_cast<char*>("ucr"), T_INT, offsetof(Printer, ucr), 0, const_cast<char*>("Apply Under Color Removal\n\tTrue -- Default\n\tFalse")},
@@ -262,15 +264,20 @@
PyErr_SetString(PyExc_TypeError, "The 'printer' attribute value must be string.");
return -1;
}
+
int n = PyList_Size(self->allPrinters);
bool same = 0;
- for (int i = 0; i<n; i++)
- if (PyObject_RichCompareBool(value, PyList_GetItem(self->allPrinters, i), Py_EQ) == 1)
+ for (int i = 0; i < n; i++) {
+ if (PyObject_RichCompareBool(value, PyList_GetItem(self->allPrinters, i), Py_EQ) == 1) {
same = true;
+ break;
+ }
+ }
if (!same) {
PyErr_SetString(PyExc_ValueError, "'printer' value can be only one of string in 'allPrinters' attribute ");
return -1;
}
+
Py_DECREF(self->printer);
Py_INCREF(value);
self->printer = value;
@@ -338,9 +345,9 @@
return -1;
}
int len = PyList_Size(value);
- for (int i = 0; i<len; i++){
+ for (int i = 0; i < len; i++) {
PyObject *tmp = PyList_GetItem(value, i);
- if (!PyInt_Check(tmp)){
+ if (!PyInt_Check(tmp)) {
PyErr_SetString(PyExc_TypeError, "'pages' attribute must be list containing only integers.");
return -1;
}
@@ -394,27 +401,24 @@
if (!checkHaveDocument()) {
return nullptr;
}
-// copied from void ScribusMainWindow::slotFilePrint() in file scribus.cpp
- QString fna, prn, cmd, cc, SepName;
- QString printcomm;
- bool fil;
-
-// ReOrderText(ScCore->primaryMainWindow()->doc, ScCore->primaryMainWindow()->view);
- prn = QString(PyString_AsString(self->printer));
- fna = QString(PyString_AsString(self->file));
- fil = QString(PyString_AsString(self->printer)) == QString("File");
- std::vector<int> pageNs;
+
+// ReOrderText(ScCore->primaryMainWindow()->doc, ScCore->primaryMainWindow()->view);
+ QString prn = QString(PyString_AsString(self->printer));
+ QString fna = QString(PyString_AsString(self->file));
+ bool fil = QString(PyString_AsString(self->printer)) == QString("File");
+ QString sepName = QString(PyString_AsString(self->separation));
+
PrintOptions options;
for (int i = 0; i < PyList_Size(self->pages); ++i) {
- options.pageNumbers.push_back((int)PyInt_AsLong(PyList_GetItem(self->pages, i)));
- }
- int copyCount = (self->copies < 1) ? 1 : self->copies;
- SepName = QString(PyString_AsString(self->separation));
+ options.pageNumbers.push_back((int) PyInt_AsLong(PyList_GetItem(self->pages, i)));
+ }
options.printer = prn;
- options.prnEngine = (PrintEngine) self->pslevel;
+ options.prnLanguage = (PrintLanguage) self->prnLang;
+ options.copies = (self->copies < 1) ? 1 : self->copies;
options.toFile = fil;
- options.separationName = SepName;
- options.outputSeparations = SepName != QString("No");
+ options.filename = fil ? fna : QString();
+ options.separationName = sepName;
+ options.outputSeparations = sepName != QString("No");
options.useSpotColors = true;
options.useColor = self->color;
options.mirrorH = self->mph;
@@ -429,9 +433,14 @@
options.includePDFMarks = false;
options.markOffset = 0.0;
options.bleeds.set(0, 0, 0, 0);
- if (!PrinterUtil::checkPrintEngineSupport(options.printer, options.prnEngine, options.toFile))
- options.prnEngine = PrinterUtil::getDefaultPrintEngine(options.printer, options.toFile);
- printcomm = QString(PyString_AsString(self->cmd));
+ if (!PrinterUtil::checkPrintLanguageSupport(options.printer, options.prnLanguage, options.toFile))
+ options.prnLanguage = PrinterUtil::getDefaultPrintLanguage(options.printer, options.toFile);
+ if (options.prnLanguage == PrintLanguage::PDF || options.prnLanguage == PrintLanguage::WindowsGDI)
+ {
+ options.separationName = "All";
+ options.outputSeparations = false;
+ }
+ options.printerCommand = QString(PyString_AsString(self->cmd));
ScribusDoc* currentDoc = ScCore->primaryMainWindow()->doc;
@@ -451,55 +460,26 @@
}
#endif
- QScopedPointer<PSLib> psLib(new PSLib(currentDoc, options, PSLib::OutputPS, ¤tDoc->PageColors));
- if (psLib.isNull())
+ if (options.prnLanguage == PrintLanguage::PostScript1 || options.prnLanguage == PrintLanguage::PostScript2)
{
- PyErr_SetString(PyExc_SystemError, "Memory allocation error");
- return nullptr;
- }
-
- if (!fil)
- fna = QDir::toNativeSeparators(ScPaths::tempFileDir() + "/tmp.ps");
- fna = QDir::toNativeSeparators(fna);
-
- int printed = psLib->createPS(fna);
- if (printed == 1)
- {
- PyErr_SetString(PyExc_SystemError, "Printing failed");
- return nullptr;
- }
-
- if (options.prnEngine == PrintEngine::PostScript1 || options.prnEngine == PrintEngine::PostScript2)
- {
- if (ScCore->haveGS())
- {
- QString tmp;
- QStringList opts;
- opts.append( QString("-dDEVICEWIDTHPOINTS=%1").arg(tmp.setNum(currentDoc->pageWidth())) );
- opts.append( QString("-dDEVICEHEIGHTPOINTS=%1").arg(tmp.setNum(currentDoc->pageHeight())) );
- convertPS2PS(fna, fna + ".tmp", opts, (int) options.prnEngine);
- moveFile( fna + ".tmp", fna );
- }
- else
+ if (!ScCore->haveGS())
{
PyErr_SetString(PyExc_SystemError, "Printing failed : GhostScript is needed to print to PostScript Level 1 or Level 2");
Py_RETURN_NONE;
}
}
-
- if (!fil)
+
+ QScopedPointer<ScPrintEngine> printEngine;
+ if (options.prnLanguage == PrintLanguage::PDF)
+ printEngine.reset(new ScPrintEngine_PDF(*currentDoc));
+ else
+ printEngine.reset(new ScPrintEngine_PS(*currentDoc));
+
+ bool printDone = printEngine->print(options);
+ if (!printDone)
{
- if (!printcomm.isEmpty())
- cmd = printcomm + " "+fna;
- else
- {
- cmd = "lpr -P" + prn;
- if (copyCount > 1)
- cmd += " -#" + cc.setNum(copyCount);
- cmd += " "+fna;
- }
- system(cmd.toLocal8Bit().constData());
- unlink(fna.toLocal8Bit().constData());
+ QString error = printEngine->errorMessage();
+ PyErr_SetString(PyExc_SystemError, error.toLocal8Bit().constData());
}
Py_RETURN_NONE;
Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp Sat Oct 3 22:57:53 2020
@@ -727,6 +727,7 @@
PyDict_SetItemString(d, const_cast<char*>("ICON_INFORMATION"), Py_BuildValue(const_cast<char*>("i"), QMessageBox::Information));
PyDict_SetItemString(d, const_cast<char*>("ICON_WARNING"), Py_BuildValue(const_cast<char*>("i"), QMessageBox::Warning));
PyDict_SetItemString(d, const_cast<char*>("ICON_CRITICAL"), Py_BuildValue(const_cast<char*>("i"), QMessageBox::Critical));
+ // Paper formats
PyDict_SetItemString(d, const_cast<char*>("PAPER_A0"), Py_BuildValue(const_cast<char*>("(ff)"), 2380.0, 3368.0));
PyDict_SetItemString(d, const_cast<char*>("PAPER_A1"), Py_BuildValue(const_cast<char*>("(ff)"), 1684.0, 2380.0));
PyDict_SetItemString(d, const_cast<char*>("PAPER_A2"), Py_BuildValue(const_cast<char*>("(ff)"), 1190.0, 1684.0));
@@ -778,12 +779,14 @@
PyDict_SetItemString(d, const_cast<char*>("PAPER_LEGAL"), Py_BuildValue(const_cast<char*>("(ff)"), 612.0, 1008.0));
PyDict_SetItemString(d, const_cast<char*>("PAPER_LETTER"), Py_BuildValue(const_cast<char*>("(ff)"), 612.0, 792.0));
PyDict_SetItemString(d, const_cast<char*>("PAPER_TABLOID"), Py_BuildValue(const_cast<char*>("(ff)"), 792.0, 1224.0));
+ // Colorspaces
PyDict_SetItemString(d, const_cast<char*>("CSPACE_UNDEFINED"), Py_BuildValue(const_cast<char*>("i"), -1));
PyDict_SetItemString(d, const_cast<char*>("CSPACE_RGB"), Py_BuildValue(const_cast<char*>("i"), 0));
PyDict_SetItemString(d, const_cast<char*>("CSPACE_CMYK"), Py_BuildValue(const_cast<char*>("i"), 1));
PyDict_SetItemString(d, const_cast<char*>("CSPACE_GRAY"), Py_BuildValue(const_cast<char*>("i"), 2));
PyDict_SetItemString(d, const_cast<char*>("CSPACE_DUOTONE"), Py_BuildValue(const_cast<char*>("i"), 3));
PyDict_SetItemString(d, const_cast<char*>("CSPACE_MONOCHROME"), Py_BuildValue(const_cast<char*>("i"), 4));
+ // Blend modes
PyDict_SetItemString(d, const_cast<char*>("NORMAL"), Py_BuildValue(const_cast<char*>("i"), 0));
PyDict_SetItemString(d, const_cast<char*>("DARKEN"), Py_BuildValue(const_cast<char*>("i"), 1));
PyDict_SetItemString(d, const_cast<char*>("LIGHTEN"), Py_BuildValue(const_cast<char*>("i"), 2));
@@ -800,12 +803,18 @@
PyDict_SetItemString(d, const_cast<char*>("SATURATION"), Py_BuildValue(const_cast<char*>("i"), 13));
PyDict_SetItemString(d, const_cast<char*>("COLOR"), Py_BuildValue(const_cast<char*>("i"), 14));
PyDict_SetItemString(d, const_cast<char*>("LUMINOSITY"), Py_BuildValue(const_cast<char*>("i"), 15));
- // preset page layouts
+ // Preset page layouts
PyDict_SetItemString(d, const_cast<char*>("PAGE_1"), Py_BuildValue(const_cast<char*>("i"), 0));
PyDict_SetItemString(d, const_cast<char*>("PAGE_2"), Py_BuildValue(const_cast<char*>("i"), 1));
PyDict_SetItemString(d, const_cast<char*>("PAGE_3"), Py_BuildValue(const_cast<char*>("i"), 2));
PyDict_SetItemString(d, const_cast<char*>("PAGE_4"), Py_BuildValue(const_cast<char*>("i"), 3));
- // tab alignment
+ // Print languages
+ PyDict_SetItemString(d, const_cast<char*>("PRNLANG_POSTSCRIPT1"), Py_BuildValue(const_cast<char*>("i"), (int) PrintLanguage::PostScript1));
+ PyDict_SetItemString(d, const_cast<char*>("PRNLANG_POSTSCRIPT2"), Py_BuildValue(const_cast<char*>("i"), (int) PrintLanguage::PostScript2));
+ PyDict_SetItemString(d, const_cast<char*>("PRNLANG_POSTSCRIPT3"), Py_BuildValue(const_cast<char*>("i"), (int) PrintLanguage::PostScript3));
+ PyDict_SetItemString(d, const_cast<char*>("PRNLANG_WINDOWSGDI"), Py_BuildValue(const_cast<char*>("i"), (int) PrintLanguage::WindowsGDI));
+ PyDict_SetItemString(d, const_cast<char*>("PRNLANG_PDF"), Py_BuildValue(const_cast<char*>("i"), (int) PrintLanguage::PDF));
+ // Tab alignment
PyDict_SetItemString(d, const_cast<char*>("TAB_LEFT"), Py_BuildValue(const_cast<char*>("i"), 0));
PyDict_SetItemString(d, const_cast<char*>("TAB_RIGHT"), Py_BuildValue(const_cast<char*>("i"), 1));
PyDict_SetItemString(d, const_cast<char*>("TAB_PERIOD"), Py_BuildValue(const_cast<char*>("i"), 2));
Modified: trunk/Scribus/scribus/printpreviewcreator.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/printpreviewcreator.h
==============================================================================
--- trunk/Scribus/scribus/printpreviewcreator.h (original)
+++ trunk/Scribus/scribus/printpreviewcreator.h Sat Oct 3 22:57:53 2020
@@ -29,6 +29,12 @@
* @retval pixmap QPixmap print preview
*/
virtual QPixmap createPreview(int pageIndex) = 0;
+
+ /**
+ * @brief If print preview is generated with Ghostscript
+ * @retval bool
+ */
+ virtual bool isGhostscriptBased() const = 0;
/**
* @brief Return if antialiasing is currently enabled or not
Modified: trunk/Scribus/scribus/printpreviewcreator_gdi.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/printpreviewcreator_gdi.cpp
==============================================================================
--- trunk/Scribus/scribus/printpreviewcreator_gdi.cpp (original)
+++ trunk/Scribus/scribus/printpreviewcreator_gdi.cpp Sat Oct 3 22:57:53 2020
@@ -19,7 +19,7 @@
PrintPreviewCreator_GDI::PrintPreviewCreator_GDI(ScribusDoc* doc) :
PrintPreviewCreator(doc)
{
- m_printOptions.prnEngine = PrintEngine::WindowsGDI;
+ m_printOptions.prnLanguage = PrintLanguage::WindowsGDI;
// Generate a template name for temporary files
QTemporaryFile *tempFile = new QTemporaryFile(ScPaths::tempFileDir() + "/scgdipreview_XXXXXX.png");
@@ -112,7 +112,7 @@
options.mirrorV = m_printOptions.mirrorV;
options.outputSeparations = false;
options.pageNumbers.push_back(pageIndex);
- options.prnEngine = PrintEngine::WindowsGDI;
+ options.prnLanguage = PrintLanguage::WindowsGDI;
options.separationName = "All";
options.toFile = false;
options.useColor = m_printOptions.useColor;
@@ -126,6 +126,6 @@
void PrintPreviewCreator_GDI::setPrintOptions(const PrintOptions& options)
{
m_printOptions = options;
- m_printOptions.prnEngine = PrintEngine::WindowsGDI;
+ m_printOptions.prnLanguage = PrintLanguage::WindowsGDI;
m_printOptionsChanged = true;
}
Modified: trunk/Scribus/scribus/printpreviewcreator_gdi.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/printpreviewcreator_gdi.h
==============================================================================
--- trunk/Scribus/scribus/printpreviewcreator_gdi.h (original)
+++ trunk/Scribus/scribus/printpreviewcreator_gdi.h Sat Oct 3 22:57:53 2020
@@ -28,6 +28,12 @@
QPixmap createPreview(int pageIndex) override;
/**
+ * @brief If print preview is generated with Ghostscript
+ * @retval bool
+ */
+ bool isGhostscriptBased() const override { return false; }
+
+ /**
* @brief Set options used for generating print preview
*/
void setPrintOptions(const PrintOptions& options) override;
Modified: trunk/Scribus/scribus/printpreviewcreator_pdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/printpreviewcreator_pdf.cpp
==============================================================================
--- trunk/Scribus/scribus/printpreviewcreator_pdf.cpp (original)
+++ trunk/Scribus/scribus/printpreviewcreator_pdf.cpp Sat Oct 3 22:57:53 2020
@@ -32,7 +32,7 @@
m_prefsManager(PrefsManager::instance())
{
m_pdfPrintEngine = new ScPrintEngine_PDF(*doc);
- m_printOptions.prnEngine = PrintEngine::PDF;
+ m_printOptions.prnLanguage = PrintLanguage::PDF;
// Generate a template name for temporary files
QTemporaryFile *tempFile = new QTemporaryFile(ScPaths::tempFileDir() + "/scpdfpreview_XXXXXX.png");
@@ -568,7 +568,7 @@
void PrintPreviewCreator_PDF::setPrintOptions(const PrintOptions& options)
{
m_printOptions = options;
- m_printOptions.prnEngine = PrintEngine::PDF;
+ m_printOptions.prnLanguage = PrintLanguage::PDF;
m_printOptionsChanged = true;
}
Modified: trunk/Scribus/scribus/printpreviewcreator_pdf.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/printpreviewcreator_pdf.h
==============================================================================
--- trunk/Scribus/scribus/printpreviewcreator_pdf.h (original)
+++ trunk/Scribus/scribus/printpreviewcreator_pdf.h Sat Oct 3 22:57:53 2020
@@ -31,6 +31,12 @@
* @retval pixmap QPixmap print preview
*/
QPixmap createPreview(int pageIndex) override;
+
+ /**
+ * @brief If print preview is generated with Ghostscript
+ * @retval bool
+ */
+ bool isGhostscriptBased() const override { return true; }
/**
* @brief Set options used for generating print preview
Modified: trunk/Scribus/scribus/printpreviewcreator_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/printpreviewcreator_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/printpreviewcreator_ps.cpp (original)
+++ trunk/Scribus/scribus/printpreviewcreator_ps.cpp Sat Oct 3 22:57:53 2020
@@ -30,7 +30,7 @@
SeparationPreviewCreator(doc),
m_prefsManager(PrefsManager::instance())
{
- m_printOptions.prnEngine = PrintEngine::PostScript3;
+ m_printOptions.prnLanguage = PrintLanguage::PostScript3;
// Generate a template name for temporary files
QTemporaryFile *tempFile = new QTemporaryFile(ScPaths::tempFileDir() + "/scpspreview_XXXXXX.png");
@@ -354,7 +354,7 @@
delete psLib;
// TODO : Postscript level < 3
- if (success && (printOptions.prnEngine != PrintEngine::PostScript3))
+ if (success && (printOptions.prnLanguage != PrintLanguage::PostScript3))
{
// use gs to convert our PS to a lower version
QStringList opts;
@@ -366,8 +366,8 @@
opts.append( QString("-dDEVICEWIDTHPOINTS=%1").arg(QString::number(pageWidth)) );
opts.append( QString("-dDEVICEHEIGHTPOINTS=%1").arg(QString::number(pageHeight)) );
- QString outFileName = ScPaths::tempFileDir() + "/" + m_tempBaseName + ".ps" + QString::number((int) printOptions.prnEngine);
- success = (convertPS2PS(psFileName, outFileName, opts, (int) printOptions.prnEngine) == 0);
+ QString outFileName = ScPaths::tempFileDir() + "/" + m_tempBaseName + ".ps" + QString::number((int) printOptions.prnLanguage);
+ success = (convertPS2PS(psFileName, outFileName, opts, (int) printOptions.prnLanguage) == 0);
if (!success)
return false;
success &= QFile::remove(psFileName);
@@ -595,7 +595,7 @@
void PrintPreviewCreator_PS::setPrintOptions(const PrintOptions& options)
{
m_printOptions = options;
- m_printOptions.prnEngine = PrintEngine::PostScript3;
+ m_printOptions.prnLanguage = PrintLanguage::PostScript3;
m_printOptionsChanged = true;
}
Modified: trunk/Scribus/scribus/printpreviewcreator_ps.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/printpreviewcreator_ps.h
==============================================================================
--- trunk/Scribus/scribus/printpreviewcreator_ps.h (original)
+++ trunk/Scribus/scribus/printpreviewcreator_ps.h Sat Oct 3 22:57:53 2020
@@ -30,6 +30,12 @@
* @retval pixmap QPixmap print preview
*/
QPixmap createPreview(int pageIndex) override;
+
+ /**
+ * @brief If print preview is generated with Ghostscript
+ * @retval bool
+ */
+ bool isGhostscriptBased() const override { return true; }
/**
* @brief Set options used for generating print preview
Modified: trunk/Scribus/scribus/printpreviewcreatorfactory.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/printpreviewcreatorfactory.cpp
==============================================================================
--- trunk/Scribus/scribus/printpreviewcreatorfactory.cpp (original)
+++ trunk/Scribus/scribus/printpreviewcreatorfactory.cpp Sat Oct 3 22:57:53 2020
@@ -12,23 +12,23 @@
#include "printpreviewcreator_pdf.h"
#include "printpreviewcreator_ps.h"
-PrintPreviewCreator* PrintPreviewCreatorFactory::create(ScribusDoc* doc, PrintEngine prnEngine)
+PrintPreviewCreator* PrintPreviewCreatorFactory::create(ScribusDoc* doc, PrintLanguage prnLanguage)
{
#ifdef Q_OS_WIN32
- if (prnEngine == PrintEngine::WindowsGDI)
+ if (prnLanguage == PrintLanguage::WindowsGDI)
{
PrintPreviewCreator* generator = new PrintPreviewCreator_GDI(doc);
return generator;
}
#endif
- if (prnEngine == PrintEngine::PostScript1 || prnEngine == PrintEngine::PostScript2 || prnEngine == PrintEngine::PostScript3)
+ if (prnLanguage == PrintLanguage::PostScript1 || prnLanguage == PrintLanguage::PostScript2 || prnLanguage == PrintLanguage::PostScript3)
{
PrintPreviewCreator* generator = new PrintPreviewCreator_PS(doc);
return generator;
}
- if (prnEngine == PrintEngine::PDF)
+ if (prnLanguage == PrintLanguage::PDF)
{
PrintPreviewCreator* generator = new PrintPreviewCreator_PDF(doc);
return generator;
Modified: trunk/Scribus/scribus/printpreviewcreatorfactory.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/printpreviewcreatorfactory.h
==============================================================================
--- trunk/Scribus/scribus/printpreviewcreatorfactory.h (original)
+++ trunk/Scribus/scribus/printpreviewcreatorfactory.h Sat Oct 3 22:57:53 2020
@@ -15,7 +15,7 @@
class PrintPreviewCreatorFactory
{
public:
- static PrintPreviewCreator* create(ScribusDoc* doc, PrintEngine prnEngine);
+ static PrintPreviewCreator* create(ScribusDoc* doc, PrintLanguage prnLanguage);
};
#endif
Modified: trunk/Scribus/scribus/scprintengine.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/scprintengine.h
==============================================================================
--- trunk/Scribus/scribus/scprintengine.h (original)
+++ trunk/Scribus/scribus/scprintengine.h Sat Oct 3 22:57:53 2020
@@ -9,10 +9,12 @@
#include <QObject>
+#include "scribusapi.h"
+
class ScribusDoc;
struct PrintOptions;
-class ScPrintEngine : public QObject
+class SCRIBUS_API ScPrintEngine : public QObject
{
Q_OBJECT
Modified: trunk/Scribus/scribus/scprintengine_gdi.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/scprintengine_gdi.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_gdi.cpp (original)
+++ trunk/Scribus/scribus/scprintengine_gdi.cpp Sat Oct 3 22:57:53 2020
@@ -216,7 +216,7 @@
// Test printer for PostScript support and
// choose appropriate page printing function
bool psPrint = isPostscriptPrinter(printerDC);
- bool useGDI = (!psPrint || m_forceGDI || (options.prnEngine == PrintEngine::WindowsGDI));
+ bool useGDI = (!psPrint || m_forceGDI || (options.prnLanguage == PrintLanguage::WindowsGDI));
printPageFunc = (useGDI) ? &ScPrintEngine_GDI::printPage_GDI : &ScPrintEngine_GDI::printPage_PS;
// Setup document infos structure
@@ -442,7 +442,7 @@
delete dd;
if (ret != 0) return false;
- if (options.prnEngine == PrintEngine::PostScript1 || options.prnEngine == PrintEngine::PostScript2)
+ if (options.prnLanguage == PrintLanguage::PostScript1 || options.prnLanguage == PrintLanguage::PostScript2)
{
QString tmp;
QStringList opts;
@@ -451,7 +451,7 @@
opts.append( QString("-dDEVICEHEIGHTPOINTS=%1").arg(tmp.setNum(m_doc.pageHeight())));
if (QFile::exists(tempFilePath2))
QFile::remove(tempFilePath2);
- ret = convertPS2PS(tempFilePath, tempFilePath2, opts, (int) options.prnEngine);
+ ret = convertPS2PS(tempFilePath, tempFilePath2, opts, (int) options.prnLanguage);
if (ret == 0)
{
QFile::remove(tempFilePath);
Modified: trunk/Scribus/scribus/scprintengine_pdf.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/scprintengine_pdf.h
==============================================================================
--- trunk/Scribus/scribus/scprintengine_pdf.h (original)
+++ trunk/Scribus/scribus/scprintengine_pdf.h Sat Oct 3 22:57:53 2020
@@ -9,8 +9,9 @@
#include "pdfoptions.h"
#include "scprintengine.h"
+#include "scribusapi.h"
-class ScPrintEngine_PDF : public ScPrintEngine
+class SCRIBUS_API ScPrintEngine_PDF : public ScPrintEngine
{
friend class PrintPreviewCreator_PDF;
Modified: trunk/Scribus/scribus/scprintengine_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/scprintengine_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_ps.cpp (original)
+++ trunk/Scribus/scribus/scprintengine_ps.cpp Sat Oct 3 22:57:53 2020
@@ -42,14 +42,14 @@
m_errorMessage = dd->errorMessage();
return false;
}
- if (options.prnEngine != PrintEngine::PostScript3 && ScCore->haveGS())
+ if (options.prnLanguage != PrintLanguage::PostScript3 && ScCore->haveGS())
{
// use gs to convert our PS to a lower version
QString tmp;
QStringList opts;
opts.append( QString("-dDEVICEWIDTHPOINTS=%1").arg(tmp.setNum(m_doc.pageWidth())) );
opts.append( QString("-dDEVICEHEIGHTPOINTS=%1").arg(tmp.setNum(m_doc.pageHeight())) );
- convertPS2PS(filename, filename + ".tmp", opts, (int) options.prnEngine);
+ convertPS2PS(filename, filename + ".tmp", opts, (int) options.prnLanguage);
moveFile(filename + ".tmp", filename);
}
if (options.toFile)
Modified: trunk/Scribus/scribus/scprintengine_ps.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/scprintengine_ps.h
==============================================================================
--- trunk/Scribus/scribus/scprintengine_ps.h (original)
+++ trunk/Scribus/scribus/scprintengine_ps.h Sat Oct 3 22:57:53 2020
@@ -8,8 +8,9 @@
#define SCPRINTENGINE_PS_H
#include "scprintengine.h"
+#include "scribusapi.h"
-class ScPrintEngine_PS : public ScPrintEngine
+class SCRIBUS_API ScPrintEngine_PS : public ScPrintEngine
{
public:
ScPrintEngine_PS(ScribusDoc& doc);
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sat Oct 3 22:57:53 2020
@@ -144,6 +144,7 @@
#include "scmimedata.h"
#include "scpage.h"
#include "scpaths.h"
+#include "scprintengine_pdf.h"
#include "scprintengine_ps.h"
#include "scraction.h"
#include "scribusXml.h"
@@ -4349,12 +4350,17 @@
ScCore->fileWatcher->stop();
ScPrintEngine* prnEngine = nullptr;
#if defined(_WIN32)
- if (doc->Print_Options.toFile)
+ if (doc->Print_Options.toFile && (options.prnLanguage == PrintLanguage::PDF))
+ prnEngine = dynamic_cast<ScPrintEngine*>(new ScPrintEngine_PDF(*doc));
+ else if (doc->Print_Options.toFile)
prnEngine = dynamic_cast<ScPrintEngine*>(new ScPrintEngine_PS(*doc));
else
prnEngine = dynamic_cast<ScPrintEngine*>(new ScPrintEngine_GDI(*doc));
#else
- prnEngine = dynamic_cast<ScPrintEngine*>(new ScPrintEngine_PS(*doc));
+ if (options.prnLanguage == PrintLanguage::PDF)
+ prnEngine = dynamic_cast<ScPrintEngine*>(new ScPrintEngine_PDF(*doc));
+ else
+ prnEngine = dynamic_cast<ScPrintEngine*>(new ScPrintEngine_PS(*doc));
#endif
if (prnEngine)
{
@@ -6764,10 +6770,10 @@
}
PrefsContext* prefs = PrefsManager::instance().prefsFile->getContext("print_options");
QString currentPrinter(prefs->get("CurrentPrn"));
- PrintEngine currentEngine = (PrintEngine) prefs->get("CurrentPrnEngine", "3").toInt();
- if (PrintPreview::usePostscriptPreview(currentPrinter, currentEngine) && (!ScCore->haveGS()) )
- {
- QString mess(tr("Ghostscript is missing : PostScript Print Preview is not available")+"\n\n");
+ PrintLanguage currentEngine = (PrintLanguage) prefs->get("CurrentPrnEngine", "3").toInt();
+ if (PrintPreview::usesGhostscript(currentPrinter, currentEngine) && (!ScCore->haveGS()) )
+ {
+ QString mess(tr("Ghostscript is missing : PostScript Print Preview is not available") + "\n\n");
ScMessageBox::warning(this, CommonStrings::trWarning, mess);
return;
}
@@ -6779,7 +6785,7 @@
prefsManager.appPrefs.printPreviewPrefs.PrPr_Mode = dia->isCMYKPreviewEnabled();
prefsManager.appPrefs.printPreviewPrefs.PrPr_AntiAliasing = dia->isAntialiasingEnabled();
prefsManager.appPrefs.printPreviewPrefs.PrPr_Transparency = dia->isTransparencyEnabled();
- if (ScCore->haveTIFFSep() && dia->usePostScriptPreview())
+ if (ScCore->haveTIFFSep() && dia->useGhostscriptPreview())
{
prefsManager.appPrefs.printPreviewPrefs.PrPr_C = dia->isInkChannelVisible("Cyan");
prefsManager.appPrefs.printPreviewPrefs.PrPr_M = dia->isInkChannelVisible("Magenta");
Modified: trunk/Scribus/scribus/scribusstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/scribusstructs.h
==============================================================================
--- trunk/Scribus/scribus/scribusstructs.h (original)
+++ trunk/Scribus/scribus/scribusstructs.h Sat Oct 3 22:57:53 2020
@@ -212,7 +212,7 @@
int menuPos;
};
-enum class PrintEngine
+enum class PrintLanguage
{
PostScript1 = 1,
PostScript2 = 2,
@@ -220,7 +220,7 @@
WindowsGDI = 4,
PDF = 5
};
-typedef QMap<QString, PrintEngine> PrintEngineMap;
+typedef QMap<QString, PrintLanguage> PrintLanguageMap;
struct PrintOptions
{
@@ -242,7 +242,7 @@
bool colorMarks { false };
bool includePDFMarks { true };
int copies { 1 };
- PrintEngine prnEngine { PrintEngine::PostScript3 };
+ PrintLanguage prnLanguage { PrintLanguage::PostScript3 };
double markLength { 20.0 };
double markOffset { 0.0 };
MarginStruct bleeds;
Modified: trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outputpreview_pdf.cpp (original)
+++ trunk/Scribus/scribus/ui/outputpreview_pdf.cpp Sat Oct 3 22:57:53 2020
@@ -186,6 +186,8 @@
QPixmap previewPix = createPreview(m_doc->currentPageNumber(), qRound(72 * m_scaleFactor));
m_previewLabel->setPixmap(previewPix);
m_previewLabel->resize(previewPix.size());
+
+ m_uiBase->pageSelector->setGUIForPage(m_doc->currentPage()->pageNr());
int w = m_previewLabel->width() + inkTableWidth + 50;
resize(qMin(QApplication::desktop()->width() - 30, w), 500);
Modified: trunk/Scribus/scribus/ui/outputpreview_pdf.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/ui/outputpreview_pdf.ui
==============================================================================
--- trunk/Scribus/scribus/ui/outputpreview_pdf.ui (original)
+++ trunk/Scribus/scribus/ui/outputpreview_pdf.ui Sat Oct 3 22:57:53 2020
@@ -197,6 +197,9 @@
<property name="maximum">
<double>400.000000000000000</double>
</property>
+ <property name="singleStep">
+ <double>10.000000000000000</double>
+ </property>
<property name="value">
<double>300.000000000000000</double>
</property>
@@ -211,14 +214,14 @@
</widget>
<customwidgets>
<customwidget>
+ <class>ScrSpinBox</class>
+ <extends>QDoubleSpinBox</extends>
+ <header>ui/scrspinbox.h</header>
+ </customwidget>
+ <customwidget>
<class>PdfVersionCombo</class>
<extends>QComboBox</extends>
<header>ui/pdfversioncombo.h</header>
- </customwidget>
- <customwidget>
- <class>ScrSpinBox</class>
- <extends>QDoubleSpinBox</extends>
- <header>ui/scrspinbox.h</header>
</customwidget>
</customwidgets>
<resources/>
Modified: trunk/Scribus/scribus/ui/outputpreview_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/ui/outputpreview_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outputpreview_ps.cpp (original)
+++ trunk/Scribus/scribus/ui/outputpreview_ps.cpp Sat Oct 3 22:57:53 2020
@@ -189,7 +189,7 @@
if (m_printOptions.firstUse)
PrinterUtil::getDefaultPrintOptions(m_printOptions, m_doc->bleedsVal());
- m_printOptions.prnEngine = PrintEngine::PostScript3;
+ m_printOptions.prnLanguage = PrintLanguage::PostScript3;
m_printOptions.outputSeparations = false;
m_printOptions.separationName = "All";
m_printOptions.allSeparations = QStringList();
@@ -207,6 +207,8 @@
QPixmap previewPix = createPreview(m_doc->currentPageNumber(), qRound(72 * m_scaleFactor));
m_previewLabel->setPixmap(previewPix);
m_previewLabel->resize(previewPix.size());
+
+ m_uiBase->pageSelector->setGUIForPage(m_doc->currentPage()->pageNr());
int w = m_previewLabel->width() + inkTableWidth + 50;
resize(qMin(QApplication::desktop()->width() - 30, w), 500);
@@ -577,7 +579,7 @@
delete psLib;
// TODO : Postscript level < 3
- if (success && (m_printOptions.prnEngine != PrintEngine::PostScript3))
+ if (success && (m_printOptions.prnLanguage != PrintLanguage::PostScript3))
{
// use gs to convert our PS to a lower version
QStringList opts;
@@ -589,8 +591,8 @@
opts.append( QString("-dDEVICEWIDTHPOINTS=%1").arg(QString::number(pageWidth)) );
opts.append( QString("-dDEVICEHEIGHTPOINTS=%1").arg(QString::number(pageHeight)) );
- QString outFileName = ScPaths::tempFileDir() + "/" + m_tempBaseName + ".ps" + QString::number((int) m_printOptions.prnEngine);
- success = (convertPS2PS(psFileName, outFileName, opts, (int) m_printOptions.prnEngine) == 0);
+ QString outFileName = ScPaths::tempFileDir() + "/" + m_tempBaseName + ".ps" + QString::number((int) m_printOptions.prnLanguage);
+ success = (convertPS2PS(psFileName, outFileName, opts, (int) m_printOptions.prnLanguage) == 0);
if (!success)
return false;
success &= QFile::remove(psFileName);
@@ -872,7 +874,7 @@
void OutputPreview_PS::setPrintOptionsToOptions(PrintOptions& prnOptions)
{
// TODO : finish
- m_psLevel = qMax(1, qMin((int) prnOptions.prnEngine, 3));
+ m_psLevel = qMax(1, qMin((int) prnOptions.prnLanguage, 3));
m_colorOutputMode = prnOptions.useColor ? 0 : 1;
m_mirrorH = prnOptions.mirrorH;
@@ -885,7 +887,7 @@
void OutputPreview_PS::setPrintOptionsToUi(PrintOptions& prnOptions)
{
// TODO : finish
- int psLevel = qMax(1, qMin((int) prnOptions.prnEngine, 3));
+ int psLevel = qMax(1, qMin((int) prnOptions.prnLanguage, 3));
m_optionsUi->psLevelCombo->setCurrentIndex(psLevel - 1);
m_optionsUi->colorOutputMode->setCurrentIndex(prnOptions.useColor ? 0 : 1);
@@ -906,7 +908,7 @@
void OutputPreview_PS::setUiOptionsToPrintOptions(PrintOptions& prnOptions)
{
// TODO : finish
- prnOptions.prnEngine = (PrintEngine) (m_optionsUi->psLevelCombo->currentIndex() + 1);
+ prnOptions.prnLanguage = (PrintLanguage) (m_optionsUi->psLevelCombo->currentIndex() + 1);
prnOptions.useColor = (m_optionsUi->colorOutputMode->currentIndex() == 0);
prnOptions.mirrorH = m_optionsUi->mirrorH->isChecked();
Modified: trunk/Scribus/scribus/ui/outputpreview_ps.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/ui/outputpreview_ps.ui
==============================================================================
--- trunk/Scribus/scribus/ui/outputpreview_ps.ui (original)
+++ trunk/Scribus/scribus/ui/outputpreview_ps.ui Sat Oct 3 22:57:53 2020
@@ -202,6 +202,9 @@
<property name="maximum">
<double>400.000000000000000</double>
</property>
+ <property name="singleStep">
+ <double>10.000000000000000</double>
+ </property>
<property name="value">
<double>300.000000000000000</double>
</property>
Modified: trunk/Scribus/scribus/ui/prefs_printer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/ui/prefs_printer.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_printer.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_printer.cpp Sat Oct 3 22:57:53 2020
@@ -31,7 +31,7 @@
{
clipToPrinterMarginsCheckBox->setToolTip( "<qt>" + tr( "Do not show objects outside the margins on the printed page" ) + "</qt>" );
altPrinterCmdLineEdit->setToolTip("<qt>" + tr( "Use an alternative print manager, such as kprinter or gtklp, to utilize additional printing options") + "</qt>" );
- postscriptLevelComboBox->setToolTip("<qt>" + tr( "Sets the PostScript Level.\n Setting to Level 1 or 2 can create huge files." ) + "</qt>" );
+ printLanguageComboBox->setToolTip("<qt>" + tr( "Sets the printing language to use.\n Setting to Postscript Level 1 or 2 can create huge files." ) + "</qt>" );
applyUnderColorRemovalCheckBox->setToolTip( "<qt>" + tr( "A way of switching off some of the gray shades which are composed of cyan, yellow and magenta and using black instead. UCR most affects parts of images which are neutral and/or dark tones which are close to the gray. Use of this may improve printing some images and some experimentation and testing is need on a case by case basis. UCR reduces the possibility of over saturation with CMY inks." ) + "</qt>");
convertSpotsToProcessCheckBox->setToolTip("<qt>" + tr( "Enables Spot Colors to be converted to composite colors. Unless you are planning to print spot colors at a commercial printer, this is probably best left enabled." ) + "</qt>");
setMediaSizeCheckBox->setToolTip( "<qt>" + tr( "This enables you to explicitly set the media size of the PostScript file. Not recommended unless requested by your printer." ) + "</qt>");
@@ -59,7 +59,7 @@
printerName = printerNames[i];
destinationComboBox->addItem(printerName);
}
- destinationComboBox->addItem( tr("File"));
+ destinationComboBox->addItem(CommonStrings::trFile);
PrefsContext* prefs = PrefsManager::instance().prefsFile->getContext("print_options");
@@ -69,12 +69,19 @@
prnIndex = destinationComboBox->findText(PrinterUtil::getDefaultPrinterName());
if ((prnIndex > -1) && (prnIndex < destinationComboBox->count()))
destinationComboBox->setCurrentIndex(prnIndex);
+
+ printerName = destinationComboBox->currentText();
+ bool printToFile = (destinationComboBox->currentIndex() == destinationComboBox->count() - 1);
+ printLanguageComboBox->setupLanguages(printerName, printToFile);
+
+ PrintLanguage printLang = (PrintLanguage) prefs->getInt("PrintLanguage", (int) PrinterUtil::getDefaultPrintLanguage(printerName, printToFile));
+ printLanguageComboBox->setCurrentLanguage(printLang);
+
useAltPrinterCmdCheckBox->setChecked(prefs->getBool("OtherCom", false));
selOtherComm();
altPrinterCmdLineEdit->setText(prefs->get("Command", ""));
outputComboBox->setCurrentIndex(prefs->getInt("Separations", 0));
- postscriptPrintToColorComboBox->setCurrentIndex(prefs->getInt("PrintColor", 0));
- postscriptLevelComboBox->setCurrentIndex(prefs->getInt("PSLevel", 3) - 1);
+ colorOutputModeComboBox->setCurrentIndex(prefs->getInt("PrintColor", 0));
pageMirrorHorizontallyCheckBox->setChecked(prefs->getBool("MirrorH", false));
pageMirrorVerticallyCheckBox->setChecked(prefs->getBool("MirrorV", false));
setMediaSizeCheckBox->setChecked(prefs->getBool("doDev", false));
@@ -86,7 +93,6 @@
prefs->getDouble("BleedBottom", 0.0),
prefs->getDouble("BleedRight", 0.0),
prefs->getDouble("BleedLeft", 0.0));
-
bleedsWidget->setup(bleeds, 0, docUnitIndex, NewMarginWidget::BleedWidgetFlags);
bleedsWidget->setPageWidth(prefsData->docSetupPrefs.pageWidth);
@@ -113,13 +119,13 @@
prefs->set("Copies", 1);
prefs->set("Separations", static_cast<int>(outputComboBox->currentIndex()==1));
//FIXME: This comparison looks wrong.
- prefs->set("PrintColor", static_cast<int>(!(postscriptPrintToColorComboBox->currentIndex()==0)));
+ prefs->set("PrintColor", static_cast<int>(!(colorOutputModeComboBox->currentIndex()==0)));
prefs->set("SepArt", 0);
prefs->set("MirrorH", pageMirrorHorizontallyCheckBox->isChecked());
prefs->set("MirrorV", pageMirrorVerticallyCheckBox->isChecked());
prefs->set("DoGCR", applyUnderColorRemovalCheckBox->isChecked());
prefs->set("Clip", clipToPrinterMarginsCheckBox->isChecked());
- prefs->set("PSLevel", postscriptLevelComboBox->currentIndex() + 1);
+ prefs->set("PrintLanguage", (int) printLanguageComboBox->currentLanguage());
prefs->set("doDev", setMediaSizeCheckBox->isChecked());
prefs->set("doSpot", !convertSpotsToProcessCheckBox->isChecked());
prefs->set("ICCinUse", true);
Modified: trunk/Scribus/scribus/ui/prefs_printerbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/ui/prefs_printerbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_printerbase.ui (original)
+++ trunk/Scribus/scribus/ui/prefs_printerbase.ui Sat Oct 3 22:57:53 2020
@@ -46,9 +46,9 @@
<property name="geometry">
<rect>
<x>0</x>
- <y>-146</y>
- <width>714</width>
- <height>931</height>
+ <y>0</y>
+ <width>722</width>
+ <height>824</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
@@ -278,6 +278,44 @@
</widget>
</item>
<item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>Print In:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="colorOutputModeComboBox">
+ <item>
+ <property name="text">
+ <string>Color (If Available)</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Grayscale</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
<widget class="QCheckBox" name="applyUnderColorRemovalCheckBox">
<property name="text">
<string>Apply Under Color Removal</string>
@@ -316,7 +354,7 @@
</font>
</property>
<property name="text">
- <string>PostScript</string>
+ <string>Printing Language</string>
</property>
</widget>
</item>
@@ -330,70 +368,17 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
- <widget class="QComboBox" name="postscriptLevelComboBox">
+ <widget class="PrintLanguageCombo" name="printLanguageComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <item>
- <property name="text">
- <string>Level 1</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Level 2</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Level 3</string>
- </property>
- </item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string>Print In:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="postscriptPrintToColorComboBox">
- <item>
- <property name="text">
- <string>Color (If Available)</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Grayscale</string>
- </property>
- </item>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@@ -600,6 +585,11 @@
<header location="global">ui/newmarginwidget.h</header>
<container>1</container>
</customwidget>
+ <customwidget>
+ <class>PrintLanguageCombo</class>
+ <extends>QComboBox</extends>
+ <header>ui/printlanguagecombo.h</header>
+ </customwidget>
</customwidgets>
<tabstops>
<tabstop>scrollArea</tabstop>
@@ -614,8 +604,8 @@
<tabstop>clipToPrinterMarginsCheckBox</tabstop>
<tabstop>applyUnderColorRemovalCheckBox</tabstop>
<tabstop>convertSpotsToProcessCheckBox</tabstop>
- <tabstop>postscriptLevelComboBox</tabstop>
- <tabstop>postscriptPrintToColorComboBox</tabstop>
+ <tabstop>printLanguageComboBox</tabstop>
+ <tabstop>colorOutputModeComboBox</tabstop>
<tabstop>cropMarksCheckBox</tabstop>
<tabstop>bleedMarksCheckBox</tabstop>
<tabstop>registrationMarksCheckBox</tabstop>
Modified: trunk/Scribus/scribus/ui/printdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/ui/printdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/printdialog.cpp Sat Oct 3 22:57:53 2020
@@ -53,9 +53,6 @@
setWindowIcon(IconManager::instance().loadIcon("AppIcon.png"));
pageNrButton->setIcon(IconManager::instance().loadIcon("ellipsis.png"));
- printEngines->addItem( CommonStrings::trPostScript1 );
- printEngines->addItem( CommonStrings::trPostScript2 );
- printEngines->addItem( CommonStrings::trPostScript3 );
markLength->setNewUnit(m_unit);
markLength->setMinimum(1 * m_unitRatio);
markLength->setMaximum(3000 * m_unitRatio);
@@ -92,7 +89,7 @@
printerName = printerNames[i];
PrintDest->addItem(printerName);
}
- PrintDest->addItem( tr("File"));
+ PrintDest->addItem( CommonStrings::trFile );
int prnIndex = PrintDest->findText(printOptions.printer);
if (prnIndex < 0)
@@ -127,7 +124,7 @@
QString prnDevice = printOptions.printer;
if (prnDevice.isEmpty())
prnDevice = PrintDest->currentText();
- if ((prnDevice == tr("File")) || (PrintDest->count() == 1))
+ if ((prnDevice == CommonStrings::trFile) || (PrintDest->count() == 1))
{
PrintDest->setCurrentIndex(PrintDest->count()-1);
prefs->set("CurrentPrn", PrintDest->currentText());
@@ -145,7 +142,7 @@
connect( okButton, SIGNAL( clicked() ), this, SLOT( okButtonClicked() ) );
connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( PrintDest, SIGNAL(activated(const QString&)), this, SLOT(selectPrinter(const QString&)));
- connect( printEngines, SIGNAL(activated(const QString&)), this, SLOT(selectEngine(const QString&)));
+ connect( printLanguages, SIGNAL(activated(const QString&)), this, SLOT(selectPrintLanguage(const QString&)));
connect( printAllRadio, SIGNAL(toggled(bool)), this, SLOT(selectRange(bool)));
connect( printCurrentRadio, SIGNAL(toggled(bool)), this, SLOT(selectRange(bool)));
connect( pageNrButton, SIGNAL(clicked()), this, SLOT(createPageNumberRange()));
@@ -165,14 +162,8 @@
}
#endif
- m_printEngineMap = PrinterUtil::getPrintEngineSupport(PrintDest->currentText(), outputToFile());
- refreshPrintEngineBox();
-
- bool ps1Supported = m_printEngineMap.contains(CommonStrings::trPostScript1);
- bool ps2Supported = m_printEngineMap.contains(CommonStrings::trPostScript2);
- bool ps3Supported = m_printEngineMap.contains(CommonStrings::trPostScript3);
- bool psSupported = (ps1Supported || ps2Supported || ps3Supported);
- printEngines->setEnabled(psSupported || outputToFile());
+ printLanguages->setupLanguages(PrintDest->currentText(), outputToFile());
+ printLanguages->setEnabled(printLanguages->count() > 1);
}
PrintDialog::~PrintDialog()
@@ -218,7 +209,7 @@
{
bool sigBlocked = Copies->blockSignals(true);
Copies->setValue(devMode->dmCopies);
- Copies->blockSignals(false);
+ Copies->blockSignals(sigBlocked);
}
#endif
}
@@ -303,36 +294,14 @@
else
{
selectPrinter(PrintDest->currentText());
- if (PrintDest->currentText() != tr("File"))
+ if (PrintDest->currentText() != CommonStrings::trFile)
optionsButton->setEnabled(true);
}
}
-void PrintDialog::selectEngine(const QString& eng)
-{
- prefs->set("CurrentPrnEngine", (int) m_printEngineMap[printEngines->currentText()]);
- bool psSupported = outputToFile();
- psSupported |= (eng == CommonStrings::trPostScript1);
- psSupported |= (eng == CommonStrings::trPostScript2);
- psSupported |= (eng == CommonStrings::trPostScript3);
- if (psSupported)
- {
- printSepCombo->setEnabled(true);
- usePDFMarks->setEnabled(true);
- }
- else
- {
- setCurrentComboItem(printSepCombo, tr("Print Normal"));
- printSepCombo->setEnabled(false);
- setCurrentComboItem(separationsCombo, tr("All"));
- separationsCombo->setEnabled(false);
- usePDFMarks->setEnabled(false);
- }
-}
-
void PrintDialog::selectPrinter(const QString& prn)
{
- bool toFile = prn == tr("File");
+ bool toFile = prn == CommonStrings::trFile;
DateiT->setEnabled(toFile);
fileNameEdit->setEnabled(toFile);
selectFileButton->setEnabled(toFile);
@@ -347,8 +316,9 @@
if (toFile && fileNameEdit->text().isEmpty())
{
QFileInfo fi(m_doc->documentFileName());
+ QString fileExt = (printLanguage() == PrintLanguage::PDF) ? ".pdf" : ".ps";
if (fi.isRelative()) // if (m_doc->DocName.startsWith( tr("Document")))
- fileNameEdit->setText( QDir::toNativeSeparators(QDir::currentPath() + "/" + m_doc->documentFileName() + ".ps") );
+ fileNameEdit->setText( QDir::toNativeSeparators(QDir::currentPath() + "/" + m_doc->documentFileName() + fileExt) );
else
{
QString completeBaseName = fi.completeBaseName();
@@ -356,35 +326,102 @@
if (completeBaseName.length() > 4) completeBaseName.chop(4);
if (completeBaseName.endsWith(".gz", Qt::CaseInsensitive))
if (completeBaseName.length() > 3) completeBaseName.chop(3);
- fileNameEdit->setText( QDir::toNativeSeparators(fi.path() + "/" + completeBaseName + ".ps") );
+ fileNameEdit->setText( QDir::toNativeSeparators(fi.path() + "/" + completeBaseName + fileExt) );
}
}
// Get page description language supported by the selected printer
- m_printEngineMap = PrinterUtil::getPrintEngineSupport(prn, toFile);
- refreshPrintEngineBox();
+ printLanguages->setupLanguages(prn, toFile);
+ printLanguages->setEnabled(printLanguages->count() > 1);
prefs->set("CurrentPrn", prn);
- prefs->set("CurrentPrnEngine", (int) m_printEngineMap[printEngines->currentText()]);
-
- bool ps1Supported = m_printEngineMap.contains(CommonStrings::trPostScript1);
- bool ps2Supported = m_printEngineMap.contains(CommonStrings::trPostScript2);
- bool ps3Supported = m_printEngineMap.contains(CommonStrings::trPostScript3);
- bool psSupported = (ps1Supported || ps2Supported || ps3Supported);
- if (psSupported || toFile)
- {
- printEngines->setEnabled(true);
- printSepCombo->setEnabled(true);
- usePDFMarks->setEnabled(true);
- }
- else
- {
- printEngines->setEnabled(false);
+ prefs->set("CurrentPrnEngine", (int) printLanguages->currentLanguage());
+
+ PrintLanguage prnLanguage = printLanguage();
+
+ bool psSupported = false;
+ psSupported |= (prnLanguage == PrintLanguage::PostScript1);
+ psSupported |= (prnLanguage == PrintLanguage::PostScript2);
+ psSupported |= (prnLanguage == PrintLanguage::PostScript3);
+
+ printSepCombo->setEnabled(psSupported);
+ separationsCombo->setEnabled(psSupported && (printSepCombo->currentIndex() == 1));
+ if (!psSupported)
+ {
setCurrentComboItem(printSepCombo, tr("Print Normal"));
- printSepCombo->setEnabled(false);
setCurrentComboItem(separationsCombo, tr("All"));
- separationsCombo->setEnabled(false);
- usePDFMarks->setEnabled(false);
+ }
+
+ bool pdfMarksSupported = (prnLanguage == PrintLanguage::PDF);
+ pdfMarksSupported |= (prnLanguage == PrintLanguage::PostScript1);
+ pdfMarksSupported |= (prnLanguage == PrintLanguage::PostScript2);
+ pdfMarksSupported |= (prnLanguage == PrintLanguage::PostScript3);
+ usePDFMarks->setEnabled(pdfMarksSupported);
+
+ if (outputToFile())
+ {
+ QString newExt = "prn";
+ if (prnLanguage == PrintLanguage::PDF)
+ newExt = "pdf";
+ if (psSupported)
+ newExt = "ps";
+ QString outputFileName = fileNameEdit->text();
+ if (!outputFileName.isEmpty())
+ {
+ QFileInfo fileInfo(outputFileName);
+ QString currentExt = fileInfo.suffix();
+ if (!currentExt.isEmpty())
+ {
+ int lastIndex = outputFileName.lastIndexOf(currentExt);
+ outputFileName.replace(lastIndex, currentExt.length(), newExt);
+ fileNameEdit->setText(outputFileName);
+ }
+ }
+ }
+}
+
+void PrintDialog::selectPrintLanguage(const QString& prnLanguage)
+{
+ prefs->set("CurrentPrnEngine", (int) printLanguages->currentLanguage());
+
+ bool psSupported = false;
+ psSupported |= (prnLanguage == CommonStrings::trPostScript1);
+ psSupported |= (prnLanguage == CommonStrings::trPostScript2);
+ psSupported |= (prnLanguage == CommonStrings::trPostScript3);
+
+ printSepCombo->setEnabled(psSupported);
+ separationsCombo->setEnabled(psSupported && (printSepCombo->currentIndex() == 1));
+ if (!psSupported)
+ {
+ setCurrentComboItem(printSepCombo, tr("Print Normal"));
+ setCurrentComboItem(separationsCombo, tr("All"));
+ }
+
+ bool pdfMarksSupported = (prnLanguage == CommonStrings::trPDF);
+ pdfMarksSupported |= (prnLanguage == CommonStrings::trPostScript1);
+ pdfMarksSupported |= (prnLanguage == CommonStrings::trPostScript2);
+ pdfMarksSupported |= (prnLanguage == CommonStrings::trPostScript3);
+ usePDFMarks->setEnabled(pdfMarksSupported);
+
+ if (outputToFile())
+ {
+ QString newExt = "prn";
+ if (prnLanguage == CommonStrings::trPDF)
+ newExt = "pdf";
+ if (psSupported)
+ newExt = "ps";
+ QString outputFileName = fileNameEdit->text();
+ if (!outputFileName.isEmpty())
+ {
+ QFileInfo fileInfo(outputFileName);
+ QString currentExt = fileInfo.suffix();
+ if (!currentExt.isEmpty())
+ {
+ int lastIndex = outputFileName.lastIndexOf(currentExt);
+ outputFileName.replace(lastIndex, currentExt.length(), newExt);
+ fileNameEdit->setText(outputFileName);
+ }
+ }
}
}
@@ -402,8 +439,11 @@
void PrintDialog::selectFile()
{
PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
- QString wdir = dirs->get("printdir", ".");
- CustomFDialog dia(this, wdir, tr("Save As"), tr("PostScript Files (*.ps);;All Files (*)"), fdNone | fdHidePreviewCheckBox);
+ QString wdir = dirs->get("printdir", ScPaths::userDocumentDir());
+
+ PrintLanguage prnLanguage = printLanguage();
+ QString fileFilter = (prnLanguage == PrintLanguage::PDF) ? tr("PDF Files (*.pdf);;All Files (*)") : tr("PostScript Files (*.ps);;All Files (*)");
+ CustomFDialog dia(this, wdir, tr("Save As"), fileFilter, fdNone | fdHidePreviewCheckBox);
if (!fileNameEdit->text().isEmpty())
dia.setSelection(fileNameEdit->text());
if (dia.exec() == QDialog::Accepted)
@@ -417,8 +457,8 @@
void PrintDialog::setMinMax(int min, int max, int cur)
{
QString tmp, tmp2;
- printCurrentRadio->setText( tr( "Print Current Pa&ge" )+" ("+tmp.setNum(cur)+")");
- pageNr->setText(tmp.setNum(min)+"-"+tmp2.setNum(max));
+ printCurrentRadio->setText( tr( "Print Current Pa&ge" ) + " (" + tmp.setNum(cur) + ")");
+ pageNr->setText(tmp.setNum(min) + "-" + tmp2.setNum(max));
}
void PrintDialog::storeValues()
@@ -441,7 +481,7 @@
m_doc->Print_Options.mirrorV = mirrorVertical();
m_doc->Print_Options.doClip = doClip();
m_doc->Print_Options.doGCR = doGCR();
- m_doc->Print_Options.prnEngine= printEngine();
+ m_doc->Print_Options.prnLanguage = printLanguage();
m_doc->Print_Options.setDevParam = doDev();
m_doc->Print_Options.useDocBleeds = docBleeds->isChecked();
m_doc->Print_Options.bleeds.setTop(bleedTop->value() / m_doc->unitRatio());
@@ -488,7 +528,7 @@
{
PrintDest->setCurrentIndex(selectedDest);
prefs->set("CurrentPrn", PrintDest->currentText());
- if (PrintDest->currentText() == tr("File"))
+ if (PrintDest->currentText() == CommonStrings::trFile)
fileNameEdit->setText(fileName);
selectPrinter(PrintDest->currentText());
}
@@ -511,7 +551,7 @@
separationsCombo->setCurrentIndex((selectedSep >= 0) ? selectedSep : 0);
if (printSepCombo->currentIndex() == 1)
separationsCombo->setEnabled(true);
- setPrintEngine(m_doc->Print_Options.prnEngine);
+ setPrintLanguage(m_doc->Print_Options.prnLanguage);
mirrorHor->setChecked(m_doc->Print_Options.mirrorH);
mirrorVert->setChecked(m_doc->Print_Options.mirrorV);
setMediaSize->setChecked(m_doc->Print_Options.setDevParam);
@@ -558,7 +598,7 @@
bool PrintDialog::outputToFile()
{
- return (PrintDest->currentText() == tr("File"));
+ return (PrintDest->currentText() == CommonStrings::trFile);
}
int PrintDialog::numCopies()
@@ -621,9 +661,9 @@
return clipMargins->isChecked();
}
-PrintEngine PrintDialog::printEngine()
-{
- return m_printEngineMap[printEngines->currentText()];
+PrintLanguage PrintDialog::printLanguage()
+{
+ return printLanguages->currentLanguage();
}
bool PrintDialog::doDev()
@@ -695,45 +735,17 @@
pageNr->setText(QString());
}
-void PrintDialog::refreshPrintEngineBox()
-{
- int index = 0, oldPDLIndex = -1;
- QString oldPDL = printEngines->currentText();
- PrintEngineMap::Iterator it, itEnd = m_printEngineMap.end();
- printEngines->clear();
- for (it = m_printEngineMap.begin(); it != itEnd; ++it)
- {
- printEngines->addItem(it.key());
- if (it.key() == oldPDL)
- oldPDLIndex = index;
- index++;
- }
- // Try to not default on PostScript 1 when switching
- // from a GDI printer to a Postscript printer
- if (oldPDLIndex < 0)
- {
- oldPDLIndex = printEngines->findText(CommonStrings::trPostScript3);
- if (oldPDLIndex < 0)
- oldPDLIndex = 0;
- }
- printEngines->setCurrentIndex(oldPDLIndex);
-}
-
-void PrintDialog::setPrintEngine(PrintEngine engine)
-{
- QString pdlString(m_printEngineMap.key(engine, ""));
- int itemIndex = printEngines->findText(pdlString);
+void PrintDialog::setPrintLanguage(PrintLanguage prnLanguage)
+{
+ int itemIndex = printLanguages->findLanguage(prnLanguage);
if (itemIndex >= 0)
- printEngines->setCurrentIndex(itemIndex);
- else if (printEngines->count() > 0)
- {
- pdlString = m_printEngineMap.key(PrintEngine::PostScript3, "");
- itemIndex = printEngines->findText(pdlString);
+ printLanguages->setCurrentIndex(itemIndex);
+ else if (printLanguages->count() > 0)
+ {
+ itemIndex = printLanguages->findLanguage(PrintLanguage::PostScript3);
if (itemIndex >= 0)
- printEngines->setCurrentIndex(itemIndex);
+ printLanguages->setCurrentIndex(itemIndex);
else
- printEngines->setCurrentIndex(printEngines->count() - 1);
- }
-}
-
-
+ printLanguages->setCurrentIndex(printLanguages->count() - 1);
+ }
+}
Modified: trunk/Scribus/scribus/ui/printdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/ui/printdialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.h (original)
+++ trunk/Scribus/scribus/ui/printdialog.h Sat Oct 3 22:57:53 2020
@@ -40,7 +40,7 @@
bool mirrorVertical();
bool doGCR();
bool doClip();
- PrintEngine printEngine();
+ PrintLanguage printLanguage();
bool doDev();
bool doSpot();
bool doPrintAll();
@@ -57,8 +57,8 @@
void doDocBleeds();
void createPageNumberRange();
void selectOptions();
- void selectEngine(const QString& eng);
void selectPrinter(const QString& prn);
+ void selectPrintLanguage(const QString& prnLanguage);
void selectRange(bool e);
void selectSepMode(int e);
void selectFile();
@@ -68,7 +68,6 @@
protected:
ScribusDoc* m_doc;
- PrintEngineMap m_printEngineMap;
PrefsContext* prefs { nullptr };
CupsOptions* m_cupsOptions { nullptr };
int m_unit { 0 };
@@ -79,8 +78,7 @@
QString getOptions();
void storeValues();
- void refreshPrintEngineBox();
- void setPrintEngine(PrintEngine engine);
+ void setPrintLanguage(PrintLanguage engine);
void setStoredValues(const QString& fileName);
};
Modified: trunk/Scribus/scribus/ui/printdialogbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/ui/printdialogbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/printdialogbase.ui (original)
+++ trunk/Scribus/scribus/ui/printdialogbase.ui Sat Oct 3 22:57:53 2020
@@ -331,7 +331,7 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="QComboBox" name="printEngines">
+ <widget class="PrintLanguageCombo" name="printLanguages">
<property name="toolTip">
<string>Sets the PostScript Level. Setting to Level 1 or 2 can create huge files.</string>
</property>
@@ -673,6 +673,11 @@
<extends>QDoubleSpinBox</extends>
<header>ui/scrspinbox.h</header>
</customwidget>
+ <customwidget>
+ <class>PrintLanguageCombo</class>
+ <extends>QComboBox</extends>
+ <header>ui/printlanguagecombo.h</header>
+ </customwidget>
</customwidgets>
<tabstops>
<tabstop>PrintDest</tabstop>
@@ -691,7 +696,7 @@
<tabstop>printSepCombo</tabstop>
<tabstop>colorType</tabstop>
<tabstop>separationsCombo</tabstop>
- <tabstop>printEngines</tabstop>
+ <tabstop>printLanguages</tabstop>
<tabstop>usePDFMarks</tabstop>
<tabstop>mirrorHor</tabstop>
<tabstop>mirrorVert</tabstop>
Modified: trunk/Scribus/scribus/ui/printpreview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/ui/printpreview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printpreview.cpp (original)
+++ trunk/Scribus/scribus/ui/printpreview.cpp Sat Oct 3 22:57:53 2020
@@ -72,263 +72,207 @@
#include "scprintengine_gdi.h"
#endif
+#include "ui_printpreviewbase.h"
+
extern bool printDinUse;
-PrintPreview::PrintPreview(QWidget* parent, ScribusDoc *docu, const QString& printer, PrintEngine engine ) : QDialog( parent ),
- doc(docu),
- prefsManager(PrefsManager::instance())
-{
+PrintPreview::PrintPreview(QWidget* parent, ScribusDoc *docu, const QString& printer, PrintLanguage engine) : QDialog(parent),
+ m_doc(docu),
+ m_prefsManager(PrefsManager::instance())
+{
+ int inkTableWidth = 0;
+
+ m_ui = new Ui::PrintPreviewBase();
+ m_ui->setupUi(this);
+
+ QString caption = tr("Print Preview");
+ setWindowTitle(caption);
+
setModal(true);
setWindowIcon(IconManager::instance().loadIcon("AppIcon.png"));
Q_ASSERT(!docu->masterPageMode());
- postscriptPreview = usePostscriptPreview(printer, engine);
- QString caption = tr("Print Preview");
-#ifdef _WIN32
- if (postscriptPreview)
- caption += " (PostScript)";
- else
- caption += " (GDI)";
-#endif
- setWindowTitle(caption);
-
- havePngAlpha = ScCore->havePNGAlpha();
- haveTiffSep = postscriptPreview ? ScCore->haveTIFFSep() : false;
+
+ bool printToFile = (printer == CommonStrings::File || printer == CommonStrings::trFile);
+ m_ui->printLanguageCombo->setupLanguages(printer, printToFile);
+ m_ui->printLanguageCombo->setCurrentLanguage(engine);
+
+ m_previewCreator = PrintPreviewCreatorFactory::create(docu, m_ui->printLanguageCombo->currentLanguage());
+
+ m_useGhostscript = m_previewCreator->isGhostscriptBased();
+ m_haveTiffSep = ScCore->haveTIFFSep() && (m_ui->printLanguageCombo->hasPDF() || m_ui->printLanguageCombo->hasPostscript());
getNumericGSVersion(m_gsVersion);
- m_previewCreator = PrintPreviewCreatorFactory::create(docu, postscriptPreview ? PrintEngine::PostScript3 : PrintEngine::WindowsGDI);
-
- PLayout = new QVBoxLayout(this);
- PLayout->setMargin(0);
- PLayout->setSpacing(0);
- int tbWidth = 0;
- Layout5 = new QHBoxLayout;
- Layout5->setSpacing(3);
- Layout5->setMargin(0);
- previewArea = new QScrollArea(this);
- previewArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- Layout5->addWidget(previewArea);
- settingsBarLayout = new QVBoxLayout;
- settingsBarLayout->setSpacing(3);
- settingsBarLayout->setMargin(0);
- devTitle = new QGroupBox( this );
- devTitle->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
- devTitle->setTitle( tr( "Display Settings" ) );
- Layout2 = new QVBoxLayout( devTitle );
- Layout2->setSpacing(5);
- Layout2->setMargin(5);
- Layout2->setAlignment( Qt::AlignTop );
- antiAliasing = new QCheckBox(devTitle);
- antiAliasing->setText( tr("Enable &Antialiasing"));
- antiAliasing->setChecked(postscriptPreview ? prefsManager.appPrefs.printPreviewPrefs.PrPr_AntiAliasing : false);
- antiAliasing->setEnabled(postscriptPreview);
- Layout2->addWidget(antiAliasing);
- showTransparency = new QCheckBox(devTitle);
- showTransparency->setText( tr("Display Trans&parency"));
- showTransparency->setChecked(postscriptPreview ? prefsManager.appPrefs.printPreviewPrefs.PrPr_Transparency : false);
- showTransparency->setEnabled(postscriptPreview);
- Layout2->addWidget(showTransparency);
- enableCMYK = new QCheckBox(devTitle);
- enableCMYK->setText( tr("&Display CMYK"));
- enableCMYK->setChecked((haveTiffSep && postscriptPreview) ? prefsManager.appPrefs.printPreviewPrefs.PrPr_Mode : false);
- enableCMYK->setEnabled(haveTiffSep && postscriptPreview);
- Layout2->addWidget(enableCMYK);
- if (haveTiffSep)
+ m_previewLabel = new QLabel(this);
+ m_previewLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
+ m_ui->previewArea->setWidget(m_previewLabel);
+
+ m_ui->scaleBox->setCurrentIndex(1);
+
+ m_ui->pageSelector->setMaximum(m_doc->DocPages.count());
+ m_ui->pageSelector->setGUIForPage(m_doc->currentPage()->pageNr());
+
+ if (m_haveTiffSep)
{
ColorList usedSpots;
- doc->getUsedColors(usedSpots, true);
+ m_doc->getUsedColors(usedSpots, true);
QStringList spots = usedSpots.keys();
- inkTable = new QTableWidget(spots.count() + 4, 2, devTitle );
- inkTable->setHorizontalHeaderItem(0, new QTableWidgetItem(IconManager::instance().loadIcon("16/show-object.png"), ""));
- inkTable->setHorizontalHeaderItem(1, new QTableWidgetItem( tr("Separation Name")));
- QHeaderView *header = inkTable->horizontalHeader();
+ m_ui->coverThresholdValue->setMaximum((spots.count() + 4) * 100.0);
+
+ m_ui->inkTable->setColumnCount(2);
+ m_ui->inkTable->setRowCount(4 + spots.count());
+ m_ui->inkTable->setHorizontalHeaderItem(0, new QTableWidgetItem(IconManager::instance().loadIcon("16/show-object.png"), ""));
+ m_ui->inkTable->setHorizontalHeaderItem(1, new QTableWidgetItem( tr("Separation Name")));
+
+ QHeaderView *header = m_ui->inkTable->horizontalHeader();
header->setStretchLastSection(true);
header->setSectionsMovable(false);
header->setSectionResizeMode(QHeaderView::Fixed);
- inkTable->setColumnWidth(0, 24);
- inkTable->verticalHeader()->hide();
- inkTable->setSelectionMode( QAbstractItemView::NoSelection );
- inkTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
- inkTable->setFocusPolicy(Qt::NoFocus);
- flagsVisible.clear();
- inkTable->setItem(0, 1, new QTableWidgetItem( tr("Cyan")));
+
+ m_ui->inkTable->setColumnWidth(0, 24);
+ m_ui->inkTable->verticalHeader()->hide();
+ m_ui->inkTable->setFocusPolicy(Qt::NoFocus);
+ m_ui->inkTable->setSelectionMode(QAbstractItemView::NoSelection);
+ m_ui->inkTable->setSizeAdjustPolicy(QTableWidget::AdjustToContentsOnFirstShow);
+
+ m_ui->inkTable->setItem(0, 1, new QTableWidgetItem( tr("Cyan")));
QCheckBox *cp = new QCheckBox(this);
cp->setFocusPolicy(Qt::NoFocus);
+ cp->setChecked(m_prefsManager.appPrefs.printPreviewPrefs.PrPr_C);
connect(cp, SIGNAL(clicked()), this, SLOT(toggleCMYK_Colour()));
- inkTable->setCellWidget(0, 0, cp);
- cp->setChecked(prefsManager.appPrefs.printPreviewPrefs.PrPr_C);
- flagsVisible.insert("Cyan", cp);
- inkTable->setItem(1, 1, new QTableWidgetItem( tr("Magenta")));
+ m_ui->inkTable->setCellWidget(0, 0, cp);
+ m_inkVisibilities.insert("Cyan", cp);
+
+ m_ui->inkTable->setItem(1, 1, new QTableWidgetItem( tr("Magenta")));
cp = new QCheckBox(this);
cp->setFocusPolicy(Qt::NoFocus);
+ cp->setChecked(m_prefsManager.appPrefs.printPreviewPrefs.PrPr_M);
connect(cp, SIGNAL(clicked()), this, SLOT(toggleCMYK_Colour()));
- inkTable->setCellWidget(1, 0, cp);
- cp->setChecked(prefsManager.appPrefs.printPreviewPrefs.PrPr_M);
- flagsVisible.insert("Magenta", cp);
- inkTable->setItem(2, 1, new QTableWidgetItem( tr("Yellow")));
+ m_ui->inkTable->setCellWidget(1, 0, cp);
+ m_inkVisibilities.insert("Magenta", cp);
+
+ m_ui->inkTable->setItem(2, 1, new QTableWidgetItem( tr("Yellow")));
cp = new QCheckBox(this);
cp->setFocusPolicy(Qt::NoFocus);
+ cp->setChecked(m_prefsManager.appPrefs.printPreviewPrefs.PrPr_Y);
connect(cp, SIGNAL(clicked()), this, SLOT(toggleCMYK_Colour()));
- inkTable->setCellWidget(2, 0, cp);
- cp->setChecked(prefsManager.appPrefs.printPreviewPrefs.PrPr_Y);
- flagsVisible.insert("Yellow", cp);
- inkTable->setItem(3, 1, new QTableWidgetItem( tr("Black")));
+ m_ui->inkTable->setCellWidget(2, 0, cp);
+ m_inkVisibilities.insert("Yellow", cp);
+
+ m_ui->inkTable->setItem(3, 1, new QTableWidgetItem( tr("Black")));
cp = new QCheckBox(this);
cp->setFocusPolicy(Qt::NoFocus);
+ cp->setChecked(m_prefsManager.appPrefs.printPreviewPrefs.PrPr_K);
connect(cp, SIGNAL(clicked()), this, SLOT(toggleCMYK_Colour()));
- inkTable->setCellWidget(3, 0, cp);
- cp->setChecked(prefsManager.appPrefs.printPreviewPrefs.PrPr_K);
- flagsVisible.insert("Black", cp);
+ m_ui->inkTable->setCellWidget(3, 0, cp);
+ m_inkVisibilities.insert("Black", cp);
+
for (int sp = 0; sp < spots.count(); ++sp)
{
- inkTable->setItem(sp+4, 1, new QTableWidgetItem(spots[sp]));
+ const QString& spotName = spots.at(sp);
+ m_ui->inkTable->setItem(sp + 4, 1, new QTableWidgetItem(spotName));
cp = new QCheckBox(this);
cp->setFocusPolicy(Qt::NoFocus);
+ cp->setChecked(true);
connect(cp, SIGNAL(clicked()), this, SLOT(toggleCMYK_Colour()));
- inkTable->setCellWidget(sp + 4, 0, cp);
- cp->setChecked(true);
- flagsVisible.insert(spots[sp], cp);
+ m_ui->inkTable->setCellWidget(sp + 4, 0, cp);
+ m_inkVisibilities.insert(spotName, cp);
}
- Layout2->addWidget(inkTable);
- tbWidth = inkTable->columnWidth(1);
-
- enableInkCover = new QCheckBox(devTitle);
- enableInkCover->setText( tr("Display Ink Coverage"));
- enableInkCover->setChecked(prefsManager.appPrefs.printPreviewPrefs.PrPr_InkCoverage);
- enableInkCover->setEnabled( postscriptPreview );
- Layout2->addWidget(enableInkCover);
- connect(enableInkCover, SIGNAL(clicked()), this, SLOT(toggleCMYK_Colour()));
- Layout7 = new QHBoxLayout;
- Layout7->setSpacing(3);
- Layout7->setMargin(0);
- thresholdLabel = new QLabel( tr("Threshold:"), devTitle);
- Layout7->addWidget(thresholdLabel);
- coverThresholdValue = new ScrSpinBox(devTitle);
- coverThresholdValue->setSuffix( tr(" %"));
- coverThresholdValue->setMaximum(600);
- coverThresholdValue->setDecimals(0);
- coverThresholdValue->setMinimum(0);
- coverThresholdValue->setSingleStep(10);
- coverThresholdValue->setSpecialValueText( tr("None"));
- coverThresholdValue->setValue(prefsManager.appPrefs.printPreviewPrefs.PrPr_InkThreshold);
- if ((enableCMYK->isChecked()) && (enableInkCover->isChecked()))
- coverThresholdValue->setEnabled(true);
- else
- coverThresholdValue->setEnabled(false);
- connect(coverThresholdValue, SIGNAL(valueChanged(double)), this, SLOT(toggleCMYK_Colour()));
- Layout7->addWidget(coverThresholdValue);
- Layout2->addLayout(Layout7);
- connect(inkTable, SIGNAL(cellDoubleClicked(int, int)), this, SLOT(doSpotTable(int)));
- connect(header, SIGNAL(sectionClicked(int)), this, SLOT(toggleAllfromHeader()));
- }
+
+ inkTableWidth = m_ui->inkTable->columnWidth(1);
+
+ bool inkCoverageEnabled = (m_ui->enableCMYK->isChecked()) && (m_ui->displayInkCoverage->isChecked());
+ m_ui->coverThresholdLabel->setEnabled(inkCoverageEnabled);
+ m_ui->coverThresholdValue->setEnabled(inkCoverageEnabled);
+ m_ui->coverThresholdValue->setSuffix( tr(" %"));
+ m_ui->coverThresholdValue->setSpecialValueText( tr("None"));
+
+ connect(header, SIGNAL(sectionClicked(int)), this, SLOT(toggleAllFromHeader()));
+ connect(m_ui->enableCMYK, SIGNAL(clicked()), this, SLOT(toggleCMYK()));
+ connect(m_ui->displayInkCoverage, SIGNAL(clicked()), this, SLOT(toggleCMYK_Colour()));
+ connect(m_ui->inkTable, SIGNAL(cellDoubleClicked(int, int)), this, SLOT(onInkTableCellDoubleClicked(int)));
+ }
+ else
+ {
+ m_ui->enableCMYK->setChecked(false);
+ m_ui->enableCMYK->setVisible(false);
+ m_ui->inkTable->setVisible(false);
+ m_ui->displayInkCoverage->setChecked(false);
+ m_ui->displayInkCoverage->setVisible(false);
+ m_ui->coverThresholdLabel->setVisible(false);
+ m_ui->coverThresholdValue->setVisible(false);
+ }
+
+ // Restore display settings from preferences
+ m_ui->antiAliasing->setChecked(m_useGhostscript ? m_prefsManager.appPrefs.printPreviewPrefs.PrPr_AntiAliasing : false);
+ m_ui->antiAliasing->setEnabled(m_useGhostscript);
+
+ m_ui->showTransparency->setChecked(m_useGhostscript ? m_prefsManager.appPrefs.printPreviewPrefs.PrPr_Transparency : false);
+ m_ui->showTransparency->setEnabled(m_useGhostscript);
+
+ m_ui->enableCMYK->setChecked((m_haveTiffSep && m_useGhostscript) ? m_prefsManager.appPrefs.printPreviewPrefs.PrPr_Mode : false);
+ m_ui->enableCMYK->setEnabled(m_haveTiffSep && m_useGhostscript);
+
+ if (m_ui->inkTable->isVisible() && m_ui->inkTable->isEnabled())
+ {
+ m_inkVisibilities["Cyan"]->setChecked(m_prefsManager.appPrefs.printPreviewPrefs.PrPr_C);
+ m_inkVisibilities["Magenta"]->setChecked(m_prefsManager.appPrefs.printPreviewPrefs.PrPr_M);
+ m_inkVisibilities["Magenta"]->setChecked(m_prefsManager.appPrefs.printPreviewPrefs.PrPr_Y);
+ m_inkVisibilities["Yellow"]->setChecked(m_prefsManager.appPrefs.printPreviewPrefs.PrPr_K);
+ }
+
+ bool cmykEnabled = m_ui->enableCMYK->isChecked();
+ m_ui->inkTable->setEnabled(cmykEnabled);
+ m_ui->displayInkCoverage->setEnabled(cmykEnabled);
- settingsBarLayout->addWidget(devTitle);
- jobTitle = new QGroupBox( this );
- jobTitle->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
- jobTitle->setTitle( tr( "Preview Settings" ) );
- Layout1 = new QVBoxLayout( jobTitle );
- Layout1->setSpacing( 5 );
- Layout1->setMargin( 5 );
- Layout1->setAlignment( Qt::AlignTop );
-
- mirrorHor = new QCheckBox( tr( "Mirror Page(s) Horizontal" ), jobTitle );
- Layout1->addWidget( mirrorHor );
-
- mirrorVert = new QCheckBox( tr( "Mirror Page(s) Vertical" ), jobTitle );
- Layout1->addWidget( mirrorVert );
-
- clipMargins = new QCheckBox( tr( "Clip to Printer Margins" ), jobTitle );
- Layout1->addWidget( clipMargins );
-
- useGray = new QCheckBox( tr("Print in Grayscale"), jobTitle);
- Layout1->addWidget(useGray);
-
- enableGCR = new QCheckBox( tr("&Under Color Removal"), jobTitle);
- Layout1->addWidget(enableGCR);
-
- spotColors = new QCheckBox( tr( "Convert Spot Colors" ), jobTitle );
- Layout1->addWidget( spotColors );
-
- settingsBarLayout->addWidget(jobTitle);
- QSpacerItem* spacerC = new QSpacerItem( 5, 5, QSizePolicy::Minimum, QSizePolicy::Expanding );
- settingsBarLayout->addItem( spacerC );
- Layout5->addLayout(settingsBarLayout);
- PLayout->addLayout(Layout5);
-
- Layout6 = new QHBoxLayout;
- Layout6->setSpacing(0);
- Layout6->setMargin(6);
- /* scaling */
- scaleLabel = new QLabel( tr("Scaling:"), this);
- // NOTE: Be careful when you change scaleBox item order.
- // There is an index order related check in the resizeEvent().
- // resizeEvent() will re-create preview when is one of "Fit to ..."
- // options in use. - 20080204 PV
- scaleBox = new QComboBox(this);
- scaleBox->setEditable(false);
- scaleBox->setFocusPolicy(Qt::NoFocus);
- scaleBox->addItem("50%");
- scaleBox->addItem("100%");
- scaleBox->addItem("150%");
- scaleBox->addItem("200%");
- scaleBox->addItem( tr("Fit to Width"));
- scaleBox->addItem( tr("Fit to Height"));
- scaleBox->addItem( tr("Fit to Page"));
- scaleBox->setCurrentIndex(1);
- Layout6->addWidget(scaleLabel);
- Layout6->addWidget(scaleBox);
- QSpacerItem* spacer = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout6->addItem( spacer );
- pageSelector = new PageSelector(this, doc->DocPages.count());
- pageSelector->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- Layout6->addWidget(pageSelector);
- QSpacerItem* spacer2 = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout6->addItem( spacer2 );
- closeButton = new QPushButton( tr("Close"), this);
- closeButton->setAutoDefault(false);
- Layout6->addWidget( closeButton );
- printButton = new QPushButton( tr("Print..."), this );
- printButton->setAutoDefault(false);
- printButton->setEnabled(!printDinUse);
- Layout6->addWidget( printButton );
- PLayout->addLayout(Layout6);
+ m_ui->displayInkCoverage->setChecked((m_haveTiffSep && m_useGhostscript) ? m_prefsManager.appPrefs.printPreviewPrefs.PrPr_InkCoverage : false);
+ m_ui->displayInkCoverage->setEnabled((m_haveTiffSep && m_useGhostscript));
+
+ bool isInkCoverageEnabled = m_ui->displayInkCoverage->isChecked();
+ m_ui->coverThresholdLabel->setEnabled(cmykEnabled && isInkCoverageEnabled);
+ m_ui->coverThresholdValue->setEnabled(cmykEnabled && isInkCoverageEnabled);
+ m_ui->coverThresholdValue->setValue(m_prefsManager.appPrefs.printPreviewPrefs.PrPr_InkThreshold);
+
+ m_ui->printButton->setEnabled(!printDinUse);
+
setValues();
- previewLabel = new QLabel(this);
- previewLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
- previewLabel->setPixmap(createPreview(doc->currentPage()->pageNr(), 72));
- previewLabel->resize(previewLabel->pixmap()->size());
- previewArea->setWidget(previewLabel);
- int w = previewLabel->width() + tbWidth + 50;
+
+ // Display preview
+ QPixmap previewPix = createPreview(m_doc->currentPageNumber(), qRound(72 * m_scaleFactor));
+ m_previewLabel->setPixmap(previewPix);
+ m_previewLabel->resize(previewPix.size());
+
+ m_ui->pageSelector->setGUIForPage(m_doc->currentPage()->pageNr());
+
+ int w = m_previewLabel->width() + inkTableWidth + 50;
resize(qMin(QApplication::desktop()->width() - 30, w), 500);
- if (!PrefsManager::instance().appPrefs.printPreviewPrefs.PrPr_Mode)
- {
- if (haveTiffSep)
- inkTable->setEnabled(false);
- }
- pageSelector->setGUIForPage(doc->currentPage()->pageNr());
// tooltips
- antiAliasing->setToolTip( "<qt>" + tr( "Provides a more pleasant view of Type 1 fonts, TrueType Fonts, OpenType Fonts, EPS, PDF and vector graphics in the preview, at the expense of a slight slowdown in previewing" ) + "</qt>" );
- showTransparency->setToolTip( "<qt>" + tr( "Shows transparency and transparent items in your document. Requires Ghostscript 7.07 or later." ) + "</qt>");
- enableCMYK->setToolTip( "<qt>" + tr( "Gives a print preview using simulations of generic CMYK inks, instead of RGB colors" ) + "</qt>");
- enableGCR->setToolTip( "<qt>" + tr( "A way of switching off some of the gray shades which are composed of cyan, yellow and magenta and using black instead. UCR most affects parts of images which are neutral and/or dark tones which are close to the gray. Use of this may improve printing some images and some experimentation and testing is need on a case by case basis. UCR reduces the possibility of over saturation with CMY inks." ) + "</qt>" );
- scaleBox->setToolTip( "<qt>" + tr("Resize the scale of the page") + "</qt>");
- spotColors->setToolTip("<qt>" + tr( "Enables Spot Colors to be converted to composite colors. Unless you are planning to print spot colors at a commercial printer, this is probably best left enabled." ) + "</qt>");
+ m_ui->antiAliasing->setToolTip( "<qt>" + tr( "Provides a more pleasant view of Type 1 fonts, TrueType Fonts, OpenType Fonts, EPS, PDF and vector graphics in the preview, at the expense of a slight slowdown in previewing" ) + "</qt>" );
+ m_ui->showTransparency->setToolTip( "<qt>" + tr( "Shows transparency and transparent items in your document. Requires Ghostscript 7.07 or later." ) + "</qt>");
+ m_ui->enableCMYK->setToolTip( "<qt>" + tr( "Gives a print preview using simulations of generic CMYK inks, instead of RGB colors" ) + "</qt>");
+ m_ui->enableGCR->setToolTip( "<qt>" + tr( "A way of switching off some of the gray shades which are composed of cyan, yellow and magenta and using black instead. UCR most affects parts of images which are neutral and/or dark tones which are close to the gray. Use of this may improve printing some images and some experimentation and testing is need on a case by case basis. UCR reduces the possibility of over saturation with CMY inks." ) + "</qt>" );
+ m_ui->scaleBox->setToolTip( "<qt>" + tr("Resize the scale of the page") + "</qt>");
+ m_ui->convertSpots->setToolTip("<qt>" + tr( "Enables Spot Colors to be converted to composite colors. Unless you are planning to print spot colors at a commercial printer, this is probably best left enabled." ) + "</qt>");
//signals and slots
- connect(antiAliasing, SIGNAL(clicked()), this, SLOT(redisplay()));
- connect(showTransparency, SIGNAL(clicked()), this, SLOT(redisplay()));
- connect(enableCMYK, SIGNAL(clicked()), this, SLOT(toggleCMYK()));
- connect(enableGCR, SIGNAL(clicked()), this, SLOT(redisplay()));
- connect(mirrorHor, SIGNAL(clicked()), this, SLOT(redisplay()));
- connect(mirrorVert, SIGNAL(clicked()), this, SLOT(redisplay()));
- connect(clipMargins, SIGNAL(clicked()), this, SLOT(redisplay()));
- connect(spotColors, SIGNAL(clicked()), this, SLOT(redisplay()));
- connect(useGray, SIGNAL(clicked()), this, SLOT(redisplay()));
- connect(pageSelector, SIGNAL(pageChanged(int)), this, SLOT(jumpToPage(int)));
- connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
- connect(printButton, SIGNAL(clicked()), this, SIGNAL(doPrint()));
- connect(scaleBox, SIGNAL(activated(int)), this, SLOT(scaleBox_valueChanged(int)));
+ connect(m_ui->pageSelector, SIGNAL(pageChanged(int)), this, SLOT(jumpToPage(int)));
+ connect(m_ui->closeButton, SIGNAL(clicked()), this, SLOT(close()));
+ connect(m_ui->printButton, SIGNAL(clicked()), this, SIGNAL(doPrint()));
+ connect(m_ui->scaleBox, SIGNAL(activated(int)), this, SLOT(scaleBox_valueChanged(int)));
+
+ connect(m_ui->antiAliasing, SIGNAL(clicked()), this, SLOT(redisplay()));
+ connect(m_ui->showTransparency, SIGNAL(clicked()), this, SLOT(redisplay()));
+
+ connect(m_ui->printLanguageCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onPrintLanguageChange(int)));
+ connect(m_ui->colorOutputMode, SIGNAL(activated(int)), this, SLOT(redisplay()));
+ connect(m_ui->mirrorH, SIGNAL(clicked()), this, SLOT(redisplay()));
+ connect(m_ui->mirrorV, SIGNAL(clicked()), this, SLOT(redisplay()));
+ connect(m_ui->clipToMargins, SIGNAL(clicked()), this, SLOT(redisplay()));
+ connect(m_ui->enableGCR, SIGNAL(clicked()), this, SLOT(redisplay()));
+ connect(m_ui->convertSpots, SIGNAL(clicked()), this, SLOT(redisplay()));
+
+ connect(m_ui->coverThresholdValue, SIGNAL(valueChanged(double)), this, SLOT(toggleCMYK_Colour()));
}
PrintPreview::~PrintPreview()
@@ -349,33 +293,62 @@
delete m_previewCreator;
m_previewCreator = nullptr;
}
+
+ delete m_ui;
+}
+
+bool PrintPreview::isCMYKPreviewEnabled() const
+{
+ return m_ui->enableCMYK->isChecked();
+}
+
+bool PrintPreview::isAntialiasingEnabled() const
+{
+ return m_ui->antiAliasing->isChecked();
+}
+
+bool PrintPreview::isTransparencyEnabled() const
+{
+ return m_ui->showTransparency->isChecked();
+}
+
+bool PrintPreview::isInkCoverageEnabled() const
+{
+ return m_ui->displayInkCoverage->isChecked();
+}
+
+bool PrintPreview::useGhostscriptPreview() const
+{
+ return m_useGhostscript;
+}
+
+double PrintPreview::inkCoverageThreshold() const
+{
+ return m_ui->coverThresholdValue->value();
}
void PrintPreview::setValues()
{
- if ((printDinUse) || (!doc->Print_Options.firstUse))
- {
- enableGCR->setChecked( postscriptPreview ? doc->Print_Options.doGCR : false);
- enableGCR->setEnabled( postscriptPreview );
- mirrorHor->setChecked(doc->Print_Options.mirrorH);
- mirrorVert->setChecked(doc->Print_Options.mirrorV);
- clipMargins->setChecked(doc->Print_Options.doClip);
- spotColors->setChecked(!doc->Print_Options.useSpotColors);
- useGray->setChecked(!doc->Print_Options.useColor);
+ if ((printDinUse) || (!m_doc->Print_Options.firstUse))
+ {
+ m_ui->enableGCR->setChecked(m_useGhostscript ? m_doc->Print_Options.doGCR : false);
+ m_ui->enableGCR->setEnabled(m_useGhostscript );
+ m_ui->mirrorH->setChecked(m_doc->Print_Options.mirrorH);
+ m_ui->mirrorV->setChecked(m_doc->Print_Options.mirrorV);
+ m_ui->clipToMargins->setChecked(m_doc->Print_Options.doClip);
+ m_ui->convertSpots->setChecked(!m_doc->Print_Options.useSpotColors);
+ m_ui->colorOutputMode->setCurrentIndex(m_doc->Print_Options.useColor ? 0 : 1);
}
else
{
PrefsContext* prefs = PrefsManager::instance().prefsFile->getContext("print_options");
- enableGCR->setChecked( postscriptPreview ? prefs->getBool("DoGCR", false) : false);
- enableGCR->setEnabled( postscriptPreview );
- mirrorHor->setChecked(prefs->getBool("MirrorH", false));
- mirrorVert->setChecked(prefs->getBool("MirrorV", false));
- clipMargins->setChecked(prefs->getBool("Clip", false));
- spotColors->setChecked(!prefs->getBool("doSpot", true));
- if (prefs->getInt("PrintColor", 0) == 1)
- useGray->setChecked(true);
- else
- useGray->setChecked(false);
+ m_ui->enableGCR->setChecked(m_useGhostscript ? prefs->getBool("DoGCR", false) : false);
+ m_ui->enableGCR->setEnabled(m_useGhostscript);
+ m_ui->mirrorH->setChecked(prefs->getBool("MirrorH", false));
+ m_ui->mirrorV->setChecked(prefs->getBool("MirrorV", false));
+ m_ui->clipToMargins->setChecked(prefs->getBool("Clip", false));
+ m_ui->convertSpots->setChecked(!prefs->getBool("doSpot", true));
+ m_ui->colorOutputMode->setCurrentIndex((prefs->getInt("PrintColor", 0) == 1) ? 1 : 0);
}
}
@@ -384,70 +357,117 @@
int n = num-1;
if (n == m_currentPage)
return;
- QPixmap previewPix = createPreview(n, qRound(72 * scaleFactor));
- previewLabel->setPixmap(previewPix);
- previewLabel->resize(previewPix.size());
+ QPixmap previewPix = createPreview(n, qRound(72 * m_scaleFactor));
+ m_previewLabel->setPixmap(previewPix);
+ m_previewLabel->resize(previewPix.size());
}
void PrintPreview::redisplay()
{
- QPixmap previewPix = createPreview(m_currentPage, qRound(72 * scaleFactor));
- previewLabel->setPixmap(previewPix);
- previewLabel->resize(previewPix.size());
+ QPixmap previewPix = createPreview(m_currentPage, qRound(72 * m_scaleFactor));
+ m_previewLabel->setPixmap(previewPix);
+ m_previewLabel->resize(previewPix.size());
}
void PrintPreview::toggleCMYK()
{
- if (!haveTiffSep)
+ if (!m_haveTiffSep)
return;
- bool c = enableCMYK->isChecked();
- inkTable->setEnabled(c);
- enableInkCover->setEnabled(c);
- if (enableInkCover->isChecked())
- coverThresholdValue->setEnabled(c);
+ bool c = m_ui->enableCMYK->isChecked();
+ m_ui->inkTable->setEnabled(c);
+ m_ui->displayInkCoverage->setEnabled(c);
+ if (m_ui->displayInkCoverage->isChecked())
+ {
+ m_ui->coverThresholdLabel->setEnabled(c);
+ m_ui->coverThresholdValue->setEnabled(c);
+ }
redisplay();
}
void PrintPreview::toggleCMYK_Colour()
{
- if (haveTiffSep)
- {
- if ((enableCMYK->isChecked()) && (enableInkCover->isChecked()))
- coverThresholdValue->setEnabled(true);
+ if (m_haveTiffSep)
+ {
+ if ((m_ui->enableCMYK->isChecked()) && (m_ui->displayInkCoverage->isChecked()))
+ {
+ m_ui->coverThresholdLabel->setEnabled(true);
+ m_ui->coverThresholdValue->setEnabled(true);
+ }
else
- coverThresholdValue->setEnabled(false);
- }
- if (enableCMYK->isChecked())
- previewLabel->setPixmap(createPreview(m_currentPage, qRound(72 * scaleFactor)));
- previewLabel->resize(previewLabel->pixmap()->size());
-}
-
-void PrintPreview::doSpotTable(int row)
-{
- if (!haveTiffSep)
+ {
+ m_ui->coverThresholdLabel->setEnabled(false);
+ m_ui->coverThresholdValue->setEnabled(false);
+ }
+ }
+ if (m_ui->enableCMYK->isChecked())
+ m_previewLabel->setPixmap(createPreview(m_currentPage, qRound(72 * m_scaleFactor)));
+ m_previewLabel->resize(m_previewLabel->pixmap()->size());
+}
+
+void PrintPreview::onInkTableCellDoubleClicked(int row)
+{
+ if (!m_haveTiffSep)
return;
- for (auto sepIt = flagsVisible.begin(); sepIt != flagsVisible.end(); ++sepIt)
+ for (auto sepIt = m_inkVisibilities.begin(); sepIt != m_inkVisibilities.end(); ++sepIt)
sepIt.value()->setChecked(false);
- ((QCheckBox*)(inkTable->cellWidget(row, 0)))->setChecked(true);
-
- if (enableCMYK->isChecked())
- previewLabel->setPixmap(createPreview(m_currentPage, qRound(72 * scaleFactor)));
- previewLabel->resize(previewLabel->pixmap()->size());
+ ((QCheckBox*)(m_ui->inkTable->cellWidget(row, 0)))->setChecked(true);
+
+ if (m_ui->enableCMYK->isChecked())
+ m_previewLabel->setPixmap(createPreview(m_currentPage, qRound(72 * m_scaleFactor)));
+ m_previewLabel->resize(m_previewLabel->pixmap()->size());
+}
+
+void PrintPreview::onPrintLanguageChange(int /*langIndex*/)
+{
+ if (m_previewCreator)
+ {
+ delete m_previewCreator;
+ m_previewCreator = nullptr;
+ }
+
+ PrintLanguage newPrnLanguage = m_ui->printLanguageCombo->currentLanguage();
+ m_previewCreator = PrintPreviewCreatorFactory::create(m_doc, newPrnLanguage);
+ m_useGhostscript = m_previewCreator->isGhostscriptBased();
+
+ m_ui->antiAliasing->setEnabled(m_useGhostscript);
+ m_ui->showTransparency->setEnabled(m_useGhostscript);
+
+ m_ui->enableCMYK->setEnabled(m_haveTiffSep && m_useGhostscript);
+ if (!m_ui->enableCMYK->isEnabled())
+ m_ui->enableCMYK->setChecked(false);
+
+ bool cmykEnabled = m_ui->enableCMYK->isChecked();
+ m_ui->inkTable->setEnabled(cmykEnabled);
+ m_ui->displayInkCoverage->setEnabled(cmykEnabled);
+
+ m_ui->displayInkCoverage->setEnabled((m_haveTiffSep && m_useGhostscript));
+ if (!m_ui->displayInkCoverage->isEnabled())
+ m_ui->displayInkCoverage->setChecked(false);
+
+ bool isInkCoverageEnabled = m_ui->displayInkCoverage->isChecked();
+ m_ui->coverThresholdLabel->setEnabled(cmykEnabled && isInkCoverageEnabled);
+ m_ui->coverThresholdValue->setEnabled(cmykEnabled && isInkCoverageEnabled);
+
+ m_currentPage = -1;
+
+ QPixmap previewPix = createPreview(m_doc->currentPageNumber(), qRound(72 * m_scaleFactor));
+ m_previewLabel->setPixmap(previewPix);
+ m_previewLabel->resize(previewPix.size());
}
void PrintPreview::toggleAllfromHeader()
{
- if (!haveTiffSep)
+ if (!m_haveTiffSep)
return;
- for (auto sepIt = flagsVisible.begin(); sepIt != flagsVisible.end(); ++sepIt)
+ for (auto sepIt = m_inkVisibilities.begin(); sepIt != m_inkVisibilities.end(); ++sepIt)
sepIt.value()->setChecked(true);
- if (enableCMYK->isChecked())
- previewLabel->setPixmap(createPreview(m_currentPage, qRound(72 * scaleFactor)));
- previewLabel->resize(previewLabel->pixmap()->size());
+ if (m_ui->enableCMYK->isChecked())
+ m_previewLabel->setPixmap(createPreview(m_currentPage, qRound(72 * m_scaleFactor)));
+ m_previewLabel->resize(m_previewLabel->pixmap()->size());
}
void PrintPreview::scaleBox_valueChanged(int value)
@@ -455,28 +475,28 @@
switch (value)
{
case 0:
- scaleFactor = 0.5;
+ m_scaleFactor = 0.5;
break;
case 1:
- scaleFactor = 1.0;
+ m_scaleFactor = 1.0;
break;
case 2:
- scaleFactor = 1.5;
+ m_scaleFactor = 1.5;
break;
case 3:
- scaleFactor = 2.0;
+ m_scaleFactor = 2.0;
break;
case 4:
- scaleFactor = previewArea->viewport()->width() / doc->Pages->at(m_currentPage)->width();
+ m_scaleFactor = m_ui->previewArea->viewport()->width() / m_doc->Pages->at(m_currentPage)->width();
break;
case 5:
- scaleFactor = previewArea->viewport()->height() / doc->Pages->at(m_currentPage)->height();
+ m_scaleFactor = m_ui->previewArea->viewport()->height() / m_doc->Pages->at(m_currentPage)->height();
break;
case 6:
- scaleFactor = qMin(previewArea->viewport()->height() / doc->Pages->at(m_currentPage)->height(), previewArea->viewport()->width() / doc->Pages->at(m_currentPage)->width());
+ m_scaleFactor = qMin(m_ui->previewArea->viewport()->height() / m_doc->Pages->at(m_currentPage)->height(), m_ui->previewArea->viewport()->width() / m_doc->Pages->at(m_currentPage)->width());
break;
default:
- scaleFactor = 1.0;
+ m_scaleFactor = 1.0;
break;
}
redisplay();
@@ -489,22 +509,20 @@
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
// Recreate Postscript-File only when necessary
- if ((pageIndex != m_currentPage) || (enableGCR->isChecked() != m_useGCR) || (useGray->isChecked() != m_useGray)
- || (mirrorHor->isChecked() != m_mirrorH) || (mirrorVert->isChecked() != m_mirrorV) || (clipMargins->isChecked() != m_clipToMargins)
- || (spotColors->isChecked() != m_convertSpots))
+ if (printOptionsHaveChanged(pageIndex))
{
PrintOptions options;
options.pageNumbers.push_back(pageIndex + 1);
options.outputSeparations = false;
options.separationName = "All";
options.allSeparations = QStringList();
- options.useSpotColors = !spotColors->isChecked();
- options.useColor = !useGray->isChecked();
- options.mirrorH = mirrorHor->isChecked();
- options.mirrorV = mirrorVert->isChecked();
- options.doGCR = enableGCR->isChecked();
+ options.useSpotColors = !m_ui->convertSpots->isChecked();
+ options.useColor = (m_ui->colorOutputMode->currentIndex() == 0);
+ options.mirrorH = m_ui->mirrorH->isChecked();
+ options.mirrorV = m_ui->mirrorV->isChecked();
+ options.doGCR = m_ui->enableGCR->isChecked();
options.setDevParam = false;
- options.doClip = clipMargins->isChecked();
+ options.doClip = m_ui->clipToMargins->isChecked();
options.cropMarks = false;
options.bleedMarks = false;
options.registrationMarks = false;
@@ -517,21 +535,21 @@
}
m_previewCreator->setPreviewResolution(res);
- m_previewCreator->setAntialisingEnabled(antiAliasing->isChecked());
- m_previewCreator->setShowTransparency(showTransparency->isChecked());
+ m_previewCreator->setAntialisingEnabled(m_ui->antiAliasing->isChecked());
+ m_previewCreator->setShowTransparency(m_ui->showTransparency->isChecked());
SeparationPreviewCreator* sepPreviewCreator = dynamic_cast<SeparationPreviewCreator*>(m_previewCreator);
if (sepPreviewCreator)
{
- sepPreviewCreator->setSeparationPreviewEnabled(enableCMYK->isChecked());
- sepPreviewCreator->setShowInkCoverage(enableInkCover->isChecked());
- sepPreviewCreator->setInkCoverageThreshold(coverThresholdValue->value());
+ sepPreviewCreator->setSeparationPreviewEnabled(m_ui->enableCMYK->isChecked());
+ sepPreviewCreator->setShowInkCoverage(m_ui->displayInkCoverage->isChecked());
+ sepPreviewCreator->setInkCoverageThreshold(m_ui->coverThresholdValue->value());
QStringList separationNames = sepPreviewCreator->separationNames();
for (int i = 0; i < separationNames.count(); ++i)
{
const QString& separationName = separationNames.at(i);
- const QCheckBox* checkBox = flagsVisible.value(separationName, nullptr);
+ const QCheckBox* checkBox = m_inkVisibilities.value(separationName, nullptr);
if (checkBox)
sepPreviewCreator->setSeparationVisible(separationName, checkBox->isChecked());
}
@@ -546,14 +564,14 @@
//-------------------------------------------------------------------------------------------------
-bool PrintPreview::usePostscriptPreview(const QString& printerName, PrintEngine engine)
+bool PrintPreview::usesGhostscript(const QString& printerName, PrintLanguage engine)
{
#ifdef _WIN32
if (printerName == tr("File"))
return true;
else if (printerName.isEmpty())
return PrinterUtil::isPostscriptPrinter( ScPrintEngine_GDI::getDefaultPrinter() );
- else if (engine >= PrintEngine::PostScript1 && engine <= PrintEngine::PostScript3)
+ else if (engine >= PrintLanguage::PostScript1 && engine <= PrintLanguage::PostScript3)
return PrinterUtil::isPostscriptPrinter( printerName );
return false;
#else
@@ -563,25 +581,46 @@
//-------------------------------------------------------------------------------------------------
+bool PrintPreview::printOptionsHaveChanged(int pageIndex) const
+{
+ if (pageIndex != m_currentPage)
+ return true;
+
+ if (m_colorOutputMode != m_ui->colorOutputMode->currentIndex())
+ return true;
+ if (m_ui->mirrorH->isChecked() != m_mirrorH)
+ return true;
+ if (m_ui->mirrorV->isChecked() != m_mirrorV)
+ return true;
+ if (m_ui->clipToMargins->isChecked() != m_clipToMargins)
+ return true;
+ if (m_ui->enableGCR->isChecked() != m_useGCR)
+ return true;
+ if (m_ui->convertSpots->isChecked() != m_convertSpots)
+ return true;
+
+ return false;
+}
+
void PrintPreview::getUserSelection(int page)
{
m_currentPage = page;
- m_colorMode = enableCMYK->isChecked();
- m_useAntialiasing = antiAliasing->isChecked();
- m_showTransparency = showTransparency->isChecked();
- m_useGCR = enableGCR->isChecked();
- m_scaleMode = scaleBox->currentIndex();
- m_mirrorH = mirrorHor->isChecked();
- m_mirrorV = mirrorVert->isChecked();
- m_clipToMargins = clipMargins->isChecked();
- m_convertSpots = spotColors->isChecked();
- m_useGray = useGray->isChecked();
+ m_colorOutputMode = m_ui->colorOutputMode->currentIndex();
+ m_colorMode = m_ui->enableCMYK->isChecked();
+ m_useAntialiasing = m_ui->antiAliasing->isChecked();
+ m_showTransparency = m_ui->showTransparency->isChecked();
+ m_useGCR = m_ui->enableGCR->isChecked();
+ m_scaleMode = m_ui->scaleBox->currentIndex();
+ m_mirrorH = m_ui->mirrorH->isChecked();
+ m_mirrorV = m_ui->mirrorV->isChecked();
+ m_clipToMargins = m_ui->clipToMargins->isChecked();
+ m_convertSpots = m_ui->convertSpots->isChecked();
}
void PrintPreview::resizeEvent(QResizeEvent * event)
{
QDialog::resizeEvent(event);
- int scaleIndex = scaleBox->currentIndex();
+ int scaleIndex = m_ui->scaleBox->currentIndex();
// Repaint only for "fit to" options in the combo box
if (scaleIndex <= 3)
return;
Modified: trunk/Scribus/scribus/ui/printpreview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/ui/printpreview.h
==============================================================================
--- trunk/Scribus/scribus/ui/printpreview.h (original)
+++ trunk/Scribus/scribus/ui/printpreview.h Sat Oct 3 22:57:53 2020
@@ -19,6 +19,7 @@
class QPushButton;
class QScrollArea;
class QTableWidget;
+namespace Ui { class PrintPreviewBase; }
#include "ui/scrspinbox.h"
#include "scribusapi.h"
@@ -47,19 +48,19 @@
\param printer a name of the printer
\param engine a printer engine
*/
- PrintPreview(QWidget* parent, ScribusDoc *docu, const QString& printer, PrintEngine engine );
+ PrintPreview(QWidget* parent, ScribusDoc *docu, const QString& printer, PrintLanguage engine);
~PrintPreview();
- bool isCMYKPreviewEnabled() const { return enableCMYK->isChecked(); }
- bool isAntialiasingEnabled() const { return antiAliasing->isChecked(); }
- bool isTransparencyEnabled() const { return showTransparency->isChecked(); }
- bool isInkChannelVisible(const QString& ink) { return (flagsVisible.contains(ink) ? flagsVisible[ink]->isChecked() : false); }
- bool isInkCoverageEnabled() const { return enableInkCover->isChecked(); }
- bool usePostScriptPreview() const { return postscriptPreview; }
+ bool isCMYKPreviewEnabled() const;
+ bool isAntialiasingEnabled() const;
+ bool isTransparencyEnabled() const;
+ bool isInkChannelVisible(const QString& ink) { return (m_inkVisibilities.contains(ink) ? m_inkVisibilities[ink]->isChecked() : false); }
+ bool isInkCoverageEnabled() const;
+ bool useGhostscriptPreview() const;
- double inkCoverageThreshold() const { return coverThresholdValue->value(); }
+ double inkCoverageThreshold() const;
- static bool usePostscriptPreview(const QString& printerName, PrintEngine engine);
+ static bool usesGhostscript(const QString& printerName, PrintLanguage engine);
/*!
\author Franz Schmid
\brief Creates the Preview of the Actual Page
@@ -91,32 +92,23 @@
\brief If CMYK preview is enabled, create a new preview with the new CMYK plate settings
*/
void toggleCMYK_Colour();
- void doSpotTable(int row);
void toggleAllfromHeader();
- /*!
- \author Petr Vanek
- \date 09/03/2005
- \brief Recompute scaling factor of the preview image
- \param value spinbox value from signal
- */
- void scaleBox_valueChanged(int value);
signals:
void doPrint();
protected:
- ScribusDoc *doc { nullptr };
- bool havePngAlpha { false };
- bool haveTiffSep { false };
- bool postscriptPreview { true };
- QMap<QString, QCheckBox*> flagsVisible;
- QTableWidget* inkTable { nullptr };
+ ScribusDoc *m_doc { nullptr };
+ bool m_haveTiffSep { false };
+ bool m_useGhostscript { true };
+ QMap<QString, QCheckBox*> m_inkVisibilities;
PrintPreviewCreator* m_previewCreator { nullptr };
int m_currentPage { -1 };
int m_scaleMode { 1 };
int m_gsVersion { 0 };
+ int m_colorOutputMode { 0 };
bool m_colorMode { false };
bool m_useAntialiasing { false };
bool m_showTransparency { false };
@@ -125,48 +117,34 @@
bool m_mirrorV { false };
bool m_clipToMargins { false };
bool m_convertSpots { true };
- bool m_useGray { false };
/*! \brief Percentage value of the scaling widget */
- double scaleFactor { 1.0 };
+ double m_scaleFactor { 1.0 };
- PageSelector *pageSelector { nullptr };
- QCheckBox* antiAliasing { nullptr };
- QCheckBox* showTransparency { nullptr };
- QCheckBox* enableCMYK { nullptr };
- QCheckBox* enableGCR { nullptr };
- QCheckBox* mirrorHor { nullptr };
- QCheckBox* mirrorVert { nullptr };
- QCheckBox* clipMargins { nullptr };
- QCheckBox* spotColors { nullptr };
- QCheckBox* useGray { nullptr };
- QCheckBox* enableInkCover { nullptr };
- ScrSpinBox* coverThresholdValue { nullptr };
- QLabel* thresholdLabel { nullptr };
- QScrollArea* previewArea { nullptr };
- QLabel* previewLabel { nullptr };
- QGroupBox* devTitle { nullptr };
- QGroupBox* jobTitle { nullptr };
- QPushButton *closeButton { nullptr };
- QPushButton *printButton { nullptr };
- /*! scaling GUI */
- QLabel* scaleLabel { nullptr };
- QComboBox* scaleBox { nullptr };
+ Ui::PrintPreviewBase *m_ui { nullptr };
+ QLabel* m_previewLabel { nullptr };
- QVBoxLayout* PLayout { nullptr };
- QVBoxLayout* Layout1 { nullptr };
- QVBoxLayout* Layout2 { nullptr };
- QHBoxLayout* Layout5 { nullptr };
- QHBoxLayout* Layout6 { nullptr };
- QHBoxLayout* Layout7 { nullptr };
- QVBoxLayout* settingsBarLayout { nullptr };
- PrefsManager& prefsManager;
+ PrefsManager& m_prefsManager;
void setValues();
void getUserSelection(int);
+ bool printOptionsHaveChanged(int pageIndex) const;
+
//! \brief repaint sample on the dialog change
void resizeEvent(QResizeEvent * event) override;
+
+protected slots:
+ void onPrintLanguageChange(int);
+ void onInkTableCellDoubleClicked(int row);
+
+ /*!
+ \author Petr Vanek
+ \date 09/03/2005
+ \brief Recompute scaling factor of the preview image
+ \param value spinbox value from signal
+ */
+ void scaleBox_valueChanged(int value);
};
#endif
Modified: trunk/Scribus/scribus/util_printer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/util_printer.cpp
==============================================================================
--- trunk/Scribus/scribus/util_printer.cpp (original)
+++ trunk/Scribus/scribus/util_printer.cpp Sat Oct 3 22:57:53 2020
@@ -25,6 +25,7 @@
#include "prefsfile.h"
#include "prefsmanager.h"
#include "scribuscore.h"
+#include "util_os.h"
void PrinterUtil::getDefaultPrintOptions(PrintOptions& options, const MarginStruct& docBleeds)
{
@@ -42,7 +43,10 @@
if ((selectedSep < 0) || (selectedSep > 4))
selectedSep = 0;
options.separationName = spots.at(selectedSep);
- options.prnEngine = (PrintEngine) prnPrefs->getInt("PSLevel", (int) PrintEngine::PostScript3);
+ if (prnPrefs->contains("PrintLanguage"))
+ options.prnLanguage = (PrintLanguage) prnPrefs->getInt("PrintLanguage", (int) PrinterUtil::getDefaultPrintLanguage(options.printer, false));
+ else
+ options.prnLanguage = (PrintLanguage) prnPrefs->getInt("PSLevel", (int) PrintLanguage::PostScript3);
options.mirrorH = prnPrefs->getBool("MirrorH", false);
options.mirrorV = prnPrefs->getBool("MirrorV", false);
options.setDevParam = prnPrefs->getBool("doDev", false);
@@ -147,54 +151,61 @@
return true;
}
-PrintEngine PrinterUtil::getDefaultPrintEngine(const QString& /*printerName*/, bool toFile)
+PrintLanguage PrinterUtil::getDefaultPrintLanguage(const QString& /*printerName*/, bool toFile)
{
if (!toFile)
{
#if defined(_WIN32)
- return PrintEngine::WindowsGDI;
+ return PrintLanguage::WindowsGDI;
#else
- return PrintEngine::PostScript3;
-#endif
- }
- return PrintEngine::PostScript3;
-}
-
-PrintEngineMap PrinterUtil::getPrintEngineSupport(const QString& printerName, bool toFile)
-{
- PrintEngineMap prnMap;
+ return PrintLanguage::PostScript3;
+#endif
+ }
+ return PrintLanguage::PostScript3;
+}
+
+PrintLanguageMap PrinterUtil::getPrintLanguageSupport(const QString& printerName, bool toFile)
+{
+ PrintLanguageMap prnMap;
if (toFile || PrinterUtil::isPostscriptPrinter(printerName))
{
if (ScCore->haveGS())
{
- prnMap.insert(CommonStrings::trPostScript1, PrintEngine::PostScript1);
- prnMap.insert(CommonStrings::trPostScript2, PrintEngine::PostScript2);
+ prnMap.insert(CommonStrings::trPostScript1, PrintLanguage::PostScript1);
+ prnMap.insert(CommonStrings::trPostScript2, PrintLanguage::PostScript2);
}
- prnMap.insert(CommonStrings::trPostScript3, PrintEngine::PostScript3);
- }
+ prnMap.insert(CommonStrings::trPostScript3, PrintLanguage::PostScript3);
+ }
+ if (toFile || PrinterUtil::supportsPDF(printerName))
+ prnMap.insert(CommonStrings::trPDF, PrintLanguage::PDF);
#if defined(_WIN32)
if (!toFile)
- prnMap.insert(CommonStrings::trWindowsGDI, PrintEngine::WindowsGDI);
+ prnMap.insert(CommonStrings::trWindowsGDI, PrintLanguage::WindowsGDI);
#endif
return prnMap;
}
-bool PrinterUtil::checkPrintEngineSupport(const QString& printerName, PrintEngine engine, bool toFile)
-{
- bool psSupported = toFile || PrinterUtil::isPostscriptPrinter(printerName);
- if (psSupported && (engine >= PrintEngine::PostScript1 && engine <= PrintEngine::PostScript3))
- return true;
- if (!psSupported && (engine >= PrintEngine::PostScript1 && engine <= PrintEngine::PostScript3))
- return false;
- if (engine == PrintEngine::WindowsGDI)
- {
-#if defined(_WIN32)
- return true; //WindowsGDI
+bool PrinterUtil::checkPrintLanguageSupport(const QString& printerName, PrintLanguage engine, bool toFile)
+{
+ if (engine >= PrintLanguage::PostScript1 && engine <= PrintLanguage::PostScript3)
+ return (toFile || PrinterUtil::isPostscriptPrinter(printerName));
+
+ if (engine == PrintLanguage::WindowsGDI)
+ return os_is_win();
+
+ if (engine == PrintLanguage::PDF)
+ return toFile || os_is_unix();
+
+ return false;
+}
+
+bool PrinterUtil::supportsPDF(const QString& /*printerName*/)
+{
+#ifdef _WIN32
+ return false;
#else
- return false;
-#endif
- }
- return false;
+ return true;
+#endif
}
//Parameter needed on win32..
Modified: trunk/Scribus/scribus/util_printer.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/scribus/util_printer.h
==============================================================================
--- trunk/Scribus/scribus/util_printer.h (original)
+++ trunk/Scribus/scribus/util_printer.h Sat Oct 3 22:57:53 2020
@@ -72,20 +72,20 @@
* @param printerName the printer name
* @param toFile if file printing is planned
*/
- static PrintEngine getDefaultPrintEngine(const QString& printerName, bool toFile);
+ static PrintLanguage getDefaultPrintLanguage(const QString& printerName, bool toFile);
/**
* @brief Get print engines supported by a specific printer
* @param printerName the printer name
* @param toFile if file printing is planned
*/
- static PrintEngineMap getPrintEngineSupport(const QString& printerName, bool toFile);
+ static PrintLanguageMap getPrintLanguageSupport(const QString& printerName, bool toFile);
/**
* @brief Check if a print engine is supported by a specific printer
* @param printerName the printer name
* @param engine the print engine for which support is to be checked
* @param toFile if file printing is planned
*/
- static bool checkPrintEngineSupport(const QString& printerName, PrintEngine engine, bool toFile);
+ static bool checkPrintLanguageSupport(const QString& printerName, PrintLanguage engine, bool toFile);
/**
* @brief Check if a specified printer supports postscript input
*
@@ -97,7 +97,17 @@
* @return true is printer support postscript, false otherwise.
*
*/
- static bool isPostscriptPrinter( const QString& printerName );
+ static bool isPostscriptPrinter(const QString& printerName);
+ /**
+ * @brief Check if a specified printer supports PDF input
+ *
+ * On Windows, the function always return false
+ *
+ * @param printerName the printer name
+ * @return true is printer support PDF, false otherwise.
+ *
+ */
+ static bool supportsPDF(const QString& printerName);
};
#endif // DRUCK_H
Modified: trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
==============================================================================
--- trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj (original)
+++ trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj Sat Oct 3 22:57:53 2020
@@ -616,6 +616,7 @@
<moc Include="..\..\..\scribus\ui\outputpreviewbase.h" />
<moc Include="..\..\..\scribus\ui\outputpreview_pdf.h" />
<moc Include="..\..\..\scribus\ui\outputpreview_ps.h" />
+ <moc Include="..\..\..\scribus\ui\printlanguagecombo.h" />
<ClInclude Include="..\..\..\scribus\ui\propertywidgetbase.h" />
<moc Include="..\..\..\scribus\pslib.h" />
<moc Include="..\..\..\scribus\ui\query.h" />
@@ -1273,6 +1274,7 @@
<ClCompile Include="..\..\..\scribus\prefsreader.cpp" />
<ClCompile Include="..\..\..\scribus\prefstable.cpp" />
<ClCompile Include="..\..\..\scribus\ui\printdialog.cpp" />
+ <ClCompile Include="..\..\..\scribus\ui\printlanguagecombo.cpp" />
<ClCompile Include="..\..\..\scribus\ui\printpreview.cpp" />
<ClCompile Include="..\..\..\scribus\ui\propertiespalette.cpp" />
<ClCompile Include="..\..\..\scribus\ui\propertiespalette_group.cpp" />
@@ -1633,6 +1635,7 @@
<uic Include="..\..\..\scribus\ui\prefs_typographybase.ui" />
<uic Include="..\..\..\scribus\ui\prefs_userinterfacebase.ui" />
<uic Include="..\..\..\scribus\ui\printdialogbase.ui" />
+ <uic Include="..\..\..\scribus\ui\printpreviewbase.ui" />
<uic Include="..\..\..\scribus\ui\propertiespalette_groupbase.ui" />
<uic Include="..\..\..\scribus\ui\propertiespalette_imagebase.ui" />
<uic Include="..\..\..\scribus\ui\propertiespalette_linebase.ui" />
Modified: trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters
==============================================================================
--- trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters (original)
+++ trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters Sat Oct 3 22:57:53 2020
@@ -824,6 +824,9 @@
<ClInclude Include="..\..\..\scribus\printpreviewcreatorfactory.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\..\..\scribus\ui\printlanguagecombo.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\scribus\desaxe\digester.cpp">
@@ -2549,6 +2552,9 @@
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\scribus\printpreviewcreatorfactory.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\scribus\ui\printlanguagecombo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
@@ -2947,6 +2953,9 @@
<uic Include="..\..\..\scribus\ui\outputpreview_ps.ui">
<Filter>Form Files</Filter>
</uic>
+ <uic Include="..\..\..\scribus\ui\printpreviewbase.ui">
+ <Filter>Form Files</Filter>
+ </uic>
</ItemGroup>
<ItemGroup>
<lrelease Include="..\..\..\resources\translations\scribus.af.ts">
Modified: trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj
==============================================================================
--- trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj (original)
+++ trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj Sat Oct 3 22:57:53 2020
@@ -616,6 +616,7 @@
<moc Include="..\..\..\scribus\ui\outputpreviewbase.h" />
<moc Include="..\..\..\scribus\ui\outputpreview_pdf.h" />
<moc Include="..\..\..\scribus\ui\outputpreview_ps.h" />
+ <moc Include="..\..\..\scribus\ui\printlanguagecombo.h" />
<ClInclude Include="..\..\..\scribus\ui\propertywidgetbase.h" />
<moc Include="..\..\..\scribus\pslib.h" />
<moc Include="..\..\..\scribus\ui\query.h" />
@@ -1273,6 +1274,7 @@
<ClCompile Include="..\..\..\scribus\prefsreader.cpp" />
<ClCompile Include="..\..\..\scribus\prefstable.cpp" />
<ClCompile Include="..\..\..\scribus\ui\printdialog.cpp" />
+ <ClCompile Include="..\..\..\scribus\ui\printlanguagecombo.cpp" />
<ClCompile Include="..\..\..\scribus\ui\printpreview.cpp" />
<ClCompile Include="..\..\..\scribus\ui\propertiespalette.cpp" />
<ClCompile Include="..\..\..\scribus\ui\propertiespalette_group.cpp" />
@@ -1633,6 +1635,7 @@
<uic Include="..\..\..\scribus\ui\prefs_typographybase.ui" />
<uic Include="..\..\..\scribus\ui\prefs_userinterfacebase.ui" />
<uic Include="..\..\..\scribus\ui\printdialogbase.ui" />
+ <uic Include="..\..\..\scribus\ui\printpreviewbase.ui" />
<uic Include="..\..\..\scribus\ui\propertiespalette_groupbase.ui" />
<uic Include="..\..\..\scribus\ui\propertiespalette_imagebase.ui" />
<uic Include="..\..\..\scribus\ui\propertiespalette_linebase.ui" />
Modified: trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj.filters
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj.filters
==============================================================================
--- trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj.filters (original)
+++ trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj.filters Sat Oct 3 22:57:53 2020
@@ -824,6 +824,9 @@
<ClInclude Include="..\..\..\scribus\printpreviewcreatorfactory.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\..\..\scribus\ui\printlanguagecombo.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\scribus\desaxe\digester.cpp">
@@ -2549,6 +2552,9 @@
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\scribus\printpreviewcreatorfactory.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\scribus\ui\printlanguagecombo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
@@ -2947,6 +2953,9 @@
<uic Include="..\..\..\scribus\ui\outputpreview_ps.ui">
<Filter>Form Files</Filter>
</uic>
+ <uic Include="..\..\..\scribus\ui\printpreviewbase.ui">
+ <Filter>Form Files</Filter>
+ </uic>
</ItemGroup>
<ItemGroup>
<lrelease Include="..\..\..\resources\translations\scribus.af.ts">
Modified: trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj
==============================================================================
--- trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj (original)
+++ trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj Sat Oct 3 22:57:53 2020
@@ -617,6 +617,7 @@
<moc Include="..\..\..\scribus\ui\outputpreviewbase.h" />
<moc Include="..\..\..\scribus\ui\outputpreview_pdf.h" />
<moc Include="..\..\..\scribus\ui\outputpreview_ps.h" />
+ <moc Include="..\..\..\scribus\ui\printlanguagecombo.h" />
<ClInclude Include="..\..\..\scribus\ui\propertywidgetbase.h" />
<moc Include="..\..\..\scribus\pslib.h" />
<moc Include="..\..\..\scribus\ui\query.h" />
@@ -1274,6 +1275,7 @@
<ClCompile Include="..\..\..\scribus\prefsreader.cpp" />
<ClCompile Include="..\..\..\scribus\prefstable.cpp" />
<ClCompile Include="..\..\..\scribus\ui\printdialog.cpp" />
+ <ClCompile Include="..\..\..\scribus\ui\printlanguagecombo.cpp" />
<ClCompile Include="..\..\..\scribus\ui\printpreview.cpp" />
<ClCompile Include="..\..\..\scribus\ui\propertiespalette.cpp" />
<ClCompile Include="..\..\..\scribus\ui\propertiespalette_group.cpp" />
@@ -1634,6 +1636,7 @@
<uic Include="..\..\..\scribus\ui\prefs_typographybase.ui" />
<uic Include="..\..\..\scribus\ui\prefs_userinterfacebase.ui" />
<uic Include="..\..\..\scribus\ui\printdialogbase.ui" />
+ <uic Include="..\..\..\scribus\ui\printpreviewbase.ui" />
<uic Include="..\..\..\scribus\ui\propertiespalette_groupbase.ui" />
<uic Include="..\..\..\scribus\ui\propertiespalette_imagebase.ui" />
<uic Include="..\..\..\scribus\ui\propertiespalette_linebase.ui" />
Modified: trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj.filters
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24049&path=/trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj.filters
==============================================================================
--- trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj.filters (original)
+++ trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj.filters Sat Oct 3 22:57:53 2020
@@ -824,6 +824,9 @@
<ClInclude Include="..\..\..\scribus\printpreviewcreatorfactory.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\..\..\scribus\ui\printlanguagecombo.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\scribus\desaxe\digester.cpp">
@@ -2549,6 +2552,9 @@
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\scribus\printpreviewcreatorfactory.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\scribus\ui\printlanguagecombo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
@@ -2947,6 +2953,9 @@
<uic Include="..\..\..\scribus\ui\outputpreview_ps.ui">
<Filter>Form Files</Filter>
</uic>
+ <uic Include="..\..\..\scribus\ui\printpreviewbase.ui">
+ <Filter>Form Files</Filter>
+ </uic>
</ItemGroup>
<ItemGroup>
<lrelease Include="..\..\..\resources\translations\scribus.af.ts">
More information about the scribus-commit
mailing list