File indexing completed on 2024-05-05 09:27:17
0001 /* 0002 This file is part of Akregator. 0003 0004 SPDX-FileCopyrightText: 2004 Stanislav Karchebny <Stanislav.Karchebny@kdemail.net> 0005 0006 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0 0007 */ 0008 0009 #pragma once 0010 0011 #include "akregator_export.h" 0012 0013 #include <KStatusNotifierItem> 0014 namespace Akregator 0015 { 0016 class AKREGATOR_EXPORT TrayIcon : public KStatusNotifierItem 0017 { 0018 Q_OBJECT 0019 public: 0020 static TrayIcon *getInstance(); 0021 static void setInstance(TrayIcon *trayIcon); 0022 0023 bool isEnabled() const; 0024 void setEnabled(bool enabled); 0025 0026 explicit TrayIcon(QObject *parent = nullptr); 0027 ~TrayIcon() override; 0028 0029 public Q_SLOTS: 0030 void settingsChanged(); 0031 void slotSetUnread(int unread); 0032 0033 private: 0034 static TrayIcon *m_instance; 0035 int m_unread = 0; 0036 bool mEnabled = false; 0037 }; 0038 } // namespace Akregator