deck editor...

This commit is contained in:
Max-Wilhelm Bruker 2009-05-24 01:41:25 +02:00
parent 3ae865178b
commit d9e51e58a3
7 changed files with 225 additions and 80 deletions

View file

@ -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());