2021-09-01 14:01:00 -05:00
|
|
|
#include "SeerTildeLogWidget.h"
|
|
|
|
|
#include "SeerUtl.h"
|
|
|
|
|
#include <QtWidgets/QScrollBar>
|
|
|
|
|
|
|
|
|
|
SeerTildeLogWidget::SeerTildeLogWidget (QWidget* parent) : SeerLogWidget(parent) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SeerTildeLogWidget::~SeerTildeLogWidget () {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SeerTildeLogWidget::processText (const QString& text) {
|
|
|
|
|
|
2022-01-16 09:55:17 -06:00
|
|
|
if (enableCheckBox->isChecked() == false) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2021-09-01 14:01:00 -05:00
|
|
|
QString str = text.mid(1); // Remove leading "~"
|
|
|
|
|
|
|
|
|
|
if (str.front() == '"') { // Remove leading """
|
|
|
|
|
str = str.mid(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (str.back() == '"') { // Remove trailing """
|
|
|
|
|
str.chop(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
str = Seer::filterEscapes(str);
|
|
|
|
|
|
|
|
|
|
if (str.back() == '\n') { // Remove trailing "\n"
|
|
|
|
|
str.chop(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
textEdit->append(str);
|
2022-01-16 12:22:37 -06:00
|
|
|
|
|
|
|
|
moveToEnd();
|
2021-09-01 14:01:00 -05:00
|
|
|
}
|
|
|
|
|
|