mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 04:23:55 -07:00
Fix deckeditor jitter problem; fix #1143
This commit is contained in:
parent
853342463a
commit
d6ce1852a1
4 changed files with 50 additions and 47 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue