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
*
* 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 */
LOGOUT , /*!< Standard log messages. Will be printed in black 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 */
LOGERR /*!< Error messages. Will be printed in red in the logwidget */
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 */
LOGINFO , /*!< Info log messages. Will be printed in green 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 */
};
/** \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){
(*logStream_) << "WARN:"; break;
case LOGERR:
(*logStream_) << "ERR :"; break;
case LOGSTATUS:
(*logStream_) << "STAT:"; break;
}
(*logStream_) << _message << "\n" << flush;
......
......@@ -108,6 +108,9 @@ slotLog(Logtype _type, QString _message) {
case LOGERR:
std::cerr << "\33[31m" << output << std::endl;
break;
case LOGSTATUS:
std::cerr << "\33[34m" << output << std::endl;
break;
}
}
......
......@@ -86,7 +86,7 @@ slotLog(Logtype _type, QString _message) {
case LOGERR:
textColor = QColor(250,0,0);
break;
case LOGNONE:
case LOGSTATUS:
textColor = QColor(0,0,250);
break;
}
......
......@@ -215,6 +215,13 @@ void LoggerWidget::append(QString _text, Logtype _type){
item->setForeground( QBrush(QColor(Qt::red)) );
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() )
item->setHidden(false);
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