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

Method loadComicInfo

YACReaderLibrary/comic_vine/select_comic.cpp:100–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98SelectComic::~SelectComic() { }
99
100void SelectComic::loadComicInfo(const QModelIndex &mi)
101{
102 QString coverURL = model->getCoverURL(mi);
103 QString id = model->getComicId(mi);
104
105 QString loadingStyle = "<font color='#AAAAAA'>%1</font>";
106 cover->setText(loadingStyle.arg(tr("loading cover")));
107 detailLabel->setAltText(loadingStyle.arg(tr("loading description")));
108
109 auto comicVineClient = new ComicVineClient;
110 connect(comicVineClient, &ComicVineClient::comicCover, this, &SelectComic::setCover);
111 connect(comicVineClient, &ComicVineClient::finished, comicVineClient, &QObject::deleteLater);
112 comicVineClient->getComicCover(coverURL);
113
114 auto comicVineClient2 = new ComicVineClient;
115 connect(comicVineClient2, &ComicVineClient::comicDetail, this, &SelectComic::setDescription);
116 connect(comicVineClient2, &ComicVineClient::finished, comicVineClient2, &QObject::deleteLater);
117 comicVineClient2->getComicDetailAsync(id);
118}
119
120void SelectComic::setCover(const QByteArray &data)
121{

Callers

nothing calls this directly

Calls 6

setAltTextMethod · 0.80
getComicCoverMethod · 0.80
getComicDetailAsyncMethod · 0.80
getCoverURLMethod · 0.45
getComicIdMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected