File indexing completed on 2024-05-12 05:03:13

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 <QItemDelegate>
0010 
0011 class AvatarCacheManager;
0012 class RocketChatAccount;
0013 class UserCompletionDelegate : public QItemDelegate
0014 {
0015 public:
0016     explicit UserCompletionDelegate(QObject *parent = nullptr);
0017     ~UserCompletionDelegate() override;
0018 
0019     void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
0020 
0021     void setRocketChatAccount(RocketChatAccount *newRocketChatAccount);
0022 
0023 private:
0024     AvatarCacheManager *const mAvatarCacheManager;
0025 };