File indexing completed on 2024-04-21 12:26:41

0001 /*
0002     This file is part of Choqok, the KDE micro-blogging client
0003 
0004     SPDX-FileCopyrightText: 2010-2012 Andrey Esin <gmlastik@gmail.com>
0005 
0006     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0007 */
0008 
0009 #ifndef INDICATORMANAGER_H
0010 #define INDICATORMANAGER_H
0011 
0012 #include <qindicateserver.h>
0013 #include <qindicateindicator.h>
0014 
0015 #include "account.h"
0016 #include "choqok_export.h"
0017 
0018 namespace Choqok
0019 {
0020 
0021 class CHOQOK_EXPORT MessageIndicatorManager : public QObject
0022 {
0023     Q_OBJECT
0024 public:
0025     static MessageIndicatorManager *self();
0026     ~MessageIndicatorManager();
0027     void newPostInc(int unread, const QString &alias, const QString &timeline);
0028     QIndicate::Server *iServer;
0029     QIndicate::Indicator *iIndicator;
0030 
0031 private:
0032     MessageIndicatorManager();
0033     static MessageIndicatorManager *mSelf;
0034     QMap<QString, int> showList;
0035     QMap<QString, QIndicate::Indicator *> iList;
0036     QImage getIconByAlias(const QString &alias);
0037 
0038 public Q_SLOTS:
0039     void slotDisplay(QIndicate::Indicator *);
0040     void slotShowMainWindow();
0041     void slotCanWorkWithAccs();
0042     void slotupdateUnreadCount(int change, int sum);
0043     void slotConfigChanged();
0044 };
0045 }
0046 #endif // INDICATORMANAGER_H