MessageComposer::ComposerJob Class
| Header: | #include <MessageComposer/ComposerJob> |
| CMake: | find_package(KPim6MessageComposer REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::MessageComposer) |
| Inherits: | MessageComposer::JobBase |
Public Functions
| ComposerJob(QObject *parent = nullptr) | |
| virtual | ~ComposerJob() override |
| void | addAttachmentPart(MessageCore::AttachmentPart::Ptr part, bool autoresizeImage = false) |
| void | addAttachmentParts(const MessageCore::AttachmentPart::List &parts, bool autoresizeImage = false) |
| MessageCore::AttachmentPart::List | attachmentParts() const |
| bool | autoSave() const |
| void | clearItipPart() |
| void | clearTextPart() |
| bool | finished() const |
| MessageComposer::GlobalPart * | globalPart() const |
| QString | gnupgHome() const |
| MessageComposer::InfoPart * | infoPart() const |
| MessageComposer::ItipPart * | itipPart() const |
| void | removeAttachmentPart(MessageCore::AttachmentPart::Ptr part) |
| QList<std::shared_ptr<KMime::Message>> | resultMessages() const |
| void | setAutocryptEnabled(bool autocryptEnabled) |
| void | setCryptoMessageFormat(Kleo::CryptoMessageFormat format) |
| void | setEncryptionKeys(const QList<std::pair<QStringList, std::vector<GpgME::Key>>> &data) |
| void | setGnupgHome(const QString &path) |
| void | setNoCrypto(bool noCrypto) |
| void | setSenderEncryptionKey(const GpgME::Key &senderKey) |
| void | setSignAndEncrypt(const bool doSign, const bool doEncrypt) |
| void | setSigningKeys(const std::vector<GpgME::Key> &signers) |
| MessageComposer::TextPart * | textPart() const |
Public Slots
| virtual void | start() override |
Protected Slots
| virtual void | slotResult(KJob *job) override |
Detailed Description
The Composer job.
Member Function Documentation
[explicit] ComposerJob::ComposerJob(QObject *parent = nullptr)
Constructs a ComposerJob. parent The parent object.
[override virtual noexcept] ComposerJob::~ComposerJob()
Destroys the ComposerJob.
void ComposerJob::addAttachmentPart(MessageCore::AttachmentPart::Ptr part, bool autoresizeImage = false)
Adds an attachment part to the message. part The attachment part to add. autoresizeImage Whether to automatically resize the image.
void ComposerJob::addAttachmentParts(const MessageCore::AttachmentPart::List &parts, bool autoresizeImage = false)
Adds multiple attachment parts to the message. parts The list of attachment parts to add. autoresizeImage Whether to automatically resize images.
MessageCore::AttachmentPart::List ComposerJob::attachmentParts() const
Returns the list of attachment parts.
bool ComposerJob::autoSave() const
Returns whether this message is being auto-saved.
void ComposerJob::clearItipPart()
Clears the iCalendar invitation part.
void ComposerJob::clearTextPart()
Clears the text part content.
bool ComposerJob::finished() const
Returns whether the job has finished composing the message.
MessageComposer::GlobalPart *ComposerJob::globalPart() const
Returns the global part containing global message settings.
QString ComposerJob::gnupgHome() const
Returns the GnuPG home directory path.
See also setGnupgHome().
MessageComposer::InfoPart *ComposerJob::infoPart() const
Returns the info part containing header information.
MessageComposer::ItipPart *ComposerJob::itipPart() const
Returns the iCalendar invitation part.
void ComposerJob::removeAttachmentPart(MessageCore::AttachmentPart::Ptr part)
Removes an attachment part from the message. part The attachment part to remove.
QList<std::shared_ptr<KMime::Message>> ComposerJob::resultMessages() const
Returns the list of composed MIME messages.
void ComposerJob::setAutocryptEnabled(bool autocryptEnabled)
Enables or disables Autocrypt support for this message. autocryptEnabled True to enable Autocrypt.
void ComposerJob::setCryptoMessageFormat(Kleo::CryptoMessageFormat format)
Sets the cryptographic message format to use. format The message format (e.g., OpenPGP, S/MIME).
void ComposerJob::setEncryptionKeys(const QList<std::pair<QStringList, std::vector<GpgME::Key>>> &data)
Sets the keys to use for encrypting the message. data List of recipient key lists.
void ComposerJob::setGnupgHome(const QString &path)
Sets the GnuPG home directory to use. path The path to the GnuPG home directory.
See also gnupgHome().
void ComposerJob::setNoCrypto(bool noCrypto)
Sets whether to skip encryption and signing for this message. noCrypto True to disable cryptography.
void ComposerJob::setSenderEncryptionKey(const GpgME::Key &senderKey)
Sets the sender's encryption key for Autocrypt. senderKey The sender's OpenPGP key.
void ComposerJob::setSignAndEncrypt(const bool doSign, const bool doEncrypt)
Sets whether the message should be signed and/or encrypted. doSign True to sign the message. doEncrypt True to encrypt the message.
void ComposerJob::setSigningKeys(const std::vector<GpgME::Key> &signers)
Sets the keys to use for signing the message. signers The list of keys to sign with.
[override virtual protected slot] void ComposerJob::slotResult(KJob *job)
Called when a sub-job has finished. job The finished job.
[override virtual slot] void ComposerJob::start()
Starts the composer job asynchronously.
MessageComposer::TextPart *ComposerJob::textPart() const
Returns the text part containing message body.