1 #ifndef H_EXTENSIONS_CUTEHMI_2_INCLUDE_CUTEHMI_MESSAGE_HPP
2 #define H_EXTENSIONS_CUTEHMI_2_INCLUDE_CUTEHMI_MESSAGE_HPP
4 #include "internal/platform.hpp"
6 #include "ErrorInfo.hpp"
11 #include <QAtomicInteger>
25 Q_PROPERTY(
Type type READ type WRITE setType NOTIFY typeChanged)
26 Q_PROPERTY(
QString text READ text WRITE setText NOTIFY textChanged)
27 Q_PROPERTY(
QString informativeText READ informativeText WRITE setInformativeText NOTIFY informativeTextChanged)
28 Q_PROPERTY(
QString detailedText READ detailedText WRITE setDetailedText NOTIFY detailedTextChanged)
29 Q_PROPERTY(Buttons buttons READ buttons WRITE setButtons NOTIFY buttonsChanged)
30 Q_PROPERTY(
Button response READ response NOTIFY responseChanged)
46 BUTTON_OK = 0x00000400,
47 BUTTON_OPEN = 0x00002000,
48 BUTTON_SAVE = 0x00000800,
49 BUTTON_CANCEL = 0x00400000,
50 BUTTON_CLOSE = 0x00200000,
51 BUTTON_DISCARD = 0x00800000,
52 BUTTON_APPLY = 0x02000000,
53 BUTTON_RESET = 0x04000000,
54 BUTTON_RESTORE_DEFAULTS = 0x08000000,
55 BUTTON_HELP = 0x01000000,
56 BUTTON_SAVE_ALL = 0x00001000,
57 BUTTON_YES = 0x00004000,
58 BUTTON_YES_TO_ALL = 0x00008000,
59 BUTTON_NO = 0x00010000,
60 BUTTON_NO_TO_ALL = 0x00020000,
61 BUTTON_ABORT = 0x00040000,
62 BUTTON_RETRY = 0x00080000,
63 BUTTON_IGNORE = 0x00100000,
64 NO_BUTTON = 0x00000000
66 Q_DECLARE_FLAGS(Buttons, Button)
144 ~Message()
override =
default;
156 void setType(Type type);
168 void setText(
const QString & text);
174 QString informativeText()
const;
180 void setInformativeText(
const QString & informativeText);
192 void setDetailedText(
const QString & detailedText);
198 Buttons buttons()
const;
204 void setButtons(Buttons buttons);
210 Button response()
const;
235 void acceptResponse(Button response);
242 void informativeTextChanged();
244 void detailedTextChanged();
246 void buttonsChanged();
248 void responseChanged();
268 Q_DECLARE_OPERATORS_FOR_FLAGS(cutehmi::Message::Buttons)