mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Update the properties dialog to support the new metadata
This commit is contained in:
parent
d5acae870b
commit
2cb201098d
@ -31,6 +31,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent)
|
|||||||
createPublishingBox();
|
createPublishingBox();
|
||||||
createButtonBox();
|
createButtonBox();
|
||||||
createPlotBox();
|
createPlotBox();
|
||||||
|
createNotesBox(); // review, notes, tags
|
||||||
|
|
||||||
createTabBar();
|
createTabBar();
|
||||||
auto rootLayout = new QGridLayout;
|
auto rootLayout = new QGridLayout;
|
||||||
@ -80,9 +81,10 @@ void PropertiesDialog::createTabBar()
|
|||||||
{
|
{
|
||||||
tabBar = new QTabWidget;
|
tabBar = new QTabWidget;
|
||||||
tabBar->addTab(generalInfoBox, tr("General info"));
|
tabBar->addTab(generalInfoBox, tr("General info"));
|
||||||
|
tabBar->addTab(plotBox, tr("Plot"));
|
||||||
tabBar->addTab(authorsBox, tr("Authors"));
|
tabBar->addTab(authorsBox, tr("Authors"));
|
||||||
tabBar->addTab(publishingBox, tr("Publishing"));
|
tabBar->addTab(publishingBox, tr("Publishing"));
|
||||||
tabBar->addTab(plotBox, tr("Plot"));
|
tabBar->addTab(notesBox, tr("Notes"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertiesDialog::createCoverBox()
|
void PropertiesDialog::createCoverBox()
|
||||||
@ -140,38 +142,44 @@ void PropertiesDialog::createGeneralInfoBox()
|
|||||||
|
|
||||||
generalInfoLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
generalInfoLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
||||||
generalInfoLayout->setRowWrapPolicy(QFormLayout::WrapAllRows);
|
generalInfoLayout->setRowWrapPolicy(QFormLayout::WrapAllRows);
|
||||||
|
generalInfoLayout->addRow(tr("Series:"), series = new YACReaderFieldEdit());
|
||||||
generalInfoLayout->addRow(tr("Title:"), title = new YACReaderFieldEdit());
|
generalInfoLayout->addRow(tr("Title:"), title = new YACReaderFieldEdit());
|
||||||
|
|
||||||
auto number = new QHBoxLayout;
|
auto number = new QHBoxLayout;
|
||||||
number->addWidget(numberEdit = new YACReaderFieldEdit());
|
number->addWidget(numberEdit = new YACReaderFieldEdit());
|
||||||
// numberValidator.setBottom(0);
|
|
||||||
// numberEdit->setValidator(&numberValidator);
|
|
||||||
number->addWidget(new QLabel("Bis:"));
|
|
||||||
number->addWidget(isBisCheck = new QCheckBox());
|
|
||||||
number->addWidget(new QLabel(tr("of:")));
|
number->addWidget(new QLabel(tr("of:")));
|
||||||
number->addWidget(countEdit = new YACReaderFieldEdit());
|
number->addWidget(countEdit = new YACReaderFieldEdit());
|
||||||
countValidator.setBottom(0);
|
countValidator.setBottom(0);
|
||||||
countEdit->setValidator(&countValidator);
|
countEdit->setValidator(&countValidator);
|
||||||
number->addStretch(1);
|
number->addStretch(1);
|
||||||
/*generalInfoLayout->addRow(tr("&Issue number:"), );
|
|
||||||
generalInfoLayout->addRow(tr("&Bis:"), );*/
|
|
||||||
generalInfoLayout->addRow(tr("Issue number:"), number);
|
generalInfoLayout->addRow(tr("Issue number:"), number);
|
||||||
|
|
||||||
generalInfoLayout->addRow(tr("Volume:"), volumeEdit = new YACReaderFieldEdit());
|
generalInfoLayout->addRow(tr("Volume:"), volumeEdit = new YACReaderFieldEdit());
|
||||||
|
|
||||||
auto arc = new QHBoxLayout;
|
auto arc = new QHBoxLayout;
|
||||||
arc->addWidget(storyArcEdit = new YACReaderFieldEdit());
|
arc->addWidget(storyArcEdit = new YACReaderFieldEdit(), 1);
|
||||||
|
storyArcEdit->setMinimumWidth(200);
|
||||||
arc->addWidget(new QLabel(tr("Arc number:")));
|
arc->addWidget(new QLabel(tr("Arc number:")));
|
||||||
arc->addWidget(arcNumberEdit = new YACReaderFieldEdit());
|
arc->addWidget(arcNumberEdit = new YACReaderFieldEdit());
|
||||||
// arcNumberValidator.setBottom(0);
|
|
||||||
// arcNumberEdit->setValidator(&arcNumberValidator);
|
|
||||||
arc->addWidget(new QLabel(tr("of:")));
|
arc->addWidget(new QLabel(tr("of:")));
|
||||||
arc->addWidget(arcCountEdit = new YACReaderFieldEdit());
|
arc->addWidget(arcCountEdit = new YACReaderFieldEdit());
|
||||||
arcCountValidator.setBottom(0);
|
arcCountValidator.setBottom(0);
|
||||||
arcCountEdit->setValidator(&arcCountValidator);
|
arcCountEdit->setValidator(&arcCountValidator);
|
||||||
arc->addStretch(1);
|
|
||||||
generalInfoLayout->addRow(tr("Story arc:"), arc);
|
generalInfoLayout->addRow(tr("Story arc:"), arc);
|
||||||
|
|
||||||
|
auto alternate = new QHBoxLayout;
|
||||||
|
alternate->addWidget(alternateSeriesEdit = new YACReaderFieldEdit(), 1);
|
||||||
|
alternateSeriesEdit->setMinimumWidth(200);
|
||||||
|
alternate->addWidget(new QLabel(tr("alt. number:")));
|
||||||
|
alternate->addWidget(alternateNumberEdit = new YACReaderFieldEdit());
|
||||||
|
alternate->addWidget(new QLabel(tr("of:")));
|
||||||
|
alternate->addWidget(alternateCountEdit = new YACReaderFieldEdit());
|
||||||
|
arcCountValidator.setBottom(0);
|
||||||
|
alternateCountEdit->setValidator(&arcCountValidator);
|
||||||
|
generalInfoLayout->addRow(tr("Alternate series:"), alternate);
|
||||||
|
|
||||||
|
generalInfoLayout->addRow(tr("Series Group:"), seriesGroupEdit = new YACReaderFieldEdit());
|
||||||
|
|
||||||
generalInfoLayout->addRow(tr("Genre:"), genereEdit = new YACReaderFieldEdit());
|
generalInfoLayout->addRow(tr("Genre:"), genereEdit = new YACReaderFieldEdit());
|
||||||
|
|
||||||
generalInfoLayout->addRow(tr("Size:"), size = new QLabel("size"));
|
generalInfoLayout->addRow(tr("Size:"), size = new QLabel("size"));
|
||||||
@ -221,9 +229,20 @@ void PropertiesDialog::createAuthorsBox()
|
|||||||
vr3->addWidget(coverArtist = new YACReaderFieldPlainTextEdit());
|
vr3->addWidget(coverArtist = new YACReaderFieldPlainTextEdit());
|
||||||
h3->addLayout(vr3);
|
h3->addLayout(vr3);
|
||||||
|
|
||||||
|
auto h4 = new QHBoxLayout;
|
||||||
|
auto vl4 = new QVBoxLayout;
|
||||||
|
auto vr4 = new QVBoxLayout;
|
||||||
|
vl4->addWidget(new QLabel(tr("Editor(s):")));
|
||||||
|
vl4->addWidget(editor = new YACReaderFieldPlainTextEdit());
|
||||||
|
h4->addLayout(vl4);
|
||||||
|
vr4->addWidget(new QLabel(tr("Imprint:")));
|
||||||
|
vr4->addWidget(imprint = new YACReaderFieldPlainTextEdit());
|
||||||
|
h4->addLayout(vr4);
|
||||||
|
|
||||||
authorsLayout->addLayout(h1);
|
authorsLayout->addLayout(h1);
|
||||||
authorsLayout->addLayout(h2);
|
authorsLayout->addLayout(h2);
|
||||||
authorsLayout->addLayout(h3);
|
authorsLayout->addLayout(h3);
|
||||||
|
authorsLayout->addLayout(h4);
|
||||||
authorsLayout->addStretch(1);
|
authorsLayout->addStretch(1);
|
||||||
authorsBox->setLayout(authorsLayout);
|
authorsBox->setLayout(authorsLayout);
|
||||||
}
|
}
|
||||||
@ -257,7 +276,16 @@ void PropertiesDialog::createPublishingBox()
|
|||||||
publishingLayout->addRow(tr("Format:"), formatEdit = new YACReaderFieldEdit());
|
publishingLayout->addRow(tr("Format:"), formatEdit = new YACReaderFieldEdit());
|
||||||
publishingLayout->addRow(tr("Color/BW:"), colorCheck = new QCheckBox());
|
publishingLayout->addRow(tr("Color/BW:"), colorCheck = new QCheckBox());
|
||||||
publishingLayout->addRow(tr("Age rating:"), ageRatingEdit = new YACReaderFieldEdit());
|
publishingLayout->addRow(tr("Age rating:"), ageRatingEdit = new YACReaderFieldEdit());
|
||||||
publishingLayout->addRow(tr("Manga:"), mangaCheck = new QCheckBox());
|
publishingLayout->addRow(tr("Type:"), typeCombo = new QComboBox());
|
||||||
|
publishingLayout->addRow(tr("Language (ISO):"), languageEdit = new YACReaderFieldEdit());
|
||||||
|
|
||||||
|
typeCombo->addItem("Comic");
|
||||||
|
typeCombo->addItem("Manga");
|
||||||
|
typeCombo->addItem("Western Manga");
|
||||||
|
typeCombo->addItem("Web Comic");
|
||||||
|
typeCombo->addItem("4koma");
|
||||||
|
|
||||||
|
typeCombo->setCurrentIndex(-1);
|
||||||
|
|
||||||
publishingBox->setLayout(publishingLayout);
|
publishingBox->setLayout(publishingLayout);
|
||||||
}
|
}
|
||||||
@ -266,17 +294,61 @@ void PropertiesDialog::createPlotBox()
|
|||||||
{
|
{
|
||||||
plotBox = new QWidget;
|
plotBox = new QWidget;
|
||||||
|
|
||||||
auto plotLayout = new QFormLayout;
|
auto plotLayout = new QVBoxLayout;
|
||||||
plotLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
|
||||||
|
|
||||||
plotLayout->setRowWrapPolicy(QFormLayout::WrapAllRows);
|
auto h1 = new QHBoxLayout;
|
||||||
plotLayout->addRow(tr("Synopsis:"), synopsis = new YACReaderFieldPlainTextEdit());
|
auto vl1 = new QVBoxLayout;
|
||||||
plotLayout->addRow(tr("Characters:"), characters = new YACReaderFieldPlainTextEdit());
|
vl1->addWidget(new QLabel(tr("Synopsis:")));
|
||||||
plotLayout->addRow(tr("Notes:"), notes = new YACReaderFieldPlainTextEdit());
|
vl1->addWidget(synopsis = new YACReaderFieldPlainTextEdit());
|
||||||
|
h1->addLayout(vl1);
|
||||||
|
|
||||||
|
auto h2 = new QHBoxLayout;
|
||||||
|
auto vl2 = new QVBoxLayout;
|
||||||
|
auto vr2 = new QVBoxLayout;
|
||||||
|
vl2->addWidget(new QLabel(tr("Characters:")));
|
||||||
|
vl2->addWidget(characters = new YACReaderFieldPlainTextEdit());
|
||||||
|
h2->addLayout(vl2);
|
||||||
|
vr2->addWidget(new QLabel(tr("Teams:")));
|
||||||
|
vr2->addWidget(teams = new YACReaderFieldPlainTextEdit());
|
||||||
|
h2->addLayout(vr2);
|
||||||
|
|
||||||
|
auto h3 = new QHBoxLayout;
|
||||||
|
auto vl3 = new QVBoxLayout;
|
||||||
|
vl3->addWidget(new QLabel(tr("Locations:")));
|
||||||
|
vl3->addWidget(locations = new YACReaderFieldPlainTextEdit());
|
||||||
|
h3->addLayout(vl3);
|
||||||
|
|
||||||
|
auto h4 = new QHBoxLayout;
|
||||||
|
auto vl4 = new QVBoxLayout;
|
||||||
|
vl4->addWidget(new QLabel(tr("Main character or team:")));
|
||||||
|
vl4->addWidget(mainCharacterOrTeamEdit = new YACReaderFieldEdit());
|
||||||
|
h4->addLayout(vl4);
|
||||||
|
|
||||||
|
plotLayout->addLayout(h1);
|
||||||
|
plotLayout->addLayout(h2);
|
||||||
|
plotLayout->addLayout(h3);
|
||||||
|
plotLayout->addLayout(h4);
|
||||||
|
plotLayout->addStretch(1);
|
||||||
|
|
||||||
plotBox->setLayout(plotLayout);
|
plotBox->setLayout(plotLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PropertiesDialog::createNotesBox()
|
||||||
|
{
|
||||||
|
notesBox = new QWidget;
|
||||||
|
|
||||||
|
auto notesLayout = new QFormLayout;
|
||||||
|
notesLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
||||||
|
|
||||||
|
notesLayout->setRowWrapPolicy(QFormLayout::WrapAllRows);
|
||||||
|
|
||||||
|
notesLayout->addRow(tr("Review:"), review = new YACReaderFieldPlainTextEdit());
|
||||||
|
notesLayout->addRow(tr("Notes:"), notes = new YACReaderFieldPlainTextEdit());
|
||||||
|
notesLayout->addRow(tr("Tags:"), tags = new YACReaderFieldPlainTextEdit());
|
||||||
|
|
||||||
|
notesBox->setLayout(notesLayout);
|
||||||
|
}
|
||||||
|
|
||||||
void PropertiesDialog::createButtonBox()
|
void PropertiesDialog::createButtonBox()
|
||||||
{
|
{
|
||||||
buttonBox = new QDialogButtonBox;
|
buttonBox = new QDialogButtonBox;
|
||||||
@ -362,6 +434,8 @@ QImage blurred(const QImage &image, const QRect &rect, int radius, bool alphaOnl
|
|||||||
|
|
||||||
void PropertiesDialog::loadComic(ComicDB &comic)
|
void PropertiesDialog::loadComic(ComicDB &comic)
|
||||||
{
|
{
|
||||||
|
if (!comic.info.series.isNull())
|
||||||
|
series->setText(comic.info.series.toString());
|
||||||
if (!comic.info.title.isNull())
|
if (!comic.info.title.isNull())
|
||||||
title->setText(comic.info.title.toString());
|
title->setText(comic.info.title.toString());
|
||||||
if (!comic.info.comicVineID.isNull()) {
|
if (!comic.info.comicVineID.isNull()) {
|
||||||
@ -401,8 +475,6 @@ void PropertiesDialog::loadComic(ComicDB &comic)
|
|||||||
|
|
||||||
if (!comic.info.number.isNull())
|
if (!comic.info.number.isNull())
|
||||||
numberEdit->setText(comic.info.number.toString());
|
numberEdit->setText(comic.info.number.toString());
|
||||||
if (!comic.info.isBis.isNull())
|
|
||||||
isBisCheck->setChecked(comic.info.isBis.toBool());
|
|
||||||
if (!comic.info.count.isNull())
|
if (!comic.info.count.isNull())
|
||||||
countEdit->setText(comic.info.count.toString());
|
countEdit->setText(comic.info.count.toString());
|
||||||
|
|
||||||
@ -414,6 +486,14 @@ void PropertiesDialog::loadComic(ComicDB &comic)
|
|||||||
arcNumberEdit->setText(comic.info.arcNumber.toString());
|
arcNumberEdit->setText(comic.info.arcNumber.toString());
|
||||||
if (!comic.info.arcCount.isNull())
|
if (!comic.info.arcCount.isNull())
|
||||||
arcCountEdit->setText(comic.info.arcCount.toString());
|
arcCountEdit->setText(comic.info.arcCount.toString());
|
||||||
|
if (!comic.info.alternateSeries.isNull())
|
||||||
|
alternateSeriesEdit->setText(comic.info.alternateSeries.toString());
|
||||||
|
if (!comic.info.alternateNumber.isNull())
|
||||||
|
alternateNumberEdit->setText(comic.info.alternateNumber.toString());
|
||||||
|
if (!comic.info.alternateCount.isNull())
|
||||||
|
alternateCountEdit->setText(comic.info.alternateCount.toString());
|
||||||
|
if (!comic.info.seriesGroup.isNull())
|
||||||
|
seriesGroupEdit->setText(comic.info.seriesGroup.toString());
|
||||||
|
|
||||||
if (!comic.info.genere.isNull())
|
if (!comic.info.genere.isNull())
|
||||||
genereEdit->setText(comic.info.genere.toString());
|
genereEdit->setText(comic.info.genere.toString());
|
||||||
@ -430,6 +510,10 @@ void PropertiesDialog::loadComic(ComicDB &comic)
|
|||||||
letterer->setPlainText(comic.info.letterer.toString());
|
letterer->setPlainText(comic.info.letterer.toString());
|
||||||
if (!comic.info.coverArtist.isNull())
|
if (!comic.info.coverArtist.isNull())
|
||||||
coverArtist->setPlainText(comic.info.coverArtist.toString());
|
coverArtist->setPlainText(comic.info.coverArtist.toString());
|
||||||
|
if (!comic.info.editor.isNull())
|
||||||
|
editor->setPlainText(comic.info.editor.toString());
|
||||||
|
if (!comic.info.imprint.isNull())
|
||||||
|
imprint->setPlainText(comic.info.imprint.toString());
|
||||||
|
|
||||||
size->setText(QString::number(comic.info.hash.right(comic.info.hash.length() - 40).toInt() / 1024.0 / 1024.0, 'f', 2) + "Mb");
|
size->setText(QString::number(comic.info.hash.right(comic.info.hash.length() - 40).toInt() / 1024.0 / 1024.0, 'f', 2) + "Mb");
|
||||||
|
|
||||||
@ -452,7 +536,10 @@ void PropertiesDialog::loadComic(ComicDB &comic)
|
|||||||
else
|
else
|
||||||
colorCheck->setCheckState(Qt::PartiallyChecked);
|
colorCheck->setCheckState(Qt::PartiallyChecked);
|
||||||
|
|
||||||
mangaCheck->setChecked(comic.info.manga.toBool());
|
typeCombo->setCurrentIndex(comic.info.type.toInt());
|
||||||
|
|
||||||
|
if (!comic.info.languageISO.isNull())
|
||||||
|
languageEdit->setText(comic.info.languageISO.toString());
|
||||||
|
|
||||||
if (!comic.info.ageRating.isNull())
|
if (!comic.info.ageRating.isNull())
|
||||||
ageRatingEdit->setText(comic.info.ageRating.toString());
|
ageRatingEdit->setText(comic.info.ageRating.toString());
|
||||||
@ -461,8 +548,19 @@ void PropertiesDialog::loadComic(ComicDB &comic)
|
|||||||
synopsis->setPlainText(comic.info.synopsis.toString());
|
synopsis->setPlainText(comic.info.synopsis.toString());
|
||||||
if (!comic.info.characters.isNull())
|
if (!comic.info.characters.isNull())
|
||||||
characters->setPlainText(comic.info.characters.toString());
|
characters->setPlainText(comic.info.characters.toString());
|
||||||
|
if (!comic.info.teams.isNull())
|
||||||
|
teams->setPlainText(comic.info.teams.toString());
|
||||||
|
if (!comic.info.locations.isNull())
|
||||||
|
locations->setPlainText(comic.info.locations.toString());
|
||||||
|
if (!comic.info.mainCharacterOrTeam.isNull())
|
||||||
|
mainCharacterOrTeamEdit->setText(comic.info.mainCharacterOrTeam.toString());
|
||||||
|
|
||||||
|
if (!comic.info.review.isNull())
|
||||||
|
review->setPlainText(comic.info.review.toString());
|
||||||
if (!comic.info.notes.isNull())
|
if (!comic.info.notes.isNull())
|
||||||
notes->setPlainText(comic.info.notes.toString());
|
notes->setPlainText(comic.info.notes.toString());
|
||||||
|
if (!comic.info.tags.isNull())
|
||||||
|
tags->setPlainText(comic.info.tags.toString());
|
||||||
|
|
||||||
this->setWindowTitle(tr("Edit comic information"));
|
this->setWindowTitle(tr("Edit comic information"));
|
||||||
setCover(comic.info.getCover(basePath));
|
setCover(comic.info.getCover(basePath));
|
||||||
@ -503,6 +601,9 @@ void PropertiesDialog::setComics(QList<ComicDB> comics)
|
|||||||
|
|
||||||
QList<ComicDB>::iterator itr;
|
QList<ComicDB>::iterator itr;
|
||||||
for (itr = ++comics.begin(); itr != comics.end(); itr++) {
|
for (itr = ++comics.begin(); itr != comics.end(); itr++) {
|
||||||
|
if (itr->info.series.isNull() || itr->info.series.toString() != series->text())
|
||||||
|
series->clear();
|
||||||
|
|
||||||
if (itr->info.title.isNull() || itr->info.title.toString() != title->text())
|
if (itr->info.title.isNull() || itr->info.title.toString() != title->text())
|
||||||
title->clear();
|
title->clear();
|
||||||
|
|
||||||
@ -516,8 +617,15 @@ void PropertiesDialog::setComics(QList<ComicDB> comics)
|
|||||||
if (itr->info.arcCount.isNull() || itr->info.arcCount.toString() != storyArcEdit->text())
|
if (itr->info.arcCount.isNull() || itr->info.arcCount.toString() != storyArcEdit->text())
|
||||||
arcCountEdit->clear();
|
arcCountEdit->clear();
|
||||||
|
|
||||||
|
if (itr->info.alternateSeries.isNull() || itr->info.alternateSeries.toString() != alternateSeriesEdit->text())
|
||||||
|
alternateSeriesEdit->clear();
|
||||||
|
if (itr->info.alternateCount.isNull() || itr->info.alternateCount.toString() != alternateCountEdit->text())
|
||||||
|
alternateCountEdit->clear();
|
||||||
|
|
||||||
if (itr->info.genere.isNull() || itr->info.genere.toString() != genereEdit->text())
|
if (itr->info.genere.isNull() || itr->info.genere.toString() != genereEdit->text())
|
||||||
genereEdit->clear();
|
genereEdit->clear();
|
||||||
|
if (itr->info.seriesGroup.isNull() || itr->info.seriesGroup.toString() != seriesGroupEdit->text())
|
||||||
|
seriesGroupEdit->clear();
|
||||||
|
|
||||||
if (itr->info.writer.isNull() || itr->info.writer.toString() != writer->toPlainText())
|
if (itr->info.writer.isNull() || itr->info.writer.toString() != writer->toPlainText())
|
||||||
writer->clear();
|
writer->clear();
|
||||||
@ -531,6 +639,10 @@ void PropertiesDialog::setComics(QList<ComicDB> comics)
|
|||||||
letterer->clear();
|
letterer->clear();
|
||||||
if (itr->info.coverArtist.isNull() || itr->info.coverArtist.toString() != coverArtist->toPlainText())
|
if (itr->info.coverArtist.isNull() || itr->info.coverArtist.toString() != coverArtist->toPlainText())
|
||||||
coverArtist->clear();
|
coverArtist->clear();
|
||||||
|
if (itr->info.editor.isNull() || itr->info.editor.toString() != editor->toPlainText())
|
||||||
|
editor->clear();
|
||||||
|
if (itr->info.imprint.isNull() || itr->info.imprint.toString() != imprint->toPlainText())
|
||||||
|
imprint->clear();
|
||||||
|
|
||||||
if (itr->info.date.isNull()) {
|
if (itr->info.date.isNull()) {
|
||||||
dayEdit->clear();
|
dayEdit->clear();
|
||||||
@ -552,8 +664,16 @@ void PropertiesDialog::setComics(QList<ComicDB> comics)
|
|||||||
formatEdit->clear();
|
formatEdit->clear();
|
||||||
if (itr->info.color.isNull() || itr->info.color.toBool() != colorCheck->isChecked())
|
if (itr->info.color.isNull() || itr->info.color.toBool() != colorCheck->isChecked())
|
||||||
colorCheck->setCheckState(Qt::PartiallyChecked);
|
colorCheck->setCheckState(Qt::PartiallyChecked);
|
||||||
if (itr->info.manga.toBool() != colorCheck->isChecked())
|
|
||||||
mangaCheck->setCheckState(Qt::PartiallyChecked);
|
if (itr->info.type.toInt() != typeCombo->currentIndex()) {
|
||||||
|
typeCombo->setCurrentIndex(-1);
|
||||||
|
} else {
|
||||||
|
typeCombo->setCurrentIndex(itr->info.type.toInt());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itr->info.languageISO.toString() != languageEdit->text())
|
||||||
|
languageEdit->clear();
|
||||||
|
|
||||||
if (itr->info.ageRating.isNull() || itr->info.ageRating.toString() != ageRatingEdit->text())
|
if (itr->info.ageRating.isNull() || itr->info.ageRating.toString() != ageRatingEdit->text())
|
||||||
ageRatingEdit->clear();
|
ageRatingEdit->clear();
|
||||||
|
|
||||||
@ -561,8 +681,19 @@ void PropertiesDialog::setComics(QList<ComicDB> comics)
|
|||||||
synopsis->clear();
|
synopsis->clear();
|
||||||
if (itr->info.characters.isNull() || itr->info.characters.toString() != characters->toPlainText())
|
if (itr->info.characters.isNull() || itr->info.characters.toString() != characters->toPlainText())
|
||||||
characters->clear();
|
characters->clear();
|
||||||
|
if (itr->info.teams.isNull() || itr->info.teams.toString() != teams->toPlainText())
|
||||||
|
teams->clear();
|
||||||
|
if (itr->info.locations.isNull() || itr->info.locations.toString() != locations->toPlainText())
|
||||||
|
locations->clear();
|
||||||
|
if (itr->info.mainCharacterOrTeam.isNull() || itr->info.mainCharacterOrTeam.toString() != mainCharacterOrTeamEdit->text())
|
||||||
|
mainCharacterOrTeamEdit->clear();
|
||||||
|
|
||||||
|
if (itr->info.review.isNull() || itr->info.review.toString() != review->toPlainText())
|
||||||
|
review->clear();
|
||||||
if (itr->info.notes.isNull() || itr->info.notes.toString() != notes->toPlainText())
|
if (itr->info.notes.isNull() || itr->info.notes.toString() != notes->toPlainText())
|
||||||
notes->clear();
|
notes->clear();
|
||||||
|
if (itr->info.tags.isNull() || itr->info.tags.toString() != tags->toPlainText())
|
||||||
|
tags->clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -615,7 +746,7 @@ void PropertiesDialog::setMultipleCover()
|
|||||||
|
|
||||||
void PropertiesDialog::setCover(const QPixmap &coverI)
|
void PropertiesDialog::setCover(const QPixmap &coverI)
|
||||||
{
|
{
|
||||||
coverImage = coverI.scaledToHeight(444, Qt::SmoothTransformation);
|
coverImage = coverI.scaledToHeight(575, Qt::SmoothTransformation);
|
||||||
|
|
||||||
cover->setPixmap(coverImage);
|
cover->setPixmap(coverImage);
|
||||||
}
|
}
|
||||||
@ -642,6 +773,12 @@ void PropertiesDialog::save()
|
|||||||
for (itr = begin; itr != end; itr++) {
|
for (itr = begin; itr != end; itr++) {
|
||||||
bool edited = false;
|
bool edited = false;
|
||||||
|
|
||||||
|
if (series->isModified()) {
|
||||||
|
auto seriesString = series->text();
|
||||||
|
itr->info.series = seriesString.isEmpty() ? QVariant() : series->text();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (title->isModified()) {
|
if (title->isModified()) {
|
||||||
auto titleString = title->text();
|
auto titleString = title->text();
|
||||||
itr->info.title = titleString.isEmpty() ? QVariant() : title->text();
|
itr->info.title = titleString.isEmpty() ? QVariant() : title->text();
|
||||||
@ -654,8 +791,6 @@ void PropertiesDialog::save()
|
|||||||
edited = true;
|
edited = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if(comic.info.numPages != NULL)
|
|
||||||
numPagesEdit->setText(QString::number(*comic.info.numPages));*/
|
|
||||||
if (sequentialEditing)
|
if (sequentialEditing)
|
||||||
if (numberEdit->isModified()) {
|
if (numberEdit->isModified()) {
|
||||||
if (numberEdit->text().isEmpty())
|
if (numberEdit->text().isEmpty())
|
||||||
@ -664,11 +799,6 @@ void PropertiesDialog::save()
|
|||||||
itr->info.number = numberEdit->text();
|
itr->info.number = numberEdit->text();
|
||||||
edited = true;
|
edited = true;
|
||||||
}
|
}
|
||||||
if (sequentialEditing)
|
|
||||||
if (!itr->info.isBis.isNull() || isBisCheck->isChecked()) {
|
|
||||||
itr->info.isBis = isBisCheck->isChecked();
|
|
||||||
edited = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (countEdit->isModified()) {
|
if (countEdit->isModified()) {
|
||||||
itr->info.count = countEdit->text();
|
itr->info.count = countEdit->text();
|
||||||
@ -693,6 +823,23 @@ void PropertiesDialog::save()
|
|||||||
edited = true;
|
edited = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (alternateSeriesEdit->isModified()) {
|
||||||
|
itr->info.alternateSeries = alternateSeriesEdit->text();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sequentialEditing) {
|
||||||
|
if (alternateNumberEdit->isModified()) {
|
||||||
|
itr->info.alternateNumber = alternateNumberEdit->text();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (alternateCountEdit->isModified()) {
|
||||||
|
itr->info.alternateCount = alternateCountEdit->text();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (genereEdit->isModified()) {
|
if (genereEdit->isModified()) {
|
||||||
itr->info.genere = genereEdit->text();
|
itr->info.genere = genereEdit->text();
|
||||||
edited = true;
|
edited = true;
|
||||||
@ -722,6 +869,14 @@ void PropertiesDialog::save()
|
|||||||
itr->info.coverArtist = coverArtist->toPlainText();
|
itr->info.coverArtist = coverArtist->toPlainText();
|
||||||
edited = true;
|
edited = true;
|
||||||
}
|
}
|
||||||
|
if (editor->document()->isModified()) {
|
||||||
|
itr->info.editor = editor->toPlainText();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
|
if (imprint->document()->isModified()) {
|
||||||
|
itr->info.imprint = imprint->toPlainText();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (dayEdit->isModified() || monthEdit->isModified() || yearEdit->isModified()) {
|
if (dayEdit->isModified() || monthEdit->isModified() || yearEdit->isModified()) {
|
||||||
itr->info.date = dayEdit->text() + "/" + monthEdit->text() + "/" + yearEdit->text();
|
itr->info.date = dayEdit->text() + "/" + monthEdit->text() + "/" + yearEdit->text();
|
||||||
@ -740,8 +895,13 @@ void PropertiesDialog::save()
|
|||||||
edited = true;
|
edited = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mangaCheck->checkState() != Qt::PartiallyChecked) {
|
if (typeCombo->currentIndex() != -1 && itr->info.type.toInt() != typeCombo->currentIndex()) {
|
||||||
itr->info.manga = mangaCheck->isChecked();
|
itr->info.type = typeCombo->currentIndex();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (languageEdit->isModified()) {
|
||||||
|
itr->info.languageISO = languageEdit->text();
|
||||||
edited = true;
|
edited = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -754,14 +914,40 @@ void PropertiesDialog::save()
|
|||||||
itr->info.synopsis = synopsis->toPlainText();
|
itr->info.synopsis = synopsis->toPlainText();
|
||||||
edited = true;
|
edited = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (characters->document()->isModified()) {
|
if (characters->document()->isModified()) {
|
||||||
itr->info.characters = characters->toPlainText();
|
itr->info.characters = characters->toPlainText();
|
||||||
edited = true;
|
edited = true;
|
||||||
}
|
}
|
||||||
|
if (locations->document()->isModified()) {
|
||||||
|
itr->info.locations = locations->toPlainText();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
|
if (teams->document()->isModified()) {
|
||||||
|
itr->info.teams = teams->toPlainText();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
|
if (mainCharacterOrTeamEdit->isModified()) {
|
||||||
|
itr->info.mainCharacterOrTeam = mainCharacterOrTeamEdit->text();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
|
if (seriesGroupEdit->isModified()) {
|
||||||
|
itr->info.seriesGroup = seriesGroupEdit->text();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (review->document()->isModified()) {
|
||||||
|
itr->info.review = review->toPlainText();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
if (notes->document()->isModified()) {
|
if (notes->document()->isModified()) {
|
||||||
itr->info.notes = notes->toPlainText();
|
itr->info.notes = notes->toPlainText();
|
||||||
edited = true;
|
edited = true;
|
||||||
}
|
}
|
||||||
|
if (tags->document()->isModified()) {
|
||||||
|
itr->info.tags = tags->toPlainText();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
|
|
||||||
itr->info.edited = edited;
|
itr->info.edited = edited;
|
||||||
}
|
}
|
||||||
@ -829,10 +1015,10 @@ void PropertiesDialog::setDisableUniqueValues(bool disabled)
|
|||||||
coverPageEdit->clear();
|
coverPageEdit->clear();
|
||||||
numberEdit->setDisabled(disabled);
|
numberEdit->setDisabled(disabled);
|
||||||
numberEdit->clear();
|
numberEdit->clear();
|
||||||
isBisCheck->setDisabled(disabled);
|
|
||||||
isBisCheck->setChecked(false);
|
|
||||||
arcNumberEdit->setDisabled(disabled);
|
arcNumberEdit->setDisabled(disabled);
|
||||||
arcNumberEdit->clear();
|
arcNumberEdit->clear();
|
||||||
|
alternateNumberEdit->setDisabled(disabled);
|
||||||
|
alternateNumberEdit->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertiesDialog::closeEvent(QCloseEvent *e)
|
void PropertiesDialog::closeEvent(QCloseEvent *e)
|
||||||
@ -841,9 +1027,7 @@ void PropertiesDialog::closeEvent(QCloseEvent *e)
|
|||||||
title->clear();
|
title->clear();
|
||||||
title->setModified(false);
|
title->setModified(false);
|
||||||
coverPageEdit->clear();
|
coverPageEdit->clear();
|
||||||
// numPagesEdit->setText(QString::number(*comic.info.numPages));
|
|
||||||
numberEdit->clear();
|
numberEdit->clear();
|
||||||
isBisCheck->setChecked(false);
|
|
||||||
countEdit->clear();
|
countEdit->clear();
|
||||||
volumeEdit->clear();
|
volumeEdit->clear();
|
||||||
storyArcEdit->clear();
|
storyArcEdit->clear();
|
||||||
@ -862,12 +1046,27 @@ void PropertiesDialog::closeEvent(QCloseEvent *e)
|
|||||||
publisherEdit->clear();
|
publisherEdit->clear();
|
||||||
formatEdit->clear();
|
formatEdit->clear();
|
||||||
colorCheck->setCheckState(Qt::PartiallyChecked);
|
colorCheck->setCheckState(Qt::PartiallyChecked);
|
||||||
mangaCheck->setChecked(false);
|
|
||||||
ageRatingEdit->clear();
|
ageRatingEdit->clear();
|
||||||
synopsis->clear();
|
synopsis->clear();
|
||||||
characters->clear();
|
characters->clear();
|
||||||
notes->clear();
|
notes->clear();
|
||||||
|
|
||||||
|
// 9.13 fields
|
||||||
|
typeCombo->setCurrentIndex(-1);
|
||||||
|
editor->clear();
|
||||||
|
imprint->clear();
|
||||||
|
teams->clear();
|
||||||
|
locations->clear();
|
||||||
|
series->clear();
|
||||||
|
alternateSeriesEdit->clear();
|
||||||
|
alternateNumberEdit->clear();
|
||||||
|
alternateCountEdit->clear();
|
||||||
|
languageEdit->clear();
|
||||||
|
seriesGroupEdit->clear();
|
||||||
|
mainCharacterOrTeamEdit->clear();
|
||||||
|
review->clear();
|
||||||
|
tags->clear();
|
||||||
|
|
||||||
setDisableUniqueValues(false);
|
setDisableUniqueValues(false);
|
||||||
|
|
||||||
tabBar->setCurrentIndex(0);
|
tabBar->setCurrentIndex(0);
|
||||||
|
@ -15,6 +15,7 @@ class YACReaderFieldEdit;
|
|||||||
class YACReaderFieldPlainTextEdit;
|
class YACReaderFieldPlainTextEdit;
|
||||||
class QDialogButtonBox;
|
class QDialogButtonBox;
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
|
class QComboBox;
|
||||||
// class YACReaderBusyWidget;
|
// class YACReaderBusyWidget;
|
||||||
class QToolButton;
|
class QToolButton;
|
||||||
|
|
||||||
@ -36,6 +37,7 @@ private:
|
|||||||
QScrollArea *sa;
|
QScrollArea *sa;
|
||||||
|
|
||||||
QWidget *generalInfoBox;
|
QWidget *generalInfoBox;
|
||||||
|
YACReaderFieldEdit *series;
|
||||||
YACReaderFieldEdit *title;
|
YACReaderFieldEdit *title;
|
||||||
YACReaderFieldEdit *numPagesEdit;
|
YACReaderFieldEdit *numPagesEdit;
|
||||||
QLabel *size;
|
QLabel *size;
|
||||||
@ -46,7 +48,6 @@ private:
|
|||||||
|
|
||||||
YACReaderFieldEdit *numberEdit;
|
YACReaderFieldEdit *numberEdit;
|
||||||
QIntValidator numberValidator;
|
QIntValidator numberValidator;
|
||||||
QCheckBox *isBisCheck;
|
|
||||||
YACReaderFieldEdit *countEdit;
|
YACReaderFieldEdit *countEdit;
|
||||||
QIntValidator countValidator;
|
QIntValidator countValidator;
|
||||||
|
|
||||||
@ -57,6 +58,12 @@ private:
|
|||||||
YACReaderFieldEdit *arcCountEdit;
|
YACReaderFieldEdit *arcCountEdit;
|
||||||
QIntValidator arcCountValidator;
|
QIntValidator arcCountValidator;
|
||||||
|
|
||||||
|
YACReaderFieldEdit *alternateSeriesEdit;
|
||||||
|
YACReaderFieldEdit *alternateNumberEdit;
|
||||||
|
YACReaderFieldEdit *alternateCountEdit;
|
||||||
|
|
||||||
|
YACReaderFieldEdit *seriesGroupEdit;
|
||||||
|
|
||||||
YACReaderFieldEdit *genereEdit;
|
YACReaderFieldEdit *genereEdit;
|
||||||
|
|
||||||
YACReaderFieldPlainTextEdit *writer;
|
YACReaderFieldPlainTextEdit *writer;
|
||||||
@ -65,6 +72,8 @@ private:
|
|||||||
YACReaderFieldPlainTextEdit *colorist;
|
YACReaderFieldPlainTextEdit *colorist;
|
||||||
YACReaderFieldPlainTextEdit *letterer;
|
YACReaderFieldPlainTextEdit *letterer;
|
||||||
YACReaderFieldPlainTextEdit *coverArtist;
|
YACReaderFieldPlainTextEdit *coverArtist;
|
||||||
|
YACReaderFieldPlainTextEdit *editor;
|
||||||
|
YACReaderFieldPlainTextEdit *imprint;
|
||||||
|
|
||||||
YACReaderFieldEdit *dayEdit;
|
YACReaderFieldEdit *dayEdit;
|
||||||
QIntValidator dayValidator;
|
QIntValidator dayValidator;
|
||||||
@ -76,11 +85,14 @@ private:
|
|||||||
YACReaderFieldEdit *formatEdit;
|
YACReaderFieldEdit *formatEdit;
|
||||||
QCheckBox *colorCheck;
|
QCheckBox *colorCheck;
|
||||||
YACReaderFieldEdit *ageRatingEdit;
|
YACReaderFieldEdit *ageRatingEdit;
|
||||||
QCheckBox *mangaCheck;
|
QComboBox *typeCombo;
|
||||||
|
YACReaderFieldEdit *languageEdit;
|
||||||
|
|
||||||
YACReaderFieldPlainTextEdit *synopsis;
|
YACReaderFieldPlainTextEdit *synopsis;
|
||||||
YACReaderFieldPlainTextEdit *characters;
|
YACReaderFieldPlainTextEdit *characters;
|
||||||
YACReaderFieldPlainTextEdit *notes;
|
YACReaderFieldPlainTextEdit *teams;
|
||||||
|
YACReaderFieldPlainTextEdit *locations;
|
||||||
|
YACReaderFieldEdit *mainCharacterOrTeamEdit;
|
||||||
|
|
||||||
QWidget *authorsBox;
|
QWidget *authorsBox;
|
||||||
|
|
||||||
@ -88,6 +100,12 @@ private:
|
|||||||
|
|
||||||
QWidget *plotBox;
|
QWidget *plotBox;
|
||||||
|
|
||||||
|
QWidget *notesBox;
|
||||||
|
|
||||||
|
YACReaderFieldPlainTextEdit *review;
|
||||||
|
YACReaderFieldPlainTextEdit *notes;
|
||||||
|
YACReaderFieldPlainTextEdit *tags;
|
||||||
|
|
||||||
QDialogButtonBox *buttonBox;
|
QDialogButtonBox *buttonBox;
|
||||||
QPushButton *closeButton;
|
QPushButton *closeButton;
|
||||||
QPushButton *saveButton;
|
QPushButton *saveButton;
|
||||||
@ -107,6 +125,7 @@ private:
|
|||||||
void createAuthorsBox();
|
void createAuthorsBox();
|
||||||
void createPublishingBox();
|
void createPublishingBox();
|
||||||
void createPlotBox();
|
void createPlotBox();
|
||||||
|
void createNotesBox();
|
||||||
|
|
||||||
void createButtonBox();
|
void createButtonBox();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user