43 lines
835 B
C++
43 lines
835 B
C++
#include "tierrowtitlecard.hpp"
|
|
#include "fullsizelayout.hpp"
|
|
#include "utils.hpp"
|
|
|
|
#include <QFrame>
|
|
|
|
TierRowTitleCard::TierRowTitleCard(IdType id, QWidget *parent)
|
|
: QFrame{parent}, _id(id)
|
|
{
|
|
this->setFrameStyle(QFrame::Box | QFrame::Plain);
|
|
auto layout = new FullSizeLayout();
|
|
titleLabel = new QLabel();
|
|
idLabel = new QLabel();
|
|
layout->addWidget(titleLabel);
|
|
layout->addWidget(idLabel);
|
|
setLayout(layout);
|
|
}
|
|
QString TierRowTitleCard::text() const
|
|
{
|
|
return titleLabel->text();
|
|
}
|
|
|
|
QColor TierRowTitleCard::color() const
|
|
{
|
|
return _color;
|
|
}
|
|
|
|
void TierRowTitleCard::setText(QString& str)
|
|
{
|
|
titleLabel->setText(str);
|
|
}
|
|
|
|
void TierRowTitleCard::setColor(QColor color)
|
|
{
|
|
_color = color;
|
|
setStyleSheet(makeBgColorString(color));
|
|
}
|
|
|
|
uint32_t TierRowTitleCard::id() const
|
|
{
|
|
return _id;
|
|
}
|