MessageComposer::ComposerViewBase

Search for usage in LXR

MessageComposer::ComposerViewBase Class Reference

#include <composerviewbase.h>

Inheritance diagram for MessageComposer::ComposerViewBase:

Public Types

enum  Confirmation { LetUserConfirm , NoConfirmationNeeded }
 
enum  FailedType { Sending , AutoSave }
 
enum  MissingAttachment { NoMissingAttachmentFound , FoundMissingAttachmentAndSending , FoundMissingAttachmentAndAddedAttachment , FoundMissingAttachmentAndCancel }
 
- Public Types inherited from QObject
typedef  QObjectList
 

Signals

void disableHtml (MessageComposer::ComposerViewBase::Confirmation)
 
void enableHtml ()
 
void failed (const QString &errorMessage, MessageComposer::ComposerViewBase::FailedType type=Sending)
 
void modified (bool isModified)
 
void sentSuccessfully (Akonadi::Item::Id id)
 
void tooManyRecipient (bool)
 

Public Slots

void autoSaveMessage ()
 
void identityChanged (const KIdentityManagementCore::Identity &ident, const KIdentityManagementCore::Identity &oldIdent, bool msgCleared=false)
 

Public Member Functions

 ComposerViewBase (QObject *parent=nullptr, QWidget *widget=nullptr)
 
void addAttachment (const QString &name, const QString &filename, const QString &charset, const QByteArray &data, const QByteArray &mimeType)
 
void addAttachment (const QUrl &url, const QString &comment, bool sync)
 
void addAttachmentPart (KMime::Content *part)
 
MessageComposer::AttachmentControllerBaseattachmentController ()
 
MessageComposer::AttachmentModelattachmentModel ()
 
bool autocryptEnabled () const
 
QString bcc () const
 
QString cc () const
 
ComposerViewBase::MissingAttachment checkForMissingAttachments (const QStringList &attachmentKeywords)
 
void cleanupAutoSave ()
 
void clearFollowUp ()
 
const KIdentityManagementCore::IdentitycurrentIdentity () const
 
Sonnet::DictionaryComboBoxdictionary () const
 
MessageComposer::RichTextComposerNgeditor () const
 
std::shared_ptr< Kleo::ExpiryChecker > expiryChecker ()
 
Akonadi::CollectionComboBoxfccCombo () const
 
void fillComposer (MessageComposer::Composer *composer)
 
Akonadi::Collection followUpCollection () const
 
QDate followUpDate () const
 
QString from () const
 
bool hasMissingAttachments (const QStringList &attachmentKeywords)
 
KIdentityManagementWidgets::IdentityComboidentityCombo ()
 
KIdentityManagementCore::IdentityManageridentityManager ()
 
bool isComposing () const
 
KMime::Message::Ptr msg () const
 
MessageComposer::RecipientsEditorrecipientsEditor ()
 
QString replyTo () const
 
bool requestDeleveryConfirmation () const
 
void saveMailSettings ()
 
void send (MessageComposer::MessageSender::SendMethod method, MessageComposer::MessageSender::SaveIn saveIn, bool checkMailDispatcher=true)
 
SendLaterInfosendLaterInfo () const
 
void setAttachmentController (MessageComposer::AttachmentControllerBase *controller)
 
void setAttachmentModel (MessageComposer::AttachmentModel *model)
 
void setAutoSaveFileName (const QString &fileName)
 
void setAutoSaveInterval (int interval)
 
void setCryptoOptions (bool sign, bool encrypt, Kleo::CryptoMessageFormat format, bool neverEncryptDrafts=false)
 
void setCustomHeader (const QMap< QByteArray, QString > &customHeader)
 
void setDictionary (Sonnet::DictionaryComboBox *dictionary)
 
void setEditor (MessageComposer::RichTextComposerNg *editor)
 
void setFcc (const Akonadi::Collection &id)
 
void setFccCombo (Akonadi::CollectionComboBox *fcc)
 
