Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
KStars
Commits
e37c3ee4
Commit
e37c3ee4
authored
Nov 06, 2016
by
Jasem Mutlaq
Browse files
New notification system that can work for both desktop and mobile version
parent
a4751fe5
Changes
2
Hide whitespace changes
Inline
Side-by-side
kstars/auxiliary/ksnotification.cpp
0 → 100644
View file @
e37c3ee4
/* 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
}
}
kstars/auxiliary/ksnotification.h
0 → 100644
View file @
e37c3ee4
/* 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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment