Akonadi Contacts

weblistwidget.cpp
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 #include "weblistwidget.h"
11 #include "webwidgetlister.h"
12 #include <KContacts/Addressee>
13 #include <KLocalizedString>
14 #include <QLabel>
15 #include <QVBoxLayout>
16 
17 using namespace ContactEditor;
18 
19 WebListWidget::WebListWidget(QWidget *parent)
20  : QWidget(parent)
21 {
22  auto topLayout = new QVBoxLayout(this);
23  topLayout->setContentsMargins(0, 0, 0, 0);
24  topLayout->setSpacing(0);
25 
26  auto label = new QLabel(i18n("Web"), this);
27  label->setObjectName(QStringLiteral("weblistlabel"));
28  topLayout->addWidget(label);
29 
30  mWebWidgetLister = new ContactEditor::WebWidgetLister(this);
31  mWebWidgetLister->setObjectName(QStringLiteral("webwidgetlister"));
32  topLayout->addWidget(mWebWidgetLister);
33 }
34 
35 WebListWidget::~WebListWidget()
36 {
37 }
38 
39 void WebListWidget::loadContact(const KContacts::Addressee &contact)
40 {
41  mWebWidgetLister->loadContact(contact);
42 }
43 
44 void WebListWidget::storeContact(KContacts::Addressee &contact) const
45 {
46  mWebWidgetLister->storeContact(contact);
47 }
48 
49 void WebListWidget::setReadOnly(bool readOnly)
50 {
51  mWebWidgetLister->setReadOnly(readOnly);
52 }
QString label(StandardShortcut id)
QString i18n(const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jun 23 2021 23:09:25 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.