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>
27 Q_PROPERTY(
Type type READ type WRITE setType NOTIFY typeChanged)
28 Q_PROPERTY(
QString text READ text WRITE setText NOTIFY textChanged)
29 Q_PROPERTY(
QString informativeText READ informativeText WRITE setInformativeText NOTIFY informativeTextChanged)
30 Q_PROPERTY(
QString detailedText READ detailedText WRITE setDetailedText NOTIFY detailedTextChanged)
31 Q_PROPERTY(Buttons buttons READ buttons WRITE setButtons NOTIFY buttonsChanged)
32 Q_PROPERTY(
Button response READ response NOTIFY responseChanged)
48 BUTTON_OK = 0x00000400,
49 BUTTON_OPEN = 0x00002000,
50 BUTTON_SAVE = 0x00000800,
51 BUTTON_CANCEL = 0x00400000,
52 BUTTON_CLOSE = 0x00200000,
53 BUTTON_DISCARD = 0x00800000,
54 BUTTON_APPLY = 0x02000000,
55 BUTTON_RESET = 0x04000000,
56 BUTTON_RESTORE_DEFAULTS = 0x08000000,
57 BUTTON_HELP = 0x01000000,
58 BUTTON_SAVE_ALL = 0x00001000,
59 BUTTON_YES = 0x00004000,
60 BUTTON_YES_TO_ALL = 0x00008000,
61 BUTTON_NO = 0x00010000,
62 BUTTON_NO_TO_ALL = 0x00020000,
63 BUTTON_ABORT = 0x00040000,
64 BUTTON_RETRY = 0x00080000,
65 BUTTON_IGNORE = 0x00100000,
66 NO_BUTTON = 0x00000000
68 Q_DECLARE_FLAGS(Buttons, Button)
158 void setType(
Type type);
170 void setText(
const QString & text);
176 QString informativeText()
const;
182 void setInformativeText(
const QString & informativeText);
194 void setDetailedText(
const QString & detailedText);
200 Buttons buttons()
const;
206 void setButtons(Buttons buttons);
270Q_DECLARE_OPERATORS_FOR_FLAGS(cutehmi::Message::Buttons)
Message.
Definition: Message.hpp:22
void detailedTextChanged()
void responseArrived(cutehmi::Message::Button response)
void informativeTextChanged()
Type
Definition: Message.hpp:34
Button
Dialog button.
Definition: Message.hpp:47
@ BUTTON_NO
Definition: Message.hpp:61
@ BUTTON_YES
Definition: Message.hpp:59
@ BUTTON_OK
Definition: Message.hpp:48
@ NO_BUTTON
Definition: Message.hpp:66
~Message() override=default
Destructor.
Definition: constants.hpp:6
ErrorInfo errorInfo(ERR err)
Get error info.
Definition: ErrorInfo.hpp:38