File indexing completed on 2024-04-28 04:44:14
0001 /* 0002 SnoreNotify is a Notification Framework based on Qt 0003 Copyright (C) 2014-2015 Hannah von Reth <vonreth@kde.org> 0004 0005 SnoreNotify is free software: you can redistribute it and/or modify 0006 it under the terms of the GNU Lesser General Public License as published by 0007 the Free Software Foundation, either version 3 of the License, or 0008 (at your option) any later version. 0009 0010 SnoreNotify is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 GNU Lesser General Public License for more details. 0014 0015 You should have received a copy of the GNU Lesser General Public License 0016 along with SnoreNotify. If not, see <http://www.gnu.org/licenses/>. 0017 */ 0018 0019 #include "application_p.h" 0020 #include "lambdahint.h" 0021 #include "snore_p.h" 0022 #include "snoreconstants.h" 0023 0024 #include <QGuiApplication> 0025 0026 using namespace Snore; 0027 0028 ApplicationData::ApplicationData(const QString &key, const QString &name, const Icon &icon): 0029 m_key(key), 0030 m_name(name), 0031 m_icon(icon), 0032 m_defaultAlert(qApp->translate("Default Alert", "Default"), icon) 0033 { 0034 Q_ASSERT_X(!name.isEmpty(), Q_FUNC_INFO, "invalid name detected"); 0035 m_alerts.insert(m_defaultAlert.key(), m_defaultAlert); 0036 0037 m_hint.setValue("pushover-token", QLatin1String("aFB1TPCyZkkr7mubCGEKy5vJEWak9t")); 0038 m_hint.setValue("use-markup", false); 0039 m_hint.setValue("silent", QVariant::fromValue(LambdaHint([]() { 0040 return SnoreCore::instance().settingsValue(Snore::Constants::SettingsKeys::Silent); 0041 }))); 0042 0043 } 0044 0045 ApplicationData::~ApplicationData() 0046 { 0047 0048 }