X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsnorenotificationbackend.h;h=02d48fec3112a73145f5976cc7c0df9153786c28;hp=e0abdf7f49c0558414fe98546ea37e92240ec31d;hb=673ded0d543cbdc2cf6e746b6bee7c1d21af8f90;hpb=8cece06596c290d69c1f32b7221c796437f5fabb diff --git a/src/qtui/snorenotificationbackend.h b/src/qtui/snorenotificationbackend.h index e0abdf7f..02d48fec 100644 --- a/src/qtui/snorenotificationbackend.h +++ b/src/qtui/snorenotificationbackend.h @@ -1,62 +1,58 @@ /*************************************************************************** -* Copyright (C) 2011-2013 by Patrick von Reth * -* vonreth@kde.org * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) version 3. * -* * -* This program 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 General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ + * Copyright (C) 2011-2020 by Hannah von Reth * + * vonreth@kde.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef SNORENOTIFICATIONBACKEND_H_ #define SNORENOTIFICATIONBACKEND_H_ -#include "abstractnotificationbackend.h" +#include +#include +#include "abstractnotificationbackend.h" #include "settingspage.h" #include "ui_snorentificationconfigwidget.h" -#include -#include - class SystrayNotificationBackend; -class SnoreNotificationBackend : public AbstractNotificationBackend { +class SnoreNotificationBackend : public AbstractNotificationBackend +{ Q_OBJECT public: - SnoreNotificationBackend (QObject *parent); + SnoreNotificationBackend(QObject* parent); ~SnoreNotificationBackend(); - void notify(const Notification &); + void notify(const Notification&); void close(uint notificationId); - virtual SettingsPage *createConfigWidget() const; - -signals: - void activated(uint notificationId = 0); + virtual SettingsPage* createConfigWidget() const; public slots: void actionInvoked(Snore::Notification); private slots: - void setTraybackend(const QVariant &b); + void setTraybackend(const QVariant& b); private: - class ConfigWidget; #ifndef HAVE_KDE - SystrayNotificationBackend * m_systrayBackend = nullptr; + SystrayNotificationBackend* m_systrayBackend = nullptr; #endif QHash m_notificationIds; Snore::Icon m_icon; @@ -64,18 +60,19 @@ private: Snore::Alert m_alert; }; -class SnoreNotificationBackend::ConfigWidget : public SettingsPage { +class SnoreNotificationBackend::ConfigWidget : public SettingsPage +{ Q_OBJECT public: - ConfigWidget(QWidget *parent = 0); + ConfigWidget(QWidget* parent = 0); bool hasDefaults() const; void defaults(); void load(); void save(); private slots: - void useSnnoreChanged(bool); + void useSnoreChanged(bool); private: Ui::SnoreNotificationConfigWidget ui;