2 This file is part of KAddressBook.
4 Copyright (c) 2009 Tobias Koenig <tokoe@kde.org>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License along
17 with this program; if not, write to the Free Software Foundation, Inc.,
18 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef GLOBALCONTACTMODEL_H
22 #define GLOBALCONTACTMODEL_H
27 class ContactsTreeModel
;
33 * @short Provides the global model for all contacts
35 * This model provides the EntityTreeModel for all contacts.
36 * The model is accessable via the static instance() method.
38 class GlobalContactModel
42 * Destroys the global contact model.
44 ~GlobalContactModel();
47 * Returns the global contact model instance.
49 static GlobalContactModel
* instance();
52 * Returns the item model of the global instance.
54 Akonadi::ContactsTreeModel
* model() const;
59 static GlobalContactModel
*mInstance
;
61 Akonadi::Session
*mSession
;
62 Akonadi::ChangeRecorder
*mMonitor
;
63 Akonadi::ContactsTreeModel
*mModel
;