Delete qplaintextedit_sink_p.h

This commit is contained in:
Muhammed Galib Uludag 2021-06-29 01:01:40 +03:00 committed by GitHub
parent c24b957e17
commit a19f4bba0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,35 +0,0 @@
// Copyright(c) 2015-present, Gabi Melman, mguludag and spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
#include <QObject>
#include <QPlainTextEdit>
namespace _spdlog_p {
namespace _sinks_p {
class qplaintextedit_sink_p : public QObject {
Q_OBJECT
public:
qplaintextedit_sink_p(QPlainTextEdit *textedit = nullptr) {
if (textedit != nullptr) {
textedit_ = textedit;
connect(this, &qplaintextedit_sink_p::append_text, textedit_,
&QPlainTextEdit::appendPlainText);
}
}
~qplaintextedit_sink_p() {}
void append(const std::string &str) {
emit append_text(QString::fromStdString(str));
}
signals:
void append_text(const QString &);
private:
QPlainTextEdit *textedit_ = nullptr;
};
} // namespace _sinks_p
} // namespace _spdlog_p