mirror of
				https://github.com/YACReader/yacreader
				synced 2025-11-04 09:15:01 -05:00 
			
		
		
		
	added yacreader flow optimization, flow animation stops if everything is done
This commit is contained in:
		
							
								
								
									
										41
									
								
								YACReaderLibrary/comic_vine/model/volume_comics_model.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								YACReaderLibrary/comic_vine/model/volume_comics_model.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,41 @@
 | 
			
		||||
#ifndef VOLUME_COMICS_MODEL_H
 | 
			
		||||
#define VOLUME_COMICS_MODEL_H
 | 
			
		||||
 | 
			
		||||
#include "json_model.h"
 | 
			
		||||
 | 
			
		||||
class VolumeComicsModel : public JSONModel
 | 
			
		||||
{
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
public:
 | 
			
		||||
	explicit VolumeComicsModel(QObject *parent = 0);
 | 
			
		||||
	void load(const QString & json);
 | 
			
		||||
 | 
			
		||||
	QModelIndex parent(const QModelIndex &index) const;
 | 
			
		||||
	int rowCount(const QModelIndex &parent = QModelIndex()) const;
 | 
			
		||||
	int columnCount(const QModelIndex &parent) const;
 | 
			
		||||
	QVariant data(const QModelIndex &index, int role) const;
 | 
			
		||||
	Qt::ItemFlags flags(const QModelIndex &index) const;
 | 
			
		||||
	QVariant headerData(int section, Qt::Orientation orientation,
 | 
			
		||||
						int role = Qt::DisplayRole) const;
 | 
			
		||||
	QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
 | 
			
		||||
signals:
 | 
			
		||||
 | 
			
		||||
public slots:
 | 
			
		||||
	QString getComicId(const QModelIndex &index) const;
 | 
			
		||||
	QString getComicId(int row) const;
 | 
			
		||||
	QString getCoverURL(const QModelIndex &index) const;
 | 
			
		||||
	void addExtraRows(int numRows);
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	int numExtraRows;
 | 
			
		||||
	QList <QList <QString> > _data;
 | 
			
		||||
 | 
			
		||||
	enum Column {
 | 
			
		||||
		ISSUE = 0,
 | 
			
		||||
		TITLE,
 | 
			
		||||
		COVER_URL,
 | 
			
		||||
		ID
 | 
			
		||||
	};
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // VOLUME_COMICS_MODEL_H
 | 
			
		||||
		Reference in New Issue
	
	Block a user