src: Yearly copyright bump
[quassel.git] / src / qtui / systrayanimationnotificationbackend.cpp
index 4af9109..086dd2e 100644 (file)
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#include <QIcon>
-
 #include "systrayanimationnotificationbackend.h"
 
 #include "clientsettings.h"
+#include "icon.h"
 #include "mainwin.h"
 #include "qtui.h"
 #include "systemtray.h"
 
-SystrayAnimationNotificationBackend::SystrayAnimationNotificationBackend(QObject *parent)
+SystrayAnimationNotificationBackend::SystrayAnimationNotificationBackend(QObjectparent)
     : AbstractNotificationBackend(parent)
 {
     NotificationSettings notificationSettings;
-    notificationSettings.initAndNotify("Systray/Alert", this, SLOT(alertChanged(QVariant)), true);
+    notificationSettings.initAndNotify("Systray/Alert", this, &SystrayAnimationNotificationBackend::alertChanged, true);
 }
 
-
-void SystrayAnimationNotificationBackend::notify(const Notification &n)
+void SystrayAnimationNotificationBackend::notify(const Notification& n)
 {
     if (n.type != Highlight && n.type != PrivMsg)
         return;
@@ -44,46 +42,41 @@ void SystrayAnimationNotificationBackend::notify(const Notification &n)
         QtUi::mainWindow()->systemTray()->setAlert(true);
 }
 
-
 void SystrayAnimationNotificationBackend::close(uint notificationId)
 {
     Q_UNUSED(notificationId)
     QtUi::mainWindow()->systemTray()->setAlert(false);
 }
 
-
-void SystrayAnimationNotificationBackend::alertChanged(const QVariant &v)
+void SystrayAnimationNotificationBackend::alertChanged(const QVariant& v)
 {
     _alert = v.toBool();
 }
 
-
-SettingsPage *SystrayAnimationNotificationBackend::createConfigWidget() const
+SettingsPage* SystrayAnimationNotificationBackend::createConfigWidget() const
 {
     return new ConfigWidget();
 }
 
-
 /***************************************************************************/
 
-SystrayAnimationNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent) : SettingsPage("Internal", "SystrayAnimation", parent)
+SystrayAnimationNotificationBackend::ConfigWidget::ConfigWidget(QWidget* parent)
+    : SettingsPage("Internal", "SystrayAnimation", parent)
 {
     ui.setupUi(this);
-    ui.enableAlert->setIcon(QIcon::fromTheme("dialog-information"));
+    ui.enableAlert->setIcon(icon::get("dialog-information"));
 
     ui.attentionBehavior->setEnabled(ui.enableAlert->isChecked());
 
     initAutoWidgets();
 }
 
-
 QString SystrayAnimationNotificationBackend::ConfigWidget::settingsKey() const
 {
     return "Notification";
 }
 
-
-QVariant SystrayAnimationNotificationBackend::ConfigWidget::loadAutoWidgetValue(const QString &widgetName)
+QVariant SystrayAnimationNotificationBackend::ConfigWidget::loadAutoWidgetValue(const QString& widgetName)
 {
     if (widgetName == "attentionBehavior") {
         NotificationSettings s;
@@ -99,8 +92,7 @@ QVariant SystrayAnimationNotificationBackend::ConfigWidget::loadAutoWidgetValue(
     return SettingsPage::loadAutoWidgetValue(widgetName);
 }
 
-
-void SystrayAnimationNotificationBackend::ConfigWidget::saveAutoWidgetValue(const QString &widgetName, const QVariant &value)
+void SystrayAnimationNotificationBackend::ConfigWidget::saveAutoWidgetValue(const QString& widgetName, const QVariant& value)
 {
     if (widgetName == "attentionBehavior") {
         NotificationSettings s;