Changeset View
Changeset View
Standalone View
Standalone View
src/notificator.cpp
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | This program is free software; you can redistribute it and/or | ||||
3 | modify it under the terms of the GNU General Public | ||||
4 | License as published by the Free Software Foundation; either | ||||
5 | version 2 of the License, or (at your option) any later version. | ||||
6 | | ||||
7 | This program is distributed in the hope that it will be useful, | ||||
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
10 | General Public License for more details. | ||||
11 | | ||||
12 | You should have received a copy of the GNU General Public License | ||||
13 | along with this program; if not, write to the Free Software | ||||
14 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
15 | */ | ||||
16 | | ||||
17 | #include "notificator.h" | ||||
18 | | ||||
19 | #include <KNotification> | ||||
20 | #include <KLocalizedString> | ||||
21 | #include <KIconLoader> | ||||
22 | | ||||
23 | void Notificator::onShortTimerReset() | ||||
24 | { | ||||
25 | KNotification::event( "short timer reset", | ||||
26 | i18n( "Timer for the short break has now been reset" ), | ||||
27 | KIconLoader::global()->loadIcon( "rsibreak0", KIconLoader::Desktop ) ); | ||||
28 | | ||||
29 | } | ||||
30 | | ||||
31 | void Notificator::onTimersReset() | ||||
32 | { | ||||
33 | KNotification::event( "timers reset", | ||||
34 | i18n( "The timers have now been reset" ), | ||||
35 | KIconLoader::global()->loadIcon( "rsibreak0", KIconLoader::Desktop ) ); | ||||
36 | } | ||||
37 | | ||||
38 | void Notificator::onStartLongBreak() | ||||
39 | { | ||||
40 | KNotification::event( "start long break", i18n( "Start of a long break" ) ); | ||||
41 | } | ||||
42 | | ||||
43 | void Notificator::onEndLongBreak() | ||||
44 | { | ||||
45 | KNotification::event( "end long break", i18n( "End of a long break" ) ); | ||||
46 | } | ||||
47 | | ||||
48 | void Notificator::onStartShortBreak() | ||||
49 | { | ||||
50 | KNotification::event( "start short break", i18n( "Start of a short break" ) ); | ||||
51 | } | ||||
52 | | ||||
53 | void Notificator::onEndShortBreak() | ||||
54 | { | ||||
55 | KNotification::event( "end short break", i18n( "End of a short break" ) ); | ||||
56 | } |