mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 08:33:54 -07:00
scaled pixmap cache. major speed improvement
This commit is contained in:
parent
1da5c63726
commit
04072b02d1
10 changed files with 57 additions and 45 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <QHash>
|
||||
#include <QPixmap>
|
||||
#include <QMap>
|
||||
#include <QDataStream>
|
||||
|
||||
class CardInfo {
|
||||
|
|
@ -14,6 +15,7 @@ private:
|
|||
QString powtough;
|
||||
QStringList text;
|
||||
QPixmap *pixmap;
|
||||
QMap<int, QPixmap *> scaledPixmapCache;
|
||||
public:
|
||||
CardInfo(const QString &_name = QString(),
|
||||
const QString &_manacost = QString(),
|
||||
|
|
@ -30,7 +32,8 @@ public:
|
|||
QStringList getText() const { return text; }
|
||||
QString getMainCardType() const;
|
||||
void addEdition(const QString &edition);
|
||||
QPixmap *getPixmap();
|
||||
QPixmap *loadPixmap();
|
||||
QPixmap *getPixmap(QSize size);
|
||||
void saveToStream(QDataStream &stream);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue