mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 02:05:43 +08:00
refs #212, improved helper methods for CStatusMessage, needed for FP validation
This commit is contained in:
@@ -73,13 +73,29 @@ namespace BlackMisc
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Validation Unspecific info message
|
* Unspecific info message
|
||||||
*/
|
*/
|
||||||
CStatusMessage CStatusMessage::getInfoMessage(const QString &message, StatusType type)
|
CStatusMessage CStatusMessage::getInfoMessage(const QString &message, StatusType type)
|
||||||
{
|
{
|
||||||
return CStatusMessage(type, CStatusMessage::SeverityInfo, message);
|
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
|
* Pixmap
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -123,6 +123,12 @@ namespace BlackMisc
|
|||||||
//! (Unspecific) Info message
|
//! (Unspecific) Info message
|
||||||
static CStatusMessage getInfoMessage(const QString &message, StatusType type = CStatusMessage::TypeUnspecific);
|
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
|
//! Representing icon
|
||||||
static const QPixmap &convertToIcon(const CStatusMessage &statusMessage);
|
static const QPixmap &convertToIcon(const CStatusMessage &statusMessage);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user