Cute Chess  0.1
Public Slots | Public Member Functions | Protected Member Functions | List of all members
PgnGameEntryModel Class Reference

Supplies PGN game entry information to views. More...

#include <pgngameentrymodel.h>

Inheritance diagram for PgnGameEntryModel:
QAbstractItemModel

Public Slots

void setFilter (const PgnGameFilter &filter)
 

Public Member Functions

virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 
virtual QVariant data (const QModelIndex &index, int role) const
 
const PgnGameEntryentryAt (int row) const
 
int entryCount () const
 
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 
virtual QModelIndex parent (const QModelIndex &index) const
 
 PgnGameEntryModel (QObject *parent=nullptr)
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 
void setEntries (const QList< const PgnGameEntry * > &entries)
 
int sourceIndex (int row) const
 

Protected Member Functions

virtual bool canFetchMore (const QModelIndex &parent) const
 
virtual void fetchMore (const QModelIndex &parent)
 

Detailed Description

Supplies PGN game entry information to views.

Constructor & Destructor Documentation

PgnGameEntryModel::PgnGameEntryModel ( QObject parent = nullptr)

Constructs a PGN game entry model with the given parent.

Member Function Documentation

const PgnGameEntry * PgnGameEntryModel::entryAt ( int  row) const

Returns the PGN entry at row.

int PgnGameEntryModel::entryCount ( ) const

Returns the total number of PGN game entries matching the current filter.

Note
Unlike rowCount() this method also includes entries that are not yet fetched into the model.
void PgnGameEntryModel::setEntries ( const QList< const PgnGameEntry * > &  entries)

Associates a list of PGN game entries with this model.

void PgnGameEntryModel::setFilter ( const PgnGameFilter filter)
slot

Sets the filter for filtering the contents of the database.

int PgnGameEntryModel::sourceIndex ( int  row) const

Returns the index in the source data that corresponds to row in the model.


The documentation for this class was generated from the following files: