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

KPeople

  • frameworks
  • kpeople
  • examples
mergededicateddialog.cpp
1 /*
2  Copyright (C) 2013 Franck Arrecot <franck.arrecot@gmail.com>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 #include <QApplication>
20 
21 #include <personsmodel.h>
22 #include <personsmodelfeature.h>
23 #include <widgets/mergedialog.h>
24 
25 using namespace KPeople;
26 
27 int main(int argc, char **argv)
28 {
29  QApplication app(argc, argv);
30 
31  MergeDialog dialog;
32  PersonsModel *persons = new PersonsModel(&dialog);
33  QList<KPeople::PersonsModelFeature> features;
34  features << KPeople::PersonsModelFeature::emailModelFeature()
35  << KPeople::PersonsModelFeature::avatarModelFeature()
36  << KPeople::PersonsModelFeature::imModelFeature()
37  << KPeople::PersonsModelFeature::fullNameModelFeature();
38  persons->startQuery(features);
39 
40  dialog.setPersonsModel(persons);
41 
42  QObject::connect(persons, SIGNAL(modelInitialized()), &dialog, SLOT(show()));
43  QObject::connect(&dialog, SIGNAL(finished(int)), &app, SLOT(quit()));
44 
45  return app.exec();
46 }
KPeople
The KPeople namespace contains all the classes for Libkpeople.
KPeople::PersonsModel
This class creates a model of all known contacts from all sources Contacts are represented as a tree ...
Definition: personsmodel.h:42
KPeople::MergeDialog::setPersonsModel
void setPersonsModel(PersonsModel *model)
Specifies which PersonsModel will be used to look for duplicates.
Definition: mergedialog.cpp:97
KPeople::MergeDialog
The merge dialog will be used to provide a GUI to attempt to figure out what contacts should be merge...
Definition: mergedialog.h:44
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