MCPcopy Create free account
hub / github.com/YACReader/yacreader / resetCover

Method resetCover

YACReaderLibrary/properties_dialog.cpp:1175–1193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1173}
1174
1175void PropertiesDialog::resetCover()
1176{
1177 if (sequentialEditing) {
1178 setCoverPage(1);
1179 coverChanged = true; // it could be that the cover is a custom cover, so we need to always update it
1180 } else {
1181 InitialComicInfoExtractor ie(basePath + comics.last().path, "", 1);
1182 ie.extract();
1183 auto cover = ie.getCover();
1184 cover = cover.scaledToHeight(575, Qt::SmoothTransformation);
1185
1186 auto coverImage = QPixmap::fromImage(blurred(cover.toImage(), QRect(0, 0, cover.width(), cover.height()), 15));
1187
1188 this->cover->setPixmap(coverImage);
1189
1190 customCover = QImage();
1191 coverChanged = true;
1192 }
1193}
1194
1195void PropertiesDialog::loadCustomCoverImage()
1196{

Callers

nothing calls this directly

Calls 4

blurredFunction · 0.85
extractMethod · 0.80
setPixmapMethod · 0.80
getCoverMethod · 0.45

Tested by

no test coverage detected