|
Krita Source Code Documentation
|
#include <kis_kra_load_visitor.h>
Inheritance diagram for KisKraLoadVisitor:Public Member Functions | |
| QStringList | errorMessages () const |
| KisKraLoadVisitor (KisImageSP image, KoStore *store, KoShapeControllerBase *shapeController, QMap< KisNode *, QString > &layerFilenames, QMap< KisNode *, QString > &keyframeFilenames, const QString &name, int syntaxVersion) | |
| void | setExternalUri (const QString &uri) |
| bool | visit (KisAdjustmentLayer *layer) override |
| bool | visit (KisCloneLayer *layer) override |
| bool | visit (KisColorizeMask *mask) override |
| bool | visit (KisExternalLayer *) override |
| bool | visit (KisFilterMask *mask) override |
| bool | visit (KisGeneratorLayer *layer) override |
| bool | visit (KisGroupLayer *layer) override |
| bool | visit (KisNode *) override |
| bool | visit (KisPaintLayer *layer) override |
| bool | visit (KisSelectionMask *mask) override |
| bool | visit (KisTransformMask *mask) override |
| bool | visit (KisTransparencyMask *mask) override |
| QStringList | warningMessages () const |
Public Member Functions inherited from KisNodeVisitor | |
| KisNodeVisitor () | |
| virtual | ~KisNodeVisitor () |
Private Member Functions | |
| void | fixOldFilterConfigurations (KisFilterConfigurationSP kfc) |
| QString | getLocation (const QString &filename, const QString &suffix=QString()) |
| QString | getLocation (KisNode *node, const QString &suffix=QString()) |
| void | initSelectionForMask (KisMask *mask) |
| void | loadDeprecatedFilter (KisFilterConfigurationSP cfg) |
| bool | loadFilterConfiguration (KisFilterConfigurationSP kfc, const QString &location) |
| bool | loadMetaData (KisNode *node) |
| void | loadNodeKeyframes (KisNode *node) |
| bool | loadPaintDevice (KisPaintDeviceSP device, const QString &location) |
| template<class DevicePolicy > | |
| bool | loadPaintDeviceFrame (KisPaintDeviceSP device, const QString &location, DevicePolicy policy) |
| const KoColorProfile * | loadProfile (const QString &location, const QString &colorModelId, const QString &colorDepthId) |
| bool | loadProfile (KisPaintDeviceSP device, const QString &location) |
| bool | loadSelection (const QString &location, KisSelectionSP dstSelection) |
Private Attributes | |
| QStringList | m_errorMessages |
| bool | m_external |
| KisImageSP | m_image |
| QMap< KisNode *, QString > | m_keyframeFilenames |
| QMap< KisNode *, QString > | m_layerFilenames |
| QString | m_name |
| QMap< QString, const KoColorProfile * > | m_profileCache |
| KoShapeControllerBase * | m_shapeController |
| KoStore * | m_store |
| int | m_syntaxVersion |
| QString | m_uri |
| QStringList | m_warningMessages |
Additional Inherited Members | |
Protected Member Functions inherited from KisNodeVisitor | |
| bool | visitAll (KisNode *node, bool breakOnFail=false) |
| bool | visitAllInverse (KisNode *node, bool breakOnFail=false) |
Definition at line 25 of file kis_kra_load_visitor.h.
| KisKraLoadVisitor::KisKraLoadVisitor | ( | KisImageSP | image, |
| KoStore * | store, | ||
| KoShapeControllerBase * | shapeController, | ||
| QMap< KisNode *, QString > & | layerFilenames, | ||
| QMap< KisNode *, QString > & | keyframeFilenames, | ||
| const QString & | name, | ||
| int | syntaxVersion ) |
Definition at line 85 of file kis_kra_load_visitor.cpp.
References dbgFile, dbgKrita, KoStore::directoryList(), KoStore::enterDirectory(), expandEncodedDirectory(), m_name, m_store, m_syntaxVersion, KoStore::popDirectory(), and KoStore::pushDirectory().
| QStringList KisKraLoadVisitor::errorMessages | ( | ) | const |
|
private |
Definition at line 693 of file kis_kra_load_visitor.cpp.
References KisFilter::configurationAllowedForMask(), KisFilter::fixLoadedFilterConfigurationForMasks(), KisFilterRegistry::instance(), KIS_SAFE_ASSERT_RECOVER_NOOP, KIS_SAFE_ASSERT_RECOVER_RETURN, and KoGenericRegistry< T >::value().
|
private |
Definition at line 803 of file kis_kra_load_visitor.cpp.
References KRA::LAYER_PATH, m_external, m_name, and m_uri.
|
private |
Definition at line 798 of file kis_kra_load_visitor.cpp.
References getLocation(), and m_layerFilenames.
Definition at line 330 of file kis_kra_load_visitor.cpp.
References KisNode::accept(), KisWeakSharedPtr< T >::data(), KisMask::initSelection(), and KisNode::parent.
|
private |
Load deprecated filters. Most deprecated filters can be handled by this, but the brightnesscontact to perchannels conversion needs to be handled in the perchannel class because those filters have their own xml loading functionality.
Definition at line 855 of file kis_kra_load_visitor.cpp.
|
private |
Definition at line 669 of file kis_kra_load_visitor.cpp.
References KoStore::close(), KoStore::hasFile(), loadDeprecatedFilter(), m_store, m_warningMessages, KoStore::open(), KoStore::read(), and KoStore::size().
|
private |
Definition at line 705 of file kis_kra_load_visitor.cpp.
References KoStore::close(), dbgFile, KRA::DOT_METADATA, KoGenericRegistry< T >::get(), getLocation(), KoStore::hasFile(), KisMetaData::IOBackend::id(), KisMetadataBackendRegistry::instance(), KisMetaData::IOBackend::loadFrom(), m_store, m_warningMessages, KisLayer::metaData(), KisBaseNode::name(), KisMetaData::IOBackend::name(), KoStore::open(), KoStore::read(), KoStore::size(), and KisMetaData::IOBackend::supportLoading().
Definition at line 810 of file kis_kra_load_visitor.cpp.
References KoStore::close(), KoStore::device(), KisBaseNode::enableAnimation(), KisBaseNode::getKeyframeChannel(), getLocation(), KisKeyframeChannel::loadXML(), m_errorMessages, m_keyframeFilenames, m_store, m_warningMessages, and KoStore::open().
|
private |
Definition at line 556 of file kis_kra_load_visitor.cpp.
References KisRasterKeyframeChannel::frameFilename(), KisPaintDeviceFramesInterface::frames(), KisPaintDevice::framesInterface(), getLocation(), KisPaintDevice::keyframeChannel(), loadPaintDeviceFrame(), and m_warningMessages.
|
private |
Definition at line 592 of file kis_kra_load_visitor.cpp.
References KoStore::close(), KisPaintDevice::colorSpace(), KoColor::createTransparent(), KoColor::data(), KoStore::device(), m_store, m_warningMessages, KoStore::open(), KoColorSpace::pixelSize(), KoStore::read(), and KoStore::size().
|
private |
Definition at line 640 of file kis_kra_load_visitor.cpp.
References KoStore::atEnd(), KoStore::close(), KoColorSpaceRegistry::createColorProfile(), dbgFile, KoStore::device(), KoMD5Generator::generateHash(), KoStore::hasFile(), KoColorSpaceRegistry::instance(), m_profileCache, m_store, KoStore::open(), KoStore::read(), and KoStore::size().
|
private |
Definition at line 626 of file kis_kra_load_visitor.cpp.
References KoColorSpace::colorDepthId(), KoColorSpace::colorModelId(), KisPaintDevice::colorSpace(), KoID::id(), loadProfile(), m_warningMessages, and KisPaintDevice::setProfile().
|
private |
We need to explicitly call updateProjection() here, because KisUpdateSelectionJob that is put into the queue will not update actual layers that own this selection. In normal situation, the setDirty() call is done explicitly while painting.
TODO: consider adding a proper setDirty() call to KisUpdateSelectionJob. Though it doesn't seem to be needed until we allow modifying vector selections on non-selection masks.
NOTE: since loading a vector selection discards all the contents of a raster projection by reincarnating the paint device, there is no need to load pixel selection in case any vector selection is present.
Definition at line 736 of file kis_kra_load_visitor.cpp.
References KisImage::bounds(), KisPaintDevice::colorSpace(), KisSelection::convertToVectorSelectionNoUndo(), KoColor::createTransparent(), KRA::DOT_PIXEL_SELECTION, KRA::DOT_SHAPE_SELECTION, KoStore::enterDirectory(), KoStore::hasFile(), KisPixelSelection::invalidateOutlineCache(), loadPaintDevice(), KisShapeSelection::loadSelection(), m_image, m_shapeController, m_store, m_warningMessages, KisSelection::pixelSelection, KoStore::popDirectory(), KoStore::pushDirectory(), KisPaintDevice::setDefaultPixel(), and KisSelection::updateProjection().
| void KisKraLoadVisitor::setExternalUri | ( | const QString & | uri | ) |
Definition at line 121 of file kis_kra_load_visitor.cpp.
References m_external, and m_uri.
|
overridevirtual |
Implements KisNodeVisitor.
Definition at line 237 of file kis_kra_load_visitor.cpp.
References KRA::DOT_FILTERCONFIG, KisBaseProcessor::factoryConfiguration(), KisNodeFilterInterface::filter(), fixOldFilterConfigurations(), getLocation(), KisFilterRegistry::instance(), KisGlobalResourcesInterface::instance(), KisSelectionBasedLayer::internalSelection(), loadFilterConfiguration(), loadMetaData(), loadNodeKeyframes(), loadPaintDevice(), loadSelection(), m_syntaxVersion, m_warningMessages, KisBaseNode::name(), KisSelection::pixelSelection, KisAdjustmentLayer::setFilter(), KisSelectionBasedLayer::setInternalSelection(), KoGenericRegistry< T >::value(), and KisNodeVisitor::visitAll().
|
overridevirtual |
Implements KisNodeVisitor.
Definition at line 302 of file kis_kra_load_visitor.cpp.
References KisCloneLayer::copyFrom, KisCloneLayer::copyFromInfo, KisSharedPtr< T >::data(), KisNodeUuidInfo::findNode(), KisSharedPtr< T >::isNull(), loadMetaData(), m_image, m_warningMessages, KisImage::rootLayer(), KisCloneLayer::setCopyFrom(), and KisNodeVisitor::visitAll().
|
overridevirtual |
Implements KisNodeVisitor.
Definition at line 452 of file kis_kra_load_visitor.cpp.
References KoColorSpace::colorDepthId(), KisColorizeMask::coloringProjection(), KRA::COLORIZE_COLORING_DEVICE, KRA::COLORIZE_KEYSTROKE, KRA::COLORIZE_KEYSTROKES_SECTION, KoColorSpace::colorModelId(), KisImage::colorSpace(), KisColorizeMask::colorSpace(), KisLazyFillTools::KeyStroke::dev, KRA::DOT_COLORIZE_MASK, KRA::DOT_ICC, KoStore::enterDirectory(), KoStore::extractFile(), getLocation(), KoID::id(), KIS_SAFE_ASSERT_RECOVER, loadPaintDevice(), loadProfile(), m_image, m_store, KisNode::parent, KoStore::popDirectory(), KoColorSpace::profile(), KoStore::pushDirectory(), KisColorizeMask::resetCache(), KisNodeFacade::root, KisColorizeMask::setKeyStrokesDirect(), KisColorizeMask::setProfile(), KisColorizeMask::x(), and KisColorizeMask::y().
|
overridevirtual |
Implements KisNodeVisitor.
Definition at line 127 of file kis_kra_load_visitor.cpp.
References KRA::DOT_SHAPE_LAYER, KoStore::enterDirectory(), getLocation(), KisImportExportManager::Import, KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, loadMetaData(), loadNodeKeyframes(), m_errorMessages, m_store, m_warningMessages, KoFileDialog::OpenFile, KoStore::popDirectory(), KoStore::pushDirectory(), KisImportExportManager::supportedMimeTypes(), and KisNodeVisitor::visitAll().
|
overridevirtual |
Implements KisNodeVisitor.
Definition at line 346 of file kis_kra_load_visitor.cpp.
References KRA::DOT_FILTERCONFIG, KisBaseProcessor::factoryConfiguration(), KisNodeFilterInterface::filter(), fixOldFilterConfigurations(), getLocation(), initSelectionForMask(), KisFilterRegistry::instance(), KisGlobalResourcesInterface::instance(), loadFilterConfiguration(), loadNodeKeyframes(), loadSelection(), KisMask::selection, KisFilterMask::setFilter(), and KoGenericRegistry< T >::value().
|
overridevirtual |
Implements KisNodeVisitor.
Definition at line 280 of file kis_kra_load_visitor.cpp.
References KRA::DOT_FILTERCONFIG, KisBaseProcessor::factoryConfiguration(), KisNodeFilterInterface::filter(), getLocation(), KisGeneratorRegistry::instance(), KisGlobalResourcesInterface::instance(), KisSelectionBasedLayer::internalSelection(), loadFilterConfiguration(), loadMetaData(), loadNodeKeyframes(), loadSelection(), KisGeneratorLayer::setFilter(), KoGenericRegistry< T >::value(), and KisNodeVisitor::visitAll().
|
overridevirtual |
Implements KisNodeVisitor.
Definition at line 225 of file kis_kra_load_visitor.cpp.
References loadMetaData(), loadNodeKeyframes(), and KisNodeVisitor::visitAll().
|
inlineoverridevirtual |
Implements KisNodeVisitor.
Definition at line 41 of file kis_kra_load_visitor.h.
|
overridevirtual |
Implements KisNodeVisitor.
Definition at line 187 of file kis_kra_load_visitor.cpp.
References KisNodeFacade::addNode(), KoStore::close(), KoStore::device(), KRA::DOT_ICC, KisNode::firstChild(), getLocation(), loadMetaData(), loadNodeKeyframes(), loadPaintDevice(), loadProfile(), m_image, m_store, m_syntaxVersion, KoStore::open(), KisPaintLayer::paintDevice, KisSelection::pixelSelection, KisPixelSelection::read(), KisMask::setSelection(), and KisNodeVisitor::visitAll().
|
overridevirtual |
Implements KisNodeVisitor.
Definition at line 446 of file kis_kra_load_visitor.cpp.
References getLocation(), initSelectionForMask(), loadSelection(), and KisMask::selection.
|
overridevirtual |
Workaround for the dumbparams that we used in older versions of Krita for simple translations. The dumbparams were deprecated with the proper implementation of the param holder, so now we should convert the old definition into the new format somehow.
See: https://bugs.kde.org/show_bug.cgi?id=492320
Implements KisNodeVisitor.
Definition at line 366 of file kis_kra_load_visitor.cpp.
References KisImage::bounds(), KoStore::close(), KisTransformMaskParamsFactoryRegistry::createParams(), KRA::DOT_TRANSFORMCONFIG, KisDomUtils::findOnlyElement(), getLocation(), KoStore::hasFile(), KisTransformMaskParamsFactoryRegistry::instance(), loadNodeKeyframes(), m_errorMessages, m_image, m_store, main(), KoStore::open(), KoStore::read(), KisTransformMask::setTransformParams(), and KoStore::size().
|
overridevirtual |
Implements KisNodeVisitor.
Definition at line 437 of file kis_kra_load_visitor.cpp.
References getLocation(), initSelectionForMask(), loadNodeKeyframes(), loadSelection(), and KisMask::selection.
| QStringList KisKraLoadVisitor::warningMessages | ( | ) | const |
Definition at line 524 of file kis_kra_load_visitor.cpp.
References m_warningMessages.
|
private |
Definition at line 94 of file kis_kra_load_visitor.h.
|
private |
Definition at line 88 of file kis_kra_load_visitor.h.
|
private |
Definition at line 86 of file kis_kra_load_visitor.h.
|
private |
Definition at line 91 of file kis_kra_load_visitor.h.
|
private |
Definition at line 90 of file kis_kra_load_visitor.h.
|
private |
Definition at line 92 of file kis_kra_load_visitor.h.
|
private |
Definition at line 97 of file kis_kra_load_visitor.h.
|
private |
Definition at line 96 of file kis_kra_load_visitor.h.
|
private |
Definition at line 87 of file kis_kra_load_visitor.h.
|
private |
Definition at line 93 of file kis_kra_load_visitor.h.
|
private |
Definition at line 89 of file kis_kra_load_visitor.h.
|
private |
Definition at line 95 of file kis_kra_load_visitor.h.