Files
yacreader/YACReaderLibrary/comic_vine/series_question.cpp
luisangelsm edd5bbc69c Make Themable pass the current Theme through applyTheme
This reduces boilerplate code and remove the ThemeManager dependency at Thamable subclasses level.
2026-02-19 18:06:31 +01:00

49 lines
1.1 KiB
C++

#include "series_question.h"
#include <QRadioButton>
#include <QVBoxLayout>
#include <QLabel>
SeriesQuestion::SeriesQuestion(QWidget *parent)
: QWidget(parent)
{
auto l = new QVBoxLayout;
questionLabel = new QLabel(tr("You are trying to get information for various comics at once, are they part of the same series?"));
yes = new QRadioButton(tr("yes"));
no = new QRadioButton(tr("no"));
yes->setChecked(true);
l->addSpacing(35);
l->addWidget(questionLabel);
l->addWidget(yes);
l->addWidget(no);
l->addStretch();
l->setContentsMargins(0, 0, 0, 0);
setLayout(l);
setContentsMargins(0, 0, 0, 0);
initTheme(this);
}
bool SeriesQuestion::getYes()
{
return yes->isChecked();
}
void SeriesQuestion::setYes(bool y)
{
yes->setChecked(y);
}
void SeriesQuestion::applyTheme(const Theme &theme)
{
auto comicVineTheme = theme.comicVine;
questionLabel->setStyleSheet(comicVineTheme.defaultLabelQSS);
yes->setStyleSheet(comicVineTheme.radioButtonQSS);
no->setStyleSheet(comicVineTheme.radioButtonQSS);
}