refs #212, improved helper methods for CStatusMessage, needed for FP validation

This commit is contained in:
Klaus Basan
2014-04-26 15:39:32 +02:00
parent 5182df5ff7
commit bcb6f3a479
2 changed files with 23 additions and 1 deletions

View File

@@ -73,13 +73,29 @@ namespace BlackMisc
}
/*
* Validation Unspecific info message
* Unspecific info message
*/
CStatusMessage CStatusMessage::getInfoMessage(const QString &message, StatusType type)
{
return CStatusMessage(type, CStatusMessage::SeverityInfo, message);
}
/*
* Unspecific warning message
*/
CStatusMessage CStatusMessage::getWarningMessage(const QString &message, StatusType type)
{
return CStatusMessage(type, CStatusMessage::SeverityWarning, message);
}
/*
* Unspecific error message
*/
CStatusMessage CStatusMessage::getErrorMessage(const QString &message, StatusType type)
{
return CStatusMessage(type, CStatusMessage::SeverityError, message);
}
/*
* Pixmap
*/

View File

@@ -123,6 +123,12 @@ namespace BlackMisc
//! (Unspecific) Info message
static CStatusMessage getInfoMessage(const QString &message, StatusType type = CStatusMessage::TypeUnspecific);
//! (Unspecific) Warning message
static CStatusMessage getWarningMessage(const QString &message, StatusType type = CStatusMessage::TypeUnspecific);
//! (Unspecific) Error message
static CStatusMessage getErrorMessage(const QString &message, StatusType type = CStatusMessage::TypeUnspecific);
//! Representing icon
static const QPixmap &convertToIcon(const CStatusMessage &statusMessage);