redirect a stream to a QPlainTextEdit More...
#include <stream_redirect.h>
Public Types | |
| typedef std::char_traits< char > ::int_type | int_type |
Public Member Functions | |
| StreamRedirect (std::ostream &stream, QPlainTextEdit *te) | |
| ~StreamRedirect () | |
Protected Member Functions | |
| virtual std::char_traits< char > ::int_type | overflow (int_type v) |
| virtual std::streamsize | xsputn (const char *p, std::streamsize n) |
Private Attributes | |
| std::string | _buffer |
| QMutex | _mutex |
| std::streambuf * | _old_buf |
| std::ostream & | _stream |
| QPlainTextEdit * | _te |
redirect a stream to a QPlainTextEdit
Definition at line 30 of file stream_redirect.h.
| typedef std::char_traits<char>::int_type StreamRedirect::int_type |
Definition at line 33 of file stream_redirect.h.
| StreamRedirect::StreamRedirect | ( | std::ostream & | stream, |
| QPlainTextEdit * | te | ||
| ) |
Definition at line 25 of file stream_redirect.cpp.
Definition at line 32 of file stream_redirect.cpp.
| std::char_traits< char >::int_type StreamRedirect::overflow | ( | int_type | v | ) | [protected, virtual] |
Definition at line 39 of file stream_redirect.cpp.
| std::streamsize StreamRedirect::xsputn | ( | const char * | p, |
| std::streamsize | n | ||
| ) | [protected, virtual] |
Definition at line 53 of file stream_redirect.cpp.
std::string StreamRedirect::_buffer [private] |
Definition at line 46 of file stream_redirect.h.
QMutex StreamRedirect::_mutex [private] |
Definition at line 48 of file stream_redirect.h.
std::streambuf* StreamRedirect::_old_buf [private] |
Definition at line 45 of file stream_redirect.h.
std::ostream& StreamRedirect::_stream [private] |
Definition at line 44 of file stream_redirect.h.
QPlainTextEdit* StreamRedirect::_te [private] |
Definition at line 47 of file stream_redirect.h.