File indexing completed on 2025-01-05 04:49:51

0001 /*
0002    SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QColor>
0010 #include <QTreeView>
0011 
0012 class SelectImapFolderTreeView : public QTreeView
0013 {
0014     Q_OBJECT
0015 public:
0016     explicit SelectImapFolderTreeView(QWidget *parent);
0017     ~SelectImapFolderTreeView() override;
0018     enum LoadingStatus { InProgress = 0, Success, Failed };
0019 
0020     void setStatus(LoadingStatus status);
0021 
0022 protected:
0023     void paintEvent(QPaintEvent *event) override;
0024 
0025 private:
0026     void generalPaletteChanged();
0027     QColor mTextColor;
0028     LoadingStatus mStatus = InProgress;
0029 };