mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-02 11:33:55 -07:00
deck editor...
This commit is contained in:
parent
3ae865178b
commit
d9e51e58a3
7 changed files with 225 additions and 80 deletions
|
|
@ -1,13 +1,13 @@
|
|||
#ifndef DECKLISTMODEL_H
|
||||
#define DECKLISTMODEL_H
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QAbstractItemModel>
|
||||
#include <QList>
|
||||
#include "decklist.h"
|
||||
|
||||
class CardDatabase;
|
||||
|
||||
class DeckListModel : public QAbstractListModel {
|
||||
class DeckListModel : public QAbstractItemModel {
|
||||
Q_OBJECT
|
||||
private slots:
|
||||
void resetModel();
|
||||
|
|
@ -15,9 +15,12 @@ public:
|
|||
DeckListModel(CardDatabase *_db, QObject *parent = 0);
|
||||
~DeckListModel();
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
bool hasChildren(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;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
QModelIndex parent(const QModelIndex &index) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
||||
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue