| 456 | } |
| 457 | |
| 458 | void PropertiesDialog::loadComic(ComicDB &comic) |
| 459 | { |
| 460 | customCover = QImage(); |
| 461 | |
| 462 | series->setText(comic.info.series.isNull() ? QString() : comic.info.series.toString()); |
| 463 | title->setText(comic.info.title.isNull() ? QString() : comic.info.title.toString()); |
| 464 | |
| 465 | if (!comic.info.comicVineID.isNull()) { |
| 466 | comicVineLink->setHidden(false); |
| 467 | comicVineLink->setText(QString(tr("Comic Vine link: <a style='color: #FFCB00; text-decoration:none; font-weight:bold;' href=\"http://www.comicvine.com/comic/4000-%1/\"> view </a>").arg(comic.info.comicVineID.toString()))); |
| 468 | } else |
| 469 | comicVineLink->setHidden(true); |
| 470 | |
| 471 | if (!comic.info.coverPage.isNull()) { |
| 472 | coverPageEdit->setText(comic.info.coverPage.toString()); |
| 473 | coverPageValidator.setRange(1, comic.info.numPages.toInt()); |
| 474 | coverPageEdit->setValidator(&coverPageValidator); |
| 475 | //---------- |
| 476 | int coverPage = comic.info.coverPage.toInt(); |
| 477 | coverPageNumberLabel->setText(QString::number(coverPage)); |
| 478 | coverPageNumberLabel->adjustSize(); |
| 479 | |
| 480 | showPreviousCoverPageButton->setEnabled(true); |
| 481 | showNextCoverPageButton->setEnabled(true); |
| 482 | |
| 483 | coverChanged = false; |
| 484 | updateCoverBoxForSingleComic(); |
| 485 | |
| 486 | if (!QFileInfo(basePath + comic.path).exists()) { |
| 487 | QMessageBox::warning(this, tr("Not found"), tr("Comic not found. You should update your library.")); |
| 488 | showPreviousCoverPageButton->setDisabled(true); |
| 489 | showNextCoverPageButton->setDisabled(true); |
| 490 | } |
| 491 | } else { |
| 492 | coverPageNumberLabel->setText("1"); |
| 493 | } |
| 494 | |
| 495 | numberEdit->setText(comic.info.number.isNull() ? QString() : comic.info.number.toString()); |
| 496 | countEdit->setText(comic.info.count.isNull() ? QString() : comic.info.count.toString()); |
| 497 | volumeEdit->setText(comic.info.volume.isNull() ? QString() : comic.info.volume.toString()); |
| 498 | storyArcEdit->setText(comic.info.storyArc.isNull() ? QString() : comic.info.storyArc.toString()); |
| 499 | arcNumberEdit->setText(comic.info.arcNumber.isNull() ? QString() : comic.info.arcNumber.toString()); |
| 500 | arcCountEdit->setText(comic.info.arcCount.isNull() ? QString() : comic.info.arcCount.toString()); |
| 501 | alternateSeriesEdit->setText(comic.info.alternateSeries.isNull() ? QString() : comic.info.alternateSeries.toString()); |
| 502 | alternateNumberEdit->setText(comic.info.alternateNumber.isNull() ? QString() : comic.info.alternateNumber.toString()); |
| 503 | alternateCountEdit->setText(comic.info.alternateCount.isNull() ? QString() : comic.info.alternateCount.toString()); |
| 504 | seriesGroupEdit->setText(comic.info.seriesGroup.isNull() ? QString() : comic.info.seriesGroup.toString()); |
| 505 | genereEdit->setText(comic.info.genere.isNull() ? QString() : comic.info.genere.toString()); |
| 506 | |
| 507 | writer->setPlainText(comic.info.writer.isNull() ? QString() : comic.info.writer.toString()); |
| 508 | penciller->setPlainText(comic.info.penciller.isNull() ? QString() : comic.info.penciller.toString()); |
| 509 | inker->setPlainText(comic.info.inker.isNull() ? QString() : comic.info.inker.toString()); |
| 510 | colorist->setPlainText(comic.info.colorist.isNull() ? QString() : comic.info.colorist.toString()); |
| 511 | letterer->setPlainText(comic.info.letterer.isNull() ? QString() : comic.info.letterer.toString()); |
| 512 | coverArtist->setPlainText(comic.info.coverArtist.isNull() ? QString() : comic.info.coverArtist.toString()); |
| 513 | editor->setPlainText(comic.info.editor.isNull() ? QString() : comic.info.editor.toString()); |
| 514 | imprint->setPlainText(comic.info.imprint.isNull() ? QString() : comic.info.imprint.toString()); |
| 515 |
nothing calls this directly
no test coverage detected