mirror of
https://github.com/YACReader/yacreader
synced 2025-07-26 08:55:05 -04:00
Implemented SelectComic
This commit is contained in:
@ -38,9 +38,10 @@ void VolumeComicsModel::load(const QString & json)
|
||||
resultsValue = it.value();
|
||||
QString issueNumber = resultsValue.property("issue_number").toString();
|
||||
QString name = resultsValue.property("name").toString();
|
||||
QString coverURL = resultsValue.property("image").property("medium_url").toString();
|
||||
QString id = resultsValue.property("id").toString();
|
||||
QStringList l;
|
||||
l << issueNumber << name << id;
|
||||
l << issueNumber << name << coverURL << id;
|
||||
//test = name.isEmpty() && year.isEmpty() && numIssues.isEmpty() && url.isEmpty();
|
||||
if(numResults > 0)
|
||||
_data.push_back(l);
|
||||
@ -151,6 +152,11 @@ QString VolumeComicsModel::getComicId(const QModelIndex &index) const
|
||||
return _data[index.row()][ID];
|
||||
}
|
||||
|
||||
QString VolumeComicsModel::getCoverURL(const QModelIndex &index) const
|
||||
{
|
||||
return _data[index.row()][COVER_URL];
|
||||
}
|
||||
|
||||
void VolumeComicsModel::addExtraRows(int numRows)
|
||||
{
|
||||
numExtraRows = numRows;
|
||||
|
@ -22,6 +22,7 @@ signals:
|
||||
|
||||
public slots:
|
||||
QString getComicId(const QModelIndex &index) const;
|
||||
QString getCoverURL(const QModelIndex &index) const;
|
||||
void addExtraRows(int numRows);
|
||||
|
||||
private:
|
||||
@ -31,6 +32,7 @@ private:
|
||||
enum Column {
|
||||
ISSUE = 0,
|
||||
TITLE,
|
||||
COVER_URL,
|
||||
ID
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user