Akonadi Contacts

nameeditdialog.h
1 /*
2  This file is part of Contact Editor.
3 
4  SPDX-FileCopyrightText: 2010 Tobias Koenig <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #pragma once
10 
11 #include "displaynameeditwidget.h"
12 #include <QDialog>
13 
14 #include <KContacts/Addressee>
15 
16 class KLineEdit;
17 class KComboBox;
19 class NameEditDialog : public QDialog
20 {
21  Q_OBJECT
22 public:
23  explicit NameEditDialog(QWidget *parent = nullptr);
24 
25  void setFamilyName(const QString &name);
26  Q_REQUIRED_RESULT QString familyName() const;
27 
28  void setGivenName(const QString &name);
29  Q_REQUIRED_RESULT QString givenName() const;
30 
31  void setPrefix(const QString &prefix);
32  Q_REQUIRED_RESULT QString prefix() const;
33 
34  void setSuffix(const QString &suffix);
35  Q_REQUIRED_RESULT QString suffix() const;
36 
37  void setAdditionalName(const QString &name);
38  Q_REQUIRED_RESULT QString additionalName() const;
39 
40  void loadContact(const KContacts::Addressee &contact);
41  void storeContact(KContacts::Addressee &contact) const;
42 
43  void setDisplayType(DisplayNameEditWidget::DisplayType type);
44  Q_REQUIRED_RESULT DisplayNameEditWidget::DisplayType displayType() const;
45 
46 private:
47  KComboBox *mSuffixCombo = nullptr;
48  KComboBox *mPrefixCombo = nullptr;
49  KLineEdit *mFamilyNameEdit = nullptr;
50  KLineEdit *mGivenNameEdit = nullptr;
51  KLineEdit *mAdditionalNameEdit = nullptr;
52  DisplayNameEditWidget *mDisplayNameEdit = nullptr;
53 };
Q_OBJECTQ_OBJECT
A widget for editing the display name of a contact.
DisplayType
Describes what the display name should look like.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Apr 1 2023 04:09:05 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.