1 /*
2     This file is part of Choqok, the KDE micro-blogging client
3 
4     Copyright (C) 2010-2012 Andrey Esin <gmlastik@gmail.com>
5 
6     This program is free software; you can redistribute it and/or
7     modify it under the terms of the GNU General Public License as
8     published by the Free Software Foundation; either version 2 of
9     the License or (at your option) version 3 or any later version
10     accepted by the membership of KDE e.V. (or its successor approved
11     by the membership of KDE e.V.), which shall act as a proxy
12     defined in Section 14 of version 3 of the license.
13 
14     This program is distributed in the hope that it will be useful,
15     but WITHOUT ANY WARRANTY; without even the implied warranty of
16     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17     GNU General Public License for more details.
18 
19     You should have received a copy of the GNU General Public License
20     along with this program; if not, see http://www.gnu.org/licenses/
21 
22 */
23 
24 #ifndef INDICATORMANAGER_H
25 #define INDICATORMANAGER_H
26 
27 #include <qindicateserver.h>
28 #include <qindicateindicator.h>
29 
30 #include "account.h"
31 #include "choqok_export.h"
32 
33 namespace Choqok
34 {
35 
36 class CHOQOK_EXPORT MessageIndicatorManager : public QObject
37 {
38     Q_OBJECT
39 public:
40     static MessageIndicatorManager *self();
41     ~MessageIndicatorManager();
42     void newPostInc(int unread, const QString &alias, const QString &timeline);
43     QIndicate::Server *iServer;
44     QIndicate::Indicator *iIndicator;
45 
46 private:
47     MessageIndicatorManager();
48     static MessageIndicatorManager *mSelf;
49     QMap<QString, int> showList;
50     QMap<QString, QIndicate::Indicator *> iList;
51     QImage getIconByAlias(const QString &alias);
52 
53 public Q_SLOTS:
54     void slotDisplay(QIndicate::Indicator *);
55     void slotShowMainWindow();
56     void slotCanWorkWithAccs();
57     void slotupdateUnreadCount(int change, int sum);
58     void slotConfigChanged();
59 };
60 }
61 #endif // INDICATORMANAGER_H
62