Akonadi Contacts

namewidget.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 "displaynameeditwidget.h"
13#include <QWidget>
14
15#include <KContacts/Addressee>
16class KLineEdit;
17class QToolButton;
18namespace Akonadi
19{
20class NameWidget : public QWidget
21{
23public:
24 explicit NameWidget(QWidget *parent = nullptr);
25 ~NameWidget() override;
26
27 void loadContact(const KContacts::Addressee &contact);
28 void storeContact(KContacts::Addressee &contact) const;
29 void setReadOnly(bool readOnly);
30
31 void setDisplayType(DisplayNameEditWidget::DisplayType type);
32 [[nodiscard]] DisplayNameEditWidget::DisplayType displayType() const;
33
35 void nameChanged(const KContacts::Addressee &contact);
36
37private:
38 void slotTextChanged(const QString &text);
39 void slotOpenNameEditDialog();
40 DisplayNameEditWidget::DisplayType mDisplayType;
41 KContacts::Addressee mContact;
42 KLineEdit *mNameEdit = nullptr;
43 QToolButton *mButtonEdit = nullptr;
44};
45}
A widget for editing the display name of a contact.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
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.