void setFollowUpCollection (const Akonadi::Collection &followUpCollection)
 
void setFollowUpDate (const QDate &followUpDate)
 
void setFrom (const QString &from)
 
void setIdentityCombo (KIdentityManagementWidgets::IdentityCombo *identCombo)
 
void setIdentityManager (KIdentityManagementCore::IdentityManager *identMan)
 
void setMDNRequested (bool mdnRequested)
 
void setMessage (const KMime::Message::Ptr &newMsg, bool allowDecryption)
 
void setParentWidgetForGui (QWidget *)
 
void setRecipientsEditor (MessageComposer::RecipientsEditor *recEditor)
 
void setRequestDeleveryConfirmation (bool requestDeleveryConfirmation)
 
void setSendLaterInfo (SendLaterInfo *info)
 
void setSignatureController (MessageComposer::SignatureController *sigController)
 
void setSubject (const QString &subject)
 
void setTransportCombo (MailTransport::TransportComboBox *transpCombo)
 
void setUrgent (bool urgent)
 
MessageComposer::SignatureControllersignatureController ()
 
QString subject () const
 
QString to () const
 
MailTransport::TransportComboBoxtransportComboBox () const
 
void updateAutoSave ()
 
void updateTemplate (const KMime::Message::Ptr &msg)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo () const const
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Properties inherited from QObject
 objectName
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

The ComposerViewBase class.

Definition at line 72 of file composerviewbase.h.

Member Enumeration Documentation

◆ Confirmation

enum MessageComposer::ComposerViewBase::Confirmation

Definition at line 79 of file composerviewbase.h.

◆ FailedType

enum MessageComposer::ComposerViewBase::FailedType

Definition at line 90 of file composerviewbase.h.

◆ MissingAttachment

enum MessageComposer::ComposerViewBase::MissingAttachment

Definition at line 83 of file composerviewbase.h.

Constructor & Destructor Documentation

◆ ComposerViewBase()

ComposerViewBase::ComposerViewBase ( QObject * parent = nullptr,
QWidget * widget = nullptr )
explicit

Definition at line 83 of file composerviewbase.cpp.

Member Function Documentation

◆ addAttachment() [1/2]

void ComposerViewBase::addAttachment ( const QString & name,
const QString & filename,
const QString & charset,
const QByteArray & data,
const QByteArray & mimeType )

Definition at line 1505 of file composerviewbase.cpp.

◆ addAttachment() [2/2]

void ComposerViewBase::addAttachment ( const QUrl & url,
const QString & comment,
bool sync )

Add the given attachment to the message.

Definition at line 1494 of file composerviewbase.cpp.

◆ addAttachmentPart()

void ComposerViewBase::addAttachmentPart ( KMime::Content * part)

Definition at line 1520 of file composerviewbase.cpp.

◆ attachmentController()

MessageComposer::AttachmentControllerBase * ComposerViewBase::attachmentController ( )
nodiscard

Definition at line 1632 of file composerviewbase.cpp.

◆ attachmentModel()

MessageComposer::AttachmentModel * ComposerViewBase::attachmentModel ( )
nodiscard

Definition at line 1642 of file composerviewbase.cpp.

◆ autocryptEnabled()

bool ComposerViewBase::autocryptEnabled ( ) const
nodiscard

Definition at line 1617 of file composerviewbase.cpp.

◆ autoSaveMessage

void ComposerViewBase::autoSaveMessage ( )
slot

Save the message.

Definition at line 1267 of file composerviewbase.cpp.

◆ bcc()

QString ComposerViewBase::bcc ( ) const
nodiscard

Definition at line 1586 of file composerviewbase.cpp.

◆ cc()

QString ComposerViewBase::cc ( ) const
nodiscard

Definition at line 1577 of file composerviewbase.cpp.

◆ checkForMissingAttachments()

ComposerViewBase::MissingAttachment ComposerViewBase::checkForMissingAttachments ( const QStringList & attachmentKeywords)
nodiscard

