Sayonara Player
Message.h
1/* GlobalMessage.h */
2
3/* Copyright (C) 2011-2020 Michael Lugmair (Lucio Carreras)
4 *
5 * This file is part of sayonara player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef GLOBALMESSAGE_H
22#define GLOBALMESSAGE_H
23
24#include <QString>
25
27
28namespace Message
29{
34 enum class Answer : unsigned char
35 {
36 Yes=0,
37 No,
38 Ok,
39 Cancel,
40 Undefined
41 };
42
47 enum class QuestionType : unsigned char
48 {
49 YesNo=0,
50 OkCancel
51 };
52
53 Message::Answer info(
54 const QString& info,
55 const QString& sender_name=QString());
56
57 Message::Answer warning(
58 const QString& warning,
59 const QString& sender_name=QString());
60
61 Message::Answer error(
62 const QString& error,
63 const QString& sender_name=QString());
64
65 Message::Answer question(
66 const QString& question,
67 const QString& sender_name,
68 QuestionType type);
69
70 Message::Answer question_yn(
71 const QString& question,
72 const QString& sender_name=QString());
73
74 Message::Answer question_ok(
75 const QString& question,
76 const QString& sender_name=QString());
77
85}
86
87#endif // GLOBALMESSAGE_H
The GlobalMessageReceiverInterface class implement this class in order to have the possibility to sho...
Definition: MessageReceiverInterface.h:34
Answer
The GlobalMessage class.
Definition: Message.h:35
bool registerReceiver(MessageReceiverInterface *receiver)
register a receiver here, so it is called whenever a message has to be written
QuestionType
The GlobalMessage class.
Definition: Message.h:48