• 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
kopetecontactlistelement.h
Go to the documentation of this file.
1 /*
2  kopeteplugindataobject.h - Kopete Plugin Data Object
3 
4  Copyright (c) 2003-2005 by Olivier Goffart <ogoffart@kde.org>
5  Copyright (c) 2003 by Martijn Klingens <klingens@kde.org>
6  Copyright (c) 2004 by Richard Smith <kde@metafoo.co.uk>
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 KOPETECONTACTLISTELEMENT_H
20 #define KOPETECONTACTLISTELEMENT_H
21 
22 #include <QtCore/QList>
23 #include <QtCore/QMap>
24 #include <QtGui/QStandardItem>
25 
26 #include "kopete_export.h"
27 #include "kopetepropertycontainer.h"
28 
29 namespace Kopete {
30 
31 class Plugin;
32 
33 
46 class KOPETE_EXPORT ContactListElement
47  : public PropertyContainer
48 {
49  Q_OBJECT
50 
51 protected:
52  ContactListElement( QObject *parent = 0L );
53  ~ContactListElement();
54 
55 
56 public:
57 
61  void setLoading( bool value );
62 
68  bool loading() const;
69 
81  void setPluginData( Plugin *plugin, const QMap<QString, QString> &value );
82 
83  void setPluginData( const QString &pluginId, const QMap<QString, QString> &pluginData );
84 
93  void setPluginData( Plugin *plugin, const QString &key, const QString &value );
94 
101  QMap<QString, QString> pluginData( Plugin *plugin ) const;
102 
111  QString pluginData( Plugin *plugin, const QString &key ) const;
112 
113  typedef QMap<QString, QMap<QString, QString> > PluginDataMap;
114 
115  typedef QMap<QString, QString> ContactData;
116  typedef QList<ContactData> ContactDataList;
117 
122  QMap<QString, ContactDataList > pluginContactData() const;
123 
128  ContactDataList pluginContactData( Plugin *plugin ) const;
129 
134  void clearPluginContactData();
135 
140  void setPluginContactData( Plugin *plugin, const ContactDataList &dataList );
141 
146  void appendPluginContactData( const QString &pluginId, const ContactData &data );
147 
151  const PluginDataMap pluginData() const;
152 
158  enum IconState { None, Open, Closed, Online, Away, Offline, Unknown };
159  typedef QMap<IconState, QString> IconMap;
160 
164  const IconMap icons() const;
165 
171  QString icon( IconState state = None ) const;
172 
177  void setIcon( const QString &icon, IconState = None );
178 
183  bool useCustomIcon() const;
184 
189  void setUseCustomIcon( bool useCustomIcon );
190 
191 signals:
195  void pluginDataChanged();
196 
200  void iconChanged( Kopete::ContactListElement::IconState, const QString & );
201 
205  void iconAppearanceChanged();
206 
210  void useCustomIconChanged( bool useCustomIcon );
211 
212 private:
213  class Private;
214  Private * const d;
215 };
216 
217 } //END namespace Kopete
218 
219 #endif // KOPETECONTACTLISTELEMENT_H
220 
221 // vim: set noet ts=4 sts=4 sw=4:
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
Kopete::ContactListElement::ContactDataList
QList< ContactData > ContactDataList
Definition: kopetecontactlistelement.h:116
QMap
kopetepropertycontainer.h
Kopete::ContactListElement::IconMap
QMap< IconState, QString > IconMap
Definition: kopetecontactlistelement.h:159
Kopete::ContactListElement
Definition: kopetecontactlistelement.h:46
QObject
NetworkStatus::Online
Definition: networkstatuscommon.h:9
kopete_export.h
QString
QList
Kopete::Plugin
Base class for all plugins or protocols.
Definition: kopeteplugin.h:84
Kopete::ContactListElement::ContactData
QMap< QString, QString > ContactData
Definition: kopetecontactlistelement.h:115
NetworkStatus::None
Definition: networkstatuscommon.h:11
Kopete::ContactListElement::PluginDataMap
QMap< QString, QMap< QString, QString > > PluginDataMap
Definition: kopetecontactlistelement.h:113
Kopete::PropertyContainer
Definition: kopetepropertycontainer.h:39
NetworkStatus::Offline
Definition: networkstatuscommon.h:9
Kopete::ContactListElement::IconState
IconState
The various icon states.
Definition: kopetecontactlistelement.h:158
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