refactor cardframe as a parent of a text card frame and a picture card frame

cardframe is now a stacked widget that prefers to show the card picture
only so that the screen can be more space efficient and the card pixel
map can be displayed as a larger size. however if the card pixel map
can not be loaded for some reason, the cardframe class will automatically
switch to the text version of the card.

a menu item was added under the database menu to allow for users to
prefer card text only.
This commit is contained in:
sylvanbasilisk 2014-01-29 00:19:34 +00:00
parent 5d223b5917
commit f77054f20d
9 changed files with 231 additions and 34 deletions

View file

@ -0,0 +1,31 @@
#ifndef CARDINFOTEXT_H
#define CARDINFOTEXT_H
#include <QFrame>
class QLabel;
class QTextEdit;
class CardInfo;
class CardInfoText : public QFrame {
Q_OBJECT
private:
QLabel *nameLabel1, *nameLabel2;
QLabel *manacostLabel1, *manacostLabel2;
QLabel *cardtypeLabel1, *cardtypeLabel2;
QLabel *powtoughLabel1, *powtoughLabel2;
QLabel *loyaltyLabel1, *loyaltyLabel2;
QTextEdit *textLabel;
CardInfo *info;
public:
CardInfoText(QWidget *parent = 0);
void retranslateUi();
public slots:
void setCard(CardInfo *card);
};
#endif