1 | /* |
2 | * Copyright (C) 2007, 2008, 2009, 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
3 | * |
4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU Lesser/Library General Public License version 2, |
6 | * or (at your option) any later version, as published by the Free |
7 | * Software Foundation |
8 | * |
9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU Lesser/Library General Public License for more details |
13 | * |
14 | * You should have received a copy of the GNU Lesser/Library General Public |
15 | * License along with this program; if not, write to the |
16 | * Free Software Foundation, Inc., |
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
18 | */ |
19 | |
20 | #ifndef LANCELOTAPP_MODELS_MESSAGESKMAIL_H |
21 | #define LANCELOTAPP_MODELS_MESSAGESKMAIL_H |
22 | |
23 | #include <lancelot/lancelot_export.h> |
24 | |
25 | #include "BaseModel.h" |
26 | |
27 | namespace Lancelot { |
28 | namespace Models { |
29 | |
30 | /** |
31 | * Lists folders in KMail that have unread mail in them |
32 | */ |
33 | class LANCELOT_EXPORT MessagesKmail : public BaseModel { |
34 | Q_OBJECT |
35 | public: |
36 | /** |
37 | * Creates a new MessagesKmail instance |
38 | */ |
39 | MessagesKmail(); |
40 | |
41 | /** |
42 | * Destroys this MessagesKmail |
43 | */ |
44 | ~MessagesKmail(); |
45 | |
46 | protected: |
47 | /** |
48 | * Opens the message folder |
49 | * @param index index of the folder to open |
50 | */ |
51 | void activate(int index); |
52 | |
53 | void load(); |
54 | |
55 | L_Override QString selfShortTitle() const; |
56 | |
57 | protected Q_SLOTS: |
58 | void updateLater(); |
59 | void update(); |
60 | |
61 | private: |
62 | class Private; |
63 | Private * const d; |
64 | }; |
65 | |
66 | } // namespace Models |
67 | } // namespace Lancelot |
68 | |
69 | #endif // LANCELOTAPP_MODELS_MESSAGESKMAIL_H |
70 | |
71 | |
72 | |