• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/libkopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • libkopete
kopetecontactlist.h
Go to the documentation of this file.
1 /*
2  kopetecontactlist.h - Kopete's Contact List backend
3 
4  Copyright (c) 2002 by Martijn Klingens <klingens@kde.org>
5  Copyright (c) 2002-2004 by Olivier Goffart <ogoffart@kde.org>
6 
7  Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
8 
9  *************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Lesser General Public *
13  * License as published by the Free Software Foundation; either *
14  * version 2 of the License, or (at your option) any later version. *
15  * *
16  *************************************************************************
17 */
18 
19 #ifndef KOPETECONTACTLIST_H__
20 #define KOPETECONTACTLIST_H__
21 
22 #include <QtCore/QObject>
23 #include <QtCore/QList>
24 #include <QtGui/QStandardItemModel>
25 
26 #include <KUrl>
27 
28 #include "kopete_export.h"
29 
30 namespace Kopete
31 {
32 
33 class MetaContact;
34 class Group;
35 class Contact;
36 
37 
49 class KOPETE_EXPORT ContactList : public QObject
50 {
51  Q_OBJECT
52 
53 public:
58  static ContactList *self();
59  ~ContactList();
60 
72  QList<MetaContact *> metaContacts() const;
73 
77  QList<Group *> groups() const;
78 
83  MetaContact *metaContact( const QString &metaContactId ) const;
84 
88  Group * group(unsigned int groupId) const;
89 
90 
99  Contact *findContact( const QString &protocolId, const QString &accountId, const QString &contactId ) const;
100 
104  MetaContact *findMetaContactByDisplayName( const QString &displayName ) const;
105 
109  MetaContact *findMetaContactByContactId( const QString &contactId ) const;
110 
119  Group * findGroup( const QString &displayName, int type = 0/*Group::Normal*/ );
120 
124  QList<MetaContact *> selectedMetaContacts() const;
125 
129  QList<Group *> selectedGroups() const ;
130 
137  MetaContact* myself();
138 
139 public slots:
146  void addMetaContacts( QList<MetaContact *> metaContacts );
147 
154  void addMetaContact( Kopete::MetaContact *c );
155 
160  void removeMetaContact( Kopete::MetaContact *contact );
161 
165  void mergeMetaContacts( QList<MetaContact *> src, Kopete::MetaContact *dst );
166 
171  void addGroups( QList<Group *> groups );
172 
177  void addGroup(Kopete::Group *);
178 
183  void removeGroup(Kopete::Group *);
184 
190  void setSelectedItems(QList<MetaContact *> metaContacts , QList<Group *> groups);
191 
196  void load();
197 
198  bool loaded() const;
199 
200  void save();
201 
206  void shutdown();
207 
208 signals:
214  void metaContactAdded( Kopete::MetaContact *mc );
215 
219  void metaContactRemoved( Kopete::MetaContact *mc );
220 
224  void groupAdded( Kopete::Group * );
225 
229  void groupRemoved( Kopete::Group * );
230 
234  void groupRenamed(Kopete::Group *, const QString & oldname);
235 
239  void metaContactAddedToGroup( Kopete::MetaContact *mc, Kopete::Group *to );
243  void metaContactRemovedFromGroup( Kopete::MetaContact *mc, Kopete::Group *from );
244 
248  void metaContactMovedToGroup( Kopete::MetaContact *mc, Kopete::Group *from, Kopete::Group *to );
249 
254  void selectionChanged();
260  void metaContactSelected(bool);
261 
262  void contactListLoaded();
263 
264 private slots:
268  void slotSaveLater();
272  void slotKABCChanged();
273 
274 private:
278  ContactList();
279 
280  static ContactList *s_self;
281  class Private;
282  Private * const d;
283 };
284 
285 } //END namespace Kopete
286 
287 
288 #endif
289 
290 
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
Kopete::ContactList
manage contacts and metacontact
Definition: kopetecontactlist.h:49
QObject
kopete_export.h
QString
QList< MetaContact * >
Kopete::Contact
Definition: kopetecontact.h:58
Kopete::Group
Class which represents the Group.
Definition: kopetegroup.h:44
Kopete::MetaContact
Definition: kopetemetacontact.h:54
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



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