| 135 | SelectVolume::~SelectVolume() { } |
| 136 | |
| 137 | void SelectVolume::loadVolumeInfo(const QModelIndex &omi) |
| 138 | { |
| 139 | QString msgStyle = "<font color='#AAAAAA'>%1</font>"; |
| 140 | |
| 141 | QModelIndex mi = proxyModel->mapToSource(omi); |
| 142 | if (!mi.isValid()) { |
| 143 | cover->clear(); |
| 144 | detailLabel->setAltText(msgStyle.arg(tr("Nothing found, clear the filter if any."))); |
| 145 | return; |
| 146 | } |
| 147 | QString coverURL = model->getCoverURL(mi); |
| 148 | QString id = model->getVolumeId(mi); |
| 149 | |
| 150 | cover->setText(msgStyle.arg(tr("loading cover"))); |
| 151 | detailLabel->setAltText(msgStyle.arg(tr("loading description"))); |
| 152 | |
| 153 | auto comicVineClient = new ComicVineClient; |
| 154 | connect(comicVineClient, &ComicVineClient::seriesCover, this, &SelectVolume::setCover); |
| 155 | connect(comicVineClient, &ComicVineClient::finished, comicVineClient, &QObject::deleteLater); |
| 156 | comicVineClient->getSeriesCover(coverURL); |
| 157 | |
| 158 | auto comicVineClient2 = new ComicVineClient; |
| 159 | connect(comicVineClient2, &ComicVineClient::seriesDetail, this, &SelectVolume::setDescription); |
| 160 | connect(comicVineClient2, &ComicVineClient::finished, comicVineClient2, &QObject::deleteLater); |
| 161 | comicVineClient2->getSeriesDetail(id); |
| 162 | } |
| 163 | |
| 164 | void SelectVolume::setCover(const QByteArray &data) |
| 165 | { |
nothing calls this directly
no test coverage detected