mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-05 04:53:54 -07:00
started implementing a simple deck editor
This commit is contained in:
parent
46a43aade4
commit
e6d6162426
13 changed files with 333 additions and 27 deletions
23
cockatrice/src/carddatabasemodel.h
Normal file
23
cockatrice/src/carddatabasemodel.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef CARDDATABASEMODEL_H
|
||||
#define CARDDATABASEMODEL_H
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QList>
|
||||
#include "carddatabase.h"
|
||||
|
||||
class CardDatabaseModel : public QAbstractListModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CardDatabaseModel(CardDatabase *_db, QObject *parent = 0);
|
||||
~CardDatabaseModel();
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
|
||||
private:
|
||||
QList<CardInfo *> cardList;
|
||||
CardDatabase *db;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue