mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 02:53:56 -07:00
Reworked to use a qtabwidget: better cross-os look
This commit is contained in:
parent
3af5804073
commit
fac44966fd
2 changed files with 36 additions and 33 deletions
|
|
@ -1,23 +1,24 @@
|
|||
#ifndef CARDFRAME_H
|
||||
#define CARDFRAME_H
|
||||
|
||||
#include <QFrame>
|
||||
#include <QTabWidget>
|
||||
|
||||
class AbstractCardItem;
|
||||
class CardInfo;
|
||||
class CardInfoPicture;
|
||||
class CardInfoText;
|
||||
class QTabBar;
|
||||
class QVBoxLayout;
|
||||
|
||||
class CardFrame : public QFrame {
|
||||
class CardFrame : public QTabWidget {
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
QTabBar * tabBar;
|
||||
CardInfo *info;
|
||||
CardInfoPicture *pic;
|
||||
CardInfoText *text;
|
||||
bool cardTextOnly;
|
||||
QWidget *tab1, *tab2, *tab3;
|
||||
QVBoxLayout *tab1Layout, *tab2Layout, *tab3Layout;
|
||||
|
||||
public:
|
||||
enum ViewMode { ImageOnlyView, TextOnlyView, ImageAndTextView };
|
||||
|
|
@ -25,7 +26,6 @@ public:
|
|||
CardFrame(int width, int height, const QString &cardName = QString(),
|
||||
QWidget *parent = 0);
|
||||
void retranslateUi();
|
||||
|
||||
public slots:
|
||||
void setCard(CardInfo *card);
|
||||
void setCard(const QString &cardName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue