Files
yacreader/YACReaderLibrary/comic_vine/search_single_comic.cpp
luisangelsm 3709b6e737
Some checks failed
Build / Initialization (push) Has been cancelled
Build / Code Format Validation (push) Has been cancelled
Build / Linux (Qt6) (push) Has been cancelled
Build / Linux (Qt6 + 7zip) (push) Has been cancelled
Build / macOS (Qt6 Universal) (push) Has been cancelled
Build / Windows x64 (Qt6) (push) Has been cancelled
Build / Windows ARM64 (Qt6) (push) Has been cancelled
Build / Docker amd64 Image (push) Has been cancelled
Build / Docker arm64 Image (push) Has been cancelled
Build / Publish Dev Builds (push) Has been cancelled
Build / Publish Release (push) Has been cancelled
Build / Publish YACReader10 Pre-release Builds (push) Has been cancelled
Format includes using clang-format
2026-03-13 18:21:38 +01:00

81 lines
2.0 KiB
C++

#include "search_single_comic.h"
#include "scraper_lineedit.h"
#include <QHBoxLayout>
#include <QLabel>
#include <QVBoxLayout>
SearchSingleComic::SearchSingleComic(QWidget *parent)
: QWidget(parent)
{
// QLabel * label = new QLabel(tr("Please provide some additional information. At least one field is needed."));
label = new QLabel(tr("Please provide some additional information for this comic."));
// titleEdit = new ScraperLineEdit(tr("Title:"));
// numberEdit = new ScraperLineEdit(tr("Number:"));
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."));
exactMatchCheckBox->setChecked(true);
// numberEdit->setMaximumWidth(126);
auto l = new QVBoxLayout;
// QHBoxLayout * hl = new QHBoxLayout;
// hl->addWidget(titleEdit);
// hl->addWidget(numberEdit);
l->addSpacing(35);
l->addWidget(label);
// l->addLayout(hl);
l->addWidget(volumeEdit);
l->addWidget(exactMatchCheckBox);
l->addStretch();
l->setContentsMargins(0, 0, 0, 0);
setLayout(l);
setContentsMargins(0, 0, 0, 0);
initTheme(this);
}
QString SearchSingleComic::getVolumeInfo() const
{
return volumeEdit->text();
}
void SearchSingleComic::setVolumeInfo(const QString &volume)
{
volumeEdit->setText(volume);
}
QString SearchSingleComic::getComicInfo()
{
// return titleEdit->text();
return "";
}
int SearchSingleComic::getComicNumber()
{
// QString numberText = numberEdit->text();
// if(numberText.isEmpty())
// return -1;
// return numberText.toInt();
return 0;
}
void SearchSingleComic::clean()
{
volumeEdit->clear();
}
void SearchSingleComic::applyTheme(const Theme &theme)
{
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
label->setStyleSheet(metadataScraperDialogTheme.defaultLabelQSS);
}