161
180
setCurrentIndex(-1);
164
183
// ------------------------------------------------------------------------------------------
166
185
IccProfilesMenuAction::IccProfilesMenuAction(const KIcon& icon, const QString& text, QObject* parent)
167
: KActionMenu(icon, text, parent),
186
: KActionMenu(icon, text, parent),
170
189
m_mapper = new QSignalMapper(this);
171
connect(m_mapper, SIGNAL(mapped(QObject*)),
190
connect(m_mapper, SIGNAL(mapped(QObject*)),
172
191
this, SLOT(slotTriggered(QObject*)));
175
IccProfilesMenuAction::IccProfilesMenuAction(const QString &text, QObject* parent)
176
: KActionMenu(text, parent),
194
IccProfilesMenuAction::IccProfilesMenuAction(const QString& text, QObject* parent)
195
: KActionMenu(text, parent),
179
198
m_mapper = new QSignalMapper(this);
180
199
connect(m_mapper, SIGNAL(mapped(QObject*)),
223
245
void IccProfilesMenuAction::disableIfEmpty()
225
247
if (menu()->isEmpty())
226
249
setEnabled(false);
229
253
void IccProfilesMenuAction::slotTriggered(QObject* obj)
231
255
KAction* action = static_cast<KAction*>(obj);
232
256
IccProfile profile = action->data().value<IccProfile>();
233
258
if (!profile.isNull())
234
260
emit triggered(profile);
237
264
// ------------------------------------------------------------------------------------------
239
266
IccRenderingIntentComboBox::IccRenderingIntentComboBox(QWidget* parent)
242
269
addItem("Perceptual", IccTransform::Perceptual);
243
270
addItem("Relative Colorimetric", IccTransform::RelativeColorimetric);
244
271
addItem("Absolute Colorimetric", IccTransform::AbsoluteColorimetric);
245
272
addItem("Saturation", IccTransform::Saturation);
246
273
setWhatsThis( i18n("<ul><li><p><b>Perceptual intent</b> causes the full gamut of the image to be "
247
"compressed or expanded to fill the gamut of the destination device, so that gray balance is "
248
"preserved but colorimetric accuracy may not be preserved.</p>"
249
"<p>In other words, if certain colors in an image fall outside of the range of colors that the output "
250
"device can render, the image intent will cause all the colors in the image to be adjusted so that "
251
"the every color in the image falls within the range that can be rendered and so that the relationship "
252
"between colors is preserved as much as possible.</p>"
253
"<p>This intent is most suitable for display of photographs and images, and is the default intent.</p></li>"
254
"<li><p><b>Absolute Colorimetric intent</b> causes any colors that fall outside the range that the output device "
255
"can render to be adjusted to the closest color that can be rendered, while all other colors are "
256
"left unchanged.</p>"
257
"<p>This intent preserves the white point and is most suitable for spot colors (Pantone, TruMatch, "
258
"logo colors, ....)</p></li>"
259
"<li><p><b>Relative Colorimetric intent</b> is defined such that any colors that fall outside the range that the "
260
"output device can render are adjusted to the closest color that can be rendered, while all other colors "
261
"are left unchanged. Proof intent does not preserve the white point.</p></li>"
262
"<li><p><b>Saturation intent</b> preserves the saturation of colors in the image at the possible expense of "
263
"hue and lightness.</p>"
264
"<p>Implementation of this intent remains somewhat problematic, and the ICC is still working on methods to "
265
"achieve the desired effects.</p>"
266
"<p>This intent is most suitable for business graphics such as charts, where it is more important that the "
267
"colors be vivid and contrast well with each other rather than a specific color.</p></li></ul>"));
274
"compressed or expanded to fill the gamut of the destination device, so that gray balance is "
275
"preserved but colorimetric accuracy may not be preserved.</p>"
276
"<p>In other words, if certain colors in an image fall outside of the range of colors that the output "
277
"device can render, the image intent will cause all the colors in the image to be adjusted so that "
278
"the every color in the image falls within the range that can be rendered and so that the relationship "
279
"between colors is preserved as much as possible.</p>"
280
"<p>This intent is most suitable for display of photographs and images, and is the default intent.</p></li>"
281
"<li><p><b>Absolute Colorimetric intent</b> causes any colors that fall outside the range that the output device "
282
"can render to be adjusted to the closest color that can be rendered, while all other colors are "
283
"left unchanged.</p>"
284
"<p>This intent preserves the white point and is most suitable for spot colors (Pantone, TruMatch, "
285
"logo colors, ....)</p></li>"
286
"<li><p><b>Relative Colorimetric intent</b> is defined such that any colors that fall outside the range that the "
287
"output device can render are adjusted to the closest color that can be rendered, while all other colors "
288
"are left unchanged. Proof intent does not preserve the white point.</p></li>"
289
"<li><p><b>Saturation intent</b> preserves the saturation of colors in the image at the possible expense of "
290
"hue and lightness.</p>"
291
"<p>Implementation of this intent remains somewhat problematic, and the ICC is still working on methods to "
292
"achieve the desired effects.</p>"
293
"<p>This intent is most suitable for business graphics such as charts, where it is more important that the "
294
"colors be vivid and contrast well with each other rather than a specific color.</p></li></ul>"));
270
297
void IccRenderingIntentComboBox::setIntent(int intent)
272
299
const int size = count();
273
301
for (int i=0; i<size; i++)
275
303
if (itemData(i).toInt() == intent)