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

KPeople

  • frameworks
  • kpeople
  • examples
duplicatesdialog.cpp
1 /*
2  Duplicates Example
3  Copyright (C) 2014 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 
20 #include <QApplication>
21 #include <QTimer>
22 #include "mergedialog.h"
23 #include <personsmodel.h>
24 
25 int main(int argc, char **argv)
26 {
27  QApplication app(argc, argv);
28 
29  KPeople::MergeDialog *dialog = new KPeople::MergeDialog;
30  KPeople::PersonsModel *model = new KPeople::PersonsModel(&app);
31 
32  QTimer *t = new QTimer(&app);
33  t->setInterval(500);
34  t->setSingleShot(true);
35  QObject::connect(model, SIGNAL(modelInitialized(bool)), t, SLOT(start()));
36  QObject::connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), t, SLOT(start()));
37  QObject::connect(t, &QTimer::timeout, [dialog, model]() {
38  dialog->setPersonsModel(model);
39  dialog->show();
40  });
41 
42  return app.exec();
43 }
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