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

KPeople

  • frameworks
  • kpeople
  • src
  • widgets
mergedialog.h
1 /*
2  KPeople - Duplicates
3  Copyright (C) 2013 Franck Arrecot <franck.arrecot@gmail.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 #ifndef MERGEDIALOG_H
21 #define MERGEDIALOG_H
22 
23 #include <kpeople/kpeople_export.h>
24 
25 #include <QDialog>
26 #include <QModelIndex>
27 
28 class QStandardItem;
29 class KJob;
30 class MergeDialogPrivate;
31 
32 namespace KPeople
33 {
34 class PersonsModel;
35 class Match;
36 
44 class KPEOPLE_EXPORT MergeDialog : public QDialog
45 {
46  Q_OBJECT
47 
48 public:
49  enum Role {
50  NameRole = Qt::DisplayRole,
51  UriRole = Qt::UserRole + 1,
52  PixmapRole,
53  MergeReasonRole
54  };
55 
56  explicit MergeDialog(QWidget *parent = 0);
57  ~MergeDialog();
58 
62  void setPersonsModel(PersonsModel *model);
63 
64 private Q_SLOTS:
65  void searchForDuplicates();
66  void searchForDuplicatesFinished(KJob *);
67  void onMergeButtonClicked();
68 
69 private:
70  QStandardItem *itemMergeContactFromMatch(bool parent, const KPeople::Match &match);
71  void feedDuplicateModelFromMatches(const QList<Match> &matches);
72 
73  MergeDialogPrivate *const d_ptr;
74  Q_DECLARE_PRIVATE(MergeDialog)
75 };
76 
77 }
78 
79 #endif // MERGEDIALOG_H
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
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