Kstars

ksnotification.h
1/*
2 SPDX-FileCopyrightText: 2016 Jasem Mutlaq <mutlaqja@ikarustech.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <KLocalizedString>
10#include <QString>
11
12/**
13 * @namespace KSNotification
14 * General KStars Notifications for desktop and lite version
15 *
16 * @author Jasem Mutlaq
17 */
18
19class QMessageBox;
20namespace KSNotification
21{
22
23typedef enum
24{
25 Debug,
26 Info,
27 Warn,
28 Alert
29} EventType;
30
31typedef enum
32{
33 General,
34 INDI,
35 Capture,
36 Focus,
37 Align,
38 Mount,
39 Guide,
40 Observatory,
41 Scheduler
42} EventSource;
43
44void error(const QString &message, const QString &title = i18n("Error"), uint32_t timeout = 0);
45void sorry(const QString &message, const QString &title = i18n("Sorry"), uint32_t timeout = 0);
46void info(const QString &message, const QString &title = i18n("Info"), uint32_t timeout = 0);
47QSharedPointer<QMessageBox> closeableMessage(const QString &message, const QString &title);
48
49/**
50 * @brief transient Non modal message box that gets deleted on close.
51 * @param message message content
52 * @param title message title
53 */
54void transient(const QString &message, const QString &title);
55
56void event(const QLatin1String &name, const QString &message, EventSource source = General, EventType type = Info);
57}
Guide is a special class that handles ST4 commands.
QString i18n(const char *text, const TYPE &arg...)
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
General KStars Notifications for desktop and lite version.
void transient(const QString &message, const QString &title)
transient Non modal message box that gets deleted on close.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 3 2025 11:47:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.