Warning, file /pim/mailcommon/src/widgets/favoritecollectionwidget.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 0003 SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #pragma once 0009 0010 #include "mailcommon_export.h" 0011 0012 #include <Akonadi/EntityListView> 0013 0014 class KXMLGUIClient; 0015 class KActionCollection; 0016 0017 namespace MailCommon 0018 { 0019 class MailCommonSettings; 0020 /** 0021 * @brief The FavoriteCollectionWidget class 0022 * @author Laurent Montel <montel@kde.org> 0023 */ 0024 class MAILCOMMON_EXPORT FavoriteCollectionWidget : public Akonadi::EntityListView 0025 { 0026 Q_OBJECT 0027 public: 0028 explicit FavoriteCollectionWidget(MailCommon::MailCommonSettings *settings, KXMLGUIClient *xmlGuiClient, QWidget *parent = nullptr); 0029 ~FavoriteCollectionWidget() override; 0030 0031 void readConfig(); 0032 void updateMode(); 0033 0034 void changeViewMode(QListView::ViewMode mode); 0035 0036 protected Q_SLOTS: 0037 void slotGeneralFontChanged(); 0038 void slotGeneralPaletteChanged(); 0039 void slotChangeIconSize(bool); 0040 void slotChangeMode(bool); 0041 0042 protected: 0043 void paintEvent(QPaintEvent *) override; 0044 void dragEnterEvent(QDragEnterEvent *event) override; 0045 void dragMoveEvent(QDragMoveEvent *event) override; 0046 void dropEvent(QDropEvent *event) override; 0047 void startDrag(Qt::DropActions) override; 0048 0049 void mousePressEvent(QMouseEvent *e) override; 0050 [[nodiscard]] bool event(QEvent *e) override; 0051 Q_SIGNALS: 0052 void newTabRequested(bool); 0053 0054 private: 0055 bool acceptEvent(QDropEvent *event) const; 0056 MAILCOMMON_NO_EXPORT void createMenu(KActionCollection *ac); 0057 MAILCOMMON_NO_EXPORT void updatePalette(); 0058 0059 class FavoriteCollectionWidgetPrivate; 0060 std::unique_ptr<FavoriteCollectionWidgetPrivate> const d; 0061 }; 0062 }