• 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
kopetegroup.h
Go to the documentation of this file.
1 /*
2  kopetegroup.h - Kopete (Meta)Contact Group
3 
4  Copyright (c) 2002-2005 by Olivier Goffart <ogoffart@kde.org>
5  Copyright (c) 2003 by Martijn Klingens <klingens@kde.org>
6 
7  Kopete (c) 2002-2005 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 KOPETEGROUP_H
20 #define KOPETEGROUP_H
21 
22 #include <QtCore/QList>
23 
24 #include "kopetecontactlistelement.h"
25 
26 #include "kopete_export.h"
27 
28 
29 namespace Kopete {
30 
31 
32 class MetaContact;
33 class Message;
34 
44 class KOPETE_EXPORT Group : public ContactListElement
45 {
46  Q_PROPERTY( QString displayName READ displayName WRITE setDisplayName )
47  Q_PROPERTY( uint groupId READ groupId )
48  Q_PROPERTY( bool expanded READ isExpanded WRITE setExpanded )
49 
50  Q_OBJECT
51 
52 public:
53  typedef QList<Group*> List;
54 
56  enum GroupType { Normal=0, Temporary, TopLevel, Offline };
57 
64  Group();
65 
71  explicit Group( const QString &displayName );
72 
73  ~Group();
74 
80  QString displayName() const;
81 
85  void setDisplayName( const QString &newName );
86 
90  GroupType type() const;
91 
95  uint groupId() const;
96 
102  QList<MetaContact *> members() const;
103 
107  void setExpanded( bool expanded );
108 
114  bool isExpanded() const;
115 
119  static Group *topLevel();
120 
124  static Group *temporary();
125 
129  static Group *offline();
130 
134  void setGroupId( uint groupId );
135 
139  uint uniqueGroupId() const;
143  void setUniqueGroupId( uint uniqueGroupId );
144 
145 public slots:
149  void sendMessage();
150 
151 
152 signals:
156  void displayNameChanged( Kopete::Group *group , const QString &oldName );
157 
158 
159 private slots:
160  void sendMessage( Kopete::Message& );
161 
162 private:
166  Group( const QString &displayName, GroupType type );
167 
168  static Group *s_topLevel;
169  static Group *s_temporary;
170  static Group *s_offline;
171 
172  class Private;
173  Private * const d;
174 
178  QList<MetaContact *> onlineMembers() const;
179 };
180 
181 } //END namespace Kopete
182 
183 #endif
184 
185 
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
Kopete::Group::GroupType
GroupType
Kinds of groups.
Definition: kopetegroup.h:56
kopetecontactlistelement.h
Kopete::ContactListElement
Definition: kopetecontactlistelement.h:46
kopete_export.h
QString
QList
Kopete::Group::TopLevel
Definition: kopetegroup.h:56
Kopete::Group
Class which represents the Group.
Definition: kopetegroup.h:44
NetworkStatus::Offline
Definition: networkstatuscommon.h:9
Kopete::Message
Representation of a message in Kopete.
Definition: kopetemessage.h:82
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