Akonadi

manageaccountwidget.h
1 /*
2  SPDX-FileCopyrightText: 2014-2022 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "akonadiwidgets_export.h"
10 #include <QWidget>
11 
12 #include <memory>
13 
15 class QAbstractItemView;
16 class QPushButton;
17 
18 namespace Akonadi
19 {
20 class AgentInstance;
21 class ManageAccountWidgetPrivate;
22 
23 class AKONADIWIDGETS_EXPORT ManageAccountWidget : public QWidget
24 {
25  Q_OBJECT
26 public:
27  explicit ManageAccountWidget(QWidget *parent);
28  ~ManageAccountWidget() override;
29 
30  /**
31  * Sets the text of the label above the list of accounts.
32  * Example: "Incoming accounts:" in an email client, or "Calendars:" in an organizer.
33  */
34  void setDescriptionLabelText(const QString &text);
35 
36  void setSpecialCollectionIdentifier(const QString &identifier);
37 
38  Q_REQUIRED_RESULT QStringList mimeTypeFilter() const;
39  void setMimeTypeFilter(const QStringList &mimeTypeFilter);
40 
41  Q_REQUIRED_RESULT QStringList capabilityFilter() const;
42  void setCapabilityFilter(const QStringList &capabilityFilter);
43 
44  Q_REQUIRED_RESULT QStringList excludeCapabilities() const;
45  void setExcludeCapabilities(const QStringList &excludeCapabilities);
46 
47  void setItemDelegate(QAbstractItemDelegate *delegate);
48 
49  Q_REQUIRED_RESULT QAbstractItemView *view() const;
50 
51  Q_REQUIRED_RESULT QPushButton *addAccountButton() const;
52  void disconnectAddAccountButton();
53 
54 protected:
55  bool eventFilter(QObject *obj, QEvent *event) override;
56 
57 public Q_SLOTS:
58  void slotAddAccount();
59 
60 private Q_SLOTS:
61  void slotAccountSelected(const Akonadi::AgentInstance &current);
62  void slotRemoveSelectedAccount();
63  void slotRestartSelectedAccount();
64  void slotModifySelectedAccount();
65 
66 private:
67  void slotSearchAgentType(const QString &str);
68 
69 private:
70  std::unique_ptr<ManageAccountWidgetPrivate> const d;
71 };
72 }
73 
Represents one agent instance and takes care of communication with it.
A representation of an agent instance.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jul 2 2022 06:41:48 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.