X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fsystraynotificationbackend.h;h=be428ff276753028f1a9949d0437e9791e4b337c;hb=518cd2bc478ab3675a60ec46d3ef183cace0cae7;hp=ca858b80263af63e724277359333479f7ea2581d;hpb=39328183a6a87c6eb10a9dbbffcd5d65bf154a1f;p=quassel.git diff --git a/src/qtui/systraynotificationbackend.h b/src/qtui/systraynotificationbackend.h index ca858b80..be428ff2 100644 --- a/src/qtui/systraynotificationbackend.h +++ b/src/qtui/systraynotificationbackend.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -31,20 +31,20 @@ class SystrayNotificationBackend : public AbstractNotificationBackend Q_OBJECT public: - SystrayNotificationBackend(QObject *parent = nullptr); + SystrayNotificationBackend(QObject* parent = nullptr); - void notify(const Notification &); - void close(uint notificationId); - virtual SettingsPage *createConfigWidget() const; + void notify(const Notification&) override; + void close(uint notificationId) override; + SettingsPage* createConfigWidget() const override; protected: - virtual bool eventFilter(QObject *obj, QEvent *event); + bool eventFilter(QObject* obj, QEvent* event) override; private slots: - void notificationActivated(uint notificationId); - void notificationActivated(SystemTray::ActivationReason); + void onNotificationActivated(uint notificationId); + void onNotificationActivated(SystemTray::ActivationReason); - void showBubbleChanged(const QVariant &); + void showBubbleChanged(const QVariant&); void updateToolTip(); private: @@ -52,25 +52,24 @@ private: bool _showBubble; QList _notifications; - bool _blockActivation; + bool _blockActivation{false}; }; - class SystrayNotificationBackend::ConfigWidget : public SettingsPage { Q_OBJECT public: - ConfigWidget(QWidget *parent = nullptr); - void save(); - void load(); - bool hasDefaults() const; - void defaults(); + ConfigWidget(QWidget* parent = nullptr); + void save() override; + void load() override; + bool hasDefaults() const override; + void defaults() override; private slots: void widgetChanged(); private: - QCheckBox *_showBubbleBox; + QCheckBox* _showBubbleBox; bool _showBubble; };