mirror of
https://github.com/YACReader/yacreader
synced 2025-07-19 13:34:44 -04:00
added new comic_vine folder containing all the ComicVine related clases
added QtScript dependency (json parser)
This commit is contained in:
54
YACReaderLibrary/comic_vine/search_single_comic.cpp
Normal file
54
YACReaderLibrary/comic_vine/search_single_comic.cpp
Normal file
@ -0,0 +1,54 @@
|
||||
#include "search_single_comic.h"
|
||||
|
||||
#include "scrapper_lineedit.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
SearchSingleComic::SearchSingleComic(QWidget * parent)
|
||||
:QWidget(parent)
|
||||
{
|
||||
|
||||
QLabel * label = new QLabel(tr("No results found, please provide some aditional information. At least one field is needed."));
|
||||
label->setStyleSheet("QLabel {color:white; font-size:12px;font-family:Arial;}");
|
||||
|
||||
titleEdit = new ScrapperLineEdit(tr("Title:"));
|
||||
numberEdit = new ScrapperLineEdit(tr("Number:"));
|
||||
volumeEdit = new ScrapperLineEdit(tr("Series:"));
|
||||
|
||||
numberEdit->setMaximumWidth(126);
|
||||
|
||||
QVBoxLayout * 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->addStretch();
|
||||
|
||||
l->setContentsMargins(0,0,0,0);
|
||||
setLayout(l);
|
||||
setContentsMargins(0,0,0,0);
|
||||
}
|
||||
|
||||
QString SearchSingleComic::getVolumeInfo()
|
||||
{
|
||||
return volumeEdit->text();
|
||||
}
|
||||
|
||||
QString SearchSingleComic::getComicInfo()
|
||||
{
|
||||
return titleEdit->text();
|
||||
}
|
||||
|
||||
int SearchSingleComic::getComicNumber()
|
||||
{
|
||||
QString numberText = numberEdit->text();
|
||||
if(numberText.isEmpty())
|
||||
return -1;
|
||||
return numberText.toInt();
|
||||
}
|
Reference in New Issue
Block a user