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

KPeople

  • frameworks
  • kpeople
  • examples
personwidget.cpp
1 /*
2  Persons Model Example
3  Copyright (C) 2012 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
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 #include <QApplication>
20 #include <QWidget>
21 #include <QDebug>
22 
23 #include <persondata.h>
24 #include <widgets/persondetailsview.h>
25 
26 int main(int argc, char **argv)
27 {
28  QApplication app(argc, argv);
29  if (app.arguments().isEmpty() < 2) {
30  qWarning() << "Missing argument: \"" << qPrintable(app.arguments().first()) << " <contact id>\"";
31  return 1;
32  }
33 
34  KPeople::PersonData *person = new KPeople::PersonData(app.arguments().last());
35 
36  KPeople::PersonDetailsView w;
37  w.setPerson(person);
38 
39  w.show();
40 
41  app.exec();
42 }
KPeople::PersonDetailsView
Use PersonDetailsView to integrate a person's information in the GUI.
Definition: persondetailsview.h:40
KPeople::PersonData
Allows to query the information about a given person.
Definition: persondata.h:44
KPeople::PersonDetailsView::setPerson
void setPerson(PersonData *person)
Specifies the person for which the details will be displayed.
Definition: persondetailsview.cpp:150
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