Revert "Reimplemented PictureLoader as a singleton"

This commit is contained in:
Zach 2015-09-23 03:17:33 -04:00
parent 064c89ba5c
commit d5adec53a2
21 changed files with 705 additions and 657 deletions

View file

@ -6,7 +6,6 @@
#include "carditem.h"
#include "carddatabase.h"
#include "pictureloader.h"
#include "main.h"
CardInfoPicture::CardInfoPicture(QWidget *parent)
@ -22,8 +21,7 @@ void CardInfoPicture::setCard(CardInfo *card)
if (info)
disconnect(info, 0, this, 0);
info = card;
if(info)
connect(info, SIGNAL(pixmapUpdated()), this, SLOT(updatePixmap()));
connect(info, SIGNAL(pixmapUpdated()), this, SLOT(updatePixmap()));
updatePixmap();
}
@ -42,13 +40,13 @@ void CardInfoPicture::updatePixmap()
void CardInfoPicture::loadPixmap()
{
if(info)
PictureLoader::getPixmap(resizedPixmap, info, size());
info->getPixmap(size(), resizedPixmap);
else
resizedPixmap = QPixmap();
if (resizedPixmap.isNull())
PictureLoader::getPixmap(resizedPixmap, db->getCard(), size());
db->getCard()->getPixmap(size(), resizedPixmap);
}
void CardInfoPicture::paintEvent(QPaintEvent *)