Akonadi Contacts

mailwidget.h
1/*
2 This file is part of Contact Editor.
3
4 SPDX-FileCopyrightText: 2016 eyeOS S.L.U., a Telefonica company, sales@eyeos.com
5 SPDX-FileCopyrightText: 2016-2020 Laurent Montel <montel.org>
6
7 SPDX-License-Identifier: LGPL-2.0-or-later
8*/
9
10#pragma once
11
12#include "akonadi_contact_widgets_private_export.h"
13#include <KContacts/Email>
14#include <QWidget>
15class QToolButton;
16namespace Akonadi
17{
18class PreferredLineEditWidget;
19class MailTypeCombobox;
20class AKONADI_CONTACT_WIDGETS_TESTS_EXPORT MailWidget : public QWidget
21{
22 Q_OBJECT
23public:
24 explicit MailWidget(QWidget *parent = nullptr);
25 ~MailWidget() override;
26
27 void clearWidget();
28 void updateAddRemoveButton(bool addButtonEnabled);
29 void setMail(const KContacts::Email &email);
30 [[nodiscard]] KContacts::Email email();
31 void setPreferred(bool b);
32 void setReadOnly(bool readOnly);
33Q_SIGNALS:
34 void addWidget(Akonadi::MailWidget *);
35 void removeWidget(Akonadi::MailWidget *);
36 void preferredChanged(Akonadi::MailWidget *);
37
38private:
39 void slotAddMail();
40 void slotRemoveMail();
41 void slotPreferredChanged();
42 KContacts::Email mEmail;
43 QString mOldType;
44 PreferredLineEditWidget *mMailEdit = nullptr;
45 Akonadi::MailTypeCombobox *mMailType = nullptr;
46 QToolButton *mAddButton = nullptr;
47 QToolButton *mRemoveButton = nullptr;
48};
49}
A widget for editing the display name of a contact.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:08 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.