#include "logstream.h"

using namespace std;

LogStreamDevice::LogStreamDevice(QPlainTextEdit* widget)
    : logWidget(widget)
{}

streamsize LogStreamDevice::write(const char *s, streamsize n)
{
    QString txt = QString::fromStdString(std::string(s,n));
    logWidget->appendPlainText(txt.simplified());
    return n;
}