Check if the mail has references to attachments, but no attachments are added to it.

If missing attachments are found, a dialog to add new attachments is shown.

Parameters
attachmentKeywordsa list with the keywords that indicate an attachment should be present
Returns
NoMissingAttachmentFound, if there is attachment in email FoundMissingAttachmentAndCancelSending, if mail might miss attachment but sending FoundMissingAttachmentAndAddedAttachment, if mail might miss attachment and we added an attachment FoundMissingAttachmentAndCancel, if mail might miss attachment and cancel sending

Definition at line 1889 of file composerviewbase.cpp.

◆ cleanupAutoSave()

void ComposerViewBase::cleanupAutoSave ( )

Stop autosaving and delete the autosaved message.

Definition at line 1240 of file composerviewbase.cpp.

◆ clearFollowUp()

void ComposerViewBase::clearFollowUp ( )

Definition at line 301 of file composerviewbase.cpp.

◆ currentIdentity()

const KIdentityManagementCore::Identity & ComposerViewBase::currentIdentity ( ) const
nodiscard

Definition at line 1612 of file composerviewbase.cpp.

◆ dictionary()

Sonnet::DictionaryComboBox * ComposerViewBase::dictionary ( ) const
nodiscard

Definition at line 1212 of file composerviewbase.cpp.

◆ disableHtml

void MessageComposer::ComposerViewBase::disableHtml ( MessageComposer::ComposerViewBase::Confirmation )
signal

Enabling or disabling HTML in the editor is affected by various client options, so when that would otherwise happen, hand it off to the client to enact it for real.

◆ editor()

MessageComposer::RichTextComposerNg * ComposerViewBase::editor ( ) const
nodiscard

Definition at line 1745 of file composerviewbase.cpp.

◆ expiryChecker()

std::shared_ptr< Kleo::ExpiryChecker > ComposerViewBase::expiryChecker ( )
nodiscard

Definition at line 2254 of file composerviewbase.cpp.

◆ failed

void MessageComposer::ComposerViewBase::failed ( const QString & errorMessage,
MessageComposer::ComposerViewBase::FailedType type = Sending )
signal

Message sending failed with given error message.

◆ fccCombo()

Akonadi::CollectionComboBox * ComposerViewBase::fccCombo ( ) const
nodiscard

Definition at line 1799 of file composerviewbase.cpp.

◆ fillComposer()

void ComposerViewBase::fillComposer ( MessageComposer::Composer * composer)

Definition at line 1552 of file composerviewbase.cpp.

◆ followUpCollection()

Akonadi::Collection ComposerViewBase::followUpCollection ( ) const
nodiscard

Definition at line 1192 of file composerviewbase.cpp.

◆ followUpDate()

QDate ComposerViewBase::followUpDate ( ) const
nodiscard

Definition at line 1202 of file composerviewbase.cpp.

◆ from()

QString ComposerViewBase::from ( ) const
nodiscard

Definition at line 1594 of file composerviewbase.cpp.

◆ hasMissingAttachments()

bool ComposerViewBase::hasMissingAttachments ( const QStringList & attachmentKeywords)
nodiscard

Definition at line 1877 of file composerviewbase.cpp.

◆ identityChanged

void ComposerViewBase::identityChanged ( const KIdentityManagementCore::Identity & ident,
const KIdentityManagementCore::Identity & oldIdent,
bool msgCleared = false )
slot

Definition at line 1718 of file composerviewbase.cpp.

◆ identityCombo()

KIdentityManagementWidgets::IdentityCombo * ComposerViewBase::identityCombo ( )
nodiscard

Definition at line 1672 of file composerviewbase.cpp.

◆ identityManager()

KIdentityManagementCore::IdentityManager * ComposerViewBase::identityManager ( )
nodiscard

Definition at line 1765 of file composerviewbase.cpp.

◆ isComposing()

bool ComposerViewBase::isComposing ( ) const
nodiscard

Returns true if there is at least one composer job running.

Definition at line 95 of file composerviewbase.cpp.

◆ modified

void MessageComposer::ComposerViewBase::modified ( bool isModified)
signal

The composer was modified.

This can happen behind the users' back when, for example, and autosaved message was recovered.

◆ msg()

KMime::Message::Ptr ComposerViewBase::msg ( ) const
nodiscard

Definition at line 2249 of file composerviewbase.cpp.

◆ recipientsEditor()

MessageComposer::RecipientsEditor * ComposerViewBase::recipientsEditor ( )
nodiscard

Definition at line 1652 of file composerviewbase.cpp.

◆ replyTo()

QString ComposerViewBase::replyTo ( ) const
nodiscard

Definition at line 1599 of file composerviewbase.cpp.

◆ requestDeleveryConfirmation()

bool ComposerViewBase::requestDeleveryConfirmation ( ) const
nodiscard

Definition at line 2239 of file composerviewbase.cpp.

◆ saveMailSettings()

void ComposerViewBase::saveMailSettings ( )

Definition at line 253 of file composerviewbase.cpp.

◆ send()

void ComposerViewBase::send ( MessageComposer::MessageSender::SendMethod method,
MessageComposer::MessageSender::SaveIn saveIn,
bool checkMailDispatcher = true )

Send the message with the specified method, saving it in the specified folder.

Definition at line 307 of file composerviewbase.cpp.

◆ sendLaterInfo()

SendLaterInfo * ComposerViewBase::sendLaterInfo ( ) const
nodiscard

Definition at line 2211 of file composerviewbase.cpp.

◆ sentSuccessfully

void MessageComposer::ComposerViewBase::sentSuccessfully ( Akonadi::Item::Id id)
signal

Message sending completed successfully.

◆ setAttachmentController()

void ComposerViewBase::setAttachmentController ( MessageComposer::AttachmentControllerBase * controller)

Definition at line 1627 of file composerviewbase.cpp.

◆ setAttachmentModel()

void ComposerViewBase::setAttachmentModel ( MessageComposer::AttachmentModel * model)

The following are for setting the various options and widgets in the composer.

Definition at line 1637 of file composerviewbase.cpp.

◆ setAutoSaveFileName()

void ComposerViewBase::setAutoSaveFileName ( const QString & fileName)

Sets the filename to use when autosaving something.

This is used when the client recovers the autosave files: It calls this method, so that the composer uses the same filename again. That way, the recovered autosave file is properly cleaned up in cleanupAutoSave():

Definition at line 1290 of file composerviewbase.cpp.

◆ setAutoSaveInterval()

void ComposerViewBase::setAutoSaveInterval ( int interval)

Definition at line 1818 of file composerviewbase.cpp.

◆ setCryptoOptions()

void ComposerViewBase::setCryptoOptions ( bool sign,
bool encrypt,
Kleo::CryptoMessageFormat format,
bool neverEncryptDrafts = false )

The following are various settings the user can modify when composing a message.

If they are not set, the default values will be used.

Definition at line 1823 of file composerviewbase.cpp.

◆ setCustomHeader()

void ComposerViewBase::setCustomHeader ( const QMap< QByteArray, QString > & customHeader)

Definition at line 364 of file composerviewbase.cpp.

◆ setDictionary()

void ComposerViewBase::setDictionary ( Sonnet::DictionaryComboBox * dictionary)

Definition at line 1217 of file composerviewbase.cpp.

◆ setEditor()

void ComposerViewBase::setEditor ( MessageComposer::RichTextComposerNg * editor)

Definition at line 1739 of file composerviewbase.cpp.

◆ setFcc()

void ComposerViewBase::setFcc ( const Akonadi::Collection & id)

Definition at line 1770 of file composerviewbase.cpp.

◆ setFccCombo()

void ComposerViewBase::setFccCombo ( Akonadi::CollectionComboBox * fcc)

Definition at line 1794 of file composerviewbase.cpp.

◆ setFollowUpCollection()

void ComposerViewBase::setFollowUpCollection ( const Akonadi::Collection & followUpCollection)

Definition at line 1197 of file composerviewbase.cpp.

◆ setFollowUpDate()

void ComposerViewBase::setFollowUpDate ( const QDate & followUpDate)

Definition at line 1207 of file composerviewbase.cpp.

◆ setFrom()

void ComposerViewBase::setFrom ( const QString & from)

Widgets for editing differ in client classes, so values are set before sending.

Definition at line 1804 of file composerviewbase.cpp.

◆ setIdentityCombo()

void ComposerViewBase::setIdentityCombo ( KIdentityManagementWidgets::IdentityCombo * identCombo)

Definition at line 1667 of file composerviewbase.cpp.

◆ setIdentityManager()

void ComposerViewBase::setIdentityManager ( KIdentityManagementCore::IdentityManager * identMan)

Definition at line 1760 of file composerviewbase.cpp.

◆ setMDNRequested()

void ComposerViewBase::setMDNRequested ( bool mdnRequested)

Definition at line 1831 of file composerviewbase.cpp.

◆ setMessage()

void ComposerViewBase::setMessage ( const KMime::Message::Ptr & newMsg,
bool allowDecryption )

Set the message to be opened in the composer window, and set the internal data structures to keep track of it.

Definition at line 100 of file composerviewbase.cpp.

◆ setParentWidgetForGui()

void ComposerViewBase::setParentWidgetForGui ( QWidget * w)

Definition at line 1622 of file composerviewbase.cpp.

◆ setRecipientsEditor()

void ComposerViewBase::setRecipientsEditor ( MessageComposer::RecipientsEditor * recEditor)

Definition at line 1647 of file composerviewbase.cpp.

◆ setRequestDeleveryConfirmation()

void ComposerViewBase::setRequestDeleveryConfirmation ( bool requestDeleveryConfirmation)

Definition at line 2244 of file composerviewbase.cpp.

◆ setSendLaterInfo()

void ComposerViewBase::setSendLaterInfo ( SendLaterInfo * info)

Definition at line 2206 of file composerviewbase.cpp.

◆ setSignatureController()

void ComposerViewBase::setSignatureController ( MessageComposer::SignatureController * sigController)

Definition at line 1657 of file composerviewbase.cpp.

◆ setSubject()

void ComposerViewBase::setSubject ( const QString & subject)

Definition at line 1809 of file composerviewbase.cpp.

◆ setTransportCombo()

void ComposerViewBase::setTransportCombo ( MailTransport::TransportComboBox * transpCombo)

Definition at line 1750 of file composerviewbase.cpp.

◆ setUrgent()

void ComposerViewBase::setUrgent ( bool urgent)

Definition at line 1836 of file composerviewbase.cpp.

◆ signatureController()

MessageComposer::SignatureController * ComposerViewBase::signatureController ( )
nodiscard

Definition at line 1662 of file composerviewbase.cpp.

◆ subject()

QString ComposerViewBase::subject ( ) const
nodiscard

Definition at line 1607 of file composerviewbase.cpp.

◆ to()

QString ComposerViewBase::to ( ) const
nodiscard

Header fields in recipients editor.

Definition at line 1568 of file composerviewbase.cpp.

◆ transportComboBox()

MailTransport::TransportComboBox * ComposerViewBase::transportComboBox ( ) const
nodiscard

Definition at line 1755 of file composerviewbase.cpp.

◆ updateAutoSave()

void ComposerViewBase::updateAutoSave ( )

Enables/disables autosaving depending on the value of the autosave interval.

Definition at line 1222 of file composerviewbase.cpp.

◆ updateTemplate()

void ComposerViewBase::updateTemplate ( const KMime::Message::Ptr & msg)

Definition at line 228 of file composerviewbase.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.