2 privacyaccountlist.h - a list of accounts that are part of the black/whitelist
4 Copyright (c) 2006 by Andre Duffeck <duffeck@kde.org>
5 Kopete (c) 2003-2006 by the Kopete developers <kopete-devel@kde.org>
7 *************************************************************************
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
14 *************************************************************************
16 #ifndef PRIVACYACCOUNTLIST_H
17 #define PRIVACYACCOUNTLIST_H
19 #include <QAbstractTableModel>
21 #include <kopete_export.h>
24 namespace Kopete
{ class Protocol
; }
26 typedef QPair
< QString
, Kopete::Protocol
*> AccountListEntry
;
28 class KOPETEPRIVACY_EXPORT PrivacyAccountListModel
: public QAbstractTableModel
33 PrivacyAccountListModel(QObject
*parent
= 0);
34 ~PrivacyAccountListModel();
36 void loadAccounts( const QStringList
&accounts
);
37 void addAccount(const QString
&accountId
, Kopete::Protocol
*protocol
);
38 void addAccount(const AccountListEntry
&entry
);
40 int rowCount(const QModelIndex
&parent
= QModelIndex()) const;
41 int columnCount(const QModelIndex
&parent
= QModelIndex()) const;
42 QVariant
data(const QModelIndex
&index
, int role
) const;
43 bool removeRow(int position
, const QModelIndex
&index
= QModelIndex());
44 bool removeRows(int position
, int rows
, const QModelIndex
&index
= QModelIndex());
46 QStringList
toStringList() const;
49 QList
< AccountListEntry
> m_list
;