Cockatrice/cockatrice/src/interface/widgets/cards/card_info_text_widget.h

44 lines
998 B
C++

/**
* @file card_info_text_widget.h
* @ingroup CardWidgets
*/
//! \todo Document this file.
#ifndef CARDINFOTEXT_H
#define CARDINFOTEXT_H
#include "libcockatrice/card/printing/exact_card.h"
#include <QFrame>
#include <QString>
#include <qtmetamacros.h>
class QLabel;
class QScrollArea;
class QTextEdit;
class QWidget;
class CardInfoTextWidget : public QFrame
{
Q_OBJECT
private:
QLabel *propsLabel;
QScrollArea *propsScroll;
QTextEdit *textLabel;
ExactCard currentCard; ///< Last card set, re-rendered when the card language changes.
bool showAllTags = false; ///< Whether the potentially long tag list is fully expanded.
void setTexts(const QString &propsText, const QString &textText);
public:
explicit CardInfoTextWidget(QWidget *parent = nullptr);
void retranslateUi();
void setInvalidCardName(const QString &cardName);
signals:
void linkActivated(const QString &link);
public slots:
void setCard(const ExactCard &card);
};
#endif