Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CMYK] Add API color model and profile methods to project #58056

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

troopa81
Copy link
Contributor

This is another PR regarding qgis/QGIS-Enhancement-Proposals#283

API allows to define a color model without a color space. If both are set, consistency between defined color model and color space one is checked (only in Qt version 6.8.0 or greater because it's not possible to retrieve color model from color space before that)

Contrary to what was stated in the QEP there is no default CMYK ICC profile. User has the ability to select a CMYK color model without ICC profile. If a ICC profile is set, a PDF/X-4 (ready-for-printing) PDF with the ICC profile embedded will be generated when exporting a layout, else a classic PDF 1.4 will be generated.

Funded by Métropôle de Bordeaux

API allows to define a color model without a color space. If both are
set, consistency between defined color model and color space one is
checked (only in Qt version 6.8.0 or greater because it's not possible
to retrieve color model from color space before that)
@troopa81 troopa81 added Feature Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks labels Jul 10, 2024
@github-actions github-actions bot added this to the 3.40.0 milestone Jul 10, 2024
Copy link

github-actions bot commented Jul 10, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 263bd3d)

src/core/project/qgsprojectstylesettings.cpp Outdated Show resolved Hide resolved
src/core/project/qgsprojectstylesettings.cpp Show resolved Hide resolved
src/core/project/qgsprojectstylesettings.cpp Outdated Show resolved Hide resolved
src/core/project/qgsprojectstylesettings.h Outdated Show resolved Hide resolved
src/core/project/qgsprojectstylesettings.h Outdated Show resolved Hide resolved
src/core/qgscolorutils.cpp Outdated Show resolved Hide resolved
src/core/qgscolorutils.h Outdated Show resolved Hide resolved
src/core/qgscolorutils.h Outdated Show resolved Hide resolved
src/core/qgscolorutils.h Show resolved Hide resolved
src/core/qgscolorutils.h Show resolved Hide resolved
@nyalldawson
Copy link
Collaborator

Looking good! (The bulk of the comments above are just grammar fixes on the docs)

@nyalldawson nyalldawson added API API improvement only, no visible user interface changes and removed Feature labels Jul 10, 2024
@troopa81
Copy link
Contributor Author

@nyalldawson Thank you for your review and your suggestions!

I treated all of them except for replacing parameter colorModel with model and colorSpace with space. I think it doesn't help in code readability because just "model" and "space" words doesn't actually convey the meaning of a COLOR space and a COLOR model

I choose to write it the Qt way

Set the project's current color space to \a colorSpace

@nyalldawson nyalldawson merged commit 43062c8 into qgis:master Jul 11, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API improvement only, no visible user interface changes Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants