Mailcommon

favoritecollectionwidget.h
1 /*
2 
3  SPDX-FileCopyrightText: 2012-2023 Laurent Montel <[email protected]>
4 
5  SPDX-License-Identifier: GPL-2.0-or-later
6 */
7 
8 #pragma once
9 
10 #include "mailcommon_export.h"
11 
12 #include <Akonadi/EntityListView>
13 
14 class KXMLGUIClient;
15 class KActionCollection;
16 
17 namespace MailCommon
18 {
19 class MailCommonSettings;
20 /**
21  * @brief The FavoriteCollectionWidget class
22  * @author Laurent Montel <[email protected]>
23  */
24 class MAILCOMMON_EXPORT FavoriteCollectionWidget : public Akonadi::EntityListView
25 {
26  Q_OBJECT
27 public:
28  explicit FavoriteCollectionWidget(MailCommon::MailCommonSettings *settings, KXMLGUIClient *xmlGuiClient, QWidget *parent = nullptr);
29  ~FavoriteCollectionWidget() override;
30 
31  void readConfig();
32  void updateMode();
33 
34  void changeViewMode(QListView::ViewMode mode);
35 
36 protected Q_SLOTS:
37  void slotGeneralFontChanged();
38  void slotGeneralPaletteChanged();
39  void slotChangeIconSize(bool);
40  void slotChangeMode(bool);
41 
42 protected:
43  void paintEvent(QPaintEvent *) override;
44  void dragEnterEvent(QDragEnterEvent *event) override;
45  void dragMoveEvent(QDragMoveEvent *event) override;
46  void dropEvent(QDropEvent *event) override;
47  void startDrag(Qt::DropActions) override;
48 
49  void mousePressEvent(QMouseEvent *e) override;
50  Q_REQUIRED_RESULT bool event(QEvent *e) override;
51 Q_SIGNALS:
52  void newTabRequested(bool);
53 
54 private:
55  bool acceptEvent(QDropEvent *event) const;
56  MAILCOMMON_NO_EXPORT void createMenu(KActionCollection *ac);
57  MAILCOMMON_NO_EXPORT void updatePalette();
58 
59  class FavoriteCollectionWidgetPrivate;
60  std::unique_ptr<FavoriteCollectionWidgetPrivate> const d;
61 };
62 }
The FavoriteCollectionWidget class.
typedef DropActions
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 22 2023 03:58:42 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.