Commit e37c3ee4 authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

New notification system that can work for both desktop and mobile version

parent a4751fe5
/* General KStars Notifications for desktop and lite version
Copyright (C) 2016 Jasem Mutlaq (mutlaqja@ikarustech.com)
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
*/
#include "ksnotification.h"
#ifdef KSTARS_LITE
#include "kstarslite.h"
#else
#include <KMessageBox>
#endif
namespace KSNotification
{
void error(const QString &value)
{
#ifdef KSTARS_LITE
KStarsLite::Instance()->notificationMessage(value);
#else
KMessageBox::error(0, value);
#endif
}
void sorry(const QString &value)
{
#ifdef KSTARS_LITE
KStarsLite::Instance()->notificationMessage(value);
#else
KMessageBox::sorry(0, value);
#endif
}
void info(const QString &value)
{
#ifdef KSTARS_LITE
KStarsLite::Instance()->notificationMessage(value);
#else
KMessageBox::info(0, value);
#endif
}
}
/* General KStars Notifications for desktop and lite version
Copyright (C) 2016 Jasem Mutlaq (mutlaqja@ikarustech.com)
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
*/
#ifndef KSNotifications_H
#define KSNotifications_H
#include <QString>
namespace KSNotification
{
void error(const QString &value);
void sorry(const QString &value);
void info(const QString &value);
}
#endif // KSNotifications_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment