Akonadi Contacts

customfieldslistwidget.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 #pragma once
11 
12 #include "customfieldsmodel.h"
13 #include <QWidget>
14 class QTreeView;
15 namespace KContacts
16 {
17 class Addressee;
18 }
19 class CustomFieldsModel;
20 namespace ContactEditor
21 {
22 class CustomFieldsListWidget : public QWidget
23 {
24  Q_OBJECT
25 public:
26  explicit CustomFieldsListWidget(QWidget *parent = nullptr);
27  ~CustomFieldsListWidget();
28  void storeContact(KContacts::Addressee &contact) const;
29  void loadContact(const KContacts::Addressee &contact);
30  void setReadOnly(bool readOnly);
31 
32  void setLocalCustomFieldDescriptions(const QVariantList &descriptions);
33  Q_REQUIRED_RESULT QVariantList localCustomFieldDescriptions() const;
34 public Q_SLOTS:
35  void slotAddNewField(const CustomField &field);
36 
37 private:
38  CustomField::List mLocalCustomFields;
39  QTreeView *mCustomFieldList = nullptr;
40  CustomFieldsModel *mModel = nullptr;
41 };
42 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Jun 18 2021 23:08:56 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.