kde-workspace/plasma/applets/notifications/applicationswidget.h

61 lines
1.8 KiB
C
Raw Normal View History

/* This file is part of the KDE project
Copyright (C) 2023 Ivailo Monev <xakepa10@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2, as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef APPLICATIONSWIDGET_H
#define APPLICATIONSWIDGET_H
#include <QMutex>
#include <QGraphicsWidget>
#include <QGraphicsLinearLayout>
#include <Plasma/Label>
#include <Plasma/Frame>
#include <Plasma/DataEngine>
class NotificationsWidget;
class ApplicationsWidget : public QGraphicsWidget
{
Q_OBJECT
public:
ApplicationsWidget(QGraphicsItem *parent, NotificationsWidget *notificationswidget);
~ApplicationsWidget();
int count() const;
Q_SIGNALS:
int countChanged();
void newNotification();
private Q_SLOTS:
void sourceAdded(const QString &name);
void dataUpdated(const QString &name, const Plasma::DataEngine::Data &data);
void slotRemoveActivated();
void slotConfigureActivated();
void slotActionClicked();
private:
QMutex m_mutex;
NotificationsWidget *m_notificationswidget;
QGraphicsLinearLayout* m_layout;
Plasma::Label* m_label;
QList<Plasma::Frame*> m_frames;
Plasma::DataEngine *m_dataengine;
};
#endif // APPLICATIONSWIDGET_H