2019-09-08 22:27:57 +02:00
|
|
|
#include "DebugPopup.hpp"
|
|
|
|
|
|
|
|
#include "util/DebugCount.hpp"
|
|
|
|
|
|
|
|
#include <QFontDatabase>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QTimer>
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
|
|
|
DebugPopup::DebugPopup()
|
|
|
|
{
|
|
|
|
auto *layout = new QHBoxLayout(this);
|
|
|
|
auto *text = new QLabel(this);
|
|
|
|
auto *timer = new QTimer(this);
|
|
|
|
|
|
|
|
timer->setInterval(300);
|
2020-11-08 12:02:19 +01:00
|
|
|
QObject::connect(timer, &QTimer::timeout, [text] {
|
|
|
|
text->setText(DebugCount::getDebugText());
|
|
|
|
});
|
2019-09-08 22:27:57 +02:00
|
|
|
timer->start();
|
|
|
|
|
|
|
|
text->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
|
|
|
|
|
|
|
|
layout->addWidget(text);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace chatterino
|