QElectroTech
0.70
|
#include <qetresult.h>
Public Member Functions | |
QETResult () | |
QETResult (const QString &error_message, bool=false) | |
virtual | ~QETResult () |
bool | isOk () const |
void | setResult (bool) |
QString | errorMessage () const |
void | setErrorMessage (const QString &) |
Private Attributes | |
bool | result_ |
Embedded boolean value. More... | |
QString | error_message_ |
Embedded error message, typically used to explain what failed to users. More... | |
This class represents the result of a lambda operation. Technically, it is a mere boolean+error message pair.
Definition at line 26 of file qetresult.h.
QETResult::QETResult | ( | ) |
Construct a default "true" QET result without an error message.
Definition at line 23 of file qetresult.cpp.
QETResult::QETResult | ( | const QString & | error_message, |
bool | result = false |
||
) |
Construct a QET result embedding error_message and result (defaults to false).
Definition at line 32 of file qetresult.cpp.
|
virtual |
Destructor
Definition at line 41 of file qetresult.cpp.
QString QETResult::errorMessage | ( | ) | const |
Definition at line 61 of file qetresult.cpp.
References error_message_.
Referenced by QETDiagramEditor::showError(), and ProjectView::tryClosing().
bool QETResult::isOk | ( | ) | const |
Definition at line 47 of file qetresult.cpp.
References result_.
Referenced by QETDiagramEditor::save(), QETDiagramEditor::saveAs(), QETDiagramEditor::showError(), and ProjectView::tryClosing().
void QETResult::setErrorMessage | ( | const QString & | error_message | ) |
Embed error_message wihthin this result.
Definition at line 68 of file qetresult.cpp.
References error_message_.
void QETResult::setResult | ( | bool | result | ) |
|
private |
Embedded error message, typically used to explain what failed to users.
Definition at line 43 of file qetresult.h.
Referenced by errorMessage(), and setErrorMessage().
|
private |
Embedded boolean value.
Definition at line 42 of file qetresult.h.
Referenced by isOk(), and setResult().