KPeople
19 #include "phonedetailswidget.h"
20 #include "persondata.h"
22 #include <QGridLayout>
23 #include <QVBoxLayout>
26 #include <KLocalizedString>
27 #include <KPluginFactory>
29 K_PLUGIN_FACTORY(PhoneDetailsWidgetFactory, registerPlugin<PhoneDetailsWidget>();)
30 K_EXPORT_PLUGIN(PhoneDetailsWidgetFactory(
"phonedetailswidgetplugin"))
34 PhoneDetailsWidget::PhoneDetailsWidget(QWidget *parent, const QVariantList &args):
35 AbstractPersonDetailsWidget(parent)
38 setTitle(i18n(
"Phone"));
39 setIcon(QIcon::fromTheme(
"phone"));
41 setLayout(
new QVBoxLayout(
this));
44 void PhoneDetailsWidget::setPerson(
PersonData *person)
46 if (person->phones().size() == 0) {
53 while ((child = layout()->takeAt(0)) != 0) {
54 delete child->widget();
58 Q_FOREACH (
const QString &phone, person->phones()) {
59 QLabel *phoneLabel =
new QLabel(phone,
this);
60 phoneLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
61 layout()->addWidget(phoneLabel);
Allows to query the information about a given person.
The KPeople namespace contains all the classes for Libkpeople.
This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Fri Feb 13 2015 15:16:39 by
doxygen 1.8.9.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.