Fix deckeditor jitter problem; fix #1143

This commit is contained in:
Fabio Bas 2015-06-18 23:13:12 +02:00
parent 853342463a
commit d6ce1852a1
4 changed files with 50 additions and 47 deletions

View file

@ -1,29 +1,25 @@
#ifndef CARDINFOPICTURE_H
#define CARDINFOPICTURE_H
#include <QLabel>
#include <QWidget>
class AbstractCardItem;
class CardInfo;
class CardInfoPicture : public QLabel {
class CardInfoPicture : public QWidget {
Q_OBJECT
signals:
void hasPictureChanged();
private:
CardInfo *info;
bool noPicture;
QPixmap resizedPixmap;
bool pixmapDirty;
public:
CardInfoPicture(int maximumWidth, QWidget *parent = 0);
bool hasPicture() const { return !noPicture; }
private:
void setNoPicture(bool status);
CardInfoPicture(int width, QWidget *parent = 0);
protected:
void resizeEvent(QResizeEvent *event);
void paintEvent(QPaintEvent *);
void loadPixmap();
public slots:
void setCard(CardInfo *card);
void updatePixmap();