Akonadi Contacts

nameeditdialog.h
1/*
2 This file is part of Contact Editor.
3
4 SPDX-FileCopyrightText: 2010 Tobias Koenig <tokoe@kde.org>
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
16class KLineEdit;
17class KComboBox;
18namespace Akonadi
19{
20class DisplayNameEditWidget;
21class NameEditDialog : public QDialog
22{
24public:
25 explicit NameEditDialog(QWidget *parent = nullptr);
26
27 void setFamilyName(const QString &name);
28 [[nodiscard]] QString familyName() const;
29
30 void setGivenName(const QString &name);
31 [[nodiscard]] QString givenName() const;
32
33 void setPrefix(const QString &prefix);
34 [[nodiscard]] QString prefix() const;
35
36 void setSuffix(const QString &suffix);
37 [[nodiscard]] QString suffix() const;
38
39 void setAdditionalName(const QString &name);
40 [[nodiscard]] QString additionalName() const;
41
42 void loadContact(const KContacts::Addressee &contact);
43 void storeContact(KContacts::Addressee &contact) const;
44
45 void setDisplayType(DisplayNameEditWidget::DisplayType type);
46 [[nodiscard]] DisplayNameEditWidget::DisplayType displayType() const;
47
48private:
49 KComboBox *mSuffixCombo = nullptr;
50 KComboBox *mPrefixCombo = nullptr;
51 KLineEdit *mFamilyNameEdit = nullptr;
52 KLineEdit *mGivenNameEdit = nullptr;
53 KLineEdit *mAdditionalNameEdit = nullptr;
54 DisplayNameEditWidget *mDisplayNameEdit = nullptr;
55};
56}
A widget for editing the display name of a contact.
Q_OBJECTQ_OBJECT
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.