TextAutoGenerateText::TextAutoGenerateAttachment Class

class TextAutoGenerateText::TextAutoGenerateAttachment

The TextAutoGenerateAttachment class Author: Laurent Montel <montel@kde.org>. More...

Header: #include <TextAutoGenerateText/TextAutoGenerateAttachment>

Public Functions

TextAutoGenerateAttachment()
~TextAutoGenerateAttachment()
QByteArray attachmentId() const
TextAutoGenerateText::TextAutoGenerateAttachment::AttachmentType attachmentType() const
QByteArray content() const
bool isValid() const
QByteArray mimeType() const
QString name() const
void setAttachmentId(const QByteArray &newAttachmentId)
void setAttachmentType(TextAutoGenerateText::TextAutoGenerateAttachment::AttachmentType newAttachmentType)
void setContent(const QByteArray &b)
void setMimeType(const QByteArray &newMimeType)
void setName(const QString &newName)
void setShowAttachment(bool newShowAttachment)
bool showAttachment() const
bool operator==(const TextAutoGenerateText::TextAutoGenerateAttachment &other) const

Static Public Members

TextAutoGenerateText::TextAutoGenerateAttachment deserialize(const QJsonObject &o)
QJsonObject serialize(const TextAutoGenerateText::TextAutoGenerateAttachment &attachment)

Detailed Description

Member Function Documentation

TextAutoGenerateAttachment::TextAutoGenerateAttachment()

Constructs a new TextAutoGenerateAttachment object.

[noexcept] TextAutoGenerateAttachment::~TextAutoGenerateAttachment()

Destroys the TextAutoGenerateAttachment object.

QByteArray TextAutoGenerateAttachment::attachmentId() const

Returns the unique identifier of the attachment. Returns The attachment ID as a QByteArray

See also setAttachmentId().

TextAutoGenerateText::TextAutoGenerateAttachment::AttachmentType TextAutoGenerateAttachment::attachmentType() const

Returns the type of the attachment. Returns The AttachmentType enum value

See also setAttachmentType().

QByteArray TextAutoGenerateAttachment::content() const

Returns the content of the attachment. Returns The attachment content as a QByteArray

See also setContent().

[static] TextAutoGenerateText::TextAutoGenerateAttachment TextAutoGenerateAttachment::deserialize(const QJsonObject &o)

Deserializes a TextAutoGenerateAttachment object from JSON. o The JSON object to deserialize from Returns The deserialized TextAutoGenerateAttachment

bool TextAutoGenerateAttachment::isValid() const

Returns whether the attachment is valid. Returns true if the attachment is valid, false otherwise

QByteArray TextAutoGenerateAttachment::mimeType() const

Returns the MIME type of the attachment. Returns The MIME type as a QByteArray

See also setMimeType().

QString TextAutoGenerateAttachment::name() const

Returns the name of the attachment. Returns The attachment name as a QString

See also setName().

[static] QJsonObject TextAutoGenerateAttachment::serialize(const TextAutoGenerateText::TextAutoGenerateAttachment &attachment)

Serializes the given TextAutoGenerateAttachment object. attachment The TextAutoGenerateAttachment to serialize Returns The serialized data as a QJsonObject

void TextAutoGenerateAttachment::setAttachmentId(const QByteArray &newAttachmentId)

Sets the unique identifier of the attachment. newAttachmentId The ID to set

See also attachmentId().

void TextAutoGenerateAttachment::setAttachmentType(TextAutoGenerateText::TextAutoGenerateAttachment::AttachmentType newAttachmentType)

Sets the type of the attachment. newAttachmentType The attachment type to set

See also attachmentType().

void TextAutoGenerateAttachment::setContent(const QByteArray &b)

Sets the content of the attachment. b The content to set

See also content().

void TextAutoGenerateAttachment::setMimeType(const QByteArray &newMimeType)

Sets the MIME type of the attachment. newMimeType The MIME type to set

See also mimeType().

void TextAutoGenerateAttachment::setName(const QString &newName)

Sets the name of the attachment. newName The name to set

See also name().

void TextAutoGenerateAttachment::setShowAttachment(bool newShowAttachment)

Sets whether the attachment should be shown. newShowAttachment true to show the attachment, false to hide

See also showAttachment().

bool TextAutoGenerateAttachment::showAttachment() const

Returns whether the attachment should be shown. Returns true if the attachment should be shown, false otherwise

See also setShowAttachment().

bool TextAutoGenerateAttachment::operator==(const TextAutoGenerateText::TextAutoGenerateAttachment &other) const

Compares this TextAutoGenerateAttachment with another for equality. other The TextAutoGenerateAttachment to compare with Returns true if both attachments are equal, false otherwise