26 #ifndef ConsoleStream_H 27 #define ConsoleStream_H 75 init(stream, textEdit);
109 void init(std::ostream* stream, QTextEdit* textEdit) {
135 std::streamsize
xsputn(
const char* p, std::streamsize n) {
138 std::string::size_type pos = 0;
139 while (pos != std::string::npos) {
141 if (pos != std::string::npos) {
int_type overflow(int_type v)
rewriting of the inherited method overflow
Definition: ConsoleStream.h:122
~ConsoleStream()
destructor: use free() to restore previous stream output buffer
Definition: ConsoleStream.h:86
void init(std::ostream *stream, QTextEdit *textEdit)
initialize ConsoleStream using both input stream and output text edit
Definition: ConsoleStream.h:109
QTextEdit * logTextEdit
Definition: ConsoleStream.h:155
std::ostream * myStream
Definition: ConsoleStream.h:152
void setStream(std::ostream *stream)
set the value for the buffer to be replaced by the ConsoleStream
Definition: ConsoleStream.h:96
Definition: Action.cpp:36
void free()
reset the state as it was before (stream use the old buffer again)
Definition: ConsoleStream.h:115
Provides a console windows, within the CamiTK application.
Definition: ConsoleStream.h:71
ConsoleStream()
default constructor, init(..) have to be called later, before first use
Definition: ConsoleStream.h:79
std::streambuf * previousBuffer
Definition: ConsoleStream.h:153
std::string myString
Definition: ConsoleStream.h:154
ConsoleStream(std::ostream *stream, QTextEdit *textEdit)
constructor to use when you are sure about both paramaters
Definition: ConsoleStream.h:74
std::streamsize xsputn(const char *p, std::streamsize n)
rewriting of the inherited method xsputn
Definition: ConsoleStream.h:135
void setTextEdit(QTextEdit *text_edit)
set the log QTextEdit
Definition: ConsoleStream.h:104