mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Issue #159: Renaming applications
This commit is contained in:
33
Pdf4QtEditorPlugins/SoftProofingPlugin/CMakeLists.txt
Normal file
33
Pdf4QtEditorPlugins/SoftProofingPlugin/CMakeLists.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
# Copyright (C) 2022 Jakub Melka
|
||||
#
|
||||
# This file is part of PDF4QT.
|
||||
#
|
||||
# PDF4QT is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# with the written consent of the copyright owner, any later version.
|
||||
#
|
||||
# PDF4QT is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
add_library(SoftProofingPlugin SHARED
|
||||
softproofingplugin.cpp
|
||||
settingsdialog.cpp
|
||||
settingsdialog.ui
|
||||
icons.qrc
|
||||
)
|
||||
|
||||
target_link_libraries(SoftProofingPlugin PRIVATE Pdf4QtLibCore Pdf4QtLibWidgets Qt6::Core Qt6::Gui Qt6::Widgets)
|
||||
|
||||
set_target_properties(SoftProofingPlugin PROPERTIES
|
||||
VERSION ${PDF4QT_VERSION}
|
||||
SOVERSION ${PDF4QT_VERSION}
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PDF4QT_PLUGINS_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PDF4QT_PLUGINS_DIR})
|
||||
|
||||
install(TARGETS SoftProofingPlugin RUNTIME DESTINATION ${PDF4QT_PLUGINS_DIR} LIBRARY DESTINATION ${PDF4QT_PLUGINS_DIR})
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Name" : "SoftProofing",
|
||||
"Author" : "Jakub Melka",
|
||||
"Version" : "1.0.0",
|
||||
"License" : "LGPL v3",
|
||||
"Description" : "Perform soft-proofing / gamut checking with CMYK profiles on a document."
|
||||
}
|
43
Pdf4QtEditorPlugins/SoftProofingPlugin/gamut-checking.svg
Normal file
43
Pdf4QtEditorPlugins/SoftProofingPlugin/gamut-checking.svg
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<g>
|
||||
<circle fill="#21E900" cx="18.644" cy="17.998" r="4.062"/>
|
||||
<g>
|
||||
<path fill="#292D32" d="M6.526,12.401c1.186,0,2.174-0.972,2.203-2.166C8.743,9.637,8.522,9.07,8.106,8.64
|
||||
C7.691,8.21,7.131,7.966,6.528,7.952H6.486c-1.192,0-2.18,0.974-2.202,2.172c-0.012,0.604,0.208,1.172,0.618,1.598
|
||||
c0.411,0.427,0.97,0.668,1.575,0.68H6.526z M5.968,9.636C6.111,9.491,6.299,9.411,6.5,9.411V9.263l0,0l0.005,0.148
|
||||
c0.414,0.004,0.764,0.356,0.764,0.769c0,0.416-0.343,0.759-0.769,0.763c-0.414,0-0.752-0.339-0.755-0.756
|
||||
C5.743,9.979,5.822,9.783,5.968,9.636z"/>
|
||||
<path fill="#292D32" d="M8.066,13.631c-1.219,0.01-2.208,1.011-2.204,2.232c0.004,1.222,1,2.216,2.219,2.216
|
||||
c0.597,0,1.159-0.234,1.582-0.658c0.42-0.422,0.651-0.98,0.649-1.571C10.302,14.626,9.298,13.631,8.066,13.631z M8.85,15.855
|
||||
c0.001,0.2-0.078,0.391-0.221,0.535c-0.145,0.146-0.336,0.225-0.539,0.225c-0.423,0-0.761-0.329-0.768-0.748
|
||||
c-0.001-0.207,0.078-0.402,0.223-0.549c0.144-0.146,0.336-0.225,0.54-0.225H8.09C8.499,15.094,8.847,15.442,8.85,15.855z"/>
|
||||
<path fill="#292D32" d="M13.416,5.347c-1.225,0-2.227,0.991-2.233,2.21c-0.003,0.59,0.227,1.148,0.647,1.573
|
||||
s0.977,0.659,1.565,0.661h0.013c0.595,0,1.153-0.229,1.572-0.645c0.42-0.417,0.651-0.974,0.651-1.566
|
||||
C15.636,6.356,14.65,5.354,13.416,5.347z M13.42,6.809V6.66l0,0l0.007,0.148c0.417,0.005,0.754,0.35,0.749,0.767
|
||||
c-0.007,0.423-0.343,0.754-0.768,0.754c-0.42,0-0.761-0.341-0.761-0.761C12.647,7.149,12.994,6.809,13.42,6.809z M13.408,9.641
|
||||
L13.408,9.641L13.408,9.641L13.408,9.641z"/>
|
||||
<path fill="#292D32" d="M19.674,9.169c-0.726-3.362-3.471-6.163-6.834-6.968c-0.735-0.163-1.495-0.254-2.199-0.261h-0.21
|
||||
C10.24,1.942,10.045,1.951,9.843,1.97l-0.13,0.017c-0.239,0.029-0.478,0.059-0.698,0.1C8.995,2.088,8.978,2.092,8.95,2.098
|
||||
C8.921,2.102,8.892,2.108,8.838,2.122C5.561,2.835,3.242,4.778,1.945,7.896c-0.432,1.042-0.645,2.19-0.65,3.532
|
||||
c-0.004,1.095-0.008,2.227,0.247,3.324c0.613,2.661,2.011,4.715,4.155,6.104c1.038,0.666,2.208,1.058,3.492,1.169l0.052,0.013
|
||||
c0.115,0.008,0.241,0.012,0.376,0.012c0.703,0,1.36-0.117,1.961-0.352c1.866-0.843,2.761-2.892,2.081-4.764
|
||||
c-0.384-1.08-0.019-2.185,0.953-2.883c0.464-0.327,1.001-0.489,1.797-0.543c1.028-0.066,1.979-0.582,2.609-1.414
|
||||
C19.652,11.257,19.892,10.189,19.674,9.169z M17.887,11.173c-0.368,0.515-0.935,0.827-1.593,0.881
|
||||
c-0.624,0.046-1.436,0.155-2.187,0.589c-1.712,0.985-2.463,2.945-1.825,4.765c0.255,0.726,0.152,1.499-0.281,2.122
|
||||
c-0.455,0.652-1.216,1.05-2.036,1.063l-0.107,0.001c-1.75,0-3.297-0.652-4.6-1.94c-1.404-1.383-2.227-3.155-2.448-5.269
|
||||
c-0.034-0.323-0.044-0.657-0.053-0.98c-0.005-0.166-0.009-0.331-0.017-0.492c-0.024-1.284,0.118-2.288,0.45-3.16
|
||||
c1.167-3.053,3.312-4.825,6.376-5.267c0.37-0.054,0.745-0.08,1.115-0.08c3.542,0,6.638,2.435,7.528,5.921
|
||||
C18.375,9.979,18.258,10.653,17.887,11.173z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M18.65,20.601c-0.092,0.014-0.187-0.008-0.266-0.059l-1.703-1.117c-0.179-0.117-0.229-0.356-0.111-0.536
|
||||
c0.117-0.179,0.356-0.229,0.535-0.111l1.312,0.856l1.617-4.002c0.08-0.196,0.307-0.293,0.504-0.213
|
||||
c0.199,0.08,0.296,0.306,0.215,0.505l-1.796,4.438c-0.043,0.107-0.134,0.19-0.244,0.225C18.693,20.594,18.671,20.598,18.65,20.601
|
||||
z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.6 KiB |
7
Pdf4QtEditorPlugins/SoftProofingPlugin/icons.qrc
Normal file
7
Pdf4QtEditorPlugins/SoftProofingPlugin/icons.qrc
Normal file
@@ -0,0 +1,7 @@
|
||||
<RCC>
|
||||
<qresource prefix="/pdfplugins/softproofing">
|
||||
<file>gamut-checking.svg</file>
|
||||
<file>soft-proofing.svg</file>
|
||||
<file>settings.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
77
Pdf4QtEditorPlugins/SoftProofingPlugin/settings.svg
Normal file
77
Pdf4QtEditorPlugins/SoftProofingPlugin/settings.svg
Normal file
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<path fill="#292D32" d="M17.437,12c0.012,3.003-2.445,5.448-5.447,5.437c-3.015-0.011-5.437-2.445-5.426-5.448
|
||||
c0-3.003,2.434-5.426,5.437-5.426S17.437,8.985,17.437,12z"/>
|
||||
<g>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M11.138,11.218c0.013-0.511-0.394-0.931-0.909-0.943
|
||||
c-0.495-0.009-0.917,0.398-0.926,0.897c-0.01,0.517,0.389,0.932,0.906,0.941C10.705,12.124,11.126,11.717,11.138,11.218z
|
||||
M9.817,11.199c-0.002-0.226,0.181-0.411,0.404-0.409c0.221,0.001,0.403,0.187,0.403,0.405c0,0.222-0.182,0.403-0.403,0.405
|
||||
C10,11.601,9.818,11.422,9.817,11.199z"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M10.912,12.791c-0.503,0.004-0.912,0.417-0.91,0.922
|
||||
c0.001,0.507,0.41,0.915,0.916,0.915c0.509,0,0.924-0.415,0.921-0.921C11.836,13.199,11.42,12.788,10.912,12.791z M10.922,14.113
|
||||
c-0.225,0-0.403-0.174-0.406-0.398c-0.002-0.226,0.179-0.41,0.405-0.409c0.221,0,0.403,0.185,0.404,0.403
|
||||
C11.326,13.931,11.144,14.112,10.922,14.113z"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M13.289,9.121c-0.511-0.003-0.927,0.406-0.931,0.913
|
||||
c-0.003,0.503,0.411,0.92,0.914,0.923c0.51,0.002,0.924-0.405,0.924-0.914C14.198,9.537,13.792,9.124,13.289,9.121z M13.278,10.442
|
||||
c-0.22,0-0.404-0.181-0.404-0.403c0-0.225,0.187-0.406,0.413-0.404c0.221,0.002,0.399,0.183,0.397,0.407
|
||||
C13.681,10.267,13.503,10.443,13.278,10.442z"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M15.988,10.761c-0.316-1.467-1.528-2.688-2.977-3.034
|
||||
c-0.152-0.035-0.523-0.11-0.959-0.115c-0.031,0-0.062,0-0.092,0c-0.083,0.001-0.167,0.004-0.253,0.012
|
||||
c-0.123,0.016-0.247,0.03-0.369,0.052c-0.009,0.001-0.017,0.004-0.025,0.004c-0.015,0.003-0.03,0.006-0.044,0.01
|
||||
C9.827,8.005,8.827,8.85,8.262,10.21c-0.203,0.488-0.282,1.004-0.283,1.53c-0.002,0.492-0.005,0.984,0.106,1.466
|
||||
c0.259,1.122,0.835,2.03,1.812,2.663c0.459,0.295,0.966,0.46,1.511,0.507c0.009,0.001,0.019,0.003,0.028,0.007
|
||||
c0.25,0.016,0.626,0.002,1.004-0.146l0,0c0.753-0.34,1.19-1.189,0.886-2.027c-0.183-0.514,0.003-1.034,0.446-1.353
|
||||
c0.25-0.177,0.532-0.233,0.83-0.253C15.524,12.544,16.181,11.664,15.988,10.761z M14.561,12.091
|
||||
c-0.334,0.026-0.648,0.084-0.939,0.252c-0.728,0.419-1.057,1.239-0.779,2.031c0.262,0.746-0.301,1.487-1.087,1.499
|
||||
c-0.833,0.013-1.545-0.296-2.134-0.879c-0.661-0.65-1.008-1.456-1.103-2.373c-0.023-0.218-0.021-0.438-0.031-0.658
|
||||
c-0.01-0.486,0.029-0.968,0.203-1.425c0.51-1.333,1.453-2.17,2.877-2.375c1.79-0.257,3.455,0.886,3.902,2.637
|
||||
C15.631,11.439,15.216,12.04,14.561,12.091z"/>
|
||||
</g>
|
||||
<path fill="#292D32" d="M23.049,10.524c-0.326-0.811-1.064-1.283-2.001-1.286c-0.377-0.002-0.373-0.003-0.508-0.357
|
||||
c-0.097-0.251-0.201-0.5-0.312-0.746c-0.139-0.309-0.147-0.31,0.104-0.554c0.327-0.318,0.563-0.687,0.646-1.141
|
||||
c0.125-0.674-0.031-1.279-0.492-1.784c-0.354-0.387-0.728-0.758-1.111-1.116c-0.824-0.767-2.023-0.752-2.846,0.02
|
||||
c-0.123,0.113-0.233,0.297-0.37,0.319c-0.138,0.023-0.3-0.122-0.453-0.185c-0.263-0.108-0.524-0.216-0.793-0.309
|
||||
c-0.118-0.04-0.158-0.093-0.155-0.216c0.004-0.21,0.01-0.425-0.023-0.632c-0.148-0.888-0.766-1.514-1.654-1.704
|
||||
c-0.025-0.006-0.051-0.025-0.074-0.038c-0.672,0-1.343,0-2.015,0c-0.116,0.035-0.234,0.068-0.349,0.107
|
||||
C9.815,1.178,9.258,1.939,9.237,2.819c-0.011,0.502-0.012,0.5-0.48,0.687C8.54,3.591,8.312,3.661,8.117,3.783
|
||||
C7.892,3.923,7.753,3.871,7.59,3.685c-0.312-0.353-0.701-0.587-1.172-0.67C5.769,2.901,5.179,3.043,4.689,3.483
|
||||
c-0.4,0.36-0.781,0.745-1.149,1.139C2.777,5.439,2.766,6.654,3.554,7.443c0.3,0.298,0.363,0.521,0.14,0.875
|
||||
C3.552,8.541,3.477,8.811,3.395,9.065C3.35,9.204,3.284,9.237,3.146,9.242c-0.275,0.008-0.561,0-0.823,0.071
|
||||
c-0.757,0.208-1.228,0.711-1.448,1.45c-0.022,0.209-0.167,1.69,0.051,2.635c0.302,0.823,1.028,1.349,1.936,1.363
|
||||
c0.457,0.006,0.454,0.006,0.625,0.438c0.088,0.225,0.18,0.444,0.28,0.663c0.141,0.31,0.148,0.312-0.103,0.556
|
||||
c-0.326,0.319-0.563,0.688-0.646,1.142c-0.123,0.664,0.025,1.268,0.479,1.768c0.358,0.393,0.736,0.77,1.126,1.131
|
||||
c0.826,0.768,2.025,0.752,2.848-0.018c0.121-0.115,0.23-0.293,0.37-0.32c0.127-0.025,0.286,0.115,0.433,0.174
|
||||
c0.263,0.109,0.523,0.223,0.793,0.311c0.14,0.045,0.18,0.109,0.172,0.246c-0.026,0.467,0.029,0.918,0.277,1.328
|
||||
c0.296,0.49,0.719,0.812,1.275,0.959c0.068,0.02,0.135,0.045,0.201,0.066c0.672,0,1.343,0,2.015,0
|
||||
c0.267-0.107,0.558-0.178,0.794-0.327c0.67-0.424,0.975-1.058,0.961-1.849c-0.006-0.355,0.002-0.352,0.334-0.479
|
||||
c0.273-0.104,0.553-0.197,0.805-0.34c0.213-0.121,0.338-0.084,0.49,0.092c0.295,0.336,0.662,0.572,1.104,0.666
|
||||
c0.701,0.153,1.336-0.002,1.865-0.492c0.379-0.352,0.746-0.719,1.099-1.098c0.765-0.826,0.752-2.021-0.019-2.848
|
||||
c-0.114-0.121-0.299-0.232-0.319-0.371c-0.022-0.135,0.118-0.297,0.183-0.451c0.105-0.257,0.217-0.509,0.301-0.773
|
||||
c0.047-0.139,0.109-0.18,0.25-0.174c0.424,0.023,0.842-0.018,1.229-0.225c0.475-0.254,0.791-0.628,0.976-1.106
|
||||
C23.369,12.076,23.049,10.524,23.049,10.524z M21.891,12.673c-0.004,0.459-0.311,0.769-0.767,0.777
|
||||
c-0.298,0.004-0.599-0.005-0.897,0.002c-0.371,0.004-0.6,0.176-0.699,0.536c-0.187,0.671-0.448,1.308-0.793,1.912
|
||||
c-0.202,0.355-0.162,0.611,0.129,0.906c0.201,0.203,0.406,0.4,0.603,0.605c0.332,0.345,0.332,0.768,0,1.109
|
||||
c-0.312,0.317-0.626,0.631-0.942,0.942c-0.34,0.332-0.767,0.332-1.109,0c-0.209-0.198-0.411-0.411-0.619-0.614
|
||||
c-0.286-0.277-0.544-0.313-0.893-0.113c-0.598,0.34-1.229,0.599-1.891,0.785c-0.402,0.11-0.56,0.328-0.563,0.748
|
||||
c-0.002,0.285,0.005,0.57-0.002,0.854c-0.006,0.457-0.315,0.764-0.773,0.768c-0.453,0.004-0.905,0.004-1.358,0
|
||||
c-0.446-0.004-0.756-0.314-0.764-0.756c-0.006-0.291,0-0.584-0.003-0.877c-0.003-0.406-0.164-0.625-0.55-0.732
|
||||
c-0.663-0.187-1.293-0.444-1.892-0.784c-0.365-0.209-0.621-0.169-0.925,0.131c-0.202,0.2-0.399,0.407-0.604,0.603
|
||||
c-0.335,0.321-0.762,0.321-1.092,0c-0.325-0.316-0.645-0.638-0.96-0.959c-0.323-0.334-0.322-0.761,0-1.093
|
||||
c0.202-0.211,0.413-0.411,0.617-0.618c0.28-0.289,0.32-0.55,0.126-0.892c-0.348-0.614-0.614-1.256-0.801-1.935
|
||||
c-0.098-0.356-0.328-0.524-0.707-0.526c-0.298-0.007-0.598,0.002-0.896-0.002c-0.444-0.011-0.75-0.321-0.757-0.767
|
||||
c-0.004-0.232-0.001-0.467-0.001-0.701c0-0.219-0.003-0.437,0.001-0.656c0.007-0.461,0.31-0.768,0.768-0.776
|
||||
c0.298-0.004,0.598,0.003,0.897-0.002c0.373-0.005,0.599-0.176,0.699-0.538C4.657,9.34,4.92,8.703,5.264,8.098
|
||||
c0.202-0.354,0.162-0.611-0.128-0.907c-0.2-0.203-0.405-0.4-0.603-0.605C4.202,6.244,4.201,5.818,4.534,5.479
|
||||
C4.845,5.16,5.16,4.846,5.478,4.534c0.338-0.333,0.764-0.333,1.108-0.002c0.21,0.203,0.411,0.414,0.62,0.618
|
||||
c0.277,0.271,0.541,0.314,0.872,0.126c0.617-0.351,1.267-0.622,1.952-0.807c0.343-0.093,0.514-0.33,0.518-0.694
|
||||
c0.005-0.298-0.002-0.597,0.003-0.896c0.006-0.458,0.315-0.765,0.775-0.768c0.444-0.004,0.89-0.004,1.335-0.001
|
||||
c0.474,0.004,0.78,0.307,0.786,0.777c0.007,0.292,0,0.583,0.003,0.875c0.006,0.387,0.172,0.609,0.549,0.713
|
||||
c0.663,0.184,1.294,0.442,1.892,0.786c0.364,0.208,0.623,0.168,0.926-0.131c0.203-0.2,0.399-0.405,0.604-0.602
|
||||
c0.335-0.322,0.761-0.324,1.093-0.001c0.323,0.314,0.643,0.634,0.959,0.958c0.321,0.332,0.323,0.756,0.002,1.093
|
||||
C19.268,6.794,19.053,7,18.842,7.216c-0.267,0.274-0.303,0.536-0.113,0.872c0.348,0.611,0.614,1.254,0.801,1.933
|
||||
c0.098,0.357,0.33,0.526,0.707,0.529c0.298,0.004,0.598-0.003,0.896,0.003c0.444,0.008,0.752,0.318,0.758,0.763
|
||||
C21.896,11.769,21.895,12.22,21.891,12.673z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 7.5 KiB |
65
Pdf4QtEditorPlugins/SoftProofingPlugin/settingsdialog.cpp
Normal file
65
Pdf4QtEditorPlugins/SoftProofingPlugin/settingsdialog.cpp
Normal file
@@ -0,0 +1,65 @@
|
||||
// Copyright (C) 2020-2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "settingsdialog.h"
|
||||
#include "ui_settingsdialog.h"
|
||||
|
||||
#include "pdfwidgetutils.h"
|
||||
|
||||
SettingsDialog::SettingsDialog(QWidget* parent, const pdf::PDFCMSSettings& settings, const pdf::PDFCMSManager* manager) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::SettingsDialog),
|
||||
m_settings(settings)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->cmsProofingIntentComboBox->addItem(tr("Auto"), int(pdf::RenderingIntent::Auto));
|
||||
ui->cmsProofingIntentComboBox->addItem(tr("Perceptual"), int(pdf::RenderingIntent::Perceptual));
|
||||
ui->cmsProofingIntentComboBox->addItem(tr("Relative colorimetric"), int(pdf::RenderingIntent::RelativeColorimetric));
|
||||
ui->cmsProofingIntentComboBox->addItem(tr("Absolute colorimetric"), int(pdf::RenderingIntent::AbsoluteColorimetric));
|
||||
ui->cmsProofingIntentComboBox->addItem(tr("Saturation"), int(pdf::RenderingIntent::Saturation));
|
||||
|
||||
for (const pdf::PDFColorProfileIdentifier& identifier : manager->getCMYKProfiles())
|
||||
{
|
||||
ui->cmsProofingColorProfileComboBox->addItem(identifier.name, identifier.id);
|
||||
}
|
||||
|
||||
ui->cmsProofingIntentComboBox->setCurrentIndex(ui->cmsProofingIntentComboBox->findData(int(m_settings.proofingIntent)));
|
||||
ui->cmsProofingColorProfileComboBox->setCurrentIndex(ui->cmsProofingColorProfileComboBox->findData(m_settings.softProofingProfile));
|
||||
ui->outOfGamutColorEdit->setText(m_settings.outOfGamutColor.name(QColor::HexRgb));
|
||||
|
||||
setMinimumSize(pdf::PDFWidgetUtils::scaleDPI(this, QSize(320, 160)));
|
||||
pdf::PDFWidgetUtils::style(this);
|
||||
}
|
||||
|
||||
SettingsDialog::~SettingsDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void SettingsDialog::accept()
|
||||
{
|
||||
m_settings.proofingIntent = static_cast<pdf::RenderingIntent>(ui->cmsProofingIntentComboBox->currentData().toInt());
|
||||
m_settings.softProofingProfile = ui->cmsProofingColorProfileComboBox->currentData().toString();
|
||||
m_settings.outOfGamutColor.fromString(ui->outOfGamutColorEdit->text());
|
||||
if (!m_settings.outOfGamutColor.isValid())
|
||||
{
|
||||
m_settings.outOfGamutColor = Qt::red;
|
||||
}
|
||||
|
||||
QDialog::accept();
|
||||
}
|
51
Pdf4QtEditorPlugins/SoftProofingPlugin/settingsdialog.h
Normal file
51
Pdf4QtEditorPlugins/SoftProofingPlugin/settingsdialog.h
Normal file
@@ -0,0 +1,51 @@
|
||||
// Copyright (C) 2020-2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef SETTINGSDIALOG_H
|
||||
#define SETTINGSDIALOG_H
|
||||
|
||||
#include "softproofingplugin.h"
|
||||
#include "pdfcms.h"
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class QComboBox;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class SettingsDialog;
|
||||
}
|
||||
|
||||
class SettingsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SettingsDialog(QWidget* parent, const pdf::PDFCMSSettings& settings, const pdf::PDFCMSManager* manager);
|
||||
virtual ~SettingsDialog() override;
|
||||
|
||||
virtual void accept() override;
|
||||
|
||||
const pdf::PDFCMSSettings& getSettings() const { return m_settings; }
|
||||
|
||||
private:
|
||||
Ui::SettingsDialog* ui;
|
||||
|
||||
pdf::PDFCMSSettings m_settings;
|
||||
};
|
||||
|
||||
#endif // SETTINGSDIALOG_H
|
116
Pdf4QtEditorPlugins/SoftProofingPlugin/settingsdialog.ui
Normal file
116
Pdf4QtEditorPlugins/SoftProofingPlugin/settingsdialog.ui
Normal file
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SettingsDialog</class>
|
||||
<widget class="QDialog" name="SettingsDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>254</width>
|
||||
<height>165</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Soft Proofing Settings</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="softProofingGroupBox">
|
||||
<property name="title">
|
||||
<string>Soft Proofing Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="3" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="cmsProofingIntentLabel">
|
||||
<property name="text">
|
||||
<string>Proofing intent</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmsProofingIntentComboBox"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="cmsOutputProfileLabel">
|
||||
<property name="text">
|
||||
<string>Proofing profile</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="cmsProofingColorProfileComboBox"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="outOfGamutColorLabel">
|
||||
<property name="text">
|
||||
<string>Alarm color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="outOfGamutColorEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>SettingsDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>SettingsDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
70
Pdf4QtEditorPlugins/SoftProofingPlugin/soft-proofing.svg
Normal file
70
Pdf4QtEditorPlugins/SoftProofingPlugin/soft-proofing.svg
Normal file
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<path fill="#00FF00" d="M18.633,16.604c0.395-0.232,0.854-0.364,1.345-0.364c0.475,0,0.921,0.125,1.307,0.344
|
||||
c0-0.008,0-0.014,0-0.021c0-1.465-1.187-2.652-2.651-2.652s-2.651,1.187-2.651,2.652c0,0.007,0,0.013,0,0.021
|
||||
c0.387-0.219,0.832-0.344,1.308-0.344C17.779,16.239,18.238,16.37,18.633,16.604z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#0000FF" d="M21.284,16.583c-0.007,0.979-0.547,1.834-1.343,2.286c0,0.007,0,0.015,0,0.021
|
||||
c0,0.974-0.525,1.825-1.309,2.286c0.395,0.233,0.854,0.366,1.345,0.366c1.464,0,2.65-1.188,2.65-2.652
|
||||
C22.628,17.9,22.086,17.039,21.284,16.583z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#00FFFF" d="M18.633,16.604c0.777,0.458,1.3,1.301,1.309,2.266c0.796-0.452,1.336-1.307,1.343-2.286
|
||||
c-0.386-0.219-0.832-0.346-1.307-0.346C19.486,16.239,19.027,16.37,18.633,16.604z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#FF0000" d="M17.326,18.89c0-0.006,0-0.014,0-0.021c-0.798-0.452-1.338-1.307-1.345-2.286
|
||||
c-0.803,0.456-1.345,1.317-1.345,2.307c0,1.465,1.188,2.652,2.652,2.652c0.49,0,0.949-0.133,1.344-0.366
|
||||
C17.85,20.715,17.326,19.863,17.326,18.89z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#FFFF00" d="M17.326,18.869c0.007-0.965,0.529-1.808,1.307-2.266c-0.395-0.233-0.854-0.364-1.344-0.364
|
||||
c-0.476,0-0.921,0.125-1.308,0.344C15.988,17.563,16.528,18.417,17.326,18.869z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#FF00FF" d="M19.941,18.89c0-0.006,0-0.014,0-0.021c-0.387,0.219-0.832,0.345-1.309,0.345
|
||||
c-0.476,0-0.922-0.126-1.307-0.345c0,0.007,0,0.015,0,0.021c0,0.974,0.525,1.825,1.308,2.286
|
||||
C19.416,20.715,19.941,19.863,19.941,18.89z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M18.633,16.604c-0.776,0.458-1.3,1.301-1.307,2.266c0.385,0.219,0.831,0.345,1.307,0.345
|
||||
c0.477,0,0.922-0.126,1.309-0.345C19.933,17.904,19.41,17.062,18.633,16.604z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="#292D32" d="M6.526,12.401c1.186,0,2.174-0.972,2.202-2.166C8.743,9.637,8.521,9.07,8.106,8.64
|
||||
C7.691,8.21,7.132,7.966,6.528,7.952H6.486c-1.191,0-2.18,0.974-2.202,2.172c-0.012,0.604,0.208,1.172,0.618,1.598
|
||||
c0.411,0.427,0.971,0.668,1.575,0.68H6.526z M5.968,9.636C6.111,9.491,6.3,9.411,6.5,9.411V9.263l0,0l0.005,0.148
|
||||
C6.919,9.415,7.27,9.768,7.27,10.18c0,0.416-0.343,0.759-0.77,0.763c-0.413,0-0.752-0.339-0.755-0.756
|
||||
C5.743,9.979,5.822,9.783,5.968,9.636z"/>
|
||||
<path fill="#292D32" d="M8.066,13.631c-1.219,0.01-2.208,1.011-2.204,2.232c0.005,1.222,1,2.216,2.219,2.216
|
||||
c0.597,0,1.159-0.234,1.582-0.658c0.421-0.422,0.651-0.98,0.649-1.571C10.302,14.626,9.299,13.631,8.066,13.631z M8.85,15.855
|
||||
c0.001,0.2-0.078,0.391-0.221,0.535c-0.145,0.146-0.336,0.225-0.539,0.225c-0.423,0-0.761-0.329-0.768-0.748
|
||||
c-0.002-0.207,0.077-0.402,0.223-0.549c0.144-0.146,0.336-0.225,0.54-0.225H8.09C8.499,15.094,8.848,15.442,8.85,15.855z"/>
|
||||
<path fill="#292D32" d="M13.416,5.347c-1.225,0-2.227,0.991-2.233,2.21c-0.003,0.59,0.227,1.148,0.647,1.573
|
||||
s0.977,0.659,1.565,0.661h0.013c0.595,0,1.153-0.229,1.572-0.645c0.42-0.417,0.651-0.974,0.651-1.566
|
||||
C15.636,6.356,14.65,5.354,13.416,5.347z M13.42,6.809V6.66l0,0l0.007,0.148c0.417,0.005,0.754,0.35,0.749,0.767
|
||||
c-0.007,0.423-0.343,0.754-0.768,0.754c-0.42,0-0.761-0.341-0.761-0.761C12.647,7.149,12.994,6.809,13.42,6.809z M13.408,9.641
|
||||
L13.408,9.641L13.408,9.641L13.408,9.641z"/>
|
||||
<path fill="#292D32" d="M19.674,9.169c-0.726-3.362-3.471-6.163-6.834-6.968c-0.735-0.163-1.495-0.254-2.199-0.261h-0.209
|
||||
C10.24,1.942,10.045,1.951,9.843,1.97l-0.13,0.017c-0.238,0.029-0.479,0.059-0.697,0.1C8.995,2.088,8.978,2.092,8.95,2.098
|
||||
C8.921,2.102,8.893,2.108,8.838,2.122C5.561,2.835,3.242,4.778,1.945,7.896c-0.433,1.042-0.646,2.19-0.65,3.532
|
||||
c-0.004,1.095-0.008,2.227,0.246,3.324c0.613,2.661,2.011,4.715,4.155,6.104c1.038,0.666,2.208,1.058,3.491,1.169l0.052,0.013
|
||||
c0.114,0.008,0.241,0.012,0.376,0.012c0.703,0,1.361-0.117,1.962-0.352c1.866-0.843,2.761-2.892,2.081-4.764
|
||||
c-0.384-1.08-0.019-2.185,0.953-2.883c0.464-0.327,1.001-0.489,1.797-0.543c1.028-0.066,1.979-0.582,2.609-1.414
|
||||
C19.652,11.257,19.892,10.189,19.674,9.169z M17.887,11.173c-0.368,0.515-0.935,0.827-1.593,0.881
|
||||
c-0.624,0.046-1.436,0.155-2.187,0.589c-1.712,0.985-2.463,2.945-1.825,4.765c0.255,0.726,0.152,1.499-0.281,2.122
|
||||
c-0.455,0.652-1.216,1.05-2.036,1.063l-0.107,0.001c-1.75,0-3.297-0.652-4.6-1.94c-1.403-1.383-2.227-3.155-2.448-5.269
|
||||
c-0.034-0.323-0.044-0.657-0.053-0.98c-0.005-0.166-0.009-0.331-0.017-0.492c-0.024-1.284,0.118-2.288,0.449-3.16
|
||||
c1.167-3.053,3.313-4.825,6.377-5.267c0.369-0.054,0.744-0.08,1.114-0.08c3.542,0,6.638,2.435,7.528,5.921
|
||||
C18.375,9.979,18.258,10.653,17.887,11.173z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.8 KiB |
141
Pdf4QtEditorPlugins/SoftProofingPlugin/softproofingplugin.cpp
Normal file
141
Pdf4QtEditorPlugins/SoftProofingPlugin/softproofingplugin.cpp
Normal file
@@ -0,0 +1,141 @@
|
||||
// Copyright (C) 2020-2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "softproofingplugin.h"
|
||||
#include "settingsdialog.h"
|
||||
|
||||
#include "pdfcms.h"
|
||||
#include "pdfutils.h"
|
||||
#include "pdfdrawwidget.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
namespace pdfplugin
|
||||
{
|
||||
|
||||
SoftProofingPlugin::SoftProofingPlugin() :
|
||||
pdf::PDFPlugin(nullptr),
|
||||
m_enableSoftProofingAction(nullptr),
|
||||
m_enableGamutCheckingAction(nullptr),
|
||||
m_showSettingsAction(nullptr),
|
||||
m_isLoadingGUI(false)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SoftProofingPlugin::setWidget(pdf::PDFWidget* widget)
|
||||
{
|
||||
Q_ASSERT(!m_widget);
|
||||
|
||||
BaseClass::setWidget(widget);
|
||||
|
||||
m_enableSoftProofingAction = new QAction(QIcon(":/pdfplugins/softproofing/soft-proofing.svg"), tr("Soft Proofing"), this);
|
||||
m_enableGamutCheckingAction = new QAction(QIcon(":/pdfplugins/softproofing/gamut-checking.svg"), tr("Gamut Checking"), this);
|
||||
m_showSettingsAction = new QAction(QIcon(":/pdfplugins/softproofing/settings.svg"), tr("Soft Proofing Settings"), this);
|
||||
|
||||
m_enableSoftProofingAction->setCheckable(true);
|
||||
m_enableGamutCheckingAction->setCheckable(true);
|
||||
|
||||
m_enableSoftProofingAction->setObjectName("actionSoftProofing_EnableSoftProofing");
|
||||
m_enableGamutCheckingAction->setObjectName("actionSoftProofing_EnableGamutChecking");
|
||||
m_showSettingsAction->setObjectName("actionSoftProofing_ShowSettings");
|
||||
|
||||
connect(m_enableSoftProofingAction, &QAction::triggered, this, &SoftProofingPlugin::onSoftProofingTriggered);
|
||||
connect(m_enableGamutCheckingAction, &QAction::triggered, this, &SoftProofingPlugin::onGamutCheckingTriggered);
|
||||
connect(m_showSettingsAction, &QAction::triggered, this, &SoftProofingPlugin::onSettingsTriggered);
|
||||
|
||||
updateActions();
|
||||
}
|
||||
|
||||
void SoftProofingPlugin::setCMSManager(pdf::PDFCMSManager* manager)
|
||||
{
|
||||
BaseClass::setCMSManager(manager);
|
||||
|
||||
connect(manager, &pdf::PDFCMSManager::colorManagementSystemChanged, this, &SoftProofingPlugin::updateActions);
|
||||
}
|
||||
|
||||
void SoftProofingPlugin::setDocument(const pdf::PDFModifiedDocument& document)
|
||||
{
|
||||
BaseClass::setDocument(document);
|
||||
|
||||
if (document.hasReset())
|
||||
{
|
||||
updateActions();
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<QAction*> SoftProofingPlugin::getActions() const
|
||||
{
|
||||
return { m_enableSoftProofingAction, m_enableGamutCheckingAction, m_showSettingsAction };
|
||||
}
|
||||
|
||||
void SoftProofingPlugin::onSoftProofingTriggered()
|
||||
{
|
||||
if (m_isLoadingGUI)
|
||||
{
|
||||
// We are just updating gui, do nothing
|
||||
return;
|
||||
}
|
||||
|
||||
pdf::PDFCMSSettings settings = m_cmsManager->getSettings();
|
||||
settings.isSoftProofing = m_enableSoftProofingAction->isChecked();
|
||||
m_cmsManager->setSettings(settings);
|
||||
}
|
||||
|
||||
void SoftProofingPlugin::onGamutCheckingTriggered()
|
||||
{
|
||||
if (m_isLoadingGUI)
|
||||
{
|
||||
// We are just updating gui, do nothing
|
||||
return;
|
||||
}
|
||||
|
||||
pdf::PDFCMSSettings settings = m_cmsManager->getSettings();
|
||||
settings.isGamutChecking = m_enableGamutCheckingAction->isChecked();
|
||||
m_cmsManager->setSettings(settings);
|
||||
}
|
||||
|
||||
void SoftProofingPlugin::onSettingsTriggered()
|
||||
{
|
||||
SettingsDialog settingsDialog(m_widget, m_cmsManager->getSettings(), m_cmsManager);
|
||||
if (settingsDialog.exec() == SettingsDialog::Accepted)
|
||||
{
|
||||
m_cmsManager->setSettings(settingsDialog.getSettings());
|
||||
}
|
||||
}
|
||||
|
||||
void SoftProofingPlugin::updateActions()
|
||||
{
|
||||
pdf::PDFTemporaryValueChange guard(&m_isLoadingGUI, true);
|
||||
|
||||
if (m_enableSoftProofingAction)
|
||||
{
|
||||
m_enableSoftProofingAction->setEnabled(m_widget);
|
||||
m_enableSoftProofingAction->setChecked(m_cmsManager && m_cmsManager->getSettings().isSoftProofing);
|
||||
}
|
||||
if (m_enableGamutCheckingAction)
|
||||
{
|
||||
m_enableGamutCheckingAction->setEnabled(m_widget);
|
||||
m_enableGamutCheckingAction->setChecked(m_cmsManager && m_cmsManager->getSettings().isGamutChecking);
|
||||
}
|
||||
if (m_showSettingsAction)
|
||||
{
|
||||
m_showSettingsAction->setEnabled(m_widget);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
60
Pdf4QtEditorPlugins/SoftProofingPlugin/softproofingplugin.h
Normal file
60
Pdf4QtEditorPlugins/SoftProofingPlugin/softproofingplugin.h
Normal file
@@ -0,0 +1,60 @@
|
||||
// Copyright (C) 2020-2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef SOFTPROOFINGPLUGIN_H
|
||||
#define SOFTPROOFINGPLUGIN_H
|
||||
|
||||
#include "pdfplugin.h"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace pdfplugin
|
||||
{
|
||||
|
||||
class SoftProofingPlugin : public pdf::PDFPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "PDF4QT.SoftProofingPlugin" FILE "SoftProofingPlugin.json")
|
||||
|
||||
private:
|
||||
using BaseClass = pdf::PDFPlugin;
|
||||
|
||||
public:
|
||||
SoftProofingPlugin();
|
||||
|
||||
virtual void setWidget(pdf::PDFWidget* widget) override;
|
||||
virtual void setCMSManager(pdf::PDFCMSManager* manager) override;
|
||||
virtual void setDocument(const pdf::PDFModifiedDocument& document) override;
|
||||
virtual std::vector<QAction*> getActions() const override;
|
||||
|
||||
private:
|
||||
void onSoftProofingTriggered();
|
||||
void onGamutCheckingTriggered();
|
||||
void onSettingsTriggered();
|
||||
|
||||
void updateActions();
|
||||
|
||||
QAction* m_enableSoftProofingAction;
|
||||
QAction* m_enableGamutCheckingAction;
|
||||
QAction* m_showSettingsAction;
|
||||
|
||||
bool m_isLoadingGUI;
|
||||
};
|
||||
|
||||
} // namespace pdfplugin
|
||||
|
||||
#endif // SOFTPROOFINGPLUGIN_H
|
Reference in New Issue
Block a user