mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 09:08:20 -04:00
Add new manga field to the edit comic dialog
This commit is contained in:
parent
97c7723b17
commit
bc82078ec9
@ -270,6 +270,7 @@ 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());
|
||||||
|
|
||||||
publishingBox->setLayout(publishingLayout);
|
publishingBox->setLayout(publishingLayout);
|
||||||
}
|
}
|
||||||
@ -466,6 +467,8 @@ void PropertiesDialog::setComics(QList<ComicDB> comics)
|
|||||||
else
|
else
|
||||||
colorCheck->setCheckState(Qt::PartiallyChecked);
|
colorCheck->setCheckState(Qt::PartiallyChecked);
|
||||||
|
|
||||||
|
mangaCheck->setChecked(comic.info.manga.toBool());
|
||||||
|
|
||||||
if (!comic.info.ageRating.isNull())
|
if (!comic.info.ageRating.isNull())
|
||||||
ageRatingEdit->setText(comic.info.ageRating.toString());
|
ageRatingEdit->setText(comic.info.ageRating.toString());
|
||||||
|
|
||||||
@ -534,6 +537,8 @@ 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.ageRating.isNull() || itr->info.ageRating.toString() != ageRatingEdit->text())
|
if (itr->info.ageRating.isNull() || itr->info.ageRating.toString() != ageRatingEdit->text())
|
||||||
ageRatingEdit->clear();
|
ageRatingEdit->clear();
|
||||||
|
|
||||||
@ -699,6 +704,12 @@ void PropertiesDialog::save()
|
|||||||
itr->info.color = colorCheck->isChecked();
|
itr->info.color = colorCheck->isChecked();
|
||||||
edited = true;
|
edited = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mangaCheck->checkState() != Qt::PartiallyChecked) {
|
||||||
|
itr->info.manga = mangaCheck->isChecked();
|
||||||
|
edited = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (ageRatingEdit->isModified()) {
|
if (ageRatingEdit->isModified()) {
|
||||||
itr->info.ageRating = ageRatingEdit->text();
|
itr->info.ageRating = ageRatingEdit->text();
|
||||||
edited = true;
|
edited = true;
|
||||||
@ -778,6 +789,7 @@ 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();
|
||||||
|
@ -76,6 +76,7 @@ private:
|
|||||||
YACReaderFieldEdit *formatEdit;
|
YACReaderFieldEdit *formatEdit;
|
||||||
QCheckBox *colorCheck;
|
QCheckBox *colorCheck;
|
||||||
YACReaderFieldEdit *ageRatingEdit;
|
YACReaderFieldEdit *ageRatingEdit;
|
||||||
|
QCheckBox *mangaCheck;
|
||||||
|
|
||||||
YACReaderFieldPlainTextEdit *synopsis;
|
YACReaderFieldPlainTextEdit *synopsis;
|
||||||
YACReaderFieldPlainTextEdit *characters;
|
YACReaderFieldPlainTextEdit *characters;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user