Deck editor
This commit is contained in:
parent
bb30012fbb
commit
3ae865178b
10 changed files with 175 additions and 43 deletions
|
@ -45,7 +45,7 @@ void CardInfoWidget::setCard(CardInfo *card)
|
||||||
QPixmap *pixmap = card->getPixmap();
|
QPixmap *pixmap = card->getPixmap();
|
||||||
if (aspectratio == 0)
|
if (aspectratio == 0)
|
||||||
aspectratio = (double) pixmap->height() / pixmap->width();
|
aspectratio = (double) pixmap->height() / pixmap->width();
|
||||||
double w = width() * 2.0 / 3.0;
|
double w = 180;
|
||||||
cardPicture->setPixmap(pixmap->scaled((int) w, (int) (w * aspectratio), Qt::KeepAspectRatio, Qt::SmoothTransformation));
|
cardPicture->setPixmap(pixmap->scaled((int) w, (int) (w * aspectratio), Qt::KeepAspectRatio, Qt::SmoothTransformation));
|
||||||
|
|
||||||
nameLabel2->setText(card->getName());
|
nameLabel2->setText(card->getName());
|
||||||
|
|
|
@ -7,10 +7,9 @@
|
||||||
#include "decklist.h"
|
#include "decklist.h"
|
||||||
#include "carddatabase.h"
|
#include "carddatabase.h"
|
||||||
|
|
||||||
DeckList::DeckList(CardDatabase *_db)
|
DeckList::DeckList(CardDatabase *_db, QObject *parent)
|
||||||
: db(_db)
|
: QObject(parent), db(_db)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DeckList::~DeckList()
|
DeckList::~DeckList()
|
||||||
|
@ -136,8 +135,10 @@ bool DeckList::loadFromFile(const QString &fileName, FileFormat fmt, QWidget *pa
|
||||||
case PlainTextFormat: result = loadFromFile_Plain(&file); break;
|
case PlainTextFormat: result = loadFromFile_Plain(&file); break;
|
||||||
case CockatriceFormat: result = loadFromFile_Native(&file); break;
|
case CockatriceFormat: result = loadFromFile_Native(&file); break;
|
||||||
}
|
}
|
||||||
if (result)
|
if (result) {
|
||||||
cacheCardPictures(parent);
|
cacheCardPictures(parent);
|
||||||
|
emit deckLoaded();
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,11 @@ private:
|
||||||
QString card;
|
QString card;
|
||||||
bool sideboard;
|
bool sideboard;
|
||||||
public:
|
public:
|
||||||
DecklistRow(int _number, const QString &_card, bool _sideboard) : number(_number), card(_card), sideboard(_sideboard) { }
|
DecklistRow(int _number = 1, const QString &_card = QString(), bool _sideboard = false) : number(_number), card(_card), sideboard(_sideboard) { }
|
||||||
int getNumber() const { return number; }
|
int getNumber() const { return number; }
|
||||||
|
void setNumber(int _number) { number = _number; }
|
||||||
QString getCard() const { return card; }
|
QString getCard() const { return card; }
|
||||||
|
void setCard(const QString &_card) { card = _card; }
|
||||||
bool isSideboard() const { return sideboard; }
|
bool isSideboard() const { return sideboard; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -30,11 +32,13 @@ private:
|
||||||
QString name, comments;
|
QString name, comments;
|
||||||
QString lastFileName;
|
QString lastFileName;
|
||||||
FileFormat lastFileFormat;
|
FileFormat lastFileFormat;
|
||||||
|
signals:
|
||||||
|
void deckLoaded();
|
||||||
public slots:
|
public slots:
|
||||||
void setName(const QString &_name) { name = _name; }
|
void setName(const QString &_name) { name = _name; }
|
||||||
void setComments(const QString &_comments) { comments = _comments; }
|
void setComments(const QString &_comments) { comments = _comments; }
|
||||||
public:
|
public:
|
||||||
DeckList(CardDatabase *_db);
|
DeckList(CardDatabase *_db, QObject *parent = 0);
|
||||||
~DeckList();
|
~DeckList();
|
||||||
QString getName() const { return name; }
|
QString getName() const { return name; }
|
||||||
QString getComments() const { return comments; }
|
QString getComments() const { return comments; }
|
||||||
|
|
|
@ -6,34 +6,39 @@
|
||||||
DeckListModel::DeckListModel(CardDatabase *_db, QObject *parent)
|
DeckListModel::DeckListModel(CardDatabase *_db, QObject *parent)
|
||||||
: QAbstractListModel(parent), db(_db)
|
: QAbstractListModel(parent), db(_db)
|
||||||
{
|
{
|
||||||
deckList = new DeckList(db);
|
deckList = new DeckList(db, this);
|
||||||
|
connect(deckList, SIGNAL(deckLoaded()), this, SLOT(resetModel()));
|
||||||
}
|
}
|
||||||
|
|
||||||
DeckListModel::~DeckListModel()
|
DeckListModel::~DeckListModel()
|
||||||
{
|
{
|
||||||
delete deckList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int DeckListModel::rowCount(const QModelIndex &parent) const
|
void DeckListModel::resetModel()
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
int DeckListModel::rowCount(const QModelIndex &/*parent*/) const
|
||||||
|
{
|
||||||
|
// qDebug(QString("rowCount = %1").arg(deckList->size()).toLatin1());
|
||||||
return deckList->size();
|
return deckList->size();
|
||||||
}
|
}
|
||||||
|
|
||||||
int DeckListModel::columnCount(const QModelIndex &parent) const
|
int DeckListModel::columnCount(const QModelIndex &/*parent*/) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant DeckListModel::data(const QModelIndex &index, int role) const
|
QVariant DeckListModel::data(const QModelIndex &index, int role) const
|
||||||
{
|
{
|
||||||
|
// qDebug(QString("data() called: index.row = %1, column = %2, role = %3").arg(index.row()).arg(index.column()).arg(role).toLatin1());
|
||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return QVariant();
|
return QVariant();
|
||||||
if ((index.row() >= deckList->size()) || (index.column() >= 2))
|
if ((index.row() >= deckList->size()) || (index.column() >= 2))
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
if (role != Qt::DisplayRole)
|
if ((role != Qt::DisplayRole) && (role != Qt::EditRole))
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
DecklistRow *r = deckList->at(index.row());
|
DecklistRow *r = deckList->at(index.row());
|
||||||
|
@ -46,6 +51,7 @@ QVariant DeckListModel::data(const QModelIndex &index, int role) const
|
||||||
|
|
||||||
QVariant DeckListModel::headerData(int section, Qt::Orientation orientation, int role) const
|
QVariant DeckListModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||||
{
|
{
|
||||||
|
// qDebug(QString("headerData() called: section = %1, orientation = %2, role = %3").arg(section).arg(orientation).arg(role).toLatin1());
|
||||||
if (role != Qt::DisplayRole)
|
if (role != Qt::DisplayRole)
|
||||||
return QVariant();
|
return QVariant();
|
||||||
if (orientation != Qt::Horizontal)
|
if (orientation != Qt::Horizontal)
|
||||||
|
@ -57,15 +63,52 @@ QVariant DeckListModel::headerData(int section, Qt::Orientation orientation, int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Qt::ItemFlags DeckListModel::flags(const QModelIndex &index) const
|
||||||
|
{
|
||||||
|
if (index.column() == 0)
|
||||||
|
return QAbstractItemModel::flags(index) | Qt::ItemIsEditable;
|
||||||
|
else
|
||||||
|
return QAbstractItemModel::flags(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DeckListModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||||
|
{
|
||||||
|
if (!index.isValid() || role != Qt::EditRole)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
switch (index.column()) {
|
||||||
|
case 0: deckList->at(index.row())->setNumber(value.toInt()); break;
|
||||||
|
case 1: deckList->at(index.row())->setCard(value.toString()); break;
|
||||||
|
default: return false;
|
||||||
|
}
|
||||||
|
emit dataChanged(index, index);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DeckListModel::removeRows(int row, int count, const QModelIndex &parent)
|
||||||
|
{
|
||||||
|
beginRemoveRows(parent, row, row + count - 1);
|
||||||
|
|
||||||
|
for (int i = 0; i < count; i++)
|
||||||
|
deckList->removeAt(row);
|
||||||
|
|
||||||
|
endRemoveRows();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DeckListModel::insertRows(int row, int count, const QModelIndex &parent)
|
||||||
|
{
|
||||||
|
beginInsertRows(parent, row, row + count - 1);
|
||||||
|
|
||||||
|
for (int i = 0; i < count; i++)
|
||||||
|
deckList->insert(row, new DecklistRow);
|
||||||
|
|
||||||
|
endInsertRows();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void DeckListModel::cleanList()
|
void DeckListModel::cleanList()
|
||||||
{
|
{
|
||||||
deckList->cleanList();
|
deckList->cleanList();
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
DecklistRow *DeckListModel::getRow(int row) const
|
|
||||||
{
|
|
||||||
if (row >= deckList->size())
|
|
||||||
return 0;
|
|
||||||
return deckList->at(row);
|
|
||||||
}
|
|
||||||
|
|
|
@ -9,6 +9,8 @@ class CardDatabase;
|
||||||
|
|
||||||
class DeckListModel : public QAbstractListModel {
|
class DeckListModel : public QAbstractListModel {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
private slots:
|
||||||
|
void resetModel();
|
||||||
public:
|
public:
|
||||||
DeckListModel(CardDatabase *_db, QObject *parent = 0);
|
DeckListModel(CardDatabase *_db, QObject *parent = 0);
|
||||||
~DeckListModel();
|
~DeckListModel();
|
||||||
|
@ -16,7 +18,10 @@ public:
|
||||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||||
QVariant data(const QModelIndex &index, int role) const;
|
QVariant data(const QModelIndex &index, int role) const;
|
||||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||||
DecklistRow *getRow(int row) 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());
|
||||||
|
bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex());
|
||||||
void cleanList();
|
void cleanList();
|
||||||
DeckList *getDeckList() const { return deckList; }
|
DeckList *getDeckList() const { return deckList; }
|
||||||
bool loadFromFile(const QString &fileName, DeckList::FileFormat fmt);
|
bool loadFromFile(const QString &fileName, DeckList::FileFormat fmt);
|
||||||
|
|
|
@ -45,8 +45,9 @@ void DlgStartGame::actLoad()
|
||||||
QStringList DlgStartGame::getDeckList() const
|
QStringList DlgStartGame::getDeckList() const
|
||||||
{
|
{
|
||||||
QStringList result;
|
QStringList result;
|
||||||
for (int i = 0; i < tableModel->rowCount(); i++) {
|
DeckList *deckList = tableModel->getDeckList();
|
||||||
DecklistRow *temp = tableModel->getRow(i);
|
for (int i = 0; i < deckList->size(); i++) {
|
||||||
|
DecklistRow *temp = deckList->at(i);
|
||||||
for (int j = 0; j < temp->getNumber(); j++)
|
for (int j = 0; j < temp->getNumber(); j++)
|
||||||
result << QString("%1%2").arg(temp->isSideboard() ? "SB:" : "").arg(temp->getCard());
|
result << QString("%1%2").arg(temp->isSideboard() ? "SB:" : "").arg(temp->getCard());
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ void myMessageOutput(QtMsgType type, const char *msg)
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
qInstallMsgHandler(myMessageOutput);
|
// qInstallMsgHandler(myMessageOutput);
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
app.addLibraryPath("plugins");
|
app.addLibraryPath("plugins");
|
||||||
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
||||||
|
|
|
@ -18,9 +18,18 @@ WndDeckEditor::WndDeckEditor(CardDatabase *_db, QWidget *parent)
|
||||||
leftFrame->addWidget(databaseView);
|
leftFrame->addWidget(databaseView);
|
||||||
|
|
||||||
cardInfo = new CardInfoWidget(db);
|
cardInfo = new CardInfoWidget(db);
|
||||||
|
cardInfo->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
|
||||||
|
|
||||||
|
QToolBar *verticalToolBar = new QToolBar;
|
||||||
|
verticalToolBar->setOrientation(Qt::Vertical);
|
||||||
|
QHBoxLayout *verticalToolBarLayout = new QHBoxLayout;
|
||||||
|
verticalToolBarLayout->addStretch();
|
||||||
|
verticalToolBarLayout->addWidget(verticalToolBar);
|
||||||
|
verticalToolBarLayout->addStretch();
|
||||||
|
|
||||||
QVBoxLayout *middleFrame = new QVBoxLayout;
|
QVBoxLayout *middleFrame = new QVBoxLayout;
|
||||||
middleFrame->addWidget(cardInfo);
|
middleFrame->addWidget(cardInfo);
|
||||||
|
middleFrame->addLayout(verticalToolBarLayout);
|
||||||
middleFrame->addStretch();
|
middleFrame->addStretch();
|
||||||
|
|
||||||
deckModel = new DeckListModel(db, this);
|
deckModel = new DeckListModel(db, this);
|
||||||
|
@ -47,9 +56,9 @@ WndDeckEditor::WndDeckEditor(CardDatabase *_db, QWidget *parent)
|
||||||
rightFrame->addWidget(deckView);
|
rightFrame->addWidget(deckView);
|
||||||
|
|
||||||
QHBoxLayout *mainLayout = new QHBoxLayout;
|
QHBoxLayout *mainLayout = new QHBoxLayout;
|
||||||
mainLayout->addLayout(leftFrame);
|
mainLayout->addLayout(leftFrame, 10);
|
||||||
mainLayout->addLayout(middleFrame);
|
mainLayout->addLayout(middleFrame);
|
||||||
mainLayout->addLayout(rightFrame);
|
mainLayout->addLayout(rightFrame, 10);
|
||||||
|
|
||||||
QWidget *centralWidget = new QWidget;
|
QWidget *centralWidget = new QWidget;
|
||||||
centralWidget->setLayout(mainLayout);
|
centralWidget->setLayout(mainLayout);
|
||||||
|
@ -73,6 +82,20 @@ WndDeckEditor::WndDeckEditor(CardDatabase *_db, QWidget *parent)
|
||||||
deckMenu->addAction(aLoadDeck);
|
deckMenu->addAction(aLoadDeck);
|
||||||
deckMenu->addAction(aSaveDeck);
|
deckMenu->addAction(aSaveDeck);
|
||||||
deckMenu->addAction(aSaveDeckAs);
|
deckMenu->addAction(aSaveDeckAs);
|
||||||
|
|
||||||
|
aAddCard = new QAction(tr("&Add card"), this);
|
||||||
|
connect(aAddCard, SIGNAL(triggered()), this, SLOT(actAddCard()));
|
||||||
|
aRemoveCard = new QAction(tr("&Remove card"), this);
|
||||||
|
connect(aRemoveCard, SIGNAL(triggered()), this, SLOT(actRemoveCard()));
|
||||||
|
aIncrement = new QAction(tr("&Increment number"), this);
|
||||||
|
connect(aIncrement, SIGNAL(triggered()), this, SLOT(actIncrement()));
|
||||||
|
aDecrement = new QAction(tr("&Decrement number"), this);
|
||||||
|
connect(aDecrement, SIGNAL(triggered()), this, SLOT(actDecrement()));
|
||||||
|
|
||||||
|
verticalToolBar->addAction(aAddCard);
|
||||||
|
verticalToolBar->addAction(aRemoveCard);
|
||||||
|
verticalToolBar->addAction(aIncrement);
|
||||||
|
verticalToolBar->addAction(aDecrement);
|
||||||
}
|
}
|
||||||
|
|
||||||
WndDeckEditor::~WndDeckEditor()
|
WndDeckEditor::~WndDeckEditor()
|
||||||
|
@ -80,15 +103,13 @@ WndDeckEditor::~WndDeckEditor()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WndDeckEditor::updateCardInfoLeft(const QModelIndex ¤t, const QModelIndex &previous)
|
void WndDeckEditor::updateCardInfoLeft(const QModelIndex ¤t, const QModelIndex &/*previous*/)
|
||||||
{
|
{
|
||||||
Q_UNUSED(previous);
|
|
||||||
cardInfo->setCard(current.sibling(current.row(), 0).data().toString());
|
cardInfo->setCard(current.sibling(current.row(), 0).data().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WndDeckEditor::updateCardInfoRight(const QModelIndex ¤t, const QModelIndex &previous)
|
void WndDeckEditor::updateCardInfoRight(const QModelIndex ¤t, const QModelIndex &/*previous*/)
|
||||||
{
|
{
|
||||||
Q_UNUSED(previous);
|
|
||||||
cardInfo->setCard(current.sibling(current.row(), 1).data().toString());
|
cardInfo->setCard(current.sibling(current.row(), 1).data().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +125,7 @@ void WndDeckEditor::actLoadDeck()
|
||||||
if (l->loadDialog(this)) {
|
if (l->loadDialog(this)) {
|
||||||
lastFileName = l->getLastFileName();
|
lastFileName = l->getLastFileName();
|
||||||
lastFileFormat = l->getLastFileFormat();
|
lastFileFormat = l->getLastFileFormat();
|
||||||
deckView->reset();
|
// deckView->reset();
|
||||||
nameEdit->setText(l->getName());
|
nameEdit->setText(l->getName());
|
||||||
commentsEdit->setText(l->getComments());
|
commentsEdit->setText(l->getComments());
|
||||||
}
|
}
|
||||||
|
@ -127,3 +148,52 @@ void WndDeckEditor::actSaveDeckAs()
|
||||||
lastFileFormat = l->getLastFileFormat();
|
lastFileFormat = l->getLastFileFormat();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WndDeckEditor::actAddCard()
|
||||||
|
{
|
||||||
|
const QModelIndex currentIndex = databaseView->selectionModel()->currentIndex();
|
||||||
|
if (!currentIndex.isValid())
|
||||||
|
return;
|
||||||
|
const QString cardName = databaseModel->index(currentIndex.row(), 0).data().toString();
|
||||||
|
QModelIndexList matches = deckModel->match(deckModel->index(0, 1), Qt::EditRole, cardName);
|
||||||
|
if (matches.isEmpty()) {
|
||||||
|
int row = deckModel->rowCount();
|
||||||
|
deckModel->insertRow(row);
|
||||||
|
deckModel->setData(deckModel->index(row, 1), cardName, Qt::EditRole);
|
||||||
|
} else {
|
||||||
|
const QModelIndex numberIndex = deckModel->index(matches[0].row(), 0);
|
||||||
|
const int count = deckModel->data(numberIndex, Qt::EditRole).toInt();
|
||||||
|
deckModel->setData(numberIndex, count + 1, Qt::EditRole);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void WndDeckEditor::actRemoveCard()
|
||||||
|
{
|
||||||
|
const QModelIndex currentIndex = deckView->selectionModel()->currentIndex();
|
||||||
|
if (!currentIndex.isValid())
|
||||||
|
return;
|
||||||
|
deckModel->removeRow(currentIndex.row());
|
||||||
|
}
|
||||||
|
|
||||||
|
void WndDeckEditor::actIncrement()
|
||||||
|
{
|
||||||
|
const QModelIndex currentIndex = deckView->selectionModel()->currentIndex();
|
||||||
|
if (!currentIndex.isValid())
|
||||||
|
return;
|
||||||
|
const QModelIndex numberIndex = deckModel->index(currentIndex.row(), 0);
|
||||||
|
const int count = deckModel->data(numberIndex, Qt::EditRole).toInt();
|
||||||
|
deckModel->setData(numberIndex, count + 1, Qt::EditRole);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WndDeckEditor::actDecrement()
|
||||||
|
{
|
||||||
|
const QModelIndex currentIndex = deckView->selectionModel()->currentIndex();
|
||||||
|
if (!currentIndex.isValid())
|
||||||
|
return;
|
||||||
|
const QModelIndex numberIndex = deckModel->index(currentIndex.row(), 0);
|
||||||
|
const int count = deckModel->data(numberIndex, Qt::EditRole).toInt();
|
||||||
|
if (count == 1)
|
||||||
|
deckModel->removeRow(currentIndex.row());
|
||||||
|
else
|
||||||
|
deckModel->setData(numberIndex, count - 1, Qt::EditRole);
|
||||||
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ class CardDatabase;
|
||||||
class CardDatabaseModel;
|
class CardDatabaseModel;
|
||||||
class DeckListModel;
|
class DeckListModel;
|
||||||
class QTreeView;
|
class QTreeView;
|
||||||
|
class QTableView;
|
||||||
class CardInfoWidget;
|
class CardInfoWidget;
|
||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
|
|
||||||
|
@ -22,6 +23,11 @@ private slots:
|
||||||
void actLoadDeck();
|
void actLoadDeck();
|
||||||
void actSaveDeck();
|
void actSaveDeck();
|
||||||
void actSaveDeckAs();
|
void actSaveDeckAs();
|
||||||
|
|
||||||
|
void actAddCard();
|
||||||
|
void actRemoveCard();
|
||||||
|
void actIncrement();
|
||||||
|
void actDecrement();
|
||||||
private:
|
private:
|
||||||
QString lastFileName;
|
QString lastFileName;
|
||||||
DeckList::FileFormat lastFileFormat;
|
DeckList::FileFormat lastFileFormat;
|
||||||
|
@ -29,12 +35,14 @@ private:
|
||||||
|
|
||||||
CardDatabaseModel *databaseModel;
|
CardDatabaseModel *databaseModel;
|
||||||
DeckListModel *deckModel;
|
DeckListModel *deckModel;
|
||||||
QTreeView *databaseView, *deckView;
|
QTreeView *databaseView;
|
||||||
|
QTreeView *deckView;
|
||||||
CardInfoWidget *cardInfo;
|
CardInfoWidget *cardInfo;
|
||||||
QLineEdit *nameEdit, *commentsEdit;
|
QLineEdit *nameEdit, *commentsEdit;
|
||||||
|
|
||||||
QMenu *deckMenu;
|
QMenu *deckMenu;
|
||||||
QAction *aNewDeck, *aLoadDeck, *aSaveDeck, *aSaveDeckAs;
|
QAction *aNewDeck, *aLoadDeck, *aSaveDeck, *aSaveDeckAs;
|
||||||
|
QAction *aAddCard, *aRemoveCard, *aIncrement, *aDecrement;
|
||||||
public:
|
public:
|
||||||
WndDeckEditor(CardDatabase *_db, QWidget *parent = 0);
|
WndDeckEditor(CardDatabase *_db, QWidget *parent = 0);
|
||||||
~WndDeckEditor();
|
~WndDeckEditor();
|
||||||
|
|
Loading…
Reference in a new issue