bunch of stuff. very basic drag/drop now working
This commit is contained in:
42
tierrowtitlecard.cpp
Normal file
42
tierrowtitlecard.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
#include "tierrowtitlecard.hpp"
|
||||
#include "fullsizelayout.hpp"
|
||||
#include "utils.hpp"
|
||||
|
||||
#include <QFrame>
|
||||
|
||||
TierRowTitleCard::TierRowTitleCard(IdType id, QWidget *parent)
|
||||
: QFrame{parent}
|
||||
{
|
||||
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 static_cast<uint32_t>(idLabel->text().toUInt());
|
||||
}
|
||||
Reference in New Issue
Block a user