2 * Contacts model item, represents a contact in the contactlist tree
3 * This file is based on TelepathyQt4Yell Models
5 * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
6 * Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #ifndef TELEPATHY_CONTACT_MODEL_ITEM_H
24 #define TELEPATHY_CONTACT_MODEL_ITEM_H
26 #include <TelepathyQt4/Types>
27 #include <TelepathyQt4/Account>
28 #include <QtCore/QVariant> //needed for declare metatype
30 #include "tree-node.h"
31 #include "makneto-backend.h"
34 namespace MaknetoBackend
{
36 class MAKNETO_EXPORT ContactModelItem
: public TreeNode
39 Q_DISABLE_COPY(ContactModelItem
)
42 ContactModelItem(const Tp::ContactPtr
&contact
, const Tp::AccountPtr
&account
);
43 virtual ~ContactModelItem();
45 Q_INVOKABLE
virtual QVariant
data(int role
) const;
46 Q_INVOKABLE
virtual bool setData(int role
, const QVariant
&value
);
48 Tp::ContactPtr
contact() const;
55 friend struct Private
;
62 Q_DECLARE_METATYPE(MaknetoBackend::ContactModelItem
*);
65 #endif // TELEPATHY_CONTACT_MODEL_ITEM_H