mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
volume ID added to VolumesModel
This commit is contained in:
parent
e924e74c07
commit
0d63bce2b5
@ -38,8 +38,9 @@ void VolumesModel::load(const QString &json)
|
||||
QString publisher = resultsValue.property("publisher").property("name").toString();
|
||||
QString url = resultsValue.property("image").property("medium_url").toString();
|
||||
QString deck = resultsValue.property("deck").toString();
|
||||
QString id = resultsValue.property("id").toString();
|
||||
QStringList & l = *(new QStringList);
|
||||
l << name << year << numIssues << publisher << url << deck;
|
||||
l << name << year << numIssues << publisher << url << deck << id;
|
||||
test = name.isEmpty() && year.isEmpty() && numIssues.isEmpty() && url.isEmpty();
|
||||
if(numResults>0 && !test)
|
||||
_data.push_back(&l);
|
||||
|
@ -36,7 +36,8 @@ public:
|
||||
ISSUES,
|
||||
PUBLISHER,
|
||||
COVER_URL,
|
||||
DECK
|
||||
DECK,
|
||||
ID
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -137,6 +137,7 @@ void SelectVolume::loadVolumeInfo(const QModelIndex & mi)
|
||||
QStringList * data = static_cast<QStringList *>(mi.internalPointer());
|
||||
QString coverURL = data->at(VolumesModel::COVER_URL);
|
||||
QString deck = data->at(VolumesModel::DECK);
|
||||
QString id = data->at(VolumesModel::ID);
|
||||
|
||||
//cover->setText(coverURL);
|
||||
detailLabel->setText(deck);
|
||||
@ -146,6 +147,7 @@ void SelectVolume::loadVolumeInfo(const QModelIndex & mi)
|
||||
connect(search,SIGNAL(timeout()),this,SLOT(queryTimeOut())); //TODO
|
||||
connect(search,SIGNAL(finished()),search,SLOT(deleteLater()));
|
||||
search->get();
|
||||
|
||||
}
|
||||
|
||||
void SelectVolume::setCover(const QByteArray & data)
|
||||
@ -162,3 +164,9 @@ void SelectVolume::setCover(const QByteArray & data)
|
||||
|
||||
cover->update();
|
||||
}
|
||||
|
||||
void SelectVolume::setDescription(const QString &description)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ public:
|
||||
public slots:
|
||||
void loadVolumeInfo(const QModelIndex & mi);
|
||||
void setCover(const QByteArray &);
|
||||
void setDescription(const QString & description);
|
||||
private:
|
||||
QLabel * cover;
|
||||
QLabel * detailLabel;
|
||||
|
Loading…
x
Reference in New Issue
Block a user