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;
22class AccountActivitiesAbstract;
23
24class AKONADIWIDGETS_EXPORT ManageAccountWidget : public QWidget
25{
26 Q_OBJECT
27public:
28 explicit ManageAccountWidget(QWidget *parent);
29 ~ManageAccountWidget() override;
30
31 /**
32 * Sets the text of the label above the list of accounts.
33 * Example: "Incoming accounts:" in an email client, or "Calendars:" in an organizer.
34 */
35 void setDescriptionLabelText(const QString &text);
36
37 void setSpecialCollectionIdentifier(const QString &identifier);
38
39 [[nodiscard]] QStringList mimeTypeFilter() const;
40 void setMimeTypeFilter(const QStringList &mimeTypeFilter);
41
42 [[nodiscard]] QStringList capabilityFilter() const;
43 void setCapabilityFilter(const QStringList &capabilityFilter);
44
45 [[nodiscard]] QStringList excludeCapabilities() const;
46 void setExcludeCapabilities(const QStringList &excludeCapabilities);
47
48 void setItemDelegate(QAbstractItemDelegate *delegate);
49
50 [[nodiscard]] QAbstractItemView *view() const;
51
52 [[nodiscard]] QPushButton *addAccountButton() const;
53 void disconnectAddAccountButton();
54
55 [[nodiscard]] bool enablePlasmaActivities() const;
56 void setEnablePlasmaActivities(bool newEnablePlasmaActivities);
57
58 [[nodiscard]] AccountActivitiesAbstract *accountActivitiesAbstract() const;
59 void setAccountActivitiesAbstract(AccountActivitiesAbstract *abstract);
60
61protected:
62 bool eventFilter(QObject *obj, QEvent *event) override;
63
64public Q_SLOTS:
65 void slotAddAccount();
66
67private:
68 AKONADIWIDGETS_NO_EXPORT void slotAccountSelected(const Akonadi::AgentInstance &current);
69 AKONADIWIDGETS_NO_EXPORT void slotRemoveSelectedAccount();
70 AKONADIWIDGETS_NO_EXPORT void slotRestartSelectedAccount();
71 AKONADIWIDGETS_NO_EXPORT void slotModifySelectedAccount();
72 AKONADIWIDGETS_NO_EXPORT void slotSearchAgentType(const QString &str);
73
74private:
75 std::unique_ptr<ManageAccountWidgetPrivate> const d;
76};
77}
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 Fri Nov 22 2024 12:03:34 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.