• Skip to content
  • Skip to link menu
KDE API Documentation - persondata.h Source File (KPeople)
  • KDE Home
  • Contact Us
 

KPeople

  • frameworks
  • kpeople
  • src
persondata.h
1 /*
2  KPeople
3  Copyright (C) 2013 David Edmundson (davidedmundson@kde.org)
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 
20 #ifndef PERSONDATA_H
21 #define PERSONDATA_H
22 
23 #include <kpeople/kpeople_export.h>
24 
25 #include <QObject>
26 #include <QPixmap>
27 
28 #include "global.h"
29 
30 namespace KPeople
31 {
32 class PersonDataPrivate;
33 
34 class PersonData;
35 
44 class KPEOPLE_EXPORT PersonData : public QObject
45 {
46  Q_OBJECT
47  Q_PROPERTY(QString name READ name NOTIFY dataChanged)
48  Q_PROPERTY(QPixmap photo READ photo NOTIFY dataChanged)
49  Q_PROPERTY(QString presenceIconName READ presenceIconName NOTIFY dataChanged)
50 
51 public:
56  PersonData(const QString &id, QObject *parent = 0);
57 
58  virtual ~PersonData();
59 
61  QString personUri() const;
62 
66  QStringList contactUris() const;
67 
71  QString name() const;
72 
76  QString presenceIconName() const;
77 
81  QPixmap photo() const;
82 
86  QVariant contactCustomProperty(const QString &key) const;
87 
91  QString presence() const;
92 
96  QString email() const;
97 
101  QUrl pictureUrl() const;
102 
104  QStringList groups() const;
105 
107  QStringList allEmails() const;
108 
109  // struct PhoneNumber {
110  // QString name;
111  // QString number;
112  // };
113  // QVector<PhoneNumber> phoneNumbers() const { createPhoneNumbers(customProperty("phoneNumbers")); };
114 
115 Q_SIGNALS:
119  void dataChanged();
120 
121 private Q_SLOTS:
122  void onContactChanged();
123 
124 private:
125  Q_DISABLE_COPY(PersonData)
126  Q_DECLARE_PRIVATE(PersonData)
127  PersonDataPrivate *d_ptr;
128 };
129 }
130 
131 #endif // PERSONDATA_H
KPeople::PersonData
Allows to query the information about a given person.
Definition: persondata.h:44
KPeople
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.

KPeople

Skip menu "KPeople"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List

Class Picker

Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal