make webinterface translatable. there are around 20 short strings, all with context...
[kdenetwork.git] / kopete / libkopete / chatsessionmemberslistmodel.h
blobd66d1049b4f429632075d1556ec0d048c07a4364
1 /*
2 ChatSessionMembersListModel
4 Copyright (c) 2007 by Duncan Mac-Vicar Prett <duncan@kde.org>
6 Kopete (c) 2002-2007 by the Kopete developers <kopete-devel@kde.org>
8 *************************************************************************
9 * *
10 * This library is free software; you can redistribute it and/or *
11 * modify it under the terms of the GNU Lesser General Public *
12 * License as published by the Free Software Foundation; either *
13 * version 2 of the License, or (at your option) any later version. *
14 * *
15 *************************************************************************
18 #ifndef Kopete_ChatSessionMembersListModel_H
19 #define Kopete_ChatSessionMembersListModel_H
21 #include <QAbstractListModel>
23 #include "kopetechatsession.h"
24 #include "kopete_export.h"
26 class Kopete::Contact;
28 namespace Kopete
31 class KOPETE_EXPORT ChatSessionMembersListModel : public QAbstractListModel
33 Q_OBJECT
34 public:
35 explicit ChatSessionMembersListModel(QObject * parent = 0);
37 // Model methods
38 int rowCount(const QModelIndex &parent = QModelIndex()) const;
39 QVariant data(const QModelIndex &index, int role) const;
40 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
41 Kopete::ChatSession *session() { return m_session; }
43 Kopete::Contact *contactAt( const QModelIndex &index ) const;
44 public slots:
45 /**
46 * Called when the ChatSession change for this list (eg. when the tab in the KopeteChatWindow is changing)
48 void setChatSession(Kopete::ChatSession *session);
50 private slots:
51 /**
52 * Called when a contact is added to the chat session.
53 * Adds this contact to the contact list view.
54 * @param c The contact that joined the chat
56 void slotContactAdded( const Kopete::Contact *c );
58 /**
59 * Called when a contact is removed from the chat session.
60 * Removes this contact from the contact list view.
61 * @param c The contact that left the chat
63 void slotContactRemoved( const Kopete::Contact *c );
65 /**
66 * Called when a contact changes status.
67 * @param contact The contact who changed status
68 * @param status The new status of the contact
70 void slotContactStatusChanged( Kopete::Contact *contact, const Kopete::OnlineStatus &status );
72 /**
73 * Called when something in the session changed that requires a full
74 * model reset
76 void slotSessionChanged();
78 /**
79 * Called when session has been closed
81 void slotSessionClosed();
83 private:
84 Kopete::ChatSession *m_session;
90 #endif