From 904bd0c52dd4f65c03fc5d3c6aad984002aa99bb Mon Sep 17 00:00:00 2001 From: David Faure Date: Sun, 10 Jul 2016 23:25:03 +0200 Subject: [PATCH] EntityCollectionOrderProxyModel: document its purpose, export for unittests (coming up) --- src/folder/entitycollectionorderproxymodel.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/folder/entitycollectionorderproxymodel.h b/src/folder/entitycollectionorderproxymodel.h index 93f4eb9..e0064d0 100644 --- a/src/folder/entitycollectionorderproxymodel.h +++ b/src/folder/entitycollectionorderproxymodel.h @@ -20,11 +20,25 @@ #define MAILCOMMON_ENTITYCOLLECTIONORDERPROXYMODEL_H #include +#include "mailcommon_export.h" namespace MailCommon { -class EntityCollectionOrderProxyModel : public Akonadi::EntityOrderProxyModel +/** + * @brief The EntityCollectionOrderProxyModel class implements ordering of mail collections. + * It supports two modes: manual sorting and automatic sorting. + * + * The manual sorting (which has to be activated explicitly by the user) allows the user to + * reorder the collections (both toplevel resources and folders within the resource) by drag-n-drop, + * and is implemented by the base class EntityOrderProxyModel. + * + * The automatic sorting is implemented by this class itself, and consists of assigning ranks + * to various special folders (outbox, drafts, sent etc.) and then having the other folders sorted + * by name (or another column), i.e. the default behaviour from QSortFilterProxyModel. + * In that mode, the order of the toplevel folders can be controlled with setTopLevelOrder(). + */ +class MAILCOMMON_EXPORT EntityCollectionOrderProxyModel : public Akonadi::EntityOrderProxyModel { Q_OBJECT public: