10#include "customfieldswidget.h"
11#include "customfieldeditorwidget.h"
12#include "customfieldslistwidget.h"
18CustomFieldsWidget::CustomFieldsWidget(
QWidget *parent)
20 , mCustomFieldEditorWidget(new
Akonadi::CustomFieldEditorWidget(this))
21 , mCustomFieldsListWidget(new
Akonadi::CustomFieldsListWidget(this))
24 topLayout->setContentsMargins({});
25 mCustomFieldEditorWidget->setObjectName(
QLatin1StringView(
"customfieldeditorwidget"));
26 topLayout->addWidget(mCustomFieldEditorWidget);
28 mCustomFieldsListWidget->setObjectName(
QLatin1StringView(
"customfieldslistwidget"));
29 topLayout->addWidget(mCustomFieldsListWidget);
31 connect(mCustomFieldEditorWidget, &CustomFieldEditorWidget::addNewField, mCustomFieldsListWidget, &CustomFieldsListWidget::slotAddNewField);
34CustomFieldsWidget::~CustomFieldsWidget() =
default;
38 mCustomFieldsListWidget->loadContact(contact);
43 mCustomFieldsListWidget->storeContact(contact);
46void CustomFieldsWidget::setReadOnly(
bool readOnly)
48 mCustomFieldEditorWidget->setReadOnly(readOnly);
49 mCustomFieldsListWidget->setReadOnly(readOnly);
52void CustomFieldsWidget::setLocalCustomFieldDescriptions(
const QVariantList &descriptions)
54 mCustomFieldsListWidget->setLocalCustomFieldDescriptions(descriptions);
57QVariantList CustomFieldsWidget::localCustomFieldDescriptions()
const
59 return mCustomFieldsListWidget->localCustomFieldDescriptions();
62#include "moc_customfieldswidget.cpp"
A widget for editing the display name of a contact.
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)