#include "debugprinter.h"

#include <QStringList>

/**
 * @brief TextPrinter::getInstance
 * @return
 */

TextPrinter *TextPrinter::getInstance()
{
    static TextPrinter textPrinter;
    return &textPrinter;
}

/**
 * @brief TextPrinter::TextPrinter
 */

TextPrinter::TextPrinter()
{
}

/**
 * @brief TextPrinter::addText
 * @param text
 */

void TextPrinter::addText(QString text)
{
    m_text.append(text);
}

/**
 * @brief TextPrinter::popAll
 * @return
 */

QString TextPrinter::popAll()
{
    QString rText = m_text.join("");
    m_text.clear();
    return rText;
}
