* 1/3 Add .clang-format file and travis compilation check * 2/3 Run clang-format * 3/3 Fix compilation problems due to include reordering * 3bis/3 AfterControlStatement: false
43 lines
869 B
C++
43 lines
869 B
C++
#ifndef CARDFRAME_H
|
|
#define CARDFRAME_H
|
|
|
|
#include <QTabWidget>
|
|
|
|
class AbstractCardItem;
|
|
class CardInfo;
|
|
class CardInfoPicture;
|
|
class CardInfoText;
|
|
class QVBoxLayout;
|
|
class QSplitter;
|
|
|
|
class CardFrame : public QTabWidget
|
|
{
|
|
Q_OBJECT
|
|
private:
|
|
CardInfo *info;
|
|
CardInfoPicture *pic;
|
|
CardInfoText *text;
|
|
bool cardTextOnly;
|
|
QWidget *tab1, *tab2, *tab3;
|
|
QVBoxLayout *tab1Layout, *tab2Layout, *tab3Layout;
|
|
QSplitter *splitter;
|
|
|
|
public:
|
|
enum ViewMode
|
|
{
|
|
ImageOnlyView,
|
|
TextOnlyView,
|
|
ImageAndTextView
|
|
};
|
|
explicit CardFrame(const QString &cardName = QString(), QWidget *parent = nullptr);
|
|
void retranslateUi();
|
|
|
|
public slots:
|
|
void setCard(CardInfo *card);
|
|
void setCard(const QString &cardName);
|
|
void setCard(AbstractCardItem *card);
|
|
void clear();
|
|
void setViewMode(int mode);
|
|
};
|
|
|
|
#endif
|