Warning, file /network/ruqola/src/core/notifications/notificationpreferences.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "notificationpreferences.h" 0008 #include "model/notificationdesktopdurationpreferencemodel.h" 0009 #include "model/notificationdesktopsoundpreferencemodel.h" 0010 #include "model/notificationpreferencemodel.h" 0011 0012 NotificationPreferences::NotificationPreferences(QObject *parent) 0013 : QObject(parent) 0014 , mEmailNotificationModel(new NotificationPreferenceModel(this)) 0015 , mMobileNotificationModel(new NotificationPreferenceModel(this)) 0016 , mDesktopNotificationModel(new NotificationPreferenceModel(this)) 0017 , mDesktopDurationNotificationModel(new NotificationDesktopDurationPreferenceModel(this)) 0018 , mDesktopSoundNotificationModel(new NotificationDesktopSoundPreferenceModel(this)) 0019 { 0020 } 0021 0022 NotificationPreferences::~NotificationPreferences() = default; 0023 0024 NotificationPreferenceModel *NotificationPreferences::emailNotificationModel() const 0025 { 0026 return mEmailNotificationModel; 0027 } 0028 0029 NotificationPreferenceModel *NotificationPreferences::mobileNotificationModel() const 0030 { 0031 return mMobileNotificationModel; 0032 } 0033 0034 NotificationPreferenceModel *NotificationPreferences::desktopNotificationModel() const 0035 { 0036 return mDesktopNotificationModel; 0037 } 0038 0039 NotificationDesktopDurationPreferenceModel *NotificationPreferences::desktopDurationNotificationModel() const 0040 { 0041 return mDesktopDurationNotificationModel; 0042 } 0043 0044 NotificationDesktopSoundPreferenceModel *NotificationPreferences::desktopSoundNotificationModel() const 0045 { 0046 return mDesktopSoundNotificationModel; 0047 } 0048 0049 NotificationPreferences *NotificationPreferences::NotificationPreferences::self() 0050 { 0051 static NotificationPreferences s_self; 0052 return &s_self; 0053 } 0054 0055 #include "moc_notificationpreferences.cpp"