This small helper class takes an url and an image; tries to import the image at the url and shove the layers of the imported image into the first image after loading is done. This is a separate class because loading can be asynchronous.
Caveat: this class calls "delete this", which means that you new it and then never touch it again. Thank you very much.
Definition at line 26 of file kis_import_catcher.h.
| void KisImportCatcher::slotLoadingFinished |
( |
| ) |
|
|
privateslot |
Definition at line 111 of file kis_import_catcher.cc.
112{
115
116 if (importedImage && importedImage->
bounds().isValid()) {
119 list << "KisLayer";
121
123
124
129 }
130 }
137
139
144 }
147 }
148 else {
152 }
153 }
154
156}
const quint8 OPACITY_OPAQUE_U8
KisShapeController * shapeController
KisGroupLayerSP rootLayer() const
KisPaintDeviceSP projection() const
QRect bounds() const override
static void adaptClipToImageColorSpace(KisPaintDeviceSP dev, KisImageSP image)
KisNodeSP createNode(const QString &nodeType, bool quiet=false, KisPaintDeviceSP copyFrom=0)
KisDocument * document() const
KisNodeManager * nodeManager() const
The node manager handles everything about nodes.
KisImageWSP image() const
Return the image this view is displaying.
void addShape(KoShape *shape)
QTransform absoluteTransformation() const
void setTransformation(const QTransform &matrix)
virtual KoShape * cloneShape() const
creates a deep copy of the shape or shape's subtree
virtual KisPaintDeviceSP projection() const =0
QString prettyLayerName(QString layerName) const
void importShapeLayer(KisShapeLayerSP shapeLayer)
void importAsPaintLayer(KisPaintDeviceSP device, QString layerName)
KisNodeSP firstChild() const
QList< KisNodeSP > childNodes(const QStringList &nodeTypes, const KoProperties &properties) const
References KoShape::absoluteTransformation(), adaptClipToImageColorSpace(), KoShapeContainer::addShape(), KisImage::bounds(), KisNode::childNodes(), KoShape::cloneShape(), KisNodeManager::createNode(), KisSharedPtr< T >::data(), KisWeakSharedPtr< T >::data(), deleteMyself(), KisImportCatcher::Private::doc, KisViewManager::document(), KisNode::firstChild(), KisDocument::image, KisViewManager::image(), KisImportCatcher::Private::importAsPaintLayer(), KisImportCatcher::Private::importShapeLayer(), KisImportCatcher::Private::layerType, m_d, KisBaseNode::name(), KisViewManager::nodeManager(), KisImportCatcher::Private::numLayersImported, OPACITY_OPAQUE_U8, KisImportCatcher::Private::prettyLayerName(), KisImage::projection(), KisBaseNode::projection(), KisImage::rootLayer(), KoShape::setTransformation(), KisDocument::shapeController, KisImportCatcher::Private::view, and KisImage::waitForDone().