Chrysalis - CLO3D DevTools Extension
Toggle main menu visibility
Loading...
Searching...
No Matches
LoggerTextEditSink.h
Go to the documentation of this file.
1
#ifndef CHRYSALIS_LOGGERTEXTEDIT_H
2
#define CHRYSALIS_LOGGERTEXTEDIT_H
3
4
#include <spdlog/sinks/qt_sinks.h>
5
6
#include <QTextEdit>
7
8
#include "Logger.h"
9
10
namespace
CLO3D::UI
{
11
class
LoggerTextEditSink
:
public
QTextEdit {
12
Q_OBJECT
13
public
:
14
explicit
LoggerTextEditSink
(QWidget* parent);
15
16
void
attach
(Logging::Logger* logger)
const
;
17
public
slots:
18
void
format
(
const
QString& text);
19
protected
:
20
void
showEvent
(QShowEvent*)
override
;
21
private
:
22
static
constexpr
auto
FORMAT_METHOD =
"format"
;
23
std::shared_ptr<spdlog::sinks::qt_sink_mt> sink_;
24
25
QTextCursor cursor_;
26
QTextCharFormat defaultFormat_;
27
QTextCharFormat coloredFormat_;
28
};
29
}
30
31
#endif
//CHRYSALIS_LOGGERTEXTEDIT_H
CLO3D::UI::LoggerTextEditSink::LoggerTextEditSink
LoggerTextEditSink(QWidget *parent)
Definition
LoggerTextEditSink.cpp:14
CLO3D::UI::LoggerTextEditSink::attach
void attach(Logging::Logger *logger) const
Definition
LoggerTextEditSink.cpp:31
CLO3D::UI::LoggerTextEditSink::format
void format(const QString &text)
Definition
LoggerTextEditSink.cpp:35
CLO3D::UI::LoggerTextEditSink::showEvent
void showEvent(QShowEvent *) override
Definition
LoggerTextEditSink.cpp:84
CLO3D::UI
Definition
BaseUIExporterOptionsWidget.h:7
integrations
clo3d
extensions
dev-tools
include
LoggerTextEditSink.h
Generated by
1.17.0