Reimplemented PictureLoader as a singleton

* Removed remaining picture handling from card database and cardinfo
 * removed the “noCard object” hack
This commit is contained in:
Fabio Bas 2015-08-22 17:22:08 +02:00
parent 8125358052
commit f6c7f3355f
20 changed files with 654 additions and 704 deletions

View file

@ -53,13 +53,23 @@ CardInfoText::CardInfoText(QWidget *parent)
void CardInfoText::setCard(CardInfo *card)
{
nameLabel2->setText(card->getName());
manacostLabel2->setText(card->getManaCost());
colorLabel2->setText(card->getColors().join(""));
cardtypeLabel2->setText(card->getCardType());
powtoughLabel2->setText(card->getPowTough());
loyaltyLabel2->setText(card->getLoyalty() > 0 ? QString::number(card->getLoyalty()) : QString());
textLabel->setText(card->getText());
if(card) {
nameLabel2->setText(card->getName());
manacostLabel2->setText(card->getManaCost());
colorLabel2->setText(card->getColors().join(""));
cardtypeLabel2->setText(card->getCardType());
powtoughLabel2->setText(card->getPowTough());
loyaltyLabel2->setText(card->getLoyalty() > 0 ? QString::number(card->getLoyalty()) : QString());
textLabel->setText(card->getText());
} else {
nameLabel2->setText("");
manacostLabel2->setText("");
colorLabel2->setText("");
cardtypeLabel2->setText("");
powtoughLabel2->setText("");
loyaltyLabel2->setText("");
textLabel->setText("");
}
}
void CardInfoText::retranslateUi()