]> git.cworth.org Git - vogl/blob - src/vogleditor/vogleditor_output.cpp
UI: Update vogleditor_output so that it can be used from other files without having...
[vogl] / src / vogleditor / vogleditor_output.cpp
1 #include "vogleditor_output.h"
2 #include <QTextEdit>
3
4 vogleditor_output gs_OUTPUT;
5
6 vogleditor_output::vogleditor_output()
7 {
8 }
9
10 vogleditor_output::~vogleditor_output()
11 {
12 }
13
14 void vogleditor_output::message(const char* pMessage)
15 {
16     if (m_pTextEdit != NULL)
17     {
18         m_pTextEdit->append(pMessage);
19     }
20 }
21
22 void vogleditor_output::warning(const char* pWarning)
23 {
24     if (m_pTextEdit != NULL)
25     {
26         QString msg = QString("Warning: %1").arg(pWarning);
27         m_pTextEdit->append(msg);
28     }
29 }
30
31 void vogleditor_output::error(const char* pError)
32 {
33     if (m_pTextEdit != NULL)
34     {
35         QString msg = QString("ERROR: %1").arg(pError);
36         m_pTextEdit->append(msg);
37     }
38 }