7#include <QScopedPointer>
10#include <KoColorSpace.h>
11#include <KoColorSpaceRegistry.h>
12#include <KoColorTransformation.h>
14#include <KisDocument.h>
15#include <KisMimeDatabase.h>
20#include <kis_paint_layer.h>
21#include <kis_group_layer.h>
22#include <kis_file_layer.h>
23#include <kis_adjustment_layer.h>
24#include <kis_generator_layer.h>
25#include <kis_clone_layer.h>
26#include <kis_shape_layer.h>
27#include <KisReferenceImagesLayer.h>
28#include <kis_transparency_mask.h>
29#include <kis_filter_mask.h>
30#include <kis_transform_mask.h>
31#include <kis_selection_mask.h>
32#include <lazybrush/kis_colorize_mask.h>
34#include <kis_meta_data_merge_strategy.h>
35#include <kis_meta_data_merge_strategy_registry.h>
36#include <kis_filter_strategy.h>
37#include <commands/kis_node_compositeop_command.h>
38#include <commands/kis_image_layer_add_command.h>
39#include <commands/kis_image_layer_remove_command.h>
40#include <commands_new/kis_set_layer_style_command.h>
41#include <kis_processing_applicator.h>
42#include <kis_asl_layer_style_serializer.h>
44#include <kis_raster_keyframe_channel.h>
45#include <kis_keyframe.h>
46#include "kis_selection.h"
48#include "InfoObject.h"
55#include "GroupLayer.h"
56#include "CloneLayer.h"
57#include "FilterLayer.h"
60#include "VectorLayer.h"
61#include "FilterMask.h"
62#include "SelectionMask.h"
63#include "TransparencyMask.h"
64#include "TransformMask.h"
65#include "ColorizeMask.h"
67#include "LibKisUtils.h"
68#include <kis_layer_utils.h>
70#include "PaintingResources.h"
71#include "KisMainWindow.h"
72#include "kis_canvas2.h"
73#include "KoCanvasResourceProvider.h"
82Node::Node(KisImageSP image, KisNodeSP node,
QObject *parent)
90Node *Node::createNode(KisImageSP image, KisNodeSP node,
QObject *parent)
95 if (node->inherits(
"KisGroupLayer")) {
96 return new GroupLayer(
dynamic_cast<KisGroupLayer*
>(node.data()));
98 else if (node->inherits(
"KisCloneLayer")) {
99 return new CloneLayer(
dynamic_cast<KisCloneLayer*
>(node.data()));
101 else if (node->inherits(
"KisFileLayer")) {
102 return new FileLayer(
dynamic_cast<KisFileLayer*
>(node.data()));
104 else if (node->inherits(
"KisAdjustmentLayer")) {
105 return new FilterLayer(
dynamic_cast<KisAdjustmentLayer*
>(node.data()));
107 else if (node->inherits(
"KisGeneratorLayer")) {
108 return new FillLayer(
dynamic_cast<KisGeneratorLayer*
>(node.data()));
110 else if (node->inherits(
"KisShapeLayer")) {
111 return new VectorLayer(
dynamic_cast<KisShapeLayer*
>(node.data()));
113 else if (node->inherits(
"KisFilterMask")) {
114 return new FilterMask(image,
dynamic_cast<KisFilterMask*
>(node.data()));
116 else if (node->inherits(
"KisSelectionMask")) {
117 return new SelectionMask(image,
dynamic_cast<KisSelectionMask*
>(node.data()));
119 else if (node->inherits(
"KisTransparencyMask")) {
120 return new TransparencyMask(image,
dynamic_cast<KisTransparencyMask*
>(node.data()));
122 else if (node->inherits(
"KisTransformMask")) {
123 return new TransformMask(image,
dynamic_cast<KisTransformMask*
>(node.data()));
125 else if (node->inherits(
"KisColorizeMask")) {
126 return new ColorizeMask(image,
dynamic_cast<KisColorizeMask*
>(node.data()));
138bool Node::operator==(
const Node &other)
const
140 return (d->node == other.d->node
141 && d->image == other.d->image);
144bool Node::operator!=(
const Node &other)
const
146 return !(operator==(other));
151 KisNodeSP
clone = d->node->clone();
159 if (!d->node)
return false;
162 return paintLayer->alphaLocked();
169 if (!d->node)
return;
172 paintLayer->setAlphaLocked(value);
179 if (!d->node)
return QString();
181 return d->node->compositeOpId();
186 if (!d->node)
return;
188 KUndo2Command *cmd =
new KisNodeCompositeOpCommand(d->node,
191 KisProcessingApplicator::runSingleCommandStroke(d->image, cmd);
192 d->image->waitForDone();
201 if (!d->node->inherits(
"KisLayer"))
return channels;
203 Q_FOREACH(KoChannelInfo *info, d->node->colorSpace()->channels()) {
215 KisNodeList nodeList;
216 int childCount = d->node->childCount();
217 for (
int i = 0; i < childCount; ++i) {
218 nodeList << d->node->at(i);
220 nodes = LibKisUtils::createNodeList(nodeList, d->image);
227 if (!d->node)
return {};
230 KisNodeList nodeList = KisLayerUtils::findNodesByName(d->node,
name, recursive, partialMatch);
233 for (
int i = nodeList.size() - 1; i >= 0; i--) {
248 nodeList.removeAt(i);
253 if (colorLabelIndex > 0) {
254 for (
int i = nodeList.size() - 1; i >= 0; i--) {
255 if (nodeList.at(i)->colorLabelIndex() != colorLabelIndex) {
256 nodeList.removeAt(i);
261 return LibKisUtils::createNodeList(nodeList, d->image);
266 if (!d->node)
return false;
268 KUndo2Command *cmd = 0;
271 cmd =
new KisImageLayerAddCommand(d->image, child->node(), d->node, above->node());
273 cmd =
new KisImageLayerAddCommand(d->image, child->node(), d->node, d->node->childCount());
276 KisProcessingApplicator::runSingleCommandStroke(d->image, cmd);
277 d->image->waitForDone();
284 if (!d->node)
return false;
290 if (!d->node)
return;
291 KisNodeSP node = d->node->firstChild();
293 d->image->removeNode(node);
294 node = node->nextSibling();
296 Q_FOREACH(
Node *node, nodes) {
297 d->image->addNode(node->node(), d->node);
303 if (!d->node)
return 0;
304 return d->node->colorLabelIndex();
309 if (!d->node)
return;
310 d->node->setColorLabelIndex(
index);
315 if (!d->node)
return "";
316 if (!d->node->projection())
return d->node->colorSpace()->colorDepthId().id();
317 return d->node->projection()->colorSpace()->colorDepthId().id();
322 if (!d->node)
return "";
323 if (!d->node->projection())
return d->node->colorSpace()->colorModelId().id();
324 return d->node->projection()->colorSpace()->colorModelId().id();
330 if (!d->node)
return "";
331 if (!d->node->projection())
return d->node->colorSpace()->profile()->name();
332 return d->node->projection()->colorSpace()->profile()->name();
337 if (!d->node)
return false;
338 if (!d->node->inherits(
"KisLayer"))
return false;
340 const KoColorProfile *profile = KoColorSpaceRegistry::instance()->profileByName(
colorProfile);
341 bool result = d->image->assignLayerProfile(layer, profile);
342 d->image->waitForDone();
348 if (!d->node)
return false;
349 if (!d->node->inherits(
"KisLayer"))
return false;
350 const KoColorProfile *profile = KoColorSpaceRegistry::instance()->profileByName(
colorProfile);
351 if (!profile)
return false;
352 const KoColorSpace *dstCs = KoColorSpaceRegistry::instance()->colorSpace(
colorModel,
355 d->image->convertLayerColorSpace(d->node, dstCs, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
356 d->image->waitForDone();
362 if (!d->node)
return false;
363 return d->node->isAnimated();
368 if (!d->node)
return;
369 d->node->enableAnimation();
374 if (!d->node)
return;
375 d->node->setPinnedToTimeline(pinned);
380 if (!d->node)
return false;
381 return d->node->isPinnedToTimeline();
386 if (!d->node)
return false;
387 return d->node->collapsed();
392 if (!d->node)
return;
398 if (!d->node)
return false;
399 if (!d->node->inherits(
"KisLayer"))
return false;
405 if (!d->node)
return;
406 if (!d->node->inherits(
"KisLayer"))
return;
412 if (!d->node)
return false;
413 return d->node->userLocked();
418 if (!d->node)
return;
419 d->node->setUserLocked(value);
424 return !d->node->extent().isEmpty();
429 if (!d->node)
return QString();
430 return d->node->name();
435 if (!d->node)
return;
436 d->node->setName(
name);
442 if (!d->node)
return 0;
443 return d->node->opacity();
448 if (!d->node)
return;
449 if (value < 0) value = 0;
450 if (value > 255) value = 255;
451 d->node->setOpacity(value);
457 if (!d->node)
return 0;
458 if (!d->node->parent())
return 0;
459 return Node::createNode(d->image, d->node->parent());
464 if (!d->node)
return QString();
475 return "filterlayer";
484 return "referenceimageslayer";
487 return "vectorlayer";
490 return "transparencymask";
496 return "transformmask";
499 return "selectionmask";
502 return "colorizemask";
511 icon = d->node->icon();
518 if (!d->node)
return false;
519 return d->node->visible();
524 if (!d->node || !d->node->isAnimated())
return false;
526 KisRasterKeyframeChannel *rkc =
dynamic_cast<KisRasterKeyframeChannel*
>(d->node->getKeyframeChannel(KisKeyframeChannel::Raster.
id()));
527 if (!rkc)
return false;
529 KisKeyframeSP currentKeyframe = rkc->keyframeAt(frameNumber);
531 if (!currentKeyframe) {
540 if (!d->node)
return;
549 if (!d->node)
return ba;
551 KisPaintDeviceSP dev = d->node->paintDevice();
554 ba.
resize(w * h * dev->pixelSize());
555 dev->readBytes(
reinterpret_cast<quint8*
>(ba.
data()), x, y, w, h);
563 if (!d->node || !d->node->isAnimated())
return ba;
566 KisRasterKeyframeChannel *rkc =
dynamic_cast<KisRasterKeyframeChannel*
>(d->node->getKeyframeChannel(KisKeyframeChannel::Raster.
id()));
568 KisRasterKeyframeSP frame = rkc->keyframeAt<KisRasterKeyframe>(time);
569 if (!frame)
return ba;
570 KisPaintDeviceSP dev =
new KisPaintDevice(*d->node->paintDevice(), KritaUtils::DeviceCopyMode::CopySnapshot);
573 frame->writeFrameToDevice(dev);
575 ba.
resize(w * h * dev->pixelSize());
576 dev->readBytes(
reinterpret_cast<quint8*
>(ba.
data()), x, y, w, h);
585 if (!d->node)
return ba;
587 KisPaintDeviceSP dev;
590 dev = mask->coloringProjection();
592 dev = d->node->projection();
596 ba.
resize(w * h * dev->pixelSize());
597 dev->readBytes(
reinterpret_cast<quint8*
>(ba.
data()), x, y, w, h);
603 if (!d->node)
return false;
604 KisPaintDeviceSP dev = d->node->paintDevice();
605 if (!dev)
return false;
606 if (value.
length() < w * h * (
int)dev->colorSpace()->pixelSize()) {
607 qWarning() <<
"Node::setPixelData: not enough data to write to the paint device";
610 dev->writeBytes((
const quint8*)value.
constData(), x, y, w, h);
616 if (!d->node)
return QRect();
617 return d->node->exactBounds();
622 if (!d->node)
return;
629 if (!d->node)
return QPoint();
630 return QPoint(d->node->x(), d->node->y());
635 if (!d->node)
return false;
636 if (!d->node->parent())
return false;
638 KUndo2Command *cmd =
new KisImageLayerRemoveCommand(d->image, d->node);
640 KisProcessingApplicator::runSingleCommandStroke(d->image, cmd);
641 d->image->waitForDone();
648 if (!d->node)
return 0;
649 return Node::createNode(d->image, d->node->clone());
654 if (!d->node)
return false;
655 if (filename.
isEmpty())
return false;
657 KisPaintDeviceSP projection = d->node->projection();
660 QString mimeType = KisMimeDatabase::mimeTypeForFile(filename,
false);
663 KisImageSP dst =
new KisImage(doc->createUndoStore(),
666 projection->compositionSourceColorSpace(),
668 dst->setResolution(xRes, yRes);
670 doc->setCurrentImage(dst);
671 KisPaintLayer* paintLayer =
new KisPaintLayer(dst,
"paint device", d->node->opacity());
672 paintLayer->paintDevice()->makeCloneFrom(projection,
bounds);
673 dst->addNode(paintLayer, dst->rootLayer(), KisLayerSP(0));
675 dst->initialRefreshGraph();
677 bool r = doc->exportDocumentSync(filename, mimeType.
toLatin1(), exportConfiguration.configuration());
679 qWarning() << doc->errorMessage();
686 if (!d->node)
return 0;
688 if (!d->node->prevSibling())
return 0;
690 d->image->mergeDown(
qobject_cast<KisLayer*>(d->node.data()), KisMetaData::MergeStrategyRegistry::instance()->get(
"Drop"));
691 d->image->waitForDone();
693 return Node::createNode(d->image, d->node->prevSibling());
698 if (!d->node)
return;
700 if (!d->node->parent())
return;
702 KisFilterStrategy *actualStrategy = KisFilterStrategyRegistry::instance()->get(strategy);
703 if (!actualStrategy) actualStrategy = KisFilterStrategyRegistry::instance()->get(
"Bicubic");
707 d->image->scaleNode(d->node,
712 d->image->waitForDone();
717 if (!d->node)
return;
719 if (!d->node->parent())
return;
721 d->image->rotateNode(d->node, radians, 0);
722 d->image->waitForDone();
727 if (!d->node)
return;
729 if (!d->node->parent())
return;
732 d->image->cropNode(d->node, rect);
733 d->image->waitForDone();
738 if (!d->node)
return;
740 if (!d->node->parent())
return;
742 d->image->shearNode(d->node, angleX, angleY, 0);
743 d->image->waitForDone();
748 if (!d->node)
return QImage();
749 return d->node->createThumbnail(w, h);
754 if (!d->node)
return QString();
760 KisPSDLayerStyleSP layerStyle = layer->layerStyle();
762 if (!layerStyle)
return QString();
764 KisAslLayerStyleSerializer serializer;
768 return serializer.formPsdXmlDocument().toString();
773 if (!d->node)
return false;
777 if (!layer)
return false;
782 qWarning() <<
"ASL string format is invalid!";
786 KisAslLayerStyleSerializer serializer;
788 serializer.registerPSDPattern(aslDoc);
789 serializer.readFromPSDXML(aslDoc);
791 if (serializer.styles().size() != 1)
return false;
793 KisPSDLayerStyleSP newStyle = serializer.styles().first();
794 KUndo2Command *cmd =
new KisSetLayerStyleCommand(layer, layer->layerStyle(), newStyle);
796 KisProcessingApplicator::runSingleCommandStroke(d->image, cmd);
797 d->image->waitForDone();
804 if (!d->node)
return -1;
805 if (!d->node->parent())
return -1;
807 return d->node->parent()->index(d->node);
812 if (!d->node)
return QUuid();
813 return d->node->uuid();
816KisPaintDeviceSP Node::paintDevice()
const
818 return d->node->paintDevice();
821KisImageSP Node::image()
const
826KisNodeSP Node::node()
const
834 KisMainWindow *mainWindow = KisPart::instance()->currentMainwindow();
835 KisCanvas2 *canvas = mainWindow->activeView()->canvasBase();
836 if (canvas->resourceManager()->resource(KoCanvasResource::CurrentPaintOpPreset).isNull()) {
837 return "UNPAINTABLE";
841 return "UNPAINTABLE";
844 if (d->node->inherits(
"KisShapeLayer")) {
847 if (d->node->inherits(
"KisCloneLayer")) {
850 if (d->node->paintDevice()) {
852 KisPaintOpPresetSP currentPaintOpPreset = canvas->resourceManager()->resource(KoCanvasResource::CurrentPaintOpPreset).value<KisPaintOpPresetSP>();
853 if (currentPaintOpPreset->paintOp().id() ==
"mypaintbrush") {
854 const KoColorSpace *colorSpace = d->node->paintDevice()->colorSpace();
855 if (colorSpace->colorModelId() != RGBAColorModelID) {
856 return "MYPAINTBRUSH_UNPAINTABLE";
863 return "UNPAINTABLE";
869 dbgScript <<
"Script attempted to use Node::paintLine() on an unpaintable node, ignoring.";
873 KisPaintInformation pointOneInfo;
874 pointOneInfo.setPressure(pressureOne);
875 pointOneInfo.setPos(pointOne);
877 KisPaintInformation pointTwoInfo;
878 pointTwoInfo.setPressure(pressureTwo);
879 pointTwoInfo.setPos(pointTwo);
881 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, strokeStyle);
882 helper.paintLine(pointOneInfo, pointTwoInfo);
889 dbgScript <<
"Script attempted to use Node::paintRectangle() on an unpaintable node, ignoring.";
896 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, strokeStyle, fillStyle);
897 helper.paintRect(rect);
904 dbgScript <<
"Script attempted to use Node::paintPolygon() on an unpaintable node, ignoring.";
910 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, strokeStyle, fillStyle);
911 helper.paintPolygon(points);
918 dbgScript <<
"Script attempted to use Node::paintEllipse() on an unpaintable node, ignoring.";
922 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, strokeStyle, fillStyle);
923 helper.paintEllipse(rect);
930 dbgScript <<
"Script attempted to use Node::paintPath() on an unpaintable node, ignoring.";
934 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, strokeStyle, fillStyle);
935 helper.paintPainterPath(path);
A Channel represents a single channel in a Node.
The CloneLayer class A clone layer is a layer that takes a reference inside the image and shows the e...
The ColorizeMask class A colorize mask is a mask type node that can be used to color in line art.
The FileLayer class A file layer is a layer that can reference an external image and show said refere...
The FillLayer class A fill layer is much like a filter layer in that it takes a name and filter.
The FilterLayer class A filter layer will, when compositing, take the composited image up to the poin...
The FilterMask class A filter mask, unlike a filter layer, will add a non-destructive filter to the c...
The GroupLayer class A group layer is a layer that can contain other layers.
InfoObject wrap a properties map.
static Krita * instance()
instance retrieve the singleton instance of the Application object.
Node represents a layer or mask in a Krita image's Node hierarchy.
bool alphaLocked() const
alphaLocked checks whether the node is a paint layer and returns whether it is alpha locked
void setBlendingMode(QString value)
setBlendingMode set the blending mode of the node to the given value
QList< Node * > childNodes() const
childNodes
void scaleNode(QPointF origin, int width, int height, QString strategy)
scaleNode
void setAlphaLocked(bool value)
setAlphaLocked set the layer to value if the node is paint layer.
void paintPolygon(const QList< QPointF > points, const QString strokeStyle=PaintingResources::defaultStrokeStyle, const QString fillStyle=PaintingResources::defaultFillStyle)
paint a polygon on the canvas.
Node * mergeDown()
mergeDown merges the given node with the first visible node underneath this node in the layerstack.
void setCollapsed(bool collapsed)
Sets the state of the node to the value of.
QList< Channel * > channels() const
channels creates a list of Channel objects that can be used individually to show or hide certain chan...
QList< Node * > findChildNodes(const QString &name=QString(), bool recursive=false, bool partialMatch=false, const QString &type=QString(), int colorLabelIndex=0) const
findChildNodes
void enableAnimation() const
enableAnimation make the current layer animated, so it can have frames.
QString colorDepth() const
colorDepth A string describing the color depth of the image:
void setOpacity(int value)
set the opacity of the Node to the given value.
bool locked() const
locked checks whether the Node is locked.
QUuid uniqueId() const
uniqueId uniqueId of the node
QPoint position() const
position returns the position of the paint device of this node.
void setPinnedToTimeline(bool pinned) const
Sets whether or not node should be pinned to the Timeline Docker, regardless of selection activity.
void move(int x, int y)
move the pixels to the given x, y location in the image coordinate space.
void setChildNodes(QList< Node * > nodes)
setChildNodes this replaces the existing set of child nodes with the new set.
void paintEllipse(const QRectF &rect, const QString strokeStyle=PaintingResources::defaultStrokeStyle, const QString fillStyle=PaintingResources::defaultFillStyle)
paint an ellipse on the canvas.
bool visible() const
Check whether the current Node is visible in the layer stack.
QString colorModel() const
colorModel retrieve the current color model of this document:
void paintLine(const QPointF pointOne, const QPointF pointTwo, double pressureOne=1.0, double pressureTwo=1.0, const QString strokeStyle=PaintingResources::defaultStrokeStyle)
paint a line on the canvas.
bool hasKeyframeAtTime(int frameNumber)
Check to see if frame number on layer is a keyframe.
void shearNode(double angleX, double angleY)
shearNode perform a shear operation on this node.
bool setPixelData(QByteArray value, int x, int y, int w, int h)
setPixelData writes the given bytes, of which there must be enough, into the Node,...
bool setColorSpace(const QString &colorModel, const QString &colorDepth, const QString &colorProfile)
setColorSpace convert the node to the given colorspace
virtual QString type() const
type Krita has several types of nodes, split in layers and masks.
void paintRectangle(const QRectF &rect, const QString strokeStyle=PaintingResources::defaultStrokeStyle, const QString fillStyle=PaintingResources::defaultFillStyle)
paint a rectangle on the canvas.
void setLocked(bool value)
set the Locked flag to the give value
bool animated() const
Krita layers can be animated, i.e., have frames.
bool remove()
remove removes this node from its parent image.
bool inheritAlpha() const
inheritAlpha checks whether this node has the inherits alpha flag set
QByteArray pixelData(int x, int y, int w, int h) const
pixelData reads the given rectangle from the Node's paintable pixels, if those exist,...
void setName(QString name)
rename the Node to the given name
bool save(const QString &filename, double xRes, double yRes, const InfoObject &exportConfiguration, const QRect &exportRect=QRect())
save exports the given node with this filename.
void cropNode(int x, int y, int w, int h)
cropNode crop this layer.
QString paintAbility()
paintAbility can be used to determine whether this node can be painted on with the current brush pres...
void rotateNode(double radians)
rotateNode rotate this layer by the given radians.
int index() const
index the index of the node inside the parent
int opacity() const
return the opacity of the Node.
bool collapsed() const
returns the collapsed state of this node
bool setLayerStyleFromAsl(const QString &asl)
setLayerStyleFromAsl set a new layer style for this node.
int colorLabel() const
Sets a color label index associated to the layer.
QString blendingMode() const
QString layerStyleToAsl()
layerStyleToAsl retrieve the current layer's style in ASL format.
bool setColorProfile(const QString &colorProfile)
setColorProfile set the color profile of the image to the given profile.
bool addChildNode(Node *child, Node *above)
addChildNode adds the given node in the list of children.
QImage thumbnail(int w, int h)
thumbnail create a thumbnail of the given dimensions.
void paintPath(const QPainterPath &path, const QString strokeStyle=PaintingResources::defaultStrokeStyle, const QString fillStyle=PaintingResources::defaultFillStyle)
paint a custom path on the canvas.
bool hasExtents()
does the node have any content in it?
Node * duplicate()
duplicate returns a full copy of the current node.
void setInheritAlpha(bool value)
set the Inherit Alpha flag to the given value
bool removeChildNode(Node *child)
removeChildNode removes the given node from the list of children.
Node * parentNode() const
return the Node that is the parent of the current Node, or 0 if this is the root Node.
void setVisible(bool visible)
Set the visibility of the current node to.
QByteArray projectionPixelData(int x, int y, int w, int h) const
projectionPixelData reads the given rectangle from the Node's projection (that is,...
void setColorLabel(int index)
setColorLabel sets a color label index associated to the layer.
Node * clone() const
clone clone the current node.
QByteArray pixelDataAtTime(int x, int y, int w, int h, int time) const
pixelDataAtTime a basic function to get pixeldata from an animated node at a given time.
bool isPinnedToTimeline() const
QRect bounds() const
bounds return the exact bounds of the node's paint device
QString colorProfile() const
The SelectionMask class A selection mask is a mask type node that can be used to store selections.
The TransparencyMask class A transparency mask is a mask type node that can be used to show and hide ...
The VectorLayer class A vector layer is a special layer that stores and shows vector shapes.
const char * constData() const const
qsizetype length() const const
void resize(qsizetype newSize, char c)
ParseResult setContent(QAnyStringView text, ParseOptions options)
QList< T > fromList(const QList< T > &list)
QObject * parent() const const
T qobject_cast(QObject *object)
bool isEmpty() const const
bool isEmpty() const const
QByteArray toLatin1() const const