File indexing completed on 2024-04-21 03:42:17
0001 /* 0002 SPDX-FileCopyrightText: 2016 Jasem Mutlaq <mutlaqja@ikarustech.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <KLocalizedString> 0010 #include <QString> 0011 0012 /** 0013 * @namespace KSNotification 0014 * General KStars Notifications for desktop and lite version 0015 * 0016 * @author Jasem Mutlaq 0017 */ 0018 namespace KSNotification 0019 { 0020 0021 typedef enum 0022 { 0023 Debug, 0024 Info, 0025 Warn, 0026 Alert 0027 } EventType; 0028 0029 typedef enum 0030 { 0031 General, 0032 INDI, 0033 Capture, 0034 Focus, 0035 Align, 0036 Mount, 0037 Guide, 0038 Observatory, 0039 Scheduler 0040 } EventSource; 0041 0042 void error(const QString &message, const QString &title = i18n("Error"), uint32_t timeout = 0); 0043 void sorry(const QString &message, const QString &title = i18n("Sorry"), uint32_t timeout = 0); 0044 void info(const QString &message, const QString &title = i18n("Info"), uint32_t timeout = 0); 0045 /** 0046 * @brief transient Non modal message box that gets deleted on close. 0047 * @param message message content 0048 * @param title message title 0049 */ 0050 void transient(const QString &message, const QString &title); 0051 0052 void event(const QLatin1String &name, const QString &message, EventSource source = General, EventType type = Info); 0053 }