mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 20:13:56 -07:00
Reworked deck editor
This commit is contained in:
parent
50b908c7c4
commit
3af5804073
13 changed files with 157 additions and 79 deletions
|
|
@ -1,36 +1,37 @@
|
|||
#ifndef CARDFRAME_H
|
||||
#define CARDFRAME_H
|
||||
|
||||
#include <QStackedWidget>
|
||||
#include <QFrame>
|
||||
|
||||
class AbstractCardItem;
|
||||
class CardInfo;
|
||||
class CardInfoPicture;
|
||||
class CardInfoText;
|
||||
class QTabBar;
|
||||
|
||||
class CardFrame : public QStackedWidget {
|
||||
class CardFrame : public QFrame {
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
QTabBar * tabBar;
|
||||
CardInfo *info;
|
||||
CardInfoPicture *pic;
|
||||
CardInfoText *text;
|
||||
bool cardTextOnly;
|
||||
|
||||
public:
|
||||
enum ViewMode { ImageOnlyView, TextOnlyView, ImageAndTextView };
|
||||
|
||||
CardFrame(int width, int height, const QString &cardName = QString(),
|
||||
QWidget *parent = 0);
|
||||
void setCardTextOnly(bool status) { cardTextOnly = status; hasPictureChanged(); }
|
||||
void retranslateUi();
|
||||
|
||||
public slots:
|
||||
void setCard(CardInfo *card);
|
||||
void setCard(const QString &cardName);
|
||||
void setCard(AbstractCardItem *card);
|
||||
void clear();
|
||||
|
||||
private slots:
|
||||
void hasPictureChanged();
|
||||
void toggleCardTextOnly() { setCardTextOnly(!cardTextOnly); }
|
||||
void setViewMode(int mode);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue