MessageComposer::AttachmentControllerBase Class
The AttachmentControllerBase class. More...
| Header: | #include <MessageComposer/AttachmentControllerBase> |
| CMake: | find_package(KPim6MessageComposer REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::MessageComposer) |
| Inherits: | QObject |
Public Functions
| AttachmentControllerBase(MessageComposer::AttachmentModel *model, QWidget *wParent, KActionCollection *actionCollection) | |
| virtual | ~AttachmentControllerBase() override |
| bool | attachOwnVcard() const |
| void | createActions() |
| void | setAttachOwnVcard(bool attachVcard) |
| void | setIdentityHasOwnVcard(bool state) |
| void | setSelectedParts(const MessageCore::AttachmentPart::List &selectedParts) |
Public Slots
| void | addAttachment(const MessageCore::AttachmentPart::Ptr &part) |
| void | addAttachment(const QUrl &url) |
| void | addAttachmentUrlSync(const QUrl &url) |
| void | addAttachments(const QList<QUrl> &urls) |
| virtual void | attachMyPublicKey() |
| void | attachmentProperties(const MessageCore::AttachmentPart::Ptr &part) |
| void | compressAttachment(const MessageCore::AttachmentPart::Ptr &part, bool compress) |
| void | editAttachment(MessageCore::AttachmentPart::Ptr part, MessageComposer::EditorWatcher::OpenWithOption option = MessageComposer::EditorWatcher::NoOpenWithDialog) |
| void | editAttachmentWith(const MessageCore::AttachmentPart::Ptr &part) |
| void | openAttachment(const MessageCore::AttachmentPart::Ptr &part) |
| void | saveAttachmentAs(const MessageCore::AttachmentPart::Ptr &part) |
| void | setEncryptEnabled(bool enabled) |
| void | setSignEnabled(bool enabled) |
| void | showAddAttachmentCompressedDirectoryDialog() |
| void | showAddAttachmentFileDialog() |
| void | showAttachClipBoard() |
| void | showAttachPublicKeyDialog() |
| void | showAttachVcard() |
| void | showContextMenu() |
| void | viewAttachment(const MessageCore::AttachmentPart::Ptr &part) |
Signals
| void | actionsCreated() |
| void | addOwnVcard(bool) |
| void | fileAttached() |
| void | refreshSelection() |
| void | selectedAllAttachment() |
| void | showAttachment(const std::shared_ptr<KMime::Content> &content, const QByteArray &charset) |
Detailed Description
Member Function Documentation
AttachmentControllerBase::AttachmentControllerBase(MessageComposer::AttachmentModel *model, QWidget *wParent, KActionCollection *actionCollection)
Constructs an AttachmentControllerBase. model The attachment model to use. wParent The parent widget. actionCollection The action collection for menu actions.
[override virtual noexcept] AttachmentControllerBase::~AttachmentControllerBase()
Destroys the AttachmentControllerBase.
[signal] void AttachmentControllerBase::actionsCreated()
Emitted when the attachment actions have been created.
[slot] void AttachmentControllerBase::addAttachment(const MessageCore::AttachmentPart::Ptr &part)
Note: This slot is overloaded. To connect to this slot:
// Connect using qOverload:
connect(sender, &SenderClass::signal,
attachmentControllerBase, qOverload(&AttachmentControllerBase::addAttachment));
// Or using a lambda as wrapper:
connect(sender, &SenderClass::signal,
attachmentControllerBase, [receiver = attachmentControllerBase](const MessageCore::AttachmentPart::Ptr &part) { receiver->addAttachment(part); });
For more examples and approaches, see connecting to overloaded slots.
[slot] void AttachmentControllerBase::addAttachment(const QUrl &url)
Note: This slot is overloaded. To connect to this slot:
// Connect using qOverload:
connect(sender, &SenderClass::signal,
attachmentControllerBase, qOverload(&AttachmentControllerBase::addAttachment));
// Or using a lambda as wrapper:
connect(sender, &SenderClass::signal,
attachmentControllerBase, [receiver = attachmentControllerBase](const QUrl &url) { receiver->addAttachment(url); });
For more examples and approaches, see connecting to overloaded slots.
[slot] void AttachmentControllerBase::addAttachmentUrlSync(const QUrl &url)
[slot] void AttachmentControllerBase::addAttachments(const QList<QUrl> &urls)
[signal] void AttachmentControllerBase::addOwnVcard(bool)
Emitted when the user's vcard should be added. attach True if the vcard should be added.
[virtual slot] void AttachmentControllerBase::attachMyPublicKey()
bool AttachmentControllerBase::attachOwnVcard() const
Returns whether the user's own vcard is attached.
See also setAttachOwnVcard().
[slot] void AttachmentControllerBase::attachmentProperties(const MessageCore::AttachmentPart::Ptr &part)
[slot] void AttachmentControllerBase::compressAttachment(const MessageCore::AttachmentPart::Ptr &part, bool compress)
void AttachmentControllerBase::createActions()
Creates and initializes the attachment-related actions.
[slot] void AttachmentControllerBase::editAttachment(MessageCore::AttachmentPart::Ptr part, MessageComposer::EditorWatcher::OpenWithOption option = MessageComposer::EditorWatcher::NoOpenWithDialog)
[slot] void AttachmentControllerBase::editAttachmentWith(const MessageCore::AttachmentPart::Ptr &part)
[signal] void AttachmentControllerBase::fileAttached()
Emitted when a file has been attached.
[slot] void AttachmentControllerBase::openAttachment(const MessageCore::AttachmentPart::Ptr &part)
[signal] void AttachmentControllerBase::refreshSelection()
Emitted when the selection needs to be refreshed.
[slot] void AttachmentControllerBase::saveAttachmentAs(const MessageCore::AttachmentPart::Ptr &part)
[signal] void AttachmentControllerBase::selectedAllAttachment()
Emitted when all attachments are selected.
void AttachmentControllerBase::setAttachOwnVcard(bool attachVcard)
Enables or disables attaching the user's own vcard. attachVcard True to attach the user's vcard.
See also attachOwnVcard().
[slot] void AttachmentControllerBase::setEncryptEnabled(bool enabled)
void AttachmentControllerBase::setIdentityHasOwnVcard(bool state)
Sets whether the current identity has its own vcard. state True if the identity has a vcard.
void AttachmentControllerBase::setSelectedParts(const MessageCore::AttachmentPart::List &selectedParts)
Sets the list of currently selected attachment parts. selectedParts The list of selected parts.
[slot] void AttachmentControllerBase::setSignEnabled(bool enabled)
[slot] void AttachmentControllerBase::showAddAttachmentCompressedDirectoryDialog()
[slot] void AttachmentControllerBase::showAddAttachmentFileDialog()
[slot] void AttachmentControllerBase::showAttachClipBoard()
[slot] void AttachmentControllerBase::showAttachPublicKeyDialog()
[slot] void AttachmentControllerBase::showAttachVcard()
[signal] void AttachmentControllerBase::showAttachment(const std::shared_ptr<KMime::Content> &content, const QByteArray &charset)
Emitted when an attachment should be displayed. content The MIME content to display. charset The character set of the content.