/usr/include/kopete/kopetegroup.h is in libkopete-dev 4:15.12.3-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | /*
kopetegroup.h - Kopete (Meta)Contact Group
Copyright (c) 2002-2005 by Olivier Goffart <ogoffart@kde.org>
Copyright (c) 2003 by Martijn Klingens <klingens@kde.org>
Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org>
*************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
*************************************************************************
*/
#ifndef KOPETEGROUP_H
#define KOPETEGROUP_H
#include <QtCore/QList>
#include "kopetecontactlistelement.h"
#include "kopete_export.h"
namespace Kopete {
class MetaContact;
class Message;
/**
* Class which represents the Group.
*
* A Group is a ConstacListElement which means plugin can save data.
*
* some static group are availavle from this class: topLevel and temporary
*
* @author Olivier Goffart <ogoffart@kde.org>
*/
class KOPETE_EXPORT Group : public ContactListElement
{
Q_PROPERTY( QString displayName READ displayName WRITE setDisplayName )
Q_PROPERTY( uint groupId READ groupId )
Q_PROPERTY( bool expanded READ isExpanded WRITE setExpanded )
Q_OBJECT
public:
typedef QList<Group*> List;
/** Kinds of groups. */
enum GroupType { Normal=0, Temporary, TopLevel, Offline };
/**
* \brief Create an empty group
*
* Note that the constructor will not add the group automatically to the contact list.
* Use @ref ContactList::addGroup() to add it
*/
Group();
/**
* \brief Create a group of the specified type
*
* Overloaded constructor to create a group with a display name and Normal type.
*/
explicit Group( const QString &displayName );
~Group();
/**
* \brief Return the group's display name
*
* \return the display name of the group
*/
QString displayName() const;
/**
* \brief Rename the group
*/
void setDisplayName( const QString &newName );
/**
* \return the group type
*/
GroupType type() const;
/**
* \return the unique id for this group
*/
uint groupId() const;
/**
* @brief child metacontact
* This function is not very efficient - it searches through all the metacontacts in the contact list
* \return the members of this group
*/
QList<MetaContact *> members() const;
/**
* \brief Set if the group is expanded.
*/
void setExpanded( bool expanded );
/**
*
* \return true if the group is expanded.
* \return false otherwise
*/
bool isExpanded() const;
/**
* \return a Group pointer to the toplevel group
*/
static Group *topLevel();
/**
* \return a Group pointer to the temporary group
*/
static Group *temporary();
/**
* \return a Group pointer to the offline group
*/
static Group *offline();
/**
* @internal
*/
void setGroupId( uint groupId );
/**
* @internal
*/
uint uniqueGroupId() const;
/**
* @internal
*/
void setUniqueGroupId( uint uniqueGroupId );
public slots:
/**
* Send a message to all contacts in the group
*/
void sendMessage();
signals:
/**
* \brief Emitted when the group has been renamed
*/
void displayNameChanged( Kopete::Group *group , const QString &oldName );
private slots:
void sendMessage( Kopete::Message& );
private:
/**
* \brief Create a group of the specified type
*/
Group( const QString &displayName, GroupType type );
static Group *s_topLevel;
static Group *s_temporary;
static Group *s_offline;
class Private;
Private * const d;
/**
* @internal used to get reachabe contact to send message to thom.
*/
QList<MetaContact *> onlineMembers() const;
};
} //END namespace Kopete
#endif
|