mirror of
https://github.com/YACReader/yacreader
synced 2025-07-26 17:04:45 -04:00
first version saving some info from comic vine
This commit is contained in:
@ -86,6 +86,11 @@ QModelIndex LocalComicListModel::index(int row, int column, const QModelIndex &p
|
||||
return createIndex(row, column);
|
||||
}
|
||||
|
||||
QList<ComicDB> LocalComicListModel::getData()
|
||||
{
|
||||
return _data;
|
||||
}
|
||||
|
||||
void LocalComicListModel::moveSelectionUp(const QList<QModelIndex> &selectedIndexes)
|
||||
{
|
||||
QModelIndex mi = selectedIndexes.first();
|
||||
|
@ -22,7 +22,7 @@ public:
|
||||
QVariant headerData(int section, Qt::Orientation orientation,
|
||||
int role = Qt::DisplayRole) const;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
|
||||
QList<ComicDB> getData();
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
@ -149,7 +149,17 @@ QModelIndex VolumeComicsModel::index(int row, int column, const QModelIndex &par
|
||||
|
||||
QString VolumeComicsModel::getComicId(const QModelIndex &index) const
|
||||
{
|
||||
return _data[index.row()][ID];
|
||||
int row = index.row();
|
||||
if(row >= _data.count())
|
||||
return "";
|
||||
return _data[row][ID];
|
||||
}
|
||||
|
||||
QString VolumeComicsModel::getComicId(int row) const
|
||||
{
|
||||
if(row >= _data.count())
|
||||
return "";
|
||||
return _data[row][ID];
|
||||
}
|
||||
|
||||
QString VolumeComicsModel::getCoverURL(const QModelIndex &index) const
|
||||
|
@ -22,6 +22,7 @@ signals:
|
||||
|
||||
public slots:
|
||||
QString getComicId(const QModelIndex &index) const;
|
||||
QString getComicId(int row) const;
|
||||
QString getCoverURL(const QModelIndex &index) const;
|
||||
void addExtraRows(int numRows);
|
||||
|
||||
|
Reference in New Issue
Block a user