|
29 | 29 | #include <QtGui> |
30 | 30 | #include <iostream> |
31 | 31 | #include <Interface/Application/ModuleLogWindow.h> |
32 | | -#include <Interface/Application/SCIRunMainWindow.h> |
33 | | -#include <Interface/Application/DialogErrorControl.h> |
| 32 | +#include <Interface/Application/SCIRunMainWindow.h> |
| 33 | +#include <Interface/Application/DialogErrorControl.h> |
34 | 34 | #include <Core/Logging/Log.h> |
35 | 35 |
|
36 | 36 | using namespace SCIRun::Gui; |
37 | 37 | using namespace SCIRun::Dataflow::Networks; |
38 | 38 | using namespace SCIRun::Core::Logging; |
39 | 39 |
|
40 | | -ModuleLogWindow::ModuleLogWindow(const QString& moduleName, boost::shared_ptr<SCIRun::Gui::DialogErrorControl> dialogErrorControl, QWidget* parent) : QDialog(parent), moduleName_(moduleName), |
| 40 | +ModuleLogWindow::ModuleLogWindow(const QString& moduleName, boost::shared_ptr<SCIRun::Gui::DialogErrorControl> dialogErrorControl, QWidget* parent) : QDialog(parent), moduleName_(moduleName), |
41 | 41 | dialogErrorControl_(dialogErrorControl) |
42 | 42 | { |
43 | 43 | setupUi(this); |
44 | | - setModal(false); |
| 44 | + setModal(false); |
45 | 45 | setWindowTitle("Log for " + moduleName); |
46 | 46 | setVisible(false); |
47 | 47 | buttonBox->button(QDialogButtonBox::Discard)->setText("Clear"); |
@@ -101,27 +101,35 @@ void ModuleLogger::error(const std::string& msg) const |
101 | 101 | logSignal("<b>ERROR: " + qmsg + "</b>", red); |
102 | 102 | alert(red); |
103 | 103 | popup(qmsg); |
| 104 | +#ifdef _WIN32 //again, unstable on Mac. Need a slicker way to avoid collisions. |
104 | 105 | Log::get("Modules") << ERROR_LOG << formatWithColor("[" + moduleName_ + "] " + msg, std::string("red")); |
| 106 | +#endif |
105 | 107 | } |
106 | 108 |
|
107 | 109 | void ModuleLogger::warning(const std::string& msg) const |
108 | 110 | { |
109 | 111 | const QColor yellow = Qt::yellow; |
110 | 112 | logSignal("WARNING: " + QString::fromStdString(msg), yellow); |
111 | 113 | alert(yellow); |
| 114 | +#ifdef _WIN32 //again, unstable on Mac. Need a slicker way to avoid collisions. |
112 | 115 | Log::get("Modules") << WARN << formatWithColor("[" + moduleName_ + "] " + msg, std::string("yellow")); |
| 116 | +#endif |
113 | 117 | } |
114 | 118 |
|
115 | 119 | void ModuleLogger::remark(const std::string& msg) const |
116 | 120 | { |
117 | 121 | const QColor blue = Qt::blue; |
118 | 122 | logSignal("REMARK: " + QString::fromStdString(msg), blue); |
119 | 123 | alert(blue); |
| 124 | +#ifdef _WIN32 //again, unstable on Mac. Need a slicker way to avoid collisions. |
120 | 125 | Log::get("Modules") << NOTICE << formatWithColor("[" + moduleName_ + "] " + msg, std::string("blue")); |
| 126 | +#endif |
121 | 127 | } |
122 | 128 |
|
123 | 129 | void ModuleLogger::status(const std::string& msg) const |
124 | 130 | { |
125 | 131 | logSignal(QString::fromStdString(msg), Qt::black); |
| 132 | +#ifdef _WIN32 //again, unstable on Mac. Need a slicker way to avoid collisions. |
126 | 133 | Log::get("Modules") << INFO << formatWithColor("[" + moduleName_ + "] " + msg, std::string("white")); |
| 134 | +#endif |
127 | 135 | } |
0 commit comments