MailCommon::FolderTreeWidgetProxyModel Class

class MailCommon::FolderTreeWidgetProxyModel

The FolderTreeWidgetProxyModel class. More...

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

Public Functions

FolderTreeWidgetProxyModel(QObject *parent = nullptr, MailCommon::FolderTreeWidgetProxyModel::FolderTreeWidgetProxyModelOptions options = FolderTreeWidgetProxyModel::None)
virtual ~FolderTreeWidgetProxyModel() override
void addContentMimeTypeInclusionFilter(const QString &mimeTypes)
bool enabledCheck() const
bool hideOutboxFolder() const
bool hideSpecificFolder() const
bool hideVirtualFolder() const
void readConfig()
void setAccountActivities(Akonadi::AccountActivitiesAbstract *accountActivities)
void setEnabledCheck(bool enable)
void setHideOutboxFolder(bool hide)
void setHideSpecificFolder(bool hide)
void setHideVirtualFolder(bool exclude)
void setWarningThreshold(qreal threshold)
void updatePalette()

Reimplemented Public Functions

virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
virtual Qt::ItemFlags flags(const QModelIndex &index) const override

Reimplemented Protected Functions

virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override

Detailed Description

Author: Laurent Montel <montel@kde.org>

Member Function Documentation

[explicit] FolderTreeWidgetProxyModel::FolderTreeWidgetProxyModel(QObject *parent = nullptr, MailCommon::FolderTreeWidgetProxyModel::FolderTreeWidgetProxyModelOptions options = FolderTreeWidgetProxyModel::None)

Constructs a folder tree proxy model with the given parent and options.

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

Destroys the model.

void FolderTreeWidgetProxyModel::addContentMimeTypeInclusionFilter(const QString &mimeTypes)

Only shows the collections that can contain items of the MIME type mimeTypes.

[override virtual] QVariant FolderTreeWidgetProxyModel::data(const QModelIndex &index, int role = Qt::DisplayRole) const

Returns the data for the given index and role.

bool FolderTreeWidgetProxyModel::enabledCheck() const

Returns true if the check of the access rights and of the resource state is enabled.

See also setEnabledCheck().

[override virtual protected] bool FolderTreeWidgetProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const

Returns true if the row sourceRow under sourceParent is accepted.

[override virtual] Qt::ItemFlags FolderTreeWidgetProxyModel::flags(const QModelIndex &index) const

Returns the item flags for the given index. Folders of broken resources are disabled when the check is enabled.

bool FolderTreeWidgetProxyModel::hideOutboxFolder() const

Returns true if the outbox folder is hidden.

See also setHideOutboxFolder().

bool FolderTreeWidgetProxyModel::hideSpecificFolder() const

Returns true if the folders configured to be hidden in selection dialogs are hidden.

See also setHideSpecificFolder().

bool FolderTreeWidgetProxyModel::hideVirtualFolder() const

Returns true if the virtual folders are hidden.

See also setHideVirtualFolder().

void FolderTreeWidgetProxyModel::readConfig()

Reads the configuration and re-filters the model.

void FolderTreeWidgetProxyModel::setAccountActivities(Akonadi::AccountActivitiesAbstract *accountActivities)

Sets accountActivities, used to filter the folders by activity.

void FolderTreeWidgetProxyModel::setEnabledCheck(bool enable)

Enables the check of the access rights and of the resource state if enable is true.

See also enabledCheck().

void FolderTreeWidgetProxyModel::setHideOutboxFolder(bool hide)

Hides the outbox folder if hide is true.

See also hideOutboxFolder().

void FolderTreeWidgetProxyModel::setHideSpecificFolder(bool hide)

Hides the folders configured to be hidden in selection dialogs if hide is true.

See also hideSpecificFolder().

void FolderTreeWidgetProxyModel::setHideVirtualFolder(bool exclude)

Hides the virtual folders if exclude is true.

See also hideVirtualFolder().

void FolderTreeWidgetProxyModel::setWarningThreshold(qreal threshold)

Sets the quota usage threshold, in percent, above which folders are highlighted.

void FolderTreeWidgetProxyModel::updatePalette()

Updates the palette.