16#include <QVersionNumber>
143 if (colorspacename ==
"Grayscale + Alpha") {
144 colorspacename =
"GRAYA";
145 profileProductName.clear();
147 else if (colorspacename ==
"RgbAF32") {
148 colorspacename =
"RGBAF32";
149 profileProductName.clear();
151 else if (colorspacename ==
"RgbAF16") {
152 colorspacename =
"RGBAF16";
153 profileProductName.clear();
155 else if (colorspacename ==
"CMYKA16") {
156 colorspacename =
"CMYKAU16";
158 else if (colorspacename ==
"GrayF32") {
159 colorspacename =
"GRAYAF32";
160 profileProductName.clear();
162 else if (colorspacename ==
"GRAYA16") {
163 colorspacename =
"GRAYAU16";
165 else if (colorspacename ==
"XyzAF16") {
166 colorspacename =
"XYZAF16";
167 profileProductName.clear();
169 else if (colorspacename ==
"XyzAF32") {
170 colorspacename =
"XYZAF32";
171 profileProductName.clear();
173 else if (colorspacename ==
"YCbCrA") {
174 colorspacename =
"YCBCRA8";
176 else if (colorspacename ==
"YCbCrAU16") {
177 colorspacename =
"YCBCRAU16";
202 QString profileProductName;
205 QString colorspacename;
215 if ((attr = imageElement.attribute(
WIDTH)).isNull()) {
221 if ((attr = imageElement.attribute(
HEIGHT)).isNull()) {
231 if (!(attr = imageElement.attribute(
X_RESOLUTION)).isNull()) {
240 if (!(attr = imageElement.attribute(
Y_RESOLUTION)).isNull()) {
247 if ((colorspacename = imageElement.attribute(
COLORSPACE_NAME)).isNull()) {
251 colorspacename =
"RGBA";
254 profileProductName = imageElement.attribute(
PROFILE);
261 if (profileProductName.isNull()) {
272 m_d->
errorMessages << i18n(
"Image specifies an unsupported color model: %1.", colorspacename);
280 proofingConfig->proofingProfile = attr;
282 if (proofingConfig && !(attr = imageElement.attribute(
PROOFINGMODEL)).isNull()) {
283 proofingConfig->proofingModel = attr;
285 if (proofingConfig && !(attr = imageElement.attribute(
PROOFINGDEPTH)).isNull()) {
286 proofingConfig->proofingDepth = attr;
288 if (proofingConfig && !(attr = imageElement.attribute(
PROOFINGINTENT)).isNull()) {
295 if (attr ==
"monitor") {
297 }
else if (attr ==
"paper") {
304 proofingConfig->useBlackPointCompensationFirstTransform = (attr ==
"true");
313 proofingConfig->setLegacyAdaptationState(legacyAdaptationState);
327 for (child = imageElement.lastChild(); !child.isNull(); child = child.previousSibling()) {
328 QDomElement e = child.toElement();
332 QByteArray colorData = QByteArray::fromBase64(e.attribute(
COLORBYTEDATA).toLatin1());
357 dom.appendChild(dom.importNode(node,
true));
358 QDomElement eq = dom.firstChildElement();
363 if (e.tagName().toLower() ==
"animation") {
368 if (proofingConfig) {
372 for (child = imageElement.lastChild(); !child.isNull(); child = child.previousSibling()) {
373 QDomElement e = child.toElement();
374 if (e.tagName() ==
"compositions") {
381 for (child = imageElement.lastChild(); !child.isNull(); child = child.previousSibling()) {
382 QDomElement e = child.toElement();
383 if (e.tagName() ==
"grid") {
385 }
else if (e.tagName() ==
"guides") {
389 }
else if (e.tagName() ==
"assistants") {
391 }
else if (e.tagName() ==
"audio") {
397 for (child = imageElement.lastChild(); !child.isNull(); child = child.previousSibling()) {
398 QDomElement e = child.toElement();
400 for (QDomElement paletteElement = e.lastChildElement(); !paletteElement.isNull();
401 paletteElement = paletteElement.previousSiblingElement()) {
402 QString paletteName = paletteElement.attribute(
"filename");
410 for (child = imageElement.lastChild(); !child.isNull(); child = child.previousSibling()) {
411 QDomElement e = child.toElement();
413 for (QDomElement resourceElement = e.lastChildElement();
414 !resourceElement.isNull();
415 resourceElement = resourceElement.previousSiblingElement())
418 resourceItem.
filename = resourceElement.attribute(
"filename");
419 resourceItem.
md5sum = resourceElement.attribute(
"md5sum");
420 resourceItem.
type = resourceElement.attribute(
"type");
421 resourceItem.
name = resourceElement.attribute(
"name");
429 for (child = imageElement.lastChild(); !child.isNull(); child = child.previousSibling()) {
430 QDomElement e = child.toElement();
432 for (QDomElement annotationElement = e.firstChildElement();
433 !annotationElement.isNull();
434 annotationElement = annotationElement.nextSiblingElement())
436 QString type = annotationElement.attribute(
"type");
437 QString description = annotationElement.attribute(
"description");
452 QString location = external ? QString() : uri;
454 if (store->
hasFile(location)) {
455 if (store->
open(location)) {
456 QByteArray data; data.resize(store->
size());
457 bool res = (store->
read(data.data(), store->
size()) > -1);
463 if (profile && profile->
valid()) {
471 location = external ? QString() : uri;
473 if (store->
hasFile(location)) {
474 if (store->
open(location)) {
475 QByteArray proofingData;
476 proofingData.resize(store->
size());
477 bool proofingProfileRes = (store->
read(proofingData.data(), store->
size())>-1);
481 if (!proofingConfig) {
485 if (proofingProfileRes) {
487 if (!proofingProfile || proofingProfile->
valid()){
488 warnKrita <<
"Failed to load a proofing profile!";
512 location = external ? QString() : uri;
514 if (store->
hasFile(location)) {
516 store->
open(location);
524 location = external ? QString() : uri;
526 if (store->
hasFile(location)) {
529 store->
open(location);
532 device.
open(QIODevice::ReadOnly);
538 QByteArray buf = device.readAll();
539 QBuffer raDevice(&buf);
540 raDevice.open(QIODevice::ReadOnly);
550 warnKrita <<
"WARNING: Couldn't load layer styles library from .kra!";
564 location = external ? QString() : uri;
566 if (store->
hasFile(location)) {
567 store->
open(location);
569 device.
open(QIODevice::ReadOnly);
570 ba = device.readAll();
573 annotation->setAnnotation(ba);
587 QByteArray data = store->
read(store->
size());
588 if (data.size() > 0) {
591 list.append(newPalette);
593 m_d->
warningMessages.append(i18nc(
"Warning message on loading a .kra file",
"Embedded palette is empty and cannot be loaded. The name of the palette: %1", filename));
604 m_d->
warningMessages.append(i18nc(
"Warning message on loading a .kra file",
"Embedded resource cannot be read. The filename of the resource: %1", resourceItem.
filename));
613 m_d->
warningMessages.append(i18nc(
"Warning message on loading a .kra file",
"Embedded resource cannot be imported. The filename of the resource: %1", resourceItem.
filename));
627 QByteArray data = store->
read(store->
size());
628 QDomDocument document;
629 document.setContent(data);
632 QDomElement root = document.documentElement();
634 for (node = root.lastChild(); !node.isNull(); node = node.previousSibling()) {
635 if (node.isElement()) {
636 QDomElement element = node.toElement();
637 if (element.tagName() ==
"StoryboardItemList") {
639 }
else if (element.tagName() ==
"StoryboardCommentList") {
652 QByteArray data = store->
read(store->
size());
653 QDomDocument document;
654 document.setContent(data);
657 QDomElement root = document.documentElement();
667 QByteArray byteData = store->
read(store->
size());
668 QDomDocument xmlDocument;
669 xmlDocument.setContent(byteData);
672 QDomElement root = xmlDocument.documentElement();
680 dom.appendChild(dom.importNode(elem,
true));
681 QDomElement qElement = dom.firstChildElement();
684 if (KisDomUtils::loadValue(qElement,
"masterChannelPath", &fileName)) {
685 fileName = QDir::toNativeSeparators(fileName);
688 fileName = QDir::cleanPath( baseDirectory.filePath(fileName) );
690 QFileInfo info(fileName);
692 if (!info.exists()) {
697 "Audio channel file \"%1\" doesn't exist!\n\n"
700 "Do you want to locate it manually?", info.fileName(), info.absoluteFilePath());
702 int result = QMessageBox::warning(qApp->activeWindow(), i18nc(
"@title:window",
"File not found"), msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
704 if (result == QMessageBox::Yes) {
714 document->setAudioTracks(clipFiles);
720 qreal audioVolume = 1.0;
721 if (KisDomUtils::loadValue(qElement,
"audioVolume", &audioVolume)) {
722 document->setAudioVolume(audioVolume);
766 QMap<int ,KisPaintingAssistantHandleSP> handleMap;
775 location = external ? QString() : uri;
777 file_path = location + loadedAssistant.key();
778 assistant->
loadXml(store, handleMap, file_path);
793 QDomNode node = element;
794 qDom.appendChild(qDom.importNode(node,
true));
795 QDomElement rootElement = qDom.firstChildElement();
804 if (KisDomUtils::loadValue(rootElement,
"framerate", &framerate)) {
808 if (KisDomUtils::loadValue(rootElement,
"range", &range)) {
812 if (KisDomUtils::loadValue(rootElement,
"currentTime", ¤tTime)) {
817 int initialFrameNumber = -1;
818 QDomElement exportElement = rootElement.firstChildElement(
"export-settings");
819 if (!exportElement.isNull()) {
820 if (KisDomUtils::loadValue(exportElement,
"sequenceFilePath", &
string)) {
824 if (KisDomUtils::loadValue(exportElement,
"sequenceBaseName", &
string)) {
828 if (KisDomUtils::loadValue(exportElement,
"sequenceInitialFrameNumber", &initialFrameNumber)) {
840 QDomNode node = element.firstChild();
843 if (!node.isNull()) {
845 if (node.isElement()) {
850 if (node.nodeName().toUpper() ==
LAYERS.toUpper() || node.nodeName().toUpper() ==
MASKS.toUpper()) {
851 for (child = node.lastChild(); !child.isNull(); child = child.previousSibling()) {
855 topLevelSelectionMasks << node;
861 if (node->inherits(
"KisLayer") && child.
childNodes().count() > 0) {
862 loadNodes(child.toElement(), image, node);
868 Q_FOREACH (
KisNodeSP node, topLevelSelectionMasks) {
871 if (activeSelectionMask) {
872 m_d->
warningMessages << i18n(
"Two global selection masks in active state found. \"%1\" is kept active, \"%2\" is deactivated", activeSelectionMask->
name(), mask->
name());
876 activeSelectionMask = mask;
897 QString name = element.attribute(
NAME,
"No Name");
899 QUuid
id = QUuid(element.attribute(
UUID, QUuid().toString()));
901 qint32 x = element.attribute(
X,
"0").toInt();
902 qint32 y = element.attribute(
Y,
"0").toInt();
910 dbgFile <<
"No attribute color space for layer: " << name;
914 QString profileProductName = element.attribute(
PROFILE);
920 dbgFile <<
"Searching color space: " << colorspacename << colorspaceModel << colorspaceDepth <<
" for layer: " << name;
923 if (profileProductName.isNull()) {
930 dbgFile <<
"found colorspace" << colorSpace;
932 m_d->
warningMessages << i18n(
"Layer %1 specifies an unsupported color model: %2.", name, colorspacename);
937 const bool visible = element.attribute(
VISIBLE,
"1") ==
"0" ? false :
true;
938 const bool locked = element.attribute(
LOCKED,
"0") ==
"0" ? false :
true;
939 const bool collapsed = element.attribute(
COLLAPSED,
"0") ==
"0" ? false :
true;
940 int colorLabelIndex = element.attribute(
COLOR_LABEL,
"0").toInt();
942 if (colorLabelIndex >= labels.size()) {
943 colorLabelIndex = labels.size() - 1;
950 nodeType = element.attribute(
"layertype");
991 node =
loadFileLayer(element, image, name, opacity, colorSpace);
1017 if (node->inherits(
"KisLayer") || node->inherits(
"KisColorizeMask")) {
1018 QString compositeOpName = element.attribute(
COMPOSITE_OP,
"normal");
1026 i18n(
"Layer \"%1\" has blending mode \"%2\" that has changed its "
1027 "behavior for CMYK color in Krita 5.2. Please check the "
1028 "result and consider enabling legacy \"Additive\" algorithm in "
1029 "Settings->Configure Krita->General->Tools->CMYK blending mode",
1034 if (node->inherits(
"KisLayer")) {
1035 KisLayer* layer = qobject_cast<KisLayer*>(node.
data());
1041 QUuid uuid(uuidString);
1042 if (!uuid.isNull()) {
1044 dumbLayerStyle->setUuid(uuid);
1047 warnKrita <<
"WARNING: Layer style for layer" << layer->
name() <<
"contains invalid UUID" << uuidString;
1052 if (node->inherits(
"KisGroupLayer")) {
1061 if (node->inherits(
"KisShapeLayer")) {
1071 const bool timelineEnabled = element.attribute(
VISIBLE_IN_TIMELINE,
"0") ==
"0" ? false :
true;
1074 if (node->inherits(
"KisPaintLayer")) {
1079 bool onionEnabled = element.attribute(
ONION_SKIN_ENABLED,
"0") ==
"0" ? false :
true;
1083 if (element.attribute(
FILE_NAME).isNull()) {
1090 if (element.hasAttribute(
"selected") && element.attribute(
"selected") ==
"true") {
1103 const QString& name,
const KoColorSpace* cs, quint32 opacity)
1116 QString filename = element.attribute(
"source", QString());
1117 if (filename.isNull())
return 0;
1118 bool scale = (element.attribute(
"scale",
"true") ==
"true");
1119 int scalingMethod = element.attribute(
"scalingmethod",
"-1").toInt();
1120 if (scalingMethod < 0) {
1128 QString scalingFilter = element.attribute(
"scalingfilter",
"Bicubic");
1130 QString documentPath;
1134 QFileInfo info(documentPath);
1135 QString basePath = info.absolutePath();
1138 QString fullPath = QDir(basePath).filePath(QDir::cleanPath(filename));
1140 QString fullPath = filename;
1142 if (!QFileInfo(fullPath).exists()) {
1145 QString msg = i18nc(
1147 "The file associated to a file layer with the name \"%1\" is not found.\n\n"
1150 "Do you want to locate it manually?", name, fullPath);
1152 int result = QMessageBox::warning(qApp->activeWindow(), i18nc(
"@title:window",
"File not found"), msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
1154 if (result == QMessageBox::Yes) {
1158 dialog.setDefaultDir(basePath);
1159 QString url = dialog.filename();
1161 if (!QFileInfo(basePath).exists()) {
1165 filename = d.relativeFilePath(url);
1177 const QString& name,
const KoColorSpace* cs, quint32 opacity)
1190 const QString& name,
const KoColorSpace* cs, quint32 opacity)
1197 QString legacy = filtername;
1199 if ((filtername = element.attribute(
FILTER_NAME)).isNull()) {
1201 warnFile <<
"No filter in adjustment layer";
1206 if (filtername==
"brightnesscontrast") {
1207 legacy = filtername;
1208 filtername =
"perchannel";
1210 if (filtername==
"left edge detections"
1211 || filtername==
"right edge detections"
1212 || filtername==
"top edge detections"
1213 || filtername==
"bottom edge detections") {
1214 legacy = filtername;
1215 filtername =
"edge detection";
1220 warnFile <<
"No filter for filtername" << filtername <<
"";
1225 kfc->createLocalResourcesSnapshot();
1226 kfc->setProperty(
"legacy", legacy);
1227 if (legacy==
"brightnesscontrast") {
1243 const QString& name,
const KoColorSpace* cs, quint32 opacity)
1263 const QString& name,
const KoColorSpace* cs, quint32 opacity)
1270 if (generatorname.isNull()) {
1272 warnFile <<
"No generator in generator layer";
1278 warnFile <<
"No generator for generatorname" << generatorname <<
"";
1283 kgc->createLocalResourcesSnapshot();
1296 const QString& name,
const KoColorSpace* cs, quint32 opacity)
1306 if ((element.attribute(
CLONE_FROM)).isNull()) {
1312 layer->setCopyFromInfo(info);
1314 if ((element.attribute(
CLONE_TYPE)).isNull()) {
1332 if ((filtername = element.attribute(
FILTER_NAME)).isNull()) {
1334 warnFile <<
"No filter in filter layer";
1340 warnFile <<
"No filter for filtername" << filtername <<
"";
1345 kfc->createLocalResourcesSnapshot();
1383 bool active = element.attribute(
ACTIVE,
"1") ==
"0" ? false :
true;
1422 for (child = elem.firstChild(); !child.isNull(); child = child.nextSibling()) {
1424 QDomElement e = child.toElement();
1425 QString name = e.attribute(
"name");
1426 bool exportEnabled = e.attribute(
"exportEnabled",
"1") ==
"0" ? false :
true;
1429 composition->setExportEnabled(exportEnabled);
1433 QDomElement e =
value.toElement();
1434 QUuid uuid(e.attribute(
"uuid"));
1435 bool visible = e.attribute(
"visible",
"1") ==
"0" ? false :
true;
1436 composition->setVisible(uuid, visible);
1437 bool collapsed = e.attribute(
"collapsed",
"1") ==
"0" ? false :
true;
1438 composition->setCollapsed(uuid, collapsed);
1448 for (child = elem.firstChild(); !child.isNull(); child = child.nextSibling()) {
1449 QDomElement e = child.toElement();
1450 QString type = e.attribute(
"type");
1451 QString file_name = e.attribute(
"filename");
1459 dom.appendChild(dom.importNode(elem,
true));
1460 QDomElement domElement = dom.firstChildElement();
1471 dom.appendChild(dom.importNode(elem,
true));
1472 QDomElement domElement = dom.firstChildElement();
1482 dom.appendChild(dom.importNode(elem,
true));
1483 QDomElement domElement = dom.firstChildElement();
1493 for (child = elem.firstChild(); !child.isNull(); child = child.nextSibling()) {
1494 QDomElement e = child.toElement();
1495 if (e.tagName() ==
"storyboarditem") {
1506 for (child = elem.firstChild(); !child.isNull(); child = child.nextSibling()) {
1507 QDomElement e = child.toElement();
1508 if (e.tagName() ==
"storyboardcomment") {
1510 if (e.hasAttribute(
"visibility")) {
1511 comment.
visibility = e.attribute(
"visibility").toInt();
1513 if (e.hasAttribute(
"name")) {
1514 comment.
name = e.attribute(
"name");
1524 QDomNode audioClip = xmlElement.firstChild();
1525 if (audioClip.nodeName() ==
"audioClips") {
1526 QDomElement audioClipElement = audioClip.toElement();
1530 for (clip = audioClipElement.firstChild(); !clip.isNull(); clip = clip.nextSibling()) {
1531 QDomElement clipElem = clip.toElement();
1533 if (clipElem.hasAttribute(
"filePath")) {
1534 QFileInfo f(clipElem.attribute(
"filePath"));
1540 if (clipElem.hasAttribute(
"volume")) {
1541 volume = clipElem.attribute(
"volume").toDouble();
1553 for (child = elem.firstChildElement(); !child.isNull(); child = child.nextSiblingElement()) {
1555 double diffWhite = 0.0;
1585 if (KisDomUtils::loadValue(red, &temp)) {
1586 cv.
red.
x = temp.x();
1587 cv.
red.
y = temp.y();
1589 if (KisDomUtils::loadValue(green, &temp)) {
1593 if (KisDomUtils::loadValue(blue, &temp)) {
1594 cv.
blue.
x = temp.x();
1595 cv.
blue.
y = temp.y();
1597 if (KisDomUtils::loadValue(white, &temp)) {
1613 for (QDomElement child = elem.firstChildElement(); !child.isNull(); child = child.nextSiblingElement()) {
1614 if (child.nodeName().toLower() ==
"referenceimage") {
1616 reference->setZIndex(layer->shapes().size());
1617 layer->addShape(reference);
1627 QDomNodeList colorNodes = colorElement.childNodes();
1628 colors.reserve(colorNodes.size());
1630 for (
int k = 0; k < colorNodes.size(); k++) {
1631 QDomElement colorElement = colorNodes.at(k).toElement();
1633 colors.push_back(color);
float value(const T *src, size_t ch)
const KoID Integer8BitsColorDepthID("U8", ki18n("8-bit integer/channel"))
const KoID Integer16BitsColorDepthID("U16", ki18n("16-bit integer/channel"))
const KoID CMYKAColorModelID("CMYKA", ki18n("CMYK/Alpha"))
QStringList subtractiveBlendingModesInCmyk()
the list of blendmodes that perform channel-inversion in CMYK color space
const quint8 OPACITY_TRANSPARENT_U8
const quint8 OPACITY_OPAQUE_U8
const QString DESCRIPTION
char nodeType(const KoPathPoint *point)
A data extension mechanism for Krita.
void assignAllLayerStylesToLayers(KisNodeSP root, const QString &storageLocation)
void readFromDevice(QIODevice &device)
KisBaseNode::PropertyList sectionModelProperties() const override
void setEdgeDetectionSize(qreal value)
void setLimitToDeviceBounds(bool value)
void setSectionModelProperties(const KisBaseNode::PropertyList &properties) override
void setUseEdgeDetection(bool value)
void setFuzzyRadius(qreal value)
KUndo2Command * setColorSpace(const KoColorSpace *dstColorSpace, KoColorConversionTransformation::Intent renderingIntent=KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::ConversionFlags conversionFlags=KoColorConversionTransformation::internalConversionFlags(), KoUpdater *progressUpdater=nullptr)
void setCleanUpAmount(qreal value)
The KisCursorOverrideHijacker class stores all override cursors in a stack, and resets them back afte...
KisUndoStore * createUndoStore()
KoDocumentInfo * documentInfo() const
QString linkedResourcesStorageId() const
KisShapeController * shapeController
void setAudioTracks(QVector< QFileInfo > f)
QString localFilePath() const
void setMirrorAxisConfig(const KisMirrorAxisConfig &config)
void setAssistantsGlobalColor(QColor color)
void setReferenceImagesLayer(KisSharedPtr< KisReferenceImagesLayer > layer, bool updateImage)
void setColorHistoryColors(const QList< KoColor > &colors)
QColor assistantsGlobalColor()
QString embeddedResourcesStorageId() const
void setGridConfig(const KisGridConfig &config)
void setAudioVolume(qreal level)
void setGuidesConfig(const KisGuidesConfig &data)
void setPaletteList(const QList< KoColorSetSP > &paletteList, bool emitSignal=false)
setPaletteList replaces the palettes in the document's local resource storage with the list of palett...
The KisFileLayer class loads a particular file as a layer into the layer stack.
void setFilter(KisFilterConfigurationSP filterConfig, bool checkCompareConfig=true) override
static KisFilterRegistry * instance()
static KisGeneratorRegistry * instance()
static KisResourcesInterfaceSP instance()
bool loadDynamicDataFromXml(const QDomElement &parent)
bool loadFromXml(const QDomElement &parent)
void setExportSequenceBaseName(const QString &baseName)
void switchCurrentTimeAsync(int frameId, SwitchTimeAsyncFlags options=STAO_NONE)
void setDocumentRange(const KisTimeSpan range)
void setFramerate(int fps)
void setExportInitialFrameNumber(const int frameNum)
void setExportSequenceFilePath(const QString &filePath)
KisProofingConfigurationSP defaultProofingconfiguration(bool requestDefault=false)
void setColorVolumeInformation(const std::optional< KisColorVolumeInformation > cvi)
Set the color volume information.
void addAnnotation(KisAnnotationSP annotation)
void setHdrReferenceWhiteLightLevel(const std::optional< double > value)
Set the diffuse white light level, in cd/m²
KisGroupLayerSP rootLayer() const
const KoColorSpace * colorSpace() const
KisImageAnimationInterface * animationInterface() const
void setDefaultProjectionColor(const KoColor &color)
void setProofingConfiguration(KisProofingConfigurationSP proofingConfig)
setProofingConfiguration, this sets the image's proofing configuration, and signals the proofingConfi...
void addComposition(KisLayerCompositionSP composition)
void setRelativeContentLightLevelInformation(const std::optional< KisRelativeContentLightLevelInformation > clli)
void setResolution(double xres, double yres)
void convertImageProjectionColorSpace(const KoColorSpace *dstColorSpace)
KisProofingConfigurationSP proofingConfiguration() const
proofingConfiguration
static QString askForAudioFileName(const QString &defaultDir, QWidget *parent)
static QStringList supportedMimeTypes(Direction direction)
void setExternalUri(const QString &uri)
QStringList warningMessages() const
static QHash< QString, QString > customProfileNameAliasForKra()
QStringList errorMessages() const
KisNodeSP loadFilterMask(KisImageSP image, const QDomElement &elem)
KisImageSP loadXML(const QDomElement &imageElement)
KisNodeSP loadNodes(const QDomElement &element, KisImageSP image, KisNodeSP parent)
void loadAnimationMetadata(KoStore *store, KisImageSP image)
KisNodeSP loadFileLayer(const QDomElement &elem, KisImageSP image, const QString &name, quint32 opacity, const KoColorSpace *fallbackColorSpace)
KisNodeSP loadShapeLayer(const QDomElement &elem, KisImageSP image, const QString &name, const KoColorSpace *cs, quint32 opacity)
void loadAudioXML(QDomDocument &xmlDoc, QDomElement &xmlElement, KisDocument *kisDoc)
void loadCompositions(const QDomElement &elem, KisImageSP image)
KisNodeSP loadColorizeMask(KisImageSP image, const QDomElement &elem, const KoColorSpace *colorSpace)
void loadAssistantsList(const QDomElement &elem)
void loadStoryboardItemList(const QDomElement &elem)
QStringList errorMessages() const
if empty, loading didn't fail...
KisNodeSP loadCloneLayer(const QDomElement &elem, KisImageSP image, const QString &name, const KoColorSpace *cs, quint32 opacity)
KisNodeSP loadGeneratorLayer(const QDomElement &elem, KisImageSP image, const QString &name, const KoColorSpace *cs, quint32 opacity)
void loadStoryboards(KoStore *store, KisDocument *doc)
KisNodeSP loadPaintLayer(const QDomElement &elem, KisImageSP image, const QString &name, const KoColorSpace *cs, quint32 opacity)
QString imageName() const
QStringList warningMessages() const
if not empty, loading didn't fail, but there are problems
void loadGuides(const QDomElement &elem)
void loadGrid(const QDomElement &elem)
KisNodeSP loadNode(const QDomElement &elem, KisImageSP image)
KisKraLoader(KisDocument *document, int syntaxVersion, const QVersionNumber &kritaVersion)
void loadBinaryData(KoStore *store, KisImageSP image, const QString &uri, bool external)
vKisNodeSP selectedNodes() const
void loadResources(KoStore *store, KisDocument *doc)
void loadMirrorAxis(const QDomElement &elem)
void loadAnimationMetadataFromXML(const QDomElement &element, KisImageSP image)
void loadStoryboardCommentList(const QDomElement &elem)
KisNodeSP loadSelectionMask(KisImageSP image, const QDomElement &elem)
StoryboardItemList storyboardItemList() const
KisNodeSP loadTransformMask(KisImageSP image, const QDomElement &elem)
KisNodeSP loadGroupLayer(const QDomElement &elem, KisImageSP image, const QString &name, const KoColorSpace *cs, quint32 opacity)
QList< KoColor > loadKoColors(const QDomElement &elem) const
KisNodeSP loadReferenceImagesLayer(const QDomElement &elem, KisImageSP image)
void loadHDRMetadata(const QDomElement &elem, KisImageSP image)
KisNodeSP loadTransparencyMask(KisImageSP image, const QDomElement &elem)
Q_DECL_DEPRECATED void backCompat_loadAudio(const QDomElement &elem, KisDocument *document)
void loadAssistants(KoStore *store, const QString &uri, bool external)
QList< KisPaintingAssistantSP > assistants() const
StoryboardCommentList storyboardCommentList() const
KisNodeSP loadAdjustmentLayer(const QDomElement &elem, KisImageSP image, const QString &name, const KoColorSpace *cs, quint32 opacity)
void loadAudio(KoStore *store, KisDocument *kisDoc)
static const KoID colorizeEditKeyStrokes
static void setNodeProperty(KisBaseNode::PropertyList *props, const KoID &id, const QVariant &value)
static const KoID colorizeShowColoring
The KisMirrorAxisConfig class stores configuration for the KisMirrorAxis canvas decoration....
bool loadFromXml(const QDomElement &parent)
loadFromXml() function for KisKraLoader
static KisNodeViewColorScheme * instance()
QVector< QColor > allColorLabels() const
static KisPaintingAssistantFactoryRegistry * instance()
virtual KisPaintingAssistant * createPaintingAssistant() const =0
void setAssistantGlobalColorCache(const QColor &color)
virtual int numHandles() const =0
void loadXml(KoStore *store, QMap< int, KisPaintingAssistantHandleSP > &handleMap, QString path)
const QList< KisPaintingAssistantHandleSP > & handles() const
@ Custom
Let artists configure their own.
@ Paper
Whether to use Paper settings (absolute colorimetric, 0% adaptation.)
@ Monitor
Whether to use monitor rendering intent and flags for the second transform.
static KisReferenceImage * fromXml(const QDomElement &elem)
The KisResourceModel class provides the main access to resources. It is possible to filter the resour...
QVector< KoResourceSP > resourcesForMD5(const QString md5sum) const
KoResourceSP importResource(const QString &filename, QIODevice *device, const bool allowOverwrite, const QString &storageId=QString("")) override
importResource imports a resource from a QIODevice
void setAntialiased(const bool antialiased)
virtual KoID colorModelId() const =0
virtual quint32 channelCount() const =0
virtual KoID colorDepthId() const =0
static KoColor fromXML(const QDomElement &elt, const QString &channelDepthId)
static const KoCompositeOpRegistry & instance()
void setAboutInfo(const QString &info, const QString &data)
QString aboutInfo(const QString &info) const
const T value(const QString &id) const
T get(const QString &id) const
A simple wrapper object for the main information about the resource.
bool open(OpenMode m) override
QIODevice * device() const
bool hasFile(const QString &fileName) const
bool open(const QString &name)
QByteArray read(qint64 max)
This class stores a list of StoryboardChild objects and provides functionality to manipulate the list...
This file is part of the Krita application in calligra.
void convertColorSpaceNames(QString &colorspacename, QString &profileProductName)
QSharedPointer< T > toQShared(T *ptr)
KisSharedPtr< KisAnnotation > KisAnnotationSP
KisSharedPtr< KisImage > KisImageSP
const QString COLORIZE_CLEANUP
const QString TRANSPARENCY_MASK
const QString COLORVOLUMEBLUE
const QString COLORIZE_FUZZY_RADIUS
const QString CLLI_CALC_RGB_XYZ_FALLBACK
const QString GENERATOR_NAME
const QString FILTER_NAME
const QString CLLI_CALC_Rec2020
const QString PROOFINGPROFILENAME
const QString COLORHISTORY
const QString CANVASPROJECTIONCOLOR
const QString COLORVOLUMERED
const QString CLONE_FROM_UUID
const QString COLORBYTEDATA
const QString PROOFINGBLACKPOINTCOMPENSATION
const QString COLORVOLUMEMAXLUMINANCE
const QString ICC_PROOFING_PATH
const QString COLORIZE_EDIT_KEYSTROKES
const QString Y_RESOLUTION
const QString ASSISTANTS_PATH
const QString COLOR_LABEL
const QString PROOFINGDEPTH
const QString ANIMATION_METADATA_PATH
const QString NATIVE_MIMETYPE
const QString LAYER_STYLES_PATH
const QString X_RESOLUTION
const QString STORYBOARD_PATH
const QString ANNOTATIONS_PATH
const QString PROOFINGDISPLAYBLACKPOINTCOMPENSATION
const QString PASS_THROUGH_MODE
const QString COLORIZE_EDGE_DETECTION_SIZE
const QString PROOFINGDISPLAYMODE
const QString HDRREFERENCEWHITE
const QString CONTENTLIGHTLEVEL
const QString COMPOSITE_OP
const QString PROOFINGWARNINGCOLOR
const QString KEYFRAME_FILE
const QString COLORVOLUMEGREEN
const QString PAINT_LAYER
const QString COLORVOLUME
const QString PROOFINGDISPLAYINTENT
const QString GROUP_LAYER
const QString VISIBLE_IN_TIMELINE
const QString COLORIZE_MASK
QBitArray stringToFlags(const QString &string, int size=-1, char token='0', bool defaultTrue=true)
const QString CHANNEL_LOCK_FLAGS
const QString GLOBALASSISTANTSCOLOR
const QString ANNOTATIONS
const QString TRANSFORM_MASK
const QString COLORIZE_SHOW_COLORING
const QString COLORVOLUMEWHITE
const QString ONION_SKIN_ENABLED
const QString RESOURCE_PATH
const QString PROOFINGMODEL
const QString REFERENCE_IMAGES_LAYER
const QString COLORIZE_USE_EDGE_DETECTION
const QString PALETTE_PATH
const QString COLORVOLUMEMINLUMINANCE
const QString PROOFINGINTENT
const QString HDRMETADATA
const QString ANTIALIASED
const QString FILTER_MASK
const QString MIRROR_AXIS
const QString SIMPLECOLORDATA
const QString PROOFINGADAPTATIONSTATE
const QString CLONE_LAYER
const QString SHAPE_LAYER
const QString GENERATOR_LAYER
const QString COLORSPACE_NAME
const QString SELECTION_MASK
const QString COLORIZE_LIMIT_TO_DEVICE
const QString CLLI_CALCTYPE
const QString LAYER_STYLE_UUID
const QString CHANNEL_FLAGS
const QString ADJUSTMENT_LAYER
QColor qStringToQColor(QString colorString)
double toDouble(const QString &str, bool *ok=nullptr)
int toInt(const QString &str, bool *ok=nullptr)
bool loadValue(const QDomElement &e, float *v)
void setPinnedToTimeline(bool pinned)
virtual void setUserLocked(bool l)
void setOpacity(quint8 val)
virtual void setVisible(bool visible, bool loading=false)
virtual void setX(qint32)
void setUuid(const QUuid &id)
virtual void setY(qint32)
void setColorLabelIndex(int index)
void setName(const QString &name)
void setCollapsed(bool collapsed)
void setCompositeOpId(const QString &compositeOpId)
virtual KisFilterConfigurationSP defaultConfiguration(KisResourcesInterfaceSP resourcesInterface) const
bool accept(KisNodeVisitor &v) override
void setPassThroughMode(bool value)
StoryboardCommentList storyboardCommentList
QList< KisPaintingAssistantSP > assistants
QMap< KisNode *, QString > keyframeFilenames
QVersionNumber kritaVersion
QVector< QString > paletteFilenames
QMap< KisNode *, QString > layerFilenames
QStringList errorMessages
StoryboardItemList storyboardItemList
QList< KisAnnotationSP > annotations
QStringList warningMessages
QVector< KoResourceSignature > resources
QMap< QString, QString > assistantsFilenames
virtual void setChannelFlags(const QBitArray &channelFlags)
void setLayerStyle(KisPSDLayerStyleSP layerStyle)
bool addNode(KisNodeSP node, KisNodeSP parent=KisNodeSP(), KisNodeAdditionFlags flags=KisNodeAdditionFlag::None)
QList< KisNodeSP > childNodes(const QStringList &nodeTypes, const KoProperties &properties) const
quint32 childCount() const
The KisPSDLayerStyle class implements loading, saving and applying the PSD layer effects.
void setChannelLockFlags(const QBitArray &channelFlags)
void setOnionSkinEnabled(bool state)
@ XYZLuminance
Calculate luminance by converting to xyz.
@ Rec2020Component
Calculate luminance by converting to rec2020.
@ RGBComponent
Calculate luminance on the RGB components if possible.
double maxFrameAverageLightLevel
maxFrameAverage MaxFrameAverageLightLevel or MaxFALL is the average of average pixel brightnesses in ...
double maxContentLightLevel
void setActive(bool active)
virtual bool valid() const =0
const KoColorSpace * colorSpace(const QString &colorModelId, const QString &colorDepthId, const KoColorProfile *profile)
static KoColorSpaceRegistry * instance()
KoID colorSpaceColorDepthId(const QString &_colorSpaceId) const
KoID colorSpaceColorModelId(const QString &_colorSpaceId) const
const KoColorProfile * createColorProfile(const QString &colorModelId, const QString &colorDepthId, const QByteArray &rawData)