![]() |
VR-Forces 5.0.2 Developer's Guide
|
This class redirects cout/cerr to the text edit that's passed in:
QDebugStream cout(std::cout, pTextEdit); QDebugStream cerr(std::cerr, pTextEdit); Unfortunately it seems that this only works in LogText Mode. It also will write that out to a log file if desired. QDebugStream cout(std::cout, fileName); QDebugStream cerr(std::cerr, fileName); Or you can do both: QDebugStream cout(std::cout, pTextEdit, fileName); QDebugStream cerr(std::cerr, pTextEdit, fileName);

Public Member Functions | |
| QDebugStream (std::ostream &stream, QTextEdit *pTE) | |
| QDebugStream (std::ostream &stream, QString &fileName) | |
| QDebugStream (std::ostream &stream, QTextEdit *pTE, QString &fileName) | |
| virtual | ~QDebugStream () |
Protected Member Functions | |
| virtual std::ios::int_type | overflow (std::ios::int_type v) |
| virtual std::streamsize | xsputn (const char *p, std::streamsize n) |
Private Attributes | |
| std::ostream & | m_stream |
| std::streambuf * | m_old_buf |
| std::string | m_string |
| QTextEdit * | pLogWindow |
| QFile | logFile |
| makVrv::QDebugStream::QDebugStream | ( | std::ostream & | stream, |
| QTextEdit * | pTE | ||
| ) |
Send text streams to text edit only.
| makVrv::QDebugStream::QDebugStream | ( | std::ostream & | stream, |
| QString & | fileName | ||
| ) |
Send text streams to file only.
| makVrv::QDebugStream::QDebugStream | ( | std::ostream & | stream, |
| QTextEdit * | pTE, | ||
| QString & | fileName | ||
| ) |
Send text streams to text edit and file.
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
private |
|
private |
|
private |
|
private |
|
private |