This class redirects cout/cerr to the text edit that's passed in:
More...
Public Member Functions |
| | QDebugStream (std::ostream &stream, QTextEdit *pTE) |
| | Send text streams to text edit only.
|
| | QDebugStream (std::ostream &stream, QString &fileName) |
| | Send text streams to file only.
|
| | QDebugStream (std::ostream &stream, QTextEdit *pTE, QString &fileName) |
| | Send text streams to text edit and file.
|
| | ~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) |
Detailed Description
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);
Constructor & Destructor Documentation
| 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.
| makVrv::QDebugStream::~QDebugStream |
( |
| ) |
|
Member Function Documentation
| virtual std::ios::int_type makVrv::QDebugStream::overflow |
( |
std::ios::int_type |
v | ) |
|
|
protectedvirtual |
| virtual std::streamsize makVrv::QDebugStream::xsputn |
( |
const char * |
p, |
|
|
std::streamsize |
n |
|
) |
| |
|
protectedvirtual |
Member Data Documentation
| std::ostream& makVrv::QDebugStream::m_stream |
|
private |
| std::streambuf* makVrv::QDebugStream::m_old_buf |
|
private |
| std::string makVrv::QDebugStream::m_string |
|
private |
| QTextEdit* makVrv::QDebugStream::pLogWindow |
|
private |
| QFile makVrv::QDebugStream::logFile |
|
private |
The documentation for this class was generated from the following file: