Akonadi Contacts

phonewidget.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 <QWidget>
14class QToolButton;
15namespace KContacts
16{
17class PhoneNumber;
18}
19namespace Akonadi
20{
21class PreferredLineEditWidget;
22class PhoneComboBoxType;
23class AKONADI_CONTACT_WIDGETS_TESTS_EXPORT PhoneWidget : public QWidget
24{
25 Q_OBJECT
26public:
27 explicit PhoneWidget(QWidget *parent = nullptr);
28 ~PhoneWidget() override;
29
30 void updateAddRemoveButton(bool addButtonEnabled);
31 void loadPhone(const KContacts::PhoneNumber &number);
32 [[nodiscard]] KContacts::PhoneNumber storePhone();
33 void clearWidget();
34 void setPreferred(bool b);
35 void setReadOnly(bool readOnly);
36Q_SIGNALS:
37 void addWidget(Akonadi::PhoneWidget *);
38 void removeWidget(Akonadi::PhoneWidget *);
39 void preferredChanged(Akonadi::PhoneWidget *);
40
41private:
42 void slotAddPhone();
43 void slotRemovePhone();
44 void slotPreferredChanged();
45 PreferredLineEditWidget *mPhoneNumberEdit = nullptr;
46 QToolButton *mAddButton = nullptr;
47 QToolButton *mRemoveButton = nullptr;
48 PhoneComboBoxType *mPhoneType = nullptr;
49};
50}
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 Fri May 17 2024 11:50:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.