|  | CuteHMI - CuteHMI (CuteHMI.2)
    | 
Message. More...
#include <cutehmi/Message.hpp>
 
  
| Public Types | |
| enum | Type { INFO = 1, WARNING = 2, CRITICAL = 3, QUESTION = 4 } | 
| enum | Button : qint32 { BUTTON_OK = 0x00000400, BUTTON_OPEN = 0x00002000, BUTTON_SAVE = 0x00000800, BUTTON_CANCEL = 0x00400000, BUTTON_CLOSE = 0x00200000, BUTTON_DISCARD = 0x00800000, BUTTON_APPLY = 0x02000000, BUTTON_RESET = 0x04000000, BUTTON_RESTORE_DEFAULTS = 0x08000000, BUTTON_HELP = 0x01000000, BUTTON_SAVE_ALL = 0x00001000, BUTTON_YES = 0x00004000, BUTTON_YES_TO_ALL = 0x00008000, BUTTON_NO = 0x00010000, BUTTON_NO_TO_ALL = 0x00020000, BUTTON_ABORT = 0x00040000, BUTTON_RETRY = 0x00080000, BUTTON_IGNORE = 0x00100000, NO_BUTTON = 0x00000000 } | 
| Dialog button.  More... | |
| Public Slots | |
| void | acceptResponse (Button response) | 
| Accept response.  More... | |
| Signals | |
| void | typeChanged () | 
| void | textChanged () | 
| void | informativeTextChanged () | 
| void | detailedTextChanged () | 
| void | buttonsChanged () | 
| void | responseChanged () | 
| void | responseArrived (cutehmi::Message::Button response) | 
| Public Member Functions | |
| Message (Type type=INFO, const QString &text=QString(), Buttons buttons=Message::NO_BUTTON, QObject *parent=nullptr) | |
| Constructor.  More... | |
| Message (Type type, const QString &text, const QString &informativeText, Buttons buttons=Message::NO_BUTTON, QObject *parent=nullptr) | |
| Constructor.  More... | |
| Message (Type type, const QString &text, const QString &informativeText, const QString &detailedText, Buttons buttons=Message::NO_BUTTON, QObject *parent=nullptr) | |
| Constructor.  More... | |
| ~Message () override=default | |
| Destructor.  More... | |
| Type | type () const | 
| Get dialog type.  More... | |
| void | setType (Type type) | 
| Set dialog type.  More... | |
| QString | text () const | 
| Get text.  More... | |
| void | setText (const QString &text) | 
| Set text.  More... | |
| QString | informativeText () const | 
| Get informative text.  More... | |
| void | setInformativeText (const QString &informativeText) | 
| Set informative text.  More... | |
| QString | detailedText () const | 
| Get detailed text.  More... | |
| void | setDetailedText (const QString &detailedText) | 
| Set detailed text.  More... | |
| Buttons | buttons () const | 
| Get message dialog buttons.  More... | |
| void | setButtons (Buttons buttons) | 
| Set buttons.  More... | |
| Button | response () const | 
| Get user response.  More... | |
| std::unique_ptr< Message > | clone () const | 
| Clone message.  More... | |
| Button | exec () | 
| Block until user provides a response.  More... | |
|  Public Member Functions inherited from QObject | |
| virtual const QMetaObject * | metaObject () const const | 
| virtual void * | qt_metacast (const char *) | 
| virtual int | qt_metacall (QMetaObject::Call, int, void **) | 
| QObject (QObject *parent) | |
| virtual | ~QObject () | 
| virtual bool | event (QEvent *e) | 
| virtual bool | eventFilter (QObject *watched, QEvent *event) | 
| QString | objectName () const const | 
| void | setObjectName (const QString &name) | 
| bool | isWidgetType () const const | 
| bool | isWindowType () const const | 
| bool | signalsBlocked () const const | 
| bool | blockSignals (bool block) | 
| QThread * | thread () const const | 
| void | moveToThread (QThread *targetThread) | 
| int | startTimer (int interval, Qt::TimerType timerType) | 
| int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType) | 
| void | killTimer (int id) | 
| T | findChild (const QString &name, Qt::FindChildOptions options) const const | 
| QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const | 
| QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const const | 
| QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const | 
| const QObjectList & | children () const const | 
| void | setParent (QObject *parent) | 
| void | installEventFilter (QObject *filterObj) | 
| void | removeEventFilter (QObject *obj) | 
| QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const | 
| bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const | 
| bool | disconnect (const QObject *receiver, const char *method) const const | 
| void | dumpObjectTree () | 
| void | dumpObjectInfo () | 
| void | dumpObjectTree () const const | 
| void | dumpObjectInfo () const const | 
| bool | setProperty (const char *name, const QVariant &value) | 
| QVariant | property (const char *name) const const | 
| QList< QByteArray > | dynamicPropertyNames () const const | 
| void | destroyed (QObject *obj) | 
| void | objectNameChanged (const QString &objectName) | 
| QObject * | parent () const const | 
| bool | inherits (const char *className) const const | 
| void | deleteLater () | 
| Static Public Member Functions | |
| static std::unique_ptr< Message > | Info (const QString &text, Message::Buttons buttons=Message::BUTTON_OK) | 
| Notice message.  More... | |
| static std::unique_ptr< Message > | Warning (const QString &text, Message::Buttons buttons=Message::BUTTON_OK) | 
| Warning message.  More... | |
| static std::unique_ptr< Message > | Question (const QString &text, Message::Buttons buttons=Message::Buttons{Message::BUTTON_YES, Message::BUTTON_NO}) | 
| Question.  More... | |
| static std::unique_ptr< Message > | Critical (const QString &text, Message::Buttons buttons=Message::BUTTON_OK) | 
| Critical message.  More... | |
| static std::unique_ptr< Message > | Critical (const ErrorInfo &errorInfo, Message::Buttons buttons=Message::BUTTON_OK) | 
| Critical message.  More... | |
|  Static Public Member Functions inherited from QObject | |
| QString | tr (const char *sourceText, const char *disambiguation, int n) | 
| QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) | 
| QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) | 
| QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) | 
| QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) | 
| QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) | 
| QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) | 
| bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) | 
| bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) | 
| bool | disconnect (const QMetaObject::Connection &connection) | 
| bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) | 
| Properties | |
| Type | type | 
| QString | text | 
| QString | informativeText | 
| QString | detailedText | 
| Buttons | buttons | 
| Button | response | 
|  Properties inherited from QObject | |
| objectName | |
| Additional Inherited Members | |
|  Protected Member Functions inherited from QObject | |
| QObject * | sender () const const | 
| int | senderSignalIndex () const const | 
| int | receivers (const char *signal) const const | 
| bool | isSignalConnected (const QMetaMethod &signal) const const | 
| virtual void | timerEvent (QTimerEvent *event) | 
| virtual void | childEvent (QChildEvent *event) | 
| virtual void | customEvent (QEvent *event) | 
| virtual void | connectNotify (const QMetaMethod &signal) | 
| virtual void | disconnectNotify (const QMetaMethod &signal) | 
Message.
| enum cutehmi::Message::Button : qint32 | 
Dialog button.
| 
 | explicit | 
