doubleclick on cards in hand

This commit is contained in:
Max-Wilhelm Bruker 2009-07-10 23:06:20 +02:00
parent 9749423d62
commit 44c64322d3
8 changed files with 91 additions and 15 deletions

View file

@ -104,6 +104,18 @@ QString CardInfo::getMainCardType() const
return result;
}
int CardInfo::getTableRow() const
{
QString mainCardType = getMainCardType();
if (mainCardType == "Land")
return 0;
if ((mainCardType == "Sorcery") || (mainCardType == "Instant"))
return 2;
if (mainCardType == "Creature")
return 3;
return 1;
}
void CardInfo::addToSet(CardSet *set)
{
set->append(this);
@ -337,7 +349,6 @@ int CardDatabase::loadFromFile(const QString &fileName)
clear();
setHash.reserve(setCount);
qDebug(QString("setCount = %1").arg(setCount).toLatin1());
for (unsigned int i = 0; i < setCount; i++) {
CardSet *newSet = new CardSet;
newSet->loadFromStream(in);