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"
74#include <brushengine/kis_paintop_preset.h>
83Node::Node(KisImageSP image, KisNodeSP node,
QObject *parent)
91Node *Node::createNode(KisImageSP image, KisNodeSP node,
QObject *parent)
96 if (node->inherits(
"KisGroupLayer")) {
97 return new GroupLayer(
dynamic_cast<KisGroupLayer*
>(node.data()));
99 else if (node->inherits(
"KisCloneLayer")) {
100 return new CloneLayer(
dynamic_cast<KisCloneLayer*
>(node.data()));
102 else if (node->inherits(
"KisFileLayer")) {
103 return new FileLayer(
dynamic_cast<KisFileLayer*
>(node.data()));
105 else if (node->inherits(
"KisAdjustmentLayer")) {
106 return new FilterLayer(
dynamic_cast<KisAdjustmentLayer*
>(node.data()));
108 else if (node->inherits(
"KisGeneratorLayer")) {
109 return new FillLayer(
dynamic_cast<KisGeneratorLayer*
>(node.data()));
111 else if (node->inherits(
"KisShapeLayer")) {
112 return new VectorLayer(
dynamic_cast<KisShapeLayer*
>(node.data()));
114 else if (node->inherits(
"KisFilterMask")) {
115 return new FilterMask(image,
dynamic_cast<KisFilterMask*
>(node.data()));
117 else if (node->inherits(
"KisSelectionMask")) {
118 return new SelectionMask(image,
dynamic_cast<KisSelectionMask*
>(node.data()));
120 else if (node->inherits(
"KisTransparencyMask")) {
121 return new TransparencyMask(image,
dynamic_cast<KisTransparencyMask*
>(node.data()));
123 else if (node->inherits(
"KisTransformMask")) {
124 return new TransformMask(image,
dynamic_cast<KisTransformMask*
>(node.data()));
126 else if (node->inherits(
"KisColorizeMask")) {
127 return new ColorizeMask(image,
dynamic_cast<KisColorizeMask*
>(node.data()));
139bool Node::operator==(
const Node &other)
const
141 return (d->node == other.d->node
142 && d->image == other.d->image);
145bool Node::operator!=(
const Node &other)
const
147 return !(operator==(other));
152 KisNodeSP
clone = d->node->clone();
160 if (!d->node)
return false;
163 return paintLayer->alphaLocked();
170 if (!d->node)
return;
173 paintLayer->setAlphaLocked(value);
180 if (!d->node)
return QString();
182 return d->node->compositeOpId();
187 if (!d->node)
return;
189 KUndo2Command *cmd =
new KisNodeCompositeOpCommand(d->node,
192 KisProcessingApplicator::runSingleCommandStroke(d->image, cmd);
193 d->image->waitForDone();
202 if (!d->node->inherits(
"KisLayer"))
return channels;
204 Q_FOREACH(KoChannelInfo *info, d->node->colorSpace()->channels()) {
216 KisNodeList nodeList;
217 int childCount = d->node->childCount();
218 for (
int i = 0; i < childCount; ++i) {
219 nodeList << d->node->at(i);
221 nodes = LibKisUtils::createNodeList(nodeList, d->image);
228 if (!d->node)
return {};
231 KisNodeList nodeList = KisLayerUtils::findNodesByName(d->node,
name, recursive, partialMatch);
234 for (
int i = nodeList.size() - 1; i >= 0; i--) {
249 nodeList.removeAt(i);
254 if (colorLabelIndex > 0) {
255 for (
int i = nodeList.size() - 1; i >= 0; i--) {
256 if (nodeList.at(i)->colorLabelIndex() != colorLabelIndex) {
257 nodeList.removeAt(i);
262 return LibKisUtils::createNodeList(nodeList, d->image);
267 if (!d->node)
return false;
269 KUndo2Command *cmd = 0;
272 cmd =
new KisImageLayerAddCommand(d->image, child->node(), d->node, above->node());
274 cmd =
new KisImageLayerAddCommand(d->image, child->node(), d->node, d->node->childCount());
277 KisProcessingApplicator::runSingleCommandStroke(d->image, cmd);
278 d->image->waitForDone();
285 if (!d->node)
return false;
291 if (!d->node)
return;
292 KisNodeSP node = d->node->firstChild();
294 d->image->removeNode(node);
295 node = node->nextSibling();
297 Q_FOREACH(
Node *node, nodes) {
298 d->image->addNode(node->node(), d->node);
304 if (!d->node)
return 0;
305 return d->node->colorLabelIndex();
310 if (!d->node)
return;
311 d->node->setColorLabelIndex(
index);
316 if (!d->node)
return "";
317 if (!d->node->projection())
return d->node->colorSpace()->colorDepthId().id();
318 return d->node->projection()->colorSpace()->colorDepthId().id();
323 if (!d->node)
return "";
324 if (!d->node->projection())
return d->node->colorSpace()->colorModelId().id();
325 return d->node->projection()->colorSpace()->colorModelId().id();
331 if (!d->node)
return "";
332 if (!d->node->projection())
return d->node->colorSpace()->profile()->name();
333 return d->node->projection()->colorSpace()->profile()->name();
338 if (!d->node)
return false;
339 if (!d->node->inherits(
"KisLayer"))
return false;
341 const KoColorProfile *profile = KoColorSpaceRegistry::instance()->profileByName(
colorProfile);
342 bool result = d->image->assignLayerProfile(layer, profile);
343 d->image->waitForDone();
349 if (!d->node)
return false;
350 if (!d->node->inherits(
"KisLayer"))
return false;
351 const KoColorProfile *profile = KoColorSpaceRegistry::instance()->profileByName(
colorProfile);
352 if (!profile)
return false;
353 const KoColorSpace *dstCs = KoColorSpaceRegistry::instance()->colorSpace(
colorModel,
356 d->image->convertLayerColorSpace(d->node, dstCs, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
357 d->image->waitForDone();
363 if (!d->node)
return false;
364 return d->node->isAnimated();
369 if (!d->node)
return;
370 d->node->enableAnimation();
375 if (!d->node)
return;
376 d->node->setPinnedToTimeline(pinned);
381 if (!d->node)
return false;
382 return d->node->isPinnedToTimeline();
387 if (!d->node)
return false;
388 return d->node->collapsed();
393 if (!d->node)
return;
399 if (!d->node)
return false;
400 if (!d->node->inherits(
"KisLayer"))
return false;
406 if (!d->node)
return;
407 if (!d->node->inherits(
"KisLayer"))
return;
413 if (!d->node)
return false;
414 return d->node->userLocked();
419 if (!d->node)
return;
420 d->node->setUserLocked(value);
425 return !d->node->extent().isEmpty();
430 if (!d->node)
return QString();
431 return d->node->name();
436 if (!d->node)
return;
437 d->node->setName(
name);
443 if (!d->node)
return 0;
444 return d->node->opacity();
449 if (!d->node)
return;
450 if (value < 0) value = 0;
451 if (value > 255) value = 255;
452 d->node->setOpacity(value);
458 if (!d->node)
return 0;
459 if (!d->node->parent())
return 0;
460 return Node::createNode(d->image, d->node->parent());
465 if (!d->node)
return QString();
476 return "filterlayer";
485 return "referenceimageslayer";
488 return "vectorlayer";
491 return "transparencymask";
497 return "transformmask";
500 return "selectionmask";
503 return "colorizemask";
512 icon = d->node->icon();
519 if (!d->node)
return false;
520 return d->node->visible();
525 if (!d->node || !d->node->isAnimated())
return false;
527 KisRasterKeyframeChannel *rkc =
dynamic_cast<KisRasterKeyframeChannel*
>(d->node->getKeyframeChannel(KisKeyframeChannel::Raster.
id()));
528 if (!rkc)
return false;
530 KisKeyframeSP currentKeyframe = rkc->keyframeAt(frameNumber);
532 if (!currentKeyframe) {
541 if (!d->node)
return;
550 if (!d->node)
return ba;
552 KisPaintDeviceSP dev = d->node->paintDevice();
555 ba.
resize(w * h * dev->pixelSize());
556 dev->readBytes(
reinterpret_cast<quint8*
>(ba.
data()), x, y, w, h);
564 if (!d->node || !d->node->isAnimated())
return ba;
567 KisRasterKeyframeChannel *rkc =
dynamic_cast<KisRasterKeyframeChannel*
>(d->node->getKeyframeChannel(KisKeyframeChannel::Raster.
id()));
569 KisRasterKeyframeSP frame = rkc->keyframeAt<KisRasterKeyframe>(time);
570 if (!frame)
return ba;
571 KisPaintDeviceSP dev =
new KisPaintDevice(*d->node->paintDevice(), KritaUtils::DeviceCopyMode::CopySnapshot);
574 frame->writeFrameToDevice(dev);
576 ba.
resize(w * h * dev->pixelSize());
577 dev->readBytes(
reinterpret_cast<quint8*
>(ba.
data()), x, y, w, h);
586 if (!d->node)
return ba;
588 KisPaintDeviceSP dev;
591 dev = mask->coloringProjection();
593 dev = d->node->projection();
597 ba.
resize(w * h * dev->pixelSize());
598 dev->readBytes(
reinterpret_cast<quint8*
>(ba.
data()), x, y, w, h);
604 if (!d->node)
return false;
605 KisPaintDeviceSP dev = d->node->paintDevice();
606 if (!dev)
return false;
607 if (value.
length() < w * h * (
int)dev->colorSpace()->pixelSize()) {
608 qWarning() <<
"Node::setPixelData: not enough data to write to the paint device";
611 dev->writeBytes((
const quint8*)value.
constData(), x, y, w, h);
617 if (!d->node)
return QRect();
618 return d->node->exactBounds();
623 if (!d->node)
return;
630 if (!d->node)
return QPoint();
631 return QPoint(d->node->x(), d->node->y());
636 if (!d->node)
return false;
637 if (!d->node->parent())
return false;
639 KUndo2Command *cmd =
new KisImageLayerRemoveCommand(d->image, d->node);
641 KisProcessingApplicator::runSingleCommandStroke(d->image, cmd);
642 d->image->waitForDone();
649 if (!d->node)
return 0;
650 return Node::createNode(d->image, d->node->clone());
655 if (!d->node)
return false;
656 if (filename.
isEmpty())
return false;
658 KisPaintDeviceSP projection = d->node->projection();
661 QString mimeType = KisMimeDatabase::mimeTypeForFile(filename,
false);
664 KisImageSP dst =
new KisImage(doc->createUndoStore(),
667 projection->compositionSourceColorSpace(),
669 dst->setResolution(xRes, yRes);
671 doc->setCurrentImage(dst);
672 KisPaintLayer* paintLayer =
new KisPaintLayer(dst,
"paint device", d->node->opacity());
673 paintLayer->paintDevice()->makeCloneFrom(projection,
bounds);
674 dst->addNode(paintLayer, dst->rootLayer(), KisLayerSP(0));
676 dst->initialRefreshGraph();
678 bool r = doc->exportDocumentSync(filename, mimeType.
toLatin1(), exportConfiguration.configuration());
680 qWarning() << doc->errorMessage();
687 if (!d->node)
return 0;
689 if (!d->node->prevSibling())
return 0;
691 d->image->mergeDown(
qobject_cast<KisLayer*>(d->node.data()), KisMetaData::MergeStrategyRegistry::instance()->get(
"Drop"));
692 d->image->waitForDone();
694 return Node::createNode(d->image, d->node->prevSibling());
699 if (!d->node)
return;
701 if (!d->node->parent())
return;
703 KisFilterStrategy *actualStrategy = KisFilterStrategyRegistry::instance()->get(strategy);
704 if (!actualStrategy) actualStrategy = KisFilterStrategyRegistry::instance()->get(
"Bicubic");
708 d->image->scaleNode(d->node,
713 d->image->waitForDone();
718 if (!d->node)
return;
720 if (!d->node->parent())
return;
722 d->image->rotateNode(d->node, radians, 0);
723 d->image->waitForDone();
728 if (!d->node)
return;
730 if (!d->node->parent())
return;
733 d->image->cropNode(d->node, rect);
734 d->image->waitForDone();
739 if (!d->node)
return;
741 if (!d->node->parent())
return;
743 d->image->shearNode(d->node, angleX, angleY, 0);
744 d->image->waitForDone();
749 if (!d->node)
return QImage();
750 return d->node->createThumbnail(w, h);
755 if (!d->node)
return QString();
761 KisPSDLayerStyleSP layerStyle = layer->layerStyle();
763 if (!layerStyle)
return QString();
765 KisAslLayerStyleSerializer serializer;
769 return serializer.formPsdXmlDocument().toString();
774 if (!d->node)
return false;
778 if (!layer)
return false;
783 qWarning() <<
"ASL string format is invalid!";
787 KisAslLayerStyleSerializer serializer;
789 serializer.registerPSDPattern(aslDoc);
790 serializer.readFromPSDXML(aslDoc);
792 if (serializer.styles().size() != 1)
return false;
794 KisPSDLayerStyleSP newStyle = serializer.styles().first();
795 KUndo2Command *cmd =
new KisSetLayerStyleCommand(layer, layer->layerStyle(), newStyle);
797 KisProcessingApplicator::runSingleCommandStroke(d->image, cmd);
798 d->image->waitForDone();
805 if (!d->node)
return -1;
806 if (!d->node->parent())
return -1;
808 return d->node->parent()->index(d->node);
813 if (!d->node)
return QUuid();
814 return d->node->uuid();
817KisPaintDeviceSP Node::paintDevice()
const
819 return d->node->paintDevice();
822KisImageSP Node::image()
const
827KisNodeSP Node::node()
const
835 KisMainWindow *mainWindow = KisPart::instance()->currentMainwindow();
836 KisCanvas2 *canvas = mainWindow->activeView()->canvasBase();
837 if (canvas->resourceManager()->resource(KoCanvasResource::CurrentPaintOpPreset).isNull()) {
838 return "UNPAINTABLE";
842 return "UNPAINTABLE";
845 if (d->node->inherits(
"KisShapeLayer")) {
848 if (d->node->inherits(
"KisCloneLayer")) {
851 if (d->node->paintDevice()) {
853 KisPaintOpPresetSP currentPaintOpPreset = canvas->resourceManager()->resource(KoCanvasResource::CurrentPaintOpPreset).value<KisPaintOpPresetSP>();
854 if (currentPaintOpPreset->paintOp().id() ==
"mypaintbrush") {
855 const KoColorSpace *colorSpace = d->node->paintDevice()->colorSpace();
856 if (colorSpace->colorModelId() != RGBAColorModelID) {
857 return "MYPAINTBRUSH_UNPAINTABLE";
864 return "UNPAINTABLE";
870 dbgScript <<
"Script attempted to use Node::paintLine() on an unpaintable node, ignoring.";
874 KisPaintInformation pointOneInfo;
875 pointOneInfo.setPressure(pressureOne);
876 pointOneInfo.setPos(pointOne);
878 KisPaintInformation pointTwoInfo;
879 pointTwoInfo.setPressure(pressureTwo);
880 pointTwoInfo.setPos(pointTwo);
882 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, strokeStyle);
883 helper.paintLine(pointOneInfo, pointTwoInfo);
890 dbgScript <<
"Script attempted to use Node::paintRectangle() on an unpaintable node, ignoring.";
897 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, strokeStyle, fillStyle);
898 helper.paintRect(rect);
905 dbgScript <<
"Script attempted to use Node::paintPolygon() on an unpaintable node, ignoring.";
911 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, strokeStyle, fillStyle);
912 helper.paintPolygon(points);
919 dbgScript <<
"Script attempted to use Node::paintEllipse() on an unpaintable node, ignoring.";
923 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, strokeStyle, fillStyle);
924 helper.paintEllipse(rect);
931 dbgScript <<
"Script attempted to use Node::paintPath() on an unpaintable node, ignoring.";
935 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, strokeStyle, fillStyle);
936 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