Files
yacreader/YACReaderLibrary/comic_vine/search_volume.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

56 lines
1.2 KiB
C++

#include "search_volume.h"
#include "scraper_lineedit.h"
#include "scraper_checkbox.h"
#include <QLabel>
#include <QVBoxLayout>
SearchVolume::SearchVolume(QWidget *parent)
: QWidget(parent)
{
label = new QLabel(tr("Please provide some additional information."));
volumeEdit = new ScraperLineEdit(tr("Series:"));
volumeEdit->setClearButtonEnabled(true);
exactMatchCheckBox = new ScraperCheckBox(tr("Use exact match search. Disable if you want to find volumes that match some of the words in the name."), this);
exactMatchCheckBox->setChecked(true);
QVBoxLayout *l = new QVBoxLayout;
l->addSpacing(35);
l->addWidget(label);
l->addWidget(volumeEdit);
l->addWidget(exactMatchCheckBox);
l->addStretch();
l->setContentsMargins(0, 0, 0, 0);
setLayout(l);
setContentsMargins(0, 0, 0, 0);
initTheme(this);
}
void SearchVolume::clean()
{
volumeEdit->clear();
}
void SearchVolume::setVolumeInfo(const QString &volume)
{
volumeEdit->setText(volume);
}
QString SearchVolume::getVolumeInfo() const
{
return volumeEdit->text();
}
void SearchVolume::applyTheme(const Theme &theme)
{
auto comicVineTheme = theme.comicVine;
label->setStyleSheet(comicVineTheme.defaultLabelQSS);
}