File indexing completed on 2024-12-08 04:34:23

0001 /*
0002    SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "delegateutils/textuibase.h"
0010 
0011 class MessageListTextUi : public TextUiBase
0012 {
0013 public:
0014     explicit MessageListTextUi(TextSelectionImpl *textSelectionImpl, QListView *view);
0015     ~MessageListTextUi() override;
0016 
0017     void clearSizeHintCache();
0018 
0019 protected:
0020     void removeMessageCache(const QString &messageId) override;
0021     void setCacheMaxEntries(int maxEntries) override;
0022     void clearCache() override;
0023     // Cache SizeHint value
0024     // We need to clear it when we resize widget.
0025     mutable LRUCache<QString, QSize> mSizeHintCache;
0026 };