MailCommon::FolderSettings Class

class MailCommon::FolderSettings

The FolderSettings class. More...

Header: #include <MailCommon/FolderSettings>
CMake: find_package(KPim6MailCommon REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::MailCommon)
Inherits: QObject

Public Functions

virtual ~FolderSettings() override
bool canCreateMessages() const
bool canDeleteMessages() const
qint64 count() const
uint fallBackIdentity() const
bool folderHtmlLoadExtPreference() const
MessageViewer::Viewer::DisplayFormatMessage formatMessage() const
bool hideInSelectionDialog() const
uint identity() const
bool isMailingListEnabled() const
bool isReadOnly() const
bool isStructural() const
bool isSystemFolder() const
bool isValid() const
bool isWriteConfig() const
MessageCore::MailingList mailingList() const
QString mailingListPostAddress() const
QString name() const
bool putRepliesInSameFolder() const
void readConfig()
Akonadi::Collection::Rights rights() const
void setCollection(const Akonadi::Collection &collection)
void setFolderHtmlLoadExtPreference(bool folderHtmlLoadExtPreference)
void setFormatMessage(MessageViewer::Viewer::DisplayFormatMessage formatMessage)
void setHideInSelectionDialog(bool hide)
void setIdentity(uint identity)
void setMailingList(const MessageCore::MailingList &mlist)
void setMailingListEnabled(bool enabled)
void setShortcut(const QKeySequence &shortcut)
void setUseDefaultIdentity(bool useDefaultIdentity)
void setWriteConfig(bool writeConfig)
const QKeySequence &shortcut() const
Akonadi::CollectionStatistics statistics() const
bool useDefaultIdentity() const
void writeConfig() const

Static Public Members

void clearCache()
QString configGroupName(const Akonadi::Collection &col)
QSharedPointer<MailCommon::FolderSettings> forCollection(const Akonadi::Collection &coll, bool writeConfig = true)
void resetHtmlFormat()

Protected Slots

Detailed Description

Author: Laurent Montel <montel@kde.org>

Member Function Documentation

[override virtual noexcept] FolderSettings::~FolderSettings()

Destroys the folder settings, writing them to the configuration if needed.

bool FolderSettings::canCreateMessages() const

Returns true if messages can be created in the collection.

bool FolderSettings::canDeleteMessages() const

Returns true if messages can be deleted from the collection.

[static] void FolderSettings::clearCache()

Clears the cache of folder settings.

[static] QString FolderSettings::configGroupName(const Akonadi::Collection &col)

Returns the name of the configuration group of the collection col.

qint64 FolderSettings::count() const

Returns the number of messages in the collection.

uint FolderSettings::fallBackIdentity() const

Returns the identity to use for this folder, taking the account identity into account.

bool FolderSettings::folderHtmlLoadExtPreference() const

Returns true if external references are loaded in HTML messages of this folder.

See also setFolderHtmlLoadExtPreference().

[static] QSharedPointer<MailCommon::FolderSettings> FolderSettings::forCollection(const Akonadi::Collection &coll, bool writeConfig = true)

Returns the settings of the collection coll, creating and caching them if needed. If writeConfig is true, the settings are written to the configuration when destroyed.

MessageViewer::Viewer::DisplayFormatMessage FolderSettings::formatMessage() const

Returns the format used to display the messages of this folder.

See also setFormatMessage().

bool FolderSettings::hideInSelectionDialog() const

Returns true if this folder should be hidden from all folder selection dialogs

See also setHideInSelectionDialog().

uint FolderSettings::identity() const

Returns the identity used for this folder.

See also setIdentity().

bool FolderSettings::isMailingListEnabled() const

Returns true if this folder is associated with a mailing-list.

bool FolderSettings::isReadOnly() const

Returns true if the collection is read-only.

bool FolderSettings::isStructural() const

Returns true if the collection is structural, i.e. it cannot contain messages.

bool FolderSettings::isSystemFolder() const

Returns true if the collection is a system folder.

bool FolderSettings::isValid() const

Returns true if the collection is valid.

bool FolderSettings::isWriteConfig() const

Returns true if the settings are written to the configuration when destroyed.

MessageCore::MailingList FolderSettings::mailingList() const

Returns the mailing-list associated with this folder.

See also setMailingList().

QString FolderSettings::mailingListPostAddress() const

Returns the post address of the mailing-list associated with this folder.

QString FolderSettings::name() const

Returns the name of the collection.

bool FolderSettings::putRepliesInSameFolder() const

Returns true if the replies to mails from this folder should be put in the same folder.

void FolderSettings::readConfig()

Reads the settings from the configuration.

[static] void FolderSettings::resetHtmlFormat()

Resets the message display format of all the cached folder settings to the global setting.

Akonadi::Collection::Rights FolderSettings::rights() const

Returns the access rights of the collection.

void FolderSettings::setCollection(const Akonadi::Collection &collection)

Sets the collection these settings apply to.

void FolderSettings::setFolderHtmlLoadExtPreference(bool folderHtmlLoadExtPreference)

Sets whether external references are loaded in HTML messages of this folder, according to folderHtmlLoadExtPreference.

See also folderHtmlLoadExtPreference().

void FolderSettings::setFormatMessage(MessageViewer::Viewer::DisplayFormatMessage formatMessage)

Sets the format used to display the messages of this folder to formatMessage.

See also formatMessage().

void FolderSettings::setHideInSelectionDialog(bool hide)

Sets whether this folder is hidden from all folder selection dialogs, according to hide.

See also hideInSelectionDialog().

void FolderSettings::setIdentity(uint identity)

Sets the identity used for this folder.

See also identity().

void FolderSettings::setMailingList(const MessageCore::MailingList &mlist)

Sets the mailing-list mlist associated with this folder.

See also mailingList().

void FolderSettings::setMailingListEnabled(bool enabled)

Sets whether this folder is associated with a mailing-list, according to enabled.

See also isMailingListEnabled().

void FolderSettings::setShortcut(const QKeySequence &shortcut)

Sets the keyboard shortcut used to select the folder.

See also shortcut().

void FolderSettings::setUseDefaultIdentity(bool useDefaultIdentity)

Sets whether the default identity should be used instead of the identity specified by setIdentity(), according to useDefaultIdentity.

See also useDefaultIdentity().

void FolderSettings::setWriteConfig(bool writeConfig)

Sets whether the settings are written to the configuration when destroyed, according to writeConfig.

See also writeConfig().

const QKeySequence &FolderSettings::shortcut() const

Returns the keyboard shortcut used to select the folder.

See also setShortcut().

[protected slot] void FolderSettings::slotIdentitiesChanged()

Updates the identity of this folder when the identities change.

Akonadi::CollectionStatistics FolderSettings::statistics() const

Returns the statistics of the collection.

bool FolderSettings::useDefaultIdentity() const

Returns true if the default identity is used instead of the identity specified by setIdentity().

See also setUseDefaultIdentity().

void FolderSettings::writeConfig() const

Writes the settings to the configuration.

See also setWriteConfig().