Commit ed157132 authored by Jan Möbius's avatar Jan Möbius

Status messages

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@19071 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a20ceb8c
...@@ -91,11 +91,11 @@ The following code sends a log message ...@@ -91,11 +91,11 @@ The following code sends a log message
* *
* Use this enum to specify the importance of log messages. * Use this enum to specify the importance of log messages.
*/ */
enum Logtype { LOGNONE , /*!< Dummy messages. These messages will not appear in the logwidget and are for testing only */ enum Logtype { LOGSTATUS , /*!< Status log messages. Will be printed in blue in the logwidget */
LOGOUT , /*!< Standard log messages. Will be printed in black in the logwidget */ LOGOUT , /*!< Standard log messages. Will be printed in black in the logwidget */
LOGINFO , /*!< Info log messages. Will be printed in green in the logwidget */ LOGINFO , /*!< Info log messages. Will be printed in green in the logwidget */
LOGWARN , /*!< Warning messages. Will be printed in yellow in the logwidget */ LOGWARN , /*!< Warning messages. Will be printed in yellow in the logwidget */
LOGERR /*!< Error messages. Will be printed in red in the logwidget */ LOGERR /*!< Error messages. Will be printed in red in the logwidget */
}; };
/** \brief Interface for all Plugins which do logging to the logging window of the framework /** \brief Interface for all Plugins which do logging to the logging window of the framework
......
...@@ -1269,6 +1269,8 @@ void Core::slotLogToFile(Logtype _type, QString _message){ ...@@ -1269,6 +1269,8 @@ void Core::slotLogToFile(Logtype _type, QString _message){
(*logStream_) << "WARN:"; break; (*logStream_) << "WARN:"; break;
case LOGERR: case LOGERR:
(*logStream_) << "ERR :"; break; (*logStream_) << "ERR :"; break;
case LOGSTATUS:
(*logStream_) << "STAT:"; break;
} }
(*logStream_) << _message << "\n" << flush; (*logStream_) << _message << "\n" << flush;
......
...@@ -108,6 +108,9 @@ slotLog(Logtype _type, QString _message) { ...@@ -108,6 +108,9 @@ slotLog(Logtype _type, QString _message) {
case LOGERR: case LOGERR:
std::cerr << "\33[31m" << output << std::endl; std::cerr << "\33[31m" << output << std::endl;
break; break;
case LOGSTATUS:
std::cerr << "\33[34m" << output << std::endl;
break;
} }
} }
......
...@@ -86,7 +86,7 @@ slotLog(Logtype _type, QString _message) { ...@@ -86,7 +86,7 @@ slotLog(Logtype _type, QString _message) {
case LOGERR: case LOGERR:
textColor = QColor(250,0,0); textColor = QColor(250,0,0);
break; break;
case LOGNONE: case LOGSTATUS:
textColor = QColor(0,0,250); textColor = QColor(0,0,250);
break; break;
} }
......
...@@ -215,6 +215,13 @@ void LoggerWidget::append(QString _text, Logtype _type){ ...@@ -215,6 +215,13 @@ void LoggerWidget::append(QString _text, Logtype _type){
item->setForeground( QBrush(QColor(Qt::red)) ); item->setForeground( QBrush(QColor(Qt::red)) );
item->setBackground( QBrush(QColor(255,225,225),Qt::Dense4Pattern) ); item->setBackground( QBrush(QColor(255,225,225),Qt::Dense4Pattern) );
if ( errorButton_->isChecked() )
item->setHidden(false);
break;
case LOGSTATUS:
item->setForeground( QBrush(QColor(Qt::blue)) );
item->setBackground( QBrush(QColor(255,225,225),Qt::Dense4Pattern) );
if ( errorButton_->isChecked() ) if ( errorButton_->isChecked() )
item->setHidden(false); item->setHidden(false);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment