setup electron app with boilerplate

This commit is contained in:
talksik
2026-02-19 19:41:26 -08:00
parent fc6a5e43db
commit 1f249c47a6
5174 changed files with 8743 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
#include "textparticlewidget.h"
#include "../models.h"
#include <QLabel>
#include <QVBoxLayout>
TextParticleWidget::TextParticleWidget(QWidget *parent)
: QWidget(parent)
{
auto *layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
layout->addStretch();
m_label = new QLabel();
QFont font;
font.setPointSize(36);
m_label->setFont(font);
m_label->setAlignment(Qt::AlignCenter);
m_label->setWordWrap(true);
m_label->setScaledContents(true);
layout->addWidget(m_label);
layout->addStretch();
}
void TextParticleWidget::setParticle(const Particle *particle)
{
if (!particle) return;
m_label->setText(particle->data.value("content").toString());
}
void TextParticleWidget::clear()
{
m_label->setText("");
}