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, [email protected]
5  SPDX-FileCopyrightText: 2016-2020 Laurent Montel <montel.org>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9 
10 #ifndef NAMEWIDGET_H
11 #define NAMEWIDGET_H
12 
13 #include "displaynameeditwidget.h"
14 #include <QWidget>
15 
16 #include <KContacts/Addressee>
17 class KLineEdit;
18 class QToolButton;
19 namespace ContactEditor {
20 class NameWidget : public QWidget
21 {
22  Q_OBJECT
23 public:
24  explicit NameWidget(QWidget *parent = nullptr);
25  ~NameWidget();
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  Q_REQUIRED_RESULT DisplayNameEditWidget::DisplayType displayType() const;
33 
34 Q_SIGNALS:
35  void nameChanged(const KContacts::Addressee &contact);
36 
37 private:
38  void slotTextChanged(const QString &text);
39  void slotOpenNameEditDialog();
41  KContacts::Addressee mContact;
42  KLineEdit *mNameEdit = nullptr;
43  QToolButton *mButtonEdit = nullptr;
44 };
45 }
46 #endif // NAMEWIDGET_H
Q_SIGNALSQ_SIGNALS
Q_OBJECTQ_OBJECT
DisplayType
Describes what the display name should look like.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Sep 23 2020 23:08:59 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.