Constructor.
| type | dialog type. | 
| text | message for the user. | 
| buttons | message dialog buttons. | 
| parent | parent object. | 
| cutehmi::Message::Message | ( | Type | type, | 
| const QString & | text, | ||
| const QString & | informativeText, | ||
| Buttons | buttons = Message::NO_BUTTON, | ||
| QObject * | parent = nullptr | ||
| ) | 
Constructor.
| type | dialog type. | 
| text | message for the user. | 
| informativeText | informative message. | 
| buttons | message dialog buttons. | 
| parent | parent object. | 
| cutehmi::Message::Message | ( | Type | type, | 
| const QString & | text, | ||
| const QString & | informativeText, | ||
| const QString & | detailedText, | ||
| Buttons | buttons = Message::NO_BUTTON, | ||
| QObject * | parent = nullptr | ||
| ) | 
Constructor.
| type | dialog type. | 
| text | message for the user. | 
| informativeText | informative message. | 
| detailedText | detailed message. | 
| buttons | message dialog buttons. | 
| parent | parent object. | 
| 
 | overridedefault | 
Destructor.
| 
 | slot | 
Accept response.
Normally a response can be accepted only once. Subsequent calls of this function will not change the value of response property and should be avoided.
| response | response to be set. | 
| Buttons cutehmi::Message::buttons | ( | ) | const | 
Get message dialog buttons.
| 
 | signal | 
| std::unique_ptr< Message > cutehmi::Message::clone | ( | ) | const | 
Clone message.
| 
 | static | 
| 
 | static | 
Critical message.
Convenient function that creates critical dialog and advertises it through Messenger instance.
| text | message for the user. | 
| buttons | message dialog buttons. | 
| QString cutehmi::Message::detailedText | ( | ) | const | 
Get detailed text.
| 
 | signal | 
| Message::Button cutehmi::Message::exec | ( | ) | 
Block until user provides a response.
This function creates local event loop and blocks until user provides a response. Before calling exec() you have to connect some signal to acceptResponse() slot.
| 
 | static | 
Notice message.
Convenient function that creates informative dialog and advertises it through Messenger instance.
| text | message for the user. | 
| buttons | message dialog buttons. | 
| QString cutehmi::Message::informativeText | ( | ) | const | 
Get informative text.
| 
 | signal | 
| 
 | static | 
Question.
Convenient function that creates question dialog and advertises it through Messenger instance.
| text | message for the user. | 
| buttons | message dialog buttons. | 
| Button cutehmi::Message::response | ( | ) | const | 
Get user response.
| 
 | signal | 
| 
 | signal | 
| void cutehmi::Message::setButtons | ( | Buttons | buttons | ) | 
Set buttons.
| buttons | buttons that should be available to the user. | 
| void cutehmi::Message::setDetailedText | ( | const QString & | detailedText | ) | 
Set detailed text.
| detailedText | detailed message for the user. | 
| void cutehmi::Message::setInformativeText | ( | const QString & | informativeText | ) | 
Set informative text.
| informativeText | informative message for the user. | 
| void cutehmi::Message::setText | ( | const QString & | text | ) | 
Set text.
| text | message for the user. | 
| void cutehmi::Message::setType | ( | Type | type | ) | 
Set dialog type.
| type | dialog type. | 
| QString cutehmi::Message::text | ( | ) | const | 
Get text.
| 
 | signal | 
| Type cutehmi::Message::type | ( | ) | const | 
Get dialog type.
| 
 | signal | 
| 
 | static | 
Warning message.
Convenient function that creates warning dialog and advertises it through Messenger instance.
| text | message for the user. | 
| buttons | message dialog buttons. | 
| 
 | readwrite | 
| 
 | readwrite | 
| 
 | readwrite | 
| 
 | read | 
| 
 | readwrite | 
| 
 | readwrite |