Akonadi

manageaccountwidget.h
1/*
2 SPDX-FileCopyrightText: 2014-2024 Laurent Montel <montel@kde.org>
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
16class QPushButton;
17
18namespace Akonadi
19{
20class AgentInstance;
21class ManageAccountWidgetPrivate;
22
23class AKONADIWIDGETS_EXPORT ManageAccountWidget : public QWidget
24{
25 Q_OBJECT
26public:
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 [[nodiscard]] QStringList mimeTypeFilter() const;
39 void setMimeTypeFilter(const QStringList &mimeTypeFilter);
40
41 [[nodiscard]] QStringList capabilityFilter() const;
42 void setCapabilityFilter(const QStringList &capabilityFilter);
43
44 [[nodiscard]] QStringList excludeCapabilities() const;
45 void setExcludeCapabilities(const QStringList &excludeCapabilities);
46
47 void setItemDelegate(QAbstractItemDelegate *delegate);
48
49 [[nodiscard]] QAbstractItemView *view() const;
50
51 [[nodiscard]] QPushButton *addAccountButton() const;
52 void disconnectAddAccountButton();
53
54protected:
55 bool eventFilter(QObject *obj, QEvent *event) override;
56
57public Q_SLOTS:
58 void slotAddAccount();
59
60private:
61 AKONADIWIDGETS_NO_EXPORT void slotAccountSelected(const Akonadi::AgentInstance &current);
62 AKONADIWIDGETS_NO_EXPORT void slotRemoveSelectedAccount();
63 AKONADIWIDGETS_NO_EXPORT void slotRestartSelectedAccount();
64 AKONADIWIDGETS_NO_EXPORT void slotModifySelectedAccount();
65 AKONADIWIDGETS_NO_EXPORT void slotSearchAgentType(const QString &str);
66
67private:
68 std::unique_ptr<ManageAccountWidgetPrivate> const d;
69};
70}
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-